Skip to content

Fix OpenCL reserved identifier code generation#214

Open
gshaowei6 wants to merge 1 commit into
Syncleus:masterfrom
gshaowei6:fix-opencl-keyword-mangling-54
Open

Fix OpenCL reserved identifier code generation#214
gshaowei6 wants to merge 1 commit into
Syncleus:masterfrom
gshaowei6:fix-opencl-keyword-mangling-54

Conversation

@gshaowei6
Copy link
Copy Markdown

Fixes #54.

This mangles Java identifiers that collide with OpenCL reserved words before emitting generated OpenCL. The fix covers kernel fields and arguments, local variables, method parameters, accessor/getter fields, struct members, and generated array length/dimension helper names.

Validation:

  • mvn -Dmaven.repo.local=.m2 org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile
  • Manual focused JUnit run with debug symbols: OpenCLReservedIdentifierTest, SequenceTest, AccessIntArrayTest, UsesArrayLengthTest, CallGetPassIdTest, ObjectArrayMemberAccessTest - 12 tests OK
  • git diff --cached --check

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 $25] OpenCL keywords are not escaped during code generation

1 participant