Add a per-runtime loop attribute table that associates a jsval attribute with every loop in the code. The jsval is used initially as a counter until a certain threshold is reached, at which point the loop is traced and compiled and the resulting native code object is stored in the jsval to be executed for future encounters of the loop.

This commit is contained in:
Andreas Gal
2008-05-30 10:11:56 -07:00
parent 863df8812c
commit 4bc37bf703
14 changed files with 113 additions and 33 deletions

View File

@@ -368,7 +368,7 @@ js_Disassemble1(JSContext *cx, JSScript *script, jsbytecode *pc,
break;
case JOF_UINT24:
JS_ASSERT(op == JSOP_UINT24);
JS_ASSERT((op == JSOP_UINT24) || (op == JSOP_HEADER));
i = (jsint)GET_UINT24(pc);
goto print_int;
@@ -376,11 +376,6 @@ js_Disassemble1(JSContext *cx, JSScript *script, jsbytecode *pc,
i = GET_INT8(pc);
goto print_int;
case JOF_UINT8:
JS_ASSERT(op == JSOP_HEADER);
i = GET_UINT8(pc);
goto print_int;
case JOF_INT32:
JS_ASSERT(op == JSOP_INT32);
i = GET_INT32(pc);