Move push literal number opcodes to basic opcodes (#4609)

`obj[number]` is a widely used structure especially for array element indexing, however super property assignment is not.
This patch moves super-assignment opcodes to ext opcodes and fills the freed 3 basic opcodes with push-literal-number ones.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
This commit is contained in:
Robert Fancsik
2021-02-23 10:00:00 +01:00
committed by GitHub
parent 2240a9153a
commit 322265bfb9
8 changed files with 62 additions and 52 deletions
+2 -6
View File
@@ -274,12 +274,8 @@ typedef struct
|| (opcode) == CBC_PUSH_TWO_LITERALS \
|| (opcode) == CBC_PUSH_THREE_LITERALS)
#define PARSER_IS_PUSH_NUMBER(opcode) \
((opcode) == CBC_PUSH_NUMBER_0 \
|| (opcode) == CBC_PUSH_NUMBER_POS_BYTE \
|| (opcode) == CBC_PUSH_NUMBER_NEG_BYTE \
|| (opcode) == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_0) \
|| (opcode) == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_POS_BYTE) \
|| (opcode) == PARSER_TO_EXT_OPCODE (CBC_EXT_PUSH_LITERAL_PUSH_NUMBER_NEG_BYTE))
((opcode) >= CBC_PUSH_NUMBER_0 \
&& (opcode) <= CBC_PUSH_LITERAL_PUSH_NUMBER_NEG_BYTE)
#define PARSER_IS_MUTABLE_PUSH_LITERAL(opcode) \
((opcode) >= CBC_PUSH_LITERAL && (opcode) <= CBC_PUSH_THIS_LITERAL)