Bug 687683: Assert that REJOIN_CHECK_ARGUMENTS and REJOIN_FUNCTION_PROLOGUE are never generated in debug mode. r=bhackett1024

Explanation in the comments.

Fixing bug 699196 properly entails replacing the assertion this patch adds
with real code to call ScriptDebugPrologue. If this patch lands, hopefully
the person fixing 669196 will notice that and write tests that reach the
assertion/new code, but just to make sure we should probably add a note to
that bug about it.
This commit is contained in:
Jim Blandy 2011-12-06 11:40:27 -08:00
Родитель 89ecd2603c
Коммит 066f111072
1 изменённых файлов: 13 добавлений и 2 удалений

Просмотреть файл

@ -920,8 +920,19 @@ js_InternalInterpret(void *returnData, void *returnType, void *returnReg, js::VM
if (!ScriptPrologueOrGeneratorResume(cx, fp, types::UseNewTypeAtEntry(cx, fp)))
return js_InternalThrow(f);
if (cx->compartment->debugMode())
js::ScriptDebugPrologue(cx, fp);
/*
* Having called ScriptPrologueOrGeneratorResume, we would normally call
* ScriptDebugPrologue here. But in debug mode, we only use JITted
* functions' invokeEntry entry point, whereas CheckArgumentTypes
* (REJOIN_CHECK_ARGUMENTS) and FunctionFramePrologue
* (REJOIN_FUNCTION_PROLOGUE) are only reachable via the other entry
* points. So we should never need either of these rejoin tails in debug
* mode.
*
* If we fix bug 699196 ("Debug mode code could use inline caches
* now"), then these cases will become reachable again.
*/
JS_ASSERT(!cx->compartment->debugMode());
break;