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
[GR-38700] Migrate to the Bytecode DSL #384
Open
graalvmbot
wants to merge
39
commits into
master
Choose a base branch
from
mdsouza/GR-38700/operation-dsl
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oracle-contributor-agreement
bot
added
the
OCA Verified
All contributors have signed the Oracle Contributor Agreement.
label
Feb 27, 2024
Copying description from the internal pull request, for usage information:
|
graalvmbot
force-pushed
the
mdsouza/GR-38700/operation-dsl
branch
from
March 8, 2024 19:51
fb9f164
to
880e2cf
Compare
graalvmbot
force-pushed
the
mdsouza/GR-38700/operation-dsl
branch
from
March 20, 2024 19:44
b2cff2d
to
57e0d30
Compare
Commits have been squashed to simplify rebase efforts. The original commit messages are: Get the DSL to generate code without errors Get the generated code to compile without errors re-add code to enable Operations interpreter Fix rebase issues + start factoring common validation out to AbstractCompiler.java Fix kwarg validation Fix implementation of Try Add named exception unbinding Fix implementation of With Minor fixes to f-strings and for-else blocks Refactor to support nested root node compilation without FunctionFinder Begin refactoring generators Partly fix generator implementation Support plain one-way generators Fix bug with empty generator expressions Support generator send (non-exceptional cases) Fully support enhanced generators Remove intermediate root node in generator implementation Add branch profile to generator resume code Fix prepareCall to handle generator calling convention merge generator logic back into a single PGenerator class Fix argument validation Fix unbound local checking and qualified names for functions Encapsulate compiler state in an OperationCompilerContext Support async def, async with, and await Get more JUnit tests running with the Operation interpreter Minor improvements to ResumeGenerator code Get JUnit tests using only the Operation interpreter Set catching frame reference for try-finally and with statements Fix stack walking to support continuation frames Minor location + integer constant fixes Convert FrameInfo to an interface and provide separate impls for bytecode and operation interpreters Make CodeUnit an abstract class with Bytecode and Operation implementations Allocate locals contiguously from slot 0 & avoid redundant allocations Misc. bug fixes (incl. name mangling and unbound local checking) Fix class cell reads and docstrings Fix bugs with keyword arguments + augmented assignments Remove AbstractCompiler abstraction, add more syntax checks Support type annotations Implement co_consts and other code fields Respect 'optimize' flag for compilations, constant fold unary negation Fix constants implementation + parser bugs Set exception __context__ when it is raised Properly handle __future__ imports Convert host StackOverflowError to RecursionError Use findBci to compute frame.f_lineno Use interceptTruffleException to set catchBci for exceptions fix Operation DSL API usage Move exception chaining to intercept hook Make future annotations inherited by exec Support interop method calls Fix finallyTry, local accesses, and continuation API usages after DSL updates Save + restore exception state on generator exit + entry Use getLocals/copyLocals APIs instead of hard-coded local offset Store bci into frame when potentially escaping root node use Proxyable for OperationProxy nodes Fix test setup after rebase Update with operation->bytecode package rename Rename POperationXYZ -> PBytecodeDSLXYZ Refactor compiler to return a CodeUnit and use a unique Builder for each root node Rework Marshal to use DataOutput and DataInput APIs Basic serialization implementation Avoid serialize+deserialize step for AST parsing Only build root node once for each MakeFunction/Generator/Coroutine operation Enable frozen modules, don't actually serialize Sources Cleanup style errors. Fix source creation, unintentional root node adoption, and parsing bugs Fix bciToLine Always use character-based sources Add separate DSL config for tests bump CI overlay bump overlay, dsl -> bytecode-dsl in gate tags peg imports to bytecode dsl branch Fix some compilation issues and undo temporary test hacks Break constant collection creation into separate operations Re-enable pattern matching tests and start a DSL implementation Add support for sequence pattern matching Move EnableBytecodeDSLInterpreter from an option to a system property; fix NI compilation bump overlay, add SVM DSL unittests config (wip) attempt to create separate native standalone for the DSL interpreter Pass bytecode DSL flag to builder when building standalone disable fail fast for DSL tests Fix inplace shifts; interactive string expressions Fix bug with empty module __init__ files Fix class decorators, disable pdb test on DSL interpreter, re-enable traceback test Fix super() implementation & fix bug with shadowed cell/free variables Update short-circuit ops, fix super() generator frame lookup Correctly mangle kwargs; implement co_lines; fix imod implementation Parse __future__ annotations before scope analysis to ensure bad annotations rejected Skip boolean coercion for boolean constants Use getLocal API for readClassCell/readSelf Clean up marshal code Use a PBytecodeDSLGeneratorFunctionRootNode instead of creating a bytecode node to instantiate generators Remove extra import Fix NI compilation by putting SourceSection method behind boundary; compute internal the same way as PBytecodeRootNode Fix rebase issue + manual bc frozen module issue bump ci overlay Fix another rebase issue with mx configuration bump overlay update to use new Bytecode DSL APIs (wip) remove bciToLine(int), set bytecode node when intercepting Truffle exceptions Replace instanceof checks with PythonOptions.ENABLE_BYTECODE_DSL_INTERPRETER checks getSourceLocation -> findSourceLocation Undo PythonTests.newBuilder now that DSL is enabled by a system property remove unreachable PKeyword marshalling logic
…rtions to detect pyc encoding mismatch
…aning up Truffle DSL warnings
…meNode; fix runtime compilation of SyncFrameValuesNode
…it op for unary compare operations
graalvmbot
force-pushed
the
mdsouza/GR-38700/operation-dsl
branch
from
April 10, 2024 14:25
f7c84aa
to
9cb5ef6
Compare
…to enable more flexible source section emission
…methods to enable more flexible source section emission" This reverts commit 753e20b.
…ons when they get disabled
…names for dynamic operands
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.