Skip to content

Refactor interpreter#1508

Merged
kripken merged 2 commits into
masterfrom
interp
Apr 13, 2018
Merged

Refactor interpreter#1508
kripken merged 2 commits into
masterfrom
interp

Conversation

@kripken

@kripken kripken commented Apr 13, 2018

Copy link
Copy Markdown
Member
  • Move more logic to the Literal class. We now leave all the work to there, except for handling traps.
  • Avoid switching on the type, then the opcode, then Literal method usually switches on the type again - instead, do one big switch for the opcodes (then the Literal method is unchanged) which is shorter and clearer, and avoids that first switching.

@kripken kripken merged commit fd3b3e5 into master Apr 13, 2018
@kripken kripken deleted the interp branch April 13, 2018 16:17
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.

1 participant