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
@@ -12,6 +12,7 @@ Wurstscript is a delicious programming language which compiles to Jass or Lua co
12
12
## User Documentation
13
13
14
14
Using WurstScript to build a map is easy! Check out the [Setup Guide](https://wurstscript.github.io/start.html) on how to get started.
15
+
For users, installation is automated and intended to work out of the box via the official setup.
15
16
For a formal description of all language features, visit the [Manual](https://wurstscript.github.io/manual.html).
16
17
17
18
Consider joining the WurstScript community on [Discord](https://discord.gg/mSHZpWcadz).
@@ -45,7 +46,10 @@ The source for the wurstscript website can be found here: https://github.com/wur
45
46
46
47
## Compiler Build Process
47
48
48
-
Java 11+ is required to build the project. Clone the repository and open the `de.peeeq.wurstscript` folder which contains the compiler project.
49
+
For **contributing/developing the compiler**, Java 25 is required.
50
+
End users normally do not need to install/configure Java manually for the standard Wurst setup flow.
51
+
52
+
Clone the repository and open the `de.peeeq.wurstscript` folder which contains the compiler project.
49
53
50
54
### Using Gradle
51
55
@@ -78,6 +82,8 @@ To run the Test Suite, execute `AllTests.xml` with TestNG.
78
82
79
83
### Publishing a new release
80
84
81
-
[Jenkins](http://peeeq.de/hudson/job/Wurst/) auto-releases versions as `major.minor.patch.hotfix-jenkins-Wurst-buildNumber` - e.g. `1.8.1.0-jenkins-Wurst-1248`.
85
+
Releases are published via GitHub workflows and GitHub Releases:
Copy file name to clipboardExpand all lines: de.peeeq.wurstscript/src/main/java/de/peeeq/wurstscript/translation/imtranslation/EliminateLocalTypes.java
Copy file name to clipboardExpand all lines: de.peeeq.wurstscript/src/main/java/de/peeeq/wurstscript/translation/imtranslation/StackTraceInjector2.java
+16-4Lines changed: 16 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -295,9 +295,14 @@ private int getStacktraceIndex(ImFunction f) {
295
295
*/
296
296
privateintgetStacktraceIndex(ImFunctionCallc) {
297
297
ImFunctionf = c.getFunc();
298
-
intres = f.getParameters().size() - 1;
298
+
intres;
299
299
if (f.hasFlag(FunctionFlagEnum.IS_VARARG)) {
300
-
res--;
300
+
// Keep stacktrace before vararg payload.
301
+
res = f.getParameters().size() - 2;
302
+
} else {
303
+
// Append for non-vararg calls based on actual call shape.
304
+
// This avoids relying on parameter-layout assumptions in lowered calls.
305
+
res = c.getArguments().size();
301
306
}
302
307
if (res < 0 || res > c.getArguments().size() + 1) {
303
308
thrownewCompileError(c, "Call " + c + " invalid index " + res + " for parameters " + f.getParameters() + " and isVararg = " + f.hasFlag(FunctionFlagEnum.IS_VARARG));
@@ -307,9 +312,16 @@ private int getStacktraceIndex(ImFunctionCall c) {
307
312
308
313
privateintgetStacktraceIndex(ImMethodCallc) {
309
314
ImFunctionf = c.getMethod().getImplementation();
310
-
intres = f.getParameters().size() - 2; // subtract one for implicit parameter
315
+
intres;
311
316
if (f.hasFlag(FunctionFlagEnum.IS_VARARG)) {
312
-
res--;
317
+
// For vararg methods keep the stacktrace argument before the vararg bucket.
318
+
// Method implementations normally include an implicit receiver as first parameter.
319
+
res = f.getParameters().size() - 3;
320
+
} else {
321
+
// For non-vararg methods append after existing explicit call arguments.
322
+
// This is robust even if a generated method implementation does not carry
323
+
// an implicit receiver parameter in its function signature.
324
+
res = c.getArguments().size();
313
325
}
314
326
if (res < 0 || res > c.getArguments().size() + 1) {
315
327
thrownewCompileError(c, "Call " + c + " invalid index " + res + " for parameters " + f.getParameters() + " and isVararg = " + f.hasFlag(FunctionFlagEnum.IS_VARARG));
0 commit comments