| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
I don't think adding another code generator is the way to go. For code in labels we will, in the future, want to:
I'm not suggesting that we do any of the above in this PR. The simple code you generate is fine for now, but it needs to be a bit more closely integrated into the interpreter/JIT generators. Since labels exist outside the dispatch loop, we'll need to generate the dispatch loop as well. We can simply copy the few lines of code surrounding #include "generated_cases.c.h" into the tier1 code generator. The tier 1 code generator would then generate:
|
Sorry, something went wrong.
|
Alright. I've moved the labels generator back into the tier 1 generator. We need to port over tier 2 in a separate PR as well. I've combined the switch-case generator into the cases generator as well. |
Sorry, something went wrong.
There was a problem hiding this comment.
Mostly looks good. One thing doesn't look right
Sorry, something went wrong.
There was a problem hiding this comment.
Adding the markers to the generated code for testing looks good, but the parsing in the test is a bit cumbersome.
Sorry, something went wrong.
| lines.pop(0) | ||
| while lines and lines[-1].startswith(("#", "\n")): | ||
| lines.pop(-1) | ||
| while lines and tier1_generator.INSTRUCTION_START_MARKER not in lines[0]: |
There was a problem hiding this comment.
You can replace this line by line processing, including the start and end comment stripping, by splitting the whole file on INSTRUCTION_START_MARKER and INSTRUCTION_START_MARKER, discarding the first and last parts.
text = temp_output.read()
_, rest = text.split(INSTRUCTION_START_MARKER)
actual, _ = rest.split(LABEL_START_MARKER)
Sorry, something went wrong.
There was a problem hiding this comment.
Good observation. Thanks!
Sorry, something went wrong.
|
When you're done making the requested changes, leave the comment: I have made the requested changes; please review again. |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for doing this.
Sorry, something went wrong.
…nGH-129112)" This reverts commit 87fb8b1.
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.