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

Parse wordcodes in Python 3.6 #621

Merged
merged 6 commits into from Aug 22, 2017

Conversation

Projects
None yet
4 participants
@abonie
Contributor

abonie commented Aug 8, 2017

Python 3.6 uses 2 bytes for each instruction (instead of varying number of bytes as in previous versions). This PR will introduce changes to VM that check for Python version to parse bytecode appropriately.

Single wordcode is 2 bytes wide and consists of an opcode and its
argument (or 0 if no argument is used)

TODO opcodes:
EXTENDED_ARG
???

@abonie abonie changed the title from [WIP] Parse wordcodes instead of bytecodes to [WIP] Parse wordcodes in Python 3.6 Aug 8, 2017

@cjrh

This comment has been minimized.

Show comment
Hide comment
@cjrh

cjrh Aug 10, 2017

Just a heads-up I've been tinkering with this in #536. I didn't get very far, but I did get the new dict opcode change done. (It's most other things that are still broken in my PR).

cjrh commented Aug 10, 2017

Just a heads-up I've been tinkering with this in #536. I didn't get very far, but I did get the new dict opcode change done. (It's most other things that are still broken in my PR).

@cjrh

This comment has been minimized.

Show comment
Hide comment
@cjrh

cjrh Aug 10, 2017

By all means please feel free to take anything that might be useful from my PR. I have very little time available to work on this.

cjrh commented Aug 10, 2017

By all means please feel free to take anything that might be useful from my PR. I have very little time available to work on this.

@abonie

This comment has been minimized.

Show comment
Hide comment
@abonie

abonie Aug 11, 2017

Contributor

Thanks cjrh, I have not touched the dict changes yet, so it works out.
For now I got sidetracked by the fact, that argument unpacking operators * and ** do not work under any Python version, but I will definitely checkout your PR when I get to dicts.

Contributor

abonie commented Aug 11, 2017

Thanks cjrh, I have not touched the dict changes yet, so it works out.
For now I got sidetracked by the fact, that argument unpacking operators * and ** do not work under any Python version, but I will definitely checkout your PR when I get to dicts.

@abonie

This comment has been minimized.

Show comment
Hide comment
@abonie

abonie Aug 13, 2017

Contributor

@cjrh if I were to use some of your code from #536 what is the proper way to give you credit? Should I just mention it in commit message?

Contributor

abonie commented Aug 13, 2017

@cjrh if I were to use some of your code from #536 what is the proper way to give you credit? Should I just mention it in commit message?

abonie added some commits Aug 8, 2017

Parse wordcodes instead of bytecodes
Single wordcode is 2 bytes wide and consists of an opcode and its
argument (or 0 if no argument is used)
Implement CALL_FUNCTION_EX opcode
Prior to 3.6 it was called CALL_FUNCTION_VAR_KW and operated in a
slightly different manner
@cjrh

This comment has been minimized.

Show comment
Hide comment
@cjrh

cjrh Aug 16, 2017

@abonie Sorry for the delay! No credit necessary, just go for it 👍

cjrh commented Aug 16, 2017

@abonie Sorry for the delay! No credit necessary, just go for it 👍

@abonie abonie changed the title from [WIP] Parse wordcodes in Python 3.6 to Parse wordcodes in Python 3.6 Aug 20, 2017

this.push(dict)
return
}
VirtualMachine.prototype.byte_STORE_MAP = function() {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_35:

This comment has been minimized.

@brutusthebee

brutusthebee Aug 20, 2017

this.push(dict)
return
}
VirtualMachine.prototype.byte_STORE_MAP = function() {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_35:

This comment has been minimized.

@brutusthebee

brutusthebee Aug 20, 2017

@freakboy3742 freakboy3742 merged commit 3908058 into pybee:master Aug 22, 2017

5 checks passed

beekeeper:0/beefore:eslint JavaScript lint checks passed.
Details
beekeeper:0/beefore:pycodestyle Python lint checks passed.
Details
beekeeper:1/smoke-test Smoke build (Python 3.4) passed.
Details
beekeeper:2/full-test:py3.5 Python 3.5 tests: non-critical problem found. Click for details.
Details
beekeeper:2/full-test:py3.6 Python 3.6 tests: non-critical problem found. Click for details.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment