You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.markdown
+7-2Lines changed: 7 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -4,24 +4,28 @@ All notable changes to this project will be documented in this file.
4
4
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project now adheres to [Semantic Versioning](https://semver.org/).
6
6
7
-
## 3.3.0 - Future release
7
+
## 3.3.0 - 2025-04-11
8
8
9
9
### Fixed
10
10
11
11
* Fixed some command-line options not having an effect in the command-line tool ([#231](https://github.com/cardillan/mindcode/issues/231)).
12
12
* Fixed wrong handling or hoisted set instruction setting up return address in subsequent loop unrolling ([#234](https://github.com/cardillan/mindcode/issues/234)).
13
13
* Fixed optimizations removing the `spawn` instruction when the output value was not used ([#236](https://github.com/cardillan/mindcode/issues/236)).
14
14
* Fixed Jump Optimization not performing the optimization in unrolled loops.
15
+
* Fixed error in compile-time evaluation of an expression involving a character literal ([#240](https://github.com/cardillan/mindcode/issues/240)).
16
+
* Fixed incorrect compile-time evaluation of some logic IDs ([#242](https://github.com/cardillan/mindcode/issues/242)).
17
+
* Fixed possible incorrect handling of arguments passed to the `print()` and other output functions ([#243](https://github.com/cardillan/mindcode/issues/243)).
15
18
16
19
### Added
17
20
18
21
***Breaking:** new `ref` keyword was added to the language. Code that uses this keyword as a function or variable name will not compile and the variable or function will have to be renamed.
19
22
* Added the [`char()` function](doc/syntax/SYNTAX-4-FUNCTIONS.markdown#the-char-function). The function returns the ASCII value of a character at given index from a string value using the `read` instruction, as supported in latest BE version.
20
23
* Added support for invoking properties and the `sensor` functions on string values to support latest BE Enhancement of sensing string lengths using `@size`.
24
+
* Added the [`strlen()` function](doc/syntax/SYNTAX-4-FUNCTIONS.markdown#the-strlen-function) returning the length of a string determined at runtime.
21
25
* Added support for compile-time evaluation of the `length()` function, allowing to specify offsets relative to the end of the array in subarrays (e.g. `array[0 ... length(array) - 1]`).
22
26
* Added compile-time evaluation of either stable, or all built-in numerical variables (such as `@pi` or `@unitCount`).
23
27
* Added a new remarks mode, `comments`, to compile remarks as mlog comments (`# comment`).
24
-
* Added support for generating boundary checks for explicitly declared external arrays.
28
+
* Added support for generating runtime boundary checks for explicitly declared external arrays.
25
29
* Added new `printLines()` function to the `printing` library. The function prints each of its arguments on a new line.
26
30
* Loop Hoisting optimizer enhanced with an ability to optimize instructions setting up return addresses of function calls.
27
31
* Added handling of numerical literal values unsupported by Mindustry Logic version 7 and earlier (namely, `-2147483648`).
@@ -44,6 +48,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
44
48
45
49
***Breaking**: underscores in multi-word command-line options were changed to hyphens.
46
50
* The metadata used by Mindcode compiler and processor emulator now correspond to the compilation target. Schemacode still uses the latest version of the metadata for both building and decompiling schematics.
51
+
* Compile-time evaluation cache is cleared when exiting function context. This forces primarily the `length()` function to be reevaluated in each call to an inline function, as its value depends on the actual arguments passed to the function.
47
52
* Improved optimization of jumps by making multiple passes over jumps-related optimizers, up to the optimization passes limit.
48
53
* Volatile built-in variables used an upper or lower bound in a ranged for-loop statement are used directly in the condition, without storing them in a temporary variable.
49
54
* Stripped unnecessary `.0` distinctions from local variable prefix.
Copy file name to clipboardExpand all lines: README.markdown
+8-6Lines changed: 8 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -18,10 +18,10 @@
18
18
19
19
**Schemacode**, an extension built over Mindcode, is a specialized definition language designed for creating a complete Mindustry schematic from a text file. [Schematics builder](doc/syntax/SCHEMACODE.markdown) compiles these definition files directly into Mindustry schematics, either into binary `.msch` file, or into the text representation. Processors can be included in these schematics, complete with the code (specified either in Mindcode or mlog) and linked blocks.
20
20
21
-
## Mindcode Syntax
22
-
23
21
> [!NOTE]
24
-
> To use new Mindustry Logic capabilities from the new [Mindustry 8 pre-release](https://github.com/Anuken/Mindustry/releases/tag/v147), use `#set target = 8;` in your code.
22
+
> To use new Mindustry Logic capabilities from the new [Mindustry 8 pre-release](https://github.com/Anuken/Mindustry/releases/tag/v147), use `#set target = 8;` in your code. [Here](/doc/syntax/MINDUSTRY-8.markdown#new-functionality-in-mindustry-8) is a summary of the new Logic content and corresponding Mindcode functionality.
23
+
24
+
## Mindcode Syntax
25
25
26
26
Please refer to the [documentation](doc/syntax/SYNTAX.markdown) for a complete description of Mindcode syntax. You can also use the code examples in the web application to get familiar with Mindcode.
27
27
@@ -34,16 +34,18 @@ See [issues](https://github.com/cardillan/mindcode/issues?q=is%3Aissue%20state%3
34
34
The most important recent changes to Mindcode include:
35
35
36
36
* Language features
37
-
*Support for [symbolic labels in generated mlog code](/doc/syntax/SYNTAX-5-OTHER.markdown#option-symbolic-labels).
37
+
*Passing arguments (including arrays) to inline functions by reference.
38
38
* Specific syntax for [mlog keywords](doc/syntax/SYNTAX.markdown#mlog-keywords).
39
39
* Support for passing mlog keywords as arguments to inline functions.
40
-
* External and internal arrays (`@counter` arrays).
40
+
* External and internal arrays (`@counter` arrays), including basic array optimizations.
41
41
* Expressions in string interpolation: `print($"Sum: ${a + b}.")`.
0 commit comments