oracle / graalpython

A high-performance embeddable Python 3 runtime for Java
https://www.graalvm.org/python/
Other
1.22k stars 104 forks source link

[GR-38700] Migrate to the Bytecode DSL #384

Open graalvmbot opened 7 months ago

DSouzaM commented 7 months ago

Copying description from the internal pull request, for usage information:

This PR defines an alternate bytecode interpreter implemented using the Bytecode DSL (PR).

The alternate interpreter is disabled by default, and can be switched on using the system property -Dpython.EnableBytecodeDSLInterpreter=true.

Some useful commands:

  • run on JVM: create the JVM standalone using mx python-jvm and then launch it with --vm.Dpython.EnableBytecodeDSLInterpreter=true.
  • run on NI: create a DSL-specific standalone using mx python-svm-dsl-interpreter.
  • run JUnit tests: mx punittest --no-leak-tests --use-bytecode-dsl-interpreter
  • run GraalPy tests: create a NI standalone (see above) and then mx graalpytest --python {standalone path} {file}
  • run CPython tests: mx python-run-cpython-unittest --use-bytecode-dsl-interpreter {pattern}
  • verify which interpreter is running: evaluate __graalpython__.is_bytecode_dsl_interpreter.