/[jscoverage]/trunk/js/jsopcode.tbl
ViewVC logotype

Diff of /trunk/js/jsopcode.tbl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 332 by siliconforks, Thu Oct 23 19:03:33 2008 UTC revision 399 by siliconforks, Tue Dec 9 03:37:47 2008 UTC
# Line 64  Line 64 
64   * format       Bytecode plus immediate operand encoding format   * format       Bytecode plus immediate operand encoding format
65   *   *
66   * Precedence   Operators               Opcodes   * Precedence   Operators               Opcodes
67   *  1           let (x = y) z, yield w  JSOP_LEAVEBLOCKEXPR, JSOP_YIELD   *  1           yield w                 JSOP_YIELD
68   *  2           ,                       JSOP_POP with SRC_PCDELTA, JSOP_RETURN   *  2           ,                       JSOP_POP with SRC_PCDELTA, JSOP_RETURN
69   *  3           =, +=, etc.             JSOP_SETNAME, etc. (all JOF_ASSIGNING)   *  3           =, +=, etc.             JSOP_SETNAME, etc. (all JOF_SET);
70     *                let (...) ...           and JSOP_LEAVEBLOCKEXPR
71   *  4           ?:                      JSOP_IFEQ, JSOP_IFEQX   *  4           ?:                      JSOP_IFEQ, JSOP_IFEQX
72   *  5           ||                      JSOP_OR, JSOP_ORX   *  5           ||                      JSOP_OR, JSOP_ORX
73   *  6           &&                      JSOP_AND, JSOP_ANDX   *  6           &&                      JSOP_AND, JSOP_ANDX
# Line 78  Line 79 
79   * 12           <<, >>, >>>             JSOP_LSH, JSOP_RSH, JSOP_URSH   * 12           <<, >>, >>>             JSOP_LSH, JSOP_RSH, JSOP_URSH
80   * 13           +, -, etc.              JSOP_ADD, JSOP_SUB, etc.   * 13           +, -, etc.              JSOP_ADD, JSOP_SUB, etc.
81   * 14           *, /, %                 JSOP_MUL, JSOP_DIV, JSOP_MOD   * 14           *, /, %                 JSOP_MUL, JSOP_DIV, JSOP_MOD
82   * 15           !, ~, etc.              JSOP_NOT, JSOP_BITNOT, etc.   * 15           !, ~, delete, etc.      JSOP_NOT, JSOP_BITNOT, JSOP_DEL*, etc.
83   * 16           3.14, 0, etc.           JSOP_DOUBLE, JSOP_ZERO, etc.   * 16           3.14, 0, etc.           JSOP_DOUBLE, JSOP_ZERO, etc.
84   * 17           delete, new             JSOP_DEL*, JSOP_NEW   * 17           new                     JSOP_NEW
85   * 18           x.y, f(), etc.          JSOP_GETPROP, JSOP_CALL, etc.   * 18           x.y, f(), etc.          JSOP_GETPROP, JSOP_CALL, etc.
86   * 19           x, null, etc.           JSOP_NAME, JSOP_NULL, etc.   * 19           x, null,                JSOP_NAME, JSOP_NULL, etc.;
87     *               function (...) ...       and JSOP_ANONFUNOBJ, JSOP_NAMEDFUNOBJ
88   *   *
89   * The push-numeric-constant operators, JSOP_ZERO, JSOP_DOUBLE, etc., have   * The push-numeric-constant operators, JSOP_ZERO, JSOP_DOUBLE, etc., have
90   * lower precedence than the member operators emitted for the . operator, to   * lower precedence than the member operators emitted for the . operator, to
91   * cause the decompiler to parenthesize the . left operand, e.g. (0).foo.   * cause the decompiler to parenthesize the . left operand, e.g. (0).foo.
92   * Otherwise the . could be taken as a decimal point.  We use the same level   * Otherwise the . could be taken as a decimal point.
93   * 16 for function expressions too, to force parenthesization.   *
94     * Let expressions are "primary" when viewed from the left, but they eat up ops
95     * to the right as if assignment expressions and therefore have precedence 3.
96     * This makes the decompiler retain the parentheses in (let (a=0) x) ? a : 0
97     * but omit the superfluous ones in (let (a=0) x), a.
98     *
99     * Yield expressions must be parenthesized even in comma-expressions and
100     * argument lists, so they have the lowest precedence.
101   *   *
102   * This file is best viewed with 128 columns:   * This file is best viewed with 128 columns:
103  12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678  12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678
# Line 111  Line 120 
120  OPDEF(JSOP_ARGUMENTS, 9, js_arguments_str, js_arguments_str, 1, 0, 1, 18, JOF_BYTE)  OPDEF(JSOP_ARGUMENTS, 9, js_arguments_str, js_arguments_str, 1, 0, 1, 18, JOF_BYTE)
121    
122  /* ECMA-compliant for-in loop with argument or local loop control. */  /* ECMA-compliant for-in loop with argument or local loop control. */
123  OPDEF(JSOP_FORARG,    10, "forarg",     NULL,         3,  0,  1, 19,  JOF_QARG|JOF_NAME|JOF_FOR)  OPDEF(JSOP_FORARG,    10, "forarg",     NULL,         3,  2,  2, 19,  JOF_QARG|JOF_NAME|JOF_FOR)
124  OPDEF(JSOP_FORLOCAL,  11, "forlocal",   NULL,         3,  0,  1, 19,  JOF_LOCAL|JOF_NAME|JOF_FOR)  OPDEF(JSOP_FORLOCAL,  11, "forlocal",   NULL,         3,  2,  2, 19,  JOF_LOCAL|JOF_NAME|JOF_FOR)
125    
126  /* More longstanding bytecodes. */  /* More longstanding bytecodes. */
127  OPDEF(JSOP_DUP,       12, "dup",        NULL,         1,  1,  2,  0,  JOF_BYTE)  OPDEF(JSOP_DUP,       12, "dup",        NULL,         1,  1,  2,  0,  JOF_BYTE)
128  OPDEF(JSOP_DUP2,      13, "dup2",       NULL,         1,  2,  4,  0,  JOF_BYTE)  OPDEF(JSOP_DUP2,      13, "dup2",       NULL,         1,  2,  4,  0,  JOF_BYTE)
129  OPDEF(JSOP_SETCONST,  14, "setconst",   NULL,         3,  1,  1,  3,  JOF_ATOM|JOF_NAME|JOF_SET)  OPDEF(JSOP_SETCONST,  14, "setconst",   NULL,         3,  1,  1,  3,  JOF_ATOM|JOF_NAME|JOF_SET)
130  OPDEF(JSOP_BITOR,     15, "bitor",      "|",          1,  2,  1,  7,  JOF_BYTE|JOF_LEFTASSOC)  OPDEF(JSOP_BITOR,     15, "bitor",      "|",          1,  2,  1,  7,  JOF_BYTE|JOF_LEFTASSOC|JOF_TMPSLOT2)
131  OPDEF(JSOP_BITXOR,    16, "bitxor",     "^",          1,  2,  1,  8,  JOF_BYTE|JOF_LEFTASSOC)  OPDEF(JSOP_BITXOR,    16, "bitxor",     "^",          1,  2,  1,  8,  JOF_BYTE|JOF_LEFTASSOC|JOF_TMPSLOT2)
132  OPDEF(JSOP_BITAND,    17, "bitand",     "&",          1,  2,  1,  9,  JOF_BYTE|JOF_LEFTASSOC)  OPDEF(JSOP_BITAND,    17, "bitand",     "&",          1,  2,  1,  9,  JOF_BYTE|JOF_LEFTASSOC|JOF_TMPSLOT2)
133  OPDEF(JSOP_EQ,        18, "eq",         "==",         1,  2,  1,  10,  JOF_BYTE|JOF_LEFTASSOC|JOF_DETECTING)  OPDEF(JSOP_EQ,        18, "eq",         "==",         1,  2,  1,  10,  JOF_BYTE|JOF_LEFTASSOC|JOF_DETECTING)
134  OPDEF(JSOP_NE,        19, "ne",         "!=",         1,  2,  1,  10,  JOF_BYTE|JOF_LEFTASSOC|JOF_DETECTING)  OPDEF(JSOP_NE,        19, "ne",         "!=",         1,  2,  1,  10,  JOF_BYTE|JOF_LEFTASSOC|JOF_DETECTING)
135  OPDEF(JSOP_LT,        20, "lt",         "<",          1,  2,  1, 11,  JOF_BYTE|JOF_LEFTASSOC)  OPDEF(JSOP_LT,        20, "lt",         "<",          1,  2,  1, 11,  JOF_BYTE|JOF_LEFTASSOC|JOF_TMPSLOT2)
136  OPDEF(JSOP_LE,        21, "le",         "<=",         1,  2,  1, 11,  JOF_BYTE|JOF_LEFTASSOC)  OPDEF(JSOP_LE,        21, "le",         "<=",         1,  2,  1, 11,  JOF_BYTE|JOF_LEFTASSOC|JOF_TMPSLOT2)
137  OPDEF(JSOP_GT,        22, "gt",         ">",          1,  2,  1, 11,  JOF_BYTE|JOF_LEFTASSOC)  OPDEF(JSOP_GT,        22, "gt",         ">",          1,  2,  1, 11,  JOF_BYTE|JOF_LEFTASSOC|JOF_TMPSLOT2)
138  OPDEF(JSOP_GE,        23, "ge",         ">=",         1,  2,  1, 11,  JOF_BYTE|JOF_LEFTASSOC)  OPDEF(JSOP_GE,        23, "ge",         ">=",         1,  2,  1, 11,  JOF_BYTE|JOF_LEFTASSOC|JOF_TMPSLOT2)
139  OPDEF(JSOP_LSH,       24, "lsh",        "<<",         1,  2,  1, 12,  JOF_BYTE|JOF_LEFTASSOC)  OPDEF(JSOP_LSH,       24, "lsh",        "<<",         1,  2,  1, 12,  JOF_BYTE|JOF_LEFTASSOC|JOF_TMPSLOT2)
140  OPDEF(JSOP_RSH,       25, "rsh",        ">>",         1,  2,  1, 12,  JOF_BYTE|JOF_LEFTASSOC)  OPDEF(JSOP_RSH,       25, "rsh",        ">>",         1,  2,  1, 12,  JOF_BYTE|JOF_LEFTASSOC|JOF_TMPSLOT2)
141  OPDEF(JSOP_URSH,      26, "ursh",       ">>>",        1,  2,  1, 12,  JOF_BYTE|JOF_LEFTASSOC)  OPDEF(JSOP_URSH,      26, "ursh",       ">>>",        1,  2,  1, 12,  JOF_BYTE|JOF_LEFTASSOC|JOF_TMPSLOT2)
142  OPDEF(JSOP_ADD,       27, "add",        "+",          1,  2,  1, 13,  JOF_BYTE|JOF_LEFTASSOC)  OPDEF(JSOP_ADD,       27, "add",        "+",          1,  2,  1, 13,  JOF_BYTE|JOF_LEFTASSOC|JOF_TMPSLOT2)
143  OPDEF(JSOP_SUB,       28, "sub",        "-",          1,  2,  1, 13,  JOF_BYTE|JOF_LEFTASSOC)  OPDEF(JSOP_SUB,       28, "sub",        "-",          1,  2,  1, 13,  JOF_BYTE|JOF_LEFTASSOC|JOF_TMPSLOT2)
144  OPDEF(JSOP_MUL,       29, "mul",        "*",          1,  2,  1, 14,  JOF_BYTE|JOF_LEFTASSOC)  OPDEF(JSOP_MUL,       29, "mul",        "*",          1,  2,  1, 14,  JOF_BYTE|JOF_LEFTASSOC|JOF_TMPSLOT2)
145  OPDEF(JSOP_DIV,       30, "div",        "/",          1,  2,  1, 14,  JOF_BYTE|JOF_LEFTASSOC)  OPDEF(JSOP_DIV,       30, "div",        "/",          1,  2,  1, 14,  JOF_BYTE|JOF_LEFTASSOC|JOF_TMPSLOT2)
146  OPDEF(JSOP_MOD,       31, "mod",        "%",          1,  2,  1, 14,  JOF_BYTE|JOF_LEFTASSOC)  OPDEF(JSOP_MOD,       31, "mod",        "%",          1,  2,  1, 14,  JOF_BYTE|JOF_LEFTASSOC|JOF_TMPSLOT2)
147  OPDEF(JSOP_NOT,       32, "not",        "!",          1,  1,  1, 15,  JOF_BYTE|JOF_DETECTING)  OPDEF(JSOP_NOT,       32, "not",        "!",          1,  1,  1, 15,  JOF_BYTE|JOF_DETECTING)
148  OPDEF(JSOP_BITNOT,    33, "bitnot",     "~",          1,  1,  1, 15,  JOF_BYTE)  OPDEF(JSOP_BITNOT,    33, "bitnot",     "~",          1,  1,  1, 15,  JOF_BYTE)
149  OPDEF(JSOP_NEG,       34, "neg",        "- ",         1,  1,  1, 15,  JOF_BYTE)  OPDEF(JSOP_NEG,       34, "neg",        "- ",         1,  1,  1, 15,  JOF_BYTE)
150  OPDEF(JSOP_NEW,       35, js_new_str,   NULL,         3, -1,  1, 17,  JOF_UINT16|JOF_INVOKE)  OPDEF(JSOP_NEW,       35, js_new_str,   NULL,         3, -1,  1, 17,  JOF_UINT16|JOF_INVOKE)
151  OPDEF(JSOP_DELNAME,   36, "delname",    NULL,         3,  0,  1, 17,  JOF_ATOM|JOF_NAME|JOF_DEL)  OPDEF(JSOP_DELNAME,   36, "delname",    NULL,         3,  0,  1, 15,  JOF_ATOM|JOF_NAME|JOF_DEL)
152  OPDEF(JSOP_DELPROP,   37, "delprop",    NULL,         3,  1,  1, 17,  JOF_ATOM|JOF_PROP|JOF_DEL)  OPDEF(JSOP_DELPROP,   37, "delprop",    NULL,         3,  1,  1, 15,  JOF_ATOM|JOF_PROP|JOF_DEL)
153  OPDEF(JSOP_DELELEM,   38, "delelem",    NULL,         1,  2,  1, 17,  JOF_BYTE |JOF_ELEM|JOF_DEL)  OPDEF(JSOP_DELELEM,   38, "delelem",    NULL,         1,  2,  1, 15,  JOF_BYTE |JOF_ELEM|JOF_DEL)
154  OPDEF(JSOP_TYPEOF,    39, js_typeof_str,NULL,         1,  1,  1, 15,  JOF_BYTE|JOF_DETECTING)  OPDEF(JSOP_TYPEOF,    39, js_typeof_str,NULL,         1,  1,  1, 15,  JOF_BYTE|JOF_DETECTING)
155  OPDEF(JSOP_VOID,      40, js_void_str,  NULL,         1,  1,  1, 15,  JOF_BYTE)  OPDEF(JSOP_VOID,      40, js_void_str,  NULL,         1,  1,  1, 15,  JOF_BYTE)
156    
# Line 181  Line 190 
190  OPDEF(JSOP_LOOKUPSWITCH, 71, "lookupswitch", NULL,   -1,  1,  0,  0,  JOF_LOOKUPSWITCH|JOF_DETECTING|JOF_PARENHEAD)  OPDEF(JSOP_LOOKUPSWITCH, 71, "lookupswitch", NULL,   -1,  1,  0,  0,  JOF_LOOKUPSWITCH|JOF_DETECTING|JOF_PARENHEAD)
191    
192  /* New, infallible/transitive identity ops. */  /* New, infallible/transitive identity ops. */
193  OPDEF(JSOP_STRICTEQ,  72, "stricteq",   NULL,         1,  2,  1,  10,  JOF_BYTE|JOF_DETECTING)  OPDEF(JSOP_STRICTEQ,  72, "stricteq",   "===",        1,  2,  1, 10,  JOF_BYTE|JOF_DETECTING|JOF_LEFTASSOC)
194  OPDEF(JSOP_STRICTNE,  73, "strictne",   NULL,         1,  2,  1,  10,  JOF_BYTE|JOF_DETECTING)  OPDEF(JSOP_STRICTNE,  73, "strictne",   "!==",        1,  2,  1, 10,  JOF_BYTE|JOF_DETECTING|JOF_LEFTASSOC)
   
 /* Resume instruction (emitted for the JIT for instructions that can't be restarted). */  
 OPDEF(JSOP_RESUME,    74, "resume",     NULL,         1,  0,  0,  0,  JOF_BYTE)  
195    
196  /* Variant of JSOP_NULL for default (global) |this| parameter pushing. */  /* Variant of JSOP_NULL for default (global) |this| parameter pushing. */
197  OPDEF(JSOP_NULLTHIS,  75, js_null_str,  js_null_str,  1,  0,  1, 19,  JOF_BYTE)  OPDEF(JSOP_NULLTHIS,  74, js_null_str,  js_null_str,  1,  0,  1, 19,  JOF_BYTE)
198    
199    /*
200     * JSOP_ITER sets up a for-in or for-each-in loop using the JSITER_* flag bits
201     * in this op's uint8 immediate operand. It replaces the top of stack object
202     * with an iterator for that object, and pushes a slot used by JSOP_NEXTITER.
203     *
204     * JSOP_NEXTITER stores the next iterated value in the top of stack slot which
205     * was allocated by JSOP_ITER and pushes true, or stores JSVAL_HOLE and pushes
206     * false. It is followed immediately by JSOP_IFNE{,X}.
207     *
208     * JSOP_ENDITER cleans up after the loop. It uses the slot above the iterator
209     * for temporary GC rooting.
210     */
211    OPDEF(JSOP_ITER,      75, "iter",       NULL,         2,  1,  2,  0,  JOF_UINT8)
212    OPDEF(JSOP_NEXTITER,  76, "nextiter",   NULL,         1,  2,  3,  0,  JOF_BYTE)
213    OPDEF(JSOP_ENDITER,   77, "enditer",    NULL,         1,  2,  0,  0,  JOF_BYTE)
214    
215  OPDEF(JSOP_UNUSED76,  76, "unused76",   NULL,         1,  0,  0,  0,  JOF_BYTE)  OPDEF(JSOP_APPLY,     78, "apply",      NULL,         3, -1,  1, 18,  JOF_UINT16|JOF_INVOKE)
216  OPDEF(JSOP_UNUSED77,  77, "unused77",   NULL,         1,  0,  0,  0,  JOF_BYTE)  OPDEF(JSOP_SWAP,      79, "swap",       NULL,         1,  2,  2,  0,  JOF_BYTE)
 OPDEF(JSOP_UNUSED78,  78, "unused78",   NULL,         1,  0,  0,  0,  JOF_BYTE)  
 OPDEF(JSOP_UNUSED79,  79, "unused79",   NULL,         1,  0,  0,  0,  JOF_BYTE)  
217    
218  /* Push object literal. */  /* Push object literal. */
219  OPDEF(JSOP_OBJECT,    80, "object",     NULL,         3,  0,  1, 19,  JOF_OBJECT)  OPDEF(JSOP_OBJECT,    80, "object",     NULL,         3,  0,  1, 19,  JOF_OBJECT)
# Line 235  Line 255 
255  OPDEF(JSOP_LOCALINC,  101,"localinc",   NULL,         3,  0,  1, 15,  JOF_LOCAL|JOF_NAME|JOF_INC|JOF_POST)  OPDEF(JSOP_LOCALINC,  101,"localinc",   NULL,         3,  0,  1, 15,  JOF_LOCAL|JOF_NAME|JOF_INC|JOF_POST)
256  OPDEF(JSOP_LOCALDEC,  102,"localdec",   NULL,         3,  0,  1, 15,  JOF_LOCAL|JOF_NAME|JOF_DEC|JOF_POST)  OPDEF(JSOP_LOCALDEC,  102,"localdec",   NULL,         3,  0,  1, 15,  JOF_LOCAL|JOF_NAME|JOF_DEC|JOF_POST)
257    
258  /*  OPDEF(JSOP_IMACOP,    103,"imacop",     NULL,         1,  0,  0,  0,  JOF_BYTE)
  * Initialize for-in iterator using the JSITER_* flag bits in this op's uint8  
  * immediate operand. See also JSOP_ENDITER.  
  */  
 OPDEF(JSOP_ITER,      103,"iter",       NULL,         2,  1,  1,  0,  JOF_UINT8)  
259    
260  /* ECMA-compliant for/in ops. */  /* ECMA-compliant for/in ops. */
261  OPDEF(JSOP_FORNAME,   104,"forname",    NULL,         3,  0,  1, 19,  JOF_ATOM|JOF_NAME|JOF_FOR)  OPDEF(JSOP_FORNAME,   104,"forname",    NULL,         3,  2,  2, 19,  JOF_ATOM|JOF_NAME|JOF_FOR)
262  OPDEF(JSOP_FORPROP,   105,"forprop",    NULL,         3,  1,  1, 18,  JOF_ATOM|JOF_PROP|JOF_FOR)  OPDEF(JSOP_FORPROP,   105,"forprop",    NULL,         3,  3,  2, 18,  JOF_ATOM|JOF_PROP|JOF_FOR)
263  OPDEF(JSOP_FORELEM,   106,"forelem",    NULL,         1,  1,  3, 18,  JOF_BYTE |JOF_ELEM|JOF_FOR)  OPDEF(JSOP_FORELEM,   106,"forelem",    NULL,         1,  2,  3, 18,  JOF_BYTE |JOF_ELEM|JOF_FOR)
264  OPDEF(JSOP_POPN,      107,"popn",       NULL,         3, -1,  0,  0,  JOF_UINT16)  OPDEF(JSOP_POPN,      107,"popn",       NULL,         3, -1,  0,  0,  JOF_UINT16)
265    
266  /* ECMA-compliant assignment ops. */  /* ECMA-compliant assignment ops. */
# Line 318  Line 334 
334  OPDEF(JSOP_SETLOCALPOP, 130, "setlocalpop", NULL,     3,  1,  0,  3,  JOF_LOCAL|JOF_NAME|JOF_SET)  OPDEF(JSOP_SETLOCALPOP, 130, "setlocalpop", NULL,     3,  1,  0,  3,  JOF_LOCAL|JOF_NAME|JOF_SET)
335    
336  /* Parenthesization opcode to help the decompiler. */  /* Parenthesization opcode to help the decompiler. */
337  OPDEF(JSOP_GROUP,       131, "group",       NULL,     1,  0,  0, 19,  JOF_BYTE)  OPDEF(JSOP_UNUSED131,   131, "unused131",   NULL,     1,  0,  0,  0,  JOF_BYTE)
338    
339  /*  /*
340   * Host object extension: given 'o.item(i) = j', the left-hand side compiles   * Host object extension: given 'o.item(i) = j', the left-hand side compiles
# Line 419  Line 435 
435   */   */
436  OPDEF(JSOP_GETUPVAR,      186,"getupvar",   NULL,     3,  0,  1, 19,  JOF_UINT16|JOF_NAME)  OPDEF(JSOP_GETUPVAR,      186,"getupvar",   NULL,     3,  0,  1, 19,  JOF_UINT16|JOF_NAME)
437    
438  OPDEF(JSOP_DELDESC,       187,"deldesc",    NULL,     1,  2,  1, 17,  JOF_BYTE |JOF_ELEM|JOF_DEL)  OPDEF(JSOP_DELDESC,       187,"deldesc",    NULL,     1,  2,  1, 15,  JOF_BYTE|JOF_ELEM|JOF_DEL)
439    
440  /*  /*
441   * Opcode to hold 24-bit immediate integer operands.   * Opcode to hold 24-bit immediate integer operands.
# Line 475  Line 491 
491  OPDEF(JSOP_UNUSED205,     205,"unused205",   NULL,    1,  0,  0,  0,  JOF_BYTE)  OPDEF(JSOP_UNUSED205,     205,"unused205",   NULL,    1,  0,  0,  0,  JOF_BYTE)
492  OPDEF(JSOP_UNUSED206,     206,"unused206",   NULL,    1,  0,  0,  0,  JOF_BYTE)  OPDEF(JSOP_UNUSED206,     206,"unused206",   NULL,    1,  0,  0,  0,  JOF_BYTE)
493  OPDEF(JSOP_UNUSED207,     207,"unused207",   NULL,    1,  0,  0,  0,  JOF_BYTE)  OPDEF(JSOP_UNUSED207,     207,"unused207",   NULL,    1,  0,  0,  0,  JOF_BYTE)
494    OPDEF(JSOP_UNUSED208,     208,"unused208",   NULL,    1,  0,  0,  0,  JOF_BYTE)
495    OPDEF(JSOP_UNUSED209,     209,"unused209",   NULL,    1,  0,  0,  0,  JOF_BYTE)
496    
497  /*  /*
498   * Iterator, generator, and array comprehension support.   * Generator and array comprehension support.
499   */   */
 OPDEF(JSOP_FORCONST,      208,"forconst",    NULL,    3,  0,  1, 19,  JOF_LOCAL|JOF_NAME|JOF_FOR)  
 OPDEF(JSOP_ENDITER,       209,"enditer",     NULL,    1,  1,  0,  0,  JOF_BYTE|JOF_TMPSLOT)  
500  OPDEF(JSOP_GENERATOR,     210,"generator",   NULL,    1,  0,  0,  0,  JOF_BYTE)  OPDEF(JSOP_GENERATOR,     210,"generator",   NULL,    1,  0,  0,  0,  JOF_BYTE)
501  OPDEF(JSOP_YIELD,         211,"yield",       NULL,    1,  1,  1,  1,  JOF_BYTE)  OPDEF(JSOP_YIELD,         211,"yield",       NULL,    1,  1,  1,  1,  JOF_BYTE)
502  OPDEF(JSOP_ARRAYPUSH,     212,"arraypush",   NULL,    3,  1,  0,  3,  JOF_LOCAL)  OPDEF(JSOP_ARRAYPUSH,     212,"arraypush",   NULL,    3,  1,  0,  3,  JOF_LOCAL)
# Line 499  Line 515 
515   * Variant of JSOP_LEAVEBLOCK has a result on the stack above the locals,   * Variant of JSOP_LEAVEBLOCK has a result on the stack above the locals,
516   * which must be moved down when the block pops.   * which must be moved down when the block pops.
517   */   */
518  OPDEF(JSOP_LEAVEBLOCKEXPR,215,"leaveblockexpr",NULL,  3, -1,  1,  1,  JOF_UINT16)  OPDEF(JSOP_LEAVEBLOCKEXPR,215,"leaveblockexpr",NULL,  3, -1,  1,  3,  JOF_UINT16)
519    
520  /*  /*
521   * Optimize common JSOP_{THIS,GET{ARG,LOCAL}} -> JSOP_GETPROP cliches.   * Optimize common JSOP_{THIS,GET{ARG,LOCAL}} -> JSOP_GETPROP cliches.

Legend:
Removed from v.332  
changed lines
  Added in v.399

  ViewVC Help
Powered by ViewVC 1.1.24