Skip to content

Add vm.run_bytecode #6239

@youknowone

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions