mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 12:10:13 +01:00
py/runtime0.h: Put inplace arith ops in front of normal operations.
This is to allow to place reverse ops immediately after normal ops, so they can be tested as one range (which is optimization for reverse ops introduction in the next patch).
This commit is contained in:
@@ -70,20 +70,6 @@ typedef enum {
|
||||
MP_BINARY_OP_IS_NOT,
|
||||
|
||||
// Arithmetic operations
|
||||
MP_BINARY_OP_OR,
|
||||
MP_BINARY_OP_XOR,
|
||||
MP_BINARY_OP_AND,
|
||||
MP_BINARY_OP_LSHIFT,
|
||||
MP_BINARY_OP_RSHIFT,
|
||||
MP_BINARY_OP_ADD,
|
||||
|
||||
MP_BINARY_OP_SUBTRACT,
|
||||
MP_BINARY_OP_MULTIPLY,
|
||||
MP_BINARY_OP_FLOOR_DIVIDE,
|
||||
MP_BINARY_OP_TRUE_DIVIDE,
|
||||
MP_BINARY_OP_MODULO,
|
||||
MP_BINARY_OP_POWER,
|
||||
|
||||
MP_BINARY_OP_INPLACE_OR,
|
||||
MP_BINARY_OP_INPLACE_XOR,
|
||||
MP_BINARY_OP_INPLACE_AND,
|
||||
@@ -98,6 +84,20 @@ typedef enum {
|
||||
MP_BINARY_OP_INPLACE_MODULO,
|
||||
MP_BINARY_OP_INPLACE_POWER,
|
||||
|
||||
MP_BINARY_OP_OR,
|
||||
MP_BINARY_OP_XOR,
|
||||
MP_BINARY_OP_AND,
|
||||
MP_BINARY_OP_LSHIFT,
|
||||
MP_BINARY_OP_RSHIFT,
|
||||
MP_BINARY_OP_ADD,
|
||||
|
||||
MP_BINARY_OP_SUBTRACT,
|
||||
MP_BINARY_OP_MULTIPLY,
|
||||
MP_BINARY_OP_FLOOR_DIVIDE,
|
||||
MP_BINARY_OP_TRUE_DIVIDE,
|
||||
MP_BINARY_OP_MODULO,
|
||||
MP_BINARY_OP_POWER,
|
||||
|
||||
// Operations below this line don't appear in bytecode, they
|
||||
// just identify special methods.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user