Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor the way bytecode offsets are tracked. #389

Open
wants to merge 1 commit into
base: develop/1.11.0
Choose a base branch
from

Conversation

Kroppeb
Copy link
Contributor

@Kroppeb Kroppeb commented May 4, 2024

  • Instructions now track their own bytecode offsets.
  • Split SimpleInstructionSequence and FullInstructionSequence. They aren't used in the same places and very little logic was actually shared.
  • Renamed SimpleInstructionSequence to InstructionSequence
  • Remove usages of VBStyleCollection
  • Simplified and converted ExceptionHandler into a record

* Split SimpleInstructionSequence and FullInstructionSequence
* Remove usages of VBStyleCollection
* Instructions now track their own bytecode offsets.
@Kroppeb Kroppeb requested a review from jaskarth May 4, 2024 19:07
@Kroppeb Kroppeb self-assigned this May 4, 2024
Copy link

github-actions bot commented May 4, 2024

Test Results

   18 files  ±0     18 suites  ±0   1m 3s ⏱️ -1s
1 919 tests ±0  1 919 ✅ ±0  0 💤 ±0  0 ❌ ±0 
2 534 runs  ±0  2 534 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit cbc4296. ± Comparison against base commit fa6317a.

@jaskarth jaskarth added Type: Enhancement New feature or request Priority: Medium Medium priority Subsystem: Parsing Anything concerning how bytecode is parsed and read labels May 4, 2024
Copy link
Member

@jaskarth jaskarth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this generally looks good but since this code is being significantly rewritten FullInstructionSequence and InstructionSequence need top level comments explaining what they are and how they're used.

}

InstructionSequence seq = new FullInstructionSequence(instructions, new ExceptionTable(lstHandlers));
FullInstructionSequence seq = new FullInstructionSequence(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move back to one line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium Medium priority Subsystem: Parsing Anything concerning how bytecode is parsed and read Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants