byterun icon indicating copy to clipboard operation
byterun copied to clipboard

A Python implementation of a Python bytecode runner

Results 18 byterun issues
Sort by recently updated
recently updated
newest added

Fix a bug in closures. It seems that lexical scoping was not implemented correctly in byterun. Please refer to the new test case (i.e., test_lexical_scope()) in tests/test_functions.py. ```python def f(x,...

intArg = byteint(arg[0]) + (byteint(arg[1])

With these patches the tests pass in Py3.4. This isn't done yet because I had to reimplement `__build_class__`, and that reimplementation doesn't yet support metaclasses or closures. It looks like...

Adding python 3.6 support. Includes the python 3.4 patch from @darius so that the tests pass. If that gets committed, I will remove the last patch from this PR.

It throws `IndexError: tuple index out of range`. ``` Traceback (most recent call last): File "python.py", line 176, in """) File "python.py", line 166, in exec_python vm_value = vm.run_code(code) File...

It does not support list comprehension in Python 3.5. Other versions untested. Trying to run `"""[x for x in [1,2,3]]"""`: ``` 1 0 BUILD_LIST 0 3 LOAD_FAST 0 (.0) >>...

Minimal reproduction of the bug fixed by this PR: ```python class Falsy(object): def __bool__(self): return False __nonzero__ = __bool__ def do_stuff(self): pass Falsy().do_stuff() ``` ``` ERROR:byterun.pyvm2:Caught exception during execution Traceback...

In the newest commit 62f9b1a9c85f52c28b78cc8942243c5c962b1954, the test case will fail, because the test case use Function.__code__ but the Function object provided by byterun not support it.

There was a subtle change in order of argument for CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW in CPython 3.5. In earlier versions `*args` is passed after keyword arguments. In 3.5 it is passed...

This is a first cut of fix for the import modules issue mentioned in #26 (It is done on top of PR #31).