bug 447762 - merging var and local JS bytecodes. r=brendan

This commit is contained in:
Igor Bukanov
2008-08-06 16:13:22 +02:00
parent 9596ea947a
commit 2c87fa5a62
7 changed files with 136 additions and 148 deletions

View File

@@ -70,7 +70,7 @@ typedef enum JSOp {
#define JOF_TABLESWITCH 4 /* table switch */
#define JOF_LOOKUPSWITCH 5 /* lookup switch */
#define JOF_QARG 6 /* quickened get/set function argument ops */
#define JOF_QVAR 7 /* quickened get/set local variable ops */
#define JOF_LOCAL 7 /* var or block-local variable */
#define JOF_SLOTATOM 8 /* uint16 slot index + constant pool index */
#define JOF_JUMPX 9 /* signed 32-bit jump offset immediate */
#define JOF_TABLESWITCHX 10 /* extended (32-bit offset) table switch */
@@ -78,12 +78,11 @@ typedef enum JSOp {
#define JOF_UINT24 12 /* extended unsigned 24-bit literal (index) */
#define JOF_2BYTE 13 /* 2-byte opcode, e.g., upper 8 bits of 24-bit
atom index */
#define JOF_LOCAL 14 /* block-local operand stack variable */
#define JOF_INT32 14 /* int32 immediate operand */
#define JOF_OBJECT 15 /* unsigned 16-bit object pool index */
#define JOF_SLOTOBJECT 16 /* uint16 slot index + object pool index */
#define JOF_REGEXP 17 /* unsigned 16-bit regexp pool index */
#define JOF_INT8 18 /* int8 immediate operand */
#define JOF_INT32 19 /* int32 immediate operand */
#define JOF_TYPEMASK 0x001f /* mask for above immediate types */
#define JOF_NAME (1U<<5) /* name operation */
@@ -235,7 +234,7 @@ JS_STATIC_ASSERT(sizeof(uint32) * JS_BITS_PER_BYTE >= INDEX_LIMIT_LOG2 + 1);
#define GET_ARGC(pc) GET_UINT16(pc)
#define ARGC_LIMIT UINT16_LIMIT
/* Synonyms for quick JOF_QARG and JOF_QVAR bytecodes. */
/* Synonyms for quick JOF_QARG and JOF_LOCAL bytecodes. */
#define GET_ARGNO(pc) GET_UINT16(pc)
#define SET_ARGNO(pc,argno) SET_UINT16(pc,argno)
#define ARGNO_LEN 2