Skip to content

Add vm.run_bytecode #6239

Closed
Closed

Description

@youknowone

Summary

When running run_code_string on the VM, the process first compiles the code into a code object and then executes it.
If you store the code object in advance, you can instead execute it using run_code_object.
However, for a VM built without a compiler, it’s unclear how external code could be executed. One possible solution is to provide a run_bytecode function that allows execution of .pyc files.

Expected use case

This feature is automatically supported when running via the Python CLI, but when using vm directly, there isn’t an equally convenient way to execute code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions