Skip to content

Fix inline assignment declaration codegen#196

Open
demircancelebi wants to merge 1 commit into
Syncleus:masterfrom
demircancelebi:fix-inline-declaration-bounty-97
Open

Fix inline assignment declaration codegen#196
demircancelebi wants to merge 1 commit into
Syncleus:masterfrom
demircancelebi:fix-inline-declaration-bounty-97

Conversation

@demircancelebi
Copy link
Copy Markdown

@demircancelebi demircancelebi commented May 11, 2026

Fixes #97.

Summary

  • Hoist inline assignment declarations to the enclosing generated OpenCL block.
  • Allow inline assignment expressions like actuallyDoIt(z = 1) to emit int z; before the call instead of throwing a CodeGenException.
  • Update the existing regression fixture and test expectation.

Tests

  • JAVA_TOOL_OPTIONS=-XX:+IgnoreUnrecognizedVMOptions JAVA_HOME=/Library/Java/JavaVirtualMachines/openjdk-17.jdk/Contents/Home mvn -Dmaven.repo.local=/private/tmp/m2-aparapi -Dtest=AssignAndPassAsParameterSimpleTest,ConstantAssignInExpressionTest test
  • Result: Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, BUILD SUCCESS.

Note: running on JDK 17 required JAVA_TOOL_OPTIONS=-XX:+IgnoreUnrecognizedVMOptions because the existing Surefire config still includes the legacy -XX:MaxPermSize=512m flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bounty $20] Inline declarations throw exception.

1 participant