Revert "Issue #2645 - Fix type confusion for ResumeKind"

This reverts commit 19c4996881.
This commit is contained in:
roytam1 2024-10-24 22:55:27 +08:00
commit f890f88314
3 changed files with 5 additions and 8 deletions

View file

@ -1960,13 +1960,8 @@ CASE(JSOP_RETRVAL)
/* Resume execution in the calling frame. */
if (MOZ_LIKELY(interpReturnOK)) {
if (JSOp(*REGS.pc) == JSOP_RESUME) {
ADVANCE_AND_DISPATCH(JSOP_RESUME_LENGTH);
}
TypeScript::Monitor(cx, script, REGS.pc, REGS.sp[-1]);
MOZ_ASSERT(CodeSpec[*REGS.pc].length == JSOP_CALL_LENGTH);
ADVANCE_AND_DISPATCH(JSOP_CALL_LENGTH);
}

View file

@ -2106,7 +2106,7 @@
* Operands: resume kind (GeneratorObject::ResumeKind)
* Stack: gen, val => rval
*/ \
macro(JSOP_RESUME, 205,"resume", NULL, 2, 2, 1, JOF_UINT16|JOF_INVOKE) \
macro(JSOP_RESUME, 205,"resume", NULL, 3, 2, 1, JOF_UINT8|JOF_INVOKE) \
/*
* Pops the top two values on the stack as 'obj' and 'v', pushes 'v' to
* 'obj'.

View file

@ -3335,7 +3335,9 @@ js::TypeMonitorResult(JSContext* cx, JSScript* script, jsbytecode* pc, TypeSet::
void
js::TypeMonitorResult(JSContext* cx, JSScript* script, jsbytecode* pc, const js::Value& rval)
{
MOZ_ASSERT(CodeSpec[*pc].format & JOF_TYPESET);
/* Allow the non-TYPESET scenario to simplify stubs used in compound opcodes. */
if (!(CodeSpec[*pc].format & JOF_TYPESET))
return;
if (!script->hasBaselineScript())
return;