Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2024-10-24 07:39:14 +08:00
commit 7df6fa1c80
10 changed files with 65 additions and 44 deletions

View file

@ -1871,8 +1871,11 @@ class JSScript : public js::gc::TenuredCell
}
js::PropertyName* getName(jsbytecode* pc) const {
MOZ_ASSERT(containsPC(pc) && containsPC(pc + sizeof(uint32_t)));
return getAtom(GET_UINT32_INDEX(pc))->asPropertyName();
if (containsPC(pc) && containsPC(pc + sizeof(uint32_t))) {
return getAtom(GET_UINT32_INDEX(pc))->asPropertyName();
} else {
return nullptr;
}
}
JSObject* getObject(size_t index) {

View file

@ -1960,8 +1960,13 @@ CASE(JSOP_RETRVAL)
/* Resume execution in the calling frame. */
if (MOZ_LIKELY(interpReturnOK)) {
TypeScript::Monitor(cx, script, REGS.pc, REGS.sp[-1]);
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, 3, 2, 1, JOF_UINT8|JOF_INVOKE) \
macro(JSOP_RESUME, 205,"resume", NULL, 2, 2, 1, JOF_UINT16|JOF_INVOKE) \
/*
* Pops the top two values on the stack as 'obj' and 'v', pushes 'v' to
* 'obj'.

View file

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