Skip to content

Fix codegen for end-of-scope stores#215

Open
newmattock wants to merge 1 commit into
Syncleus:masterfrom
newmattock:codex/unused-scope-codegen-96
Open

Fix codegen for end-of-scope stores#215
newmattock wants to merge 1 commit into
Syncleus:masterfrom
newmattock:codex/unused-scope-codegen-96

Conversation

@newmattock
Copy link
Copy Markdown

Fixes #96.

This updates local-variable lookup for store instructions so codegen can handle stores whose local-variable table entry starts at the store PC, and can synthesize a scoped local when javac omits metadata for an unused zero-length local at the end of a scope.

The ignored ArbitraryScopeTest codegen regression is re-enabled. Its expected output now uses the generated slot name for the compiler-erased unused local, since the original source name is not available in the class metadata.

Validation:

  • git diff --check
  • Manual Java 8-targeted compile with javac --release 8
  • JUnitCore com.aparapi.codegen.test.NullCheckTest com.aparapi.codegen.test.ArbitraryScopeTest -> OK (4 tests)

Note: I did not add payment details.

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] Unused variable at end of scope results in OutOfScope exceptions

1 participant