--- 8aafa58b619298c726ab56381e50ff4eeac7ade7/js/src/vm/BytecodeUtil.cpp
+++ ca828d00606a9fe726f8385e68e32219e36cbd05/js/src/vm/BytecodeUtil.cpp
@@ -570,16 +570,17 @@ uint32_t BytecodeParser::simulateOp(JSOp
switch (op) {
case JSOp::InitHiddenProp:
case JSOp::InitHiddenPropGetter:
case JSOp::InitHiddenPropSetter:
case JSOp::InitLockedProp:
case JSOp::InitProp:
case JSOp::InitPropGetter:
case JSOp::InitPropSetter:
+ case JSOp::MutateProto:
case JSOp::SetFunName:
// Keep the second value.
MOZ_ASSERT(nuses == 2);
MOZ_ASSERT(ndefs == 1);
goto end;
case JSOp::InitElem:
case JSOp::InitElemGetter:
@@ -732,22 +733,30 @@ uint32_t BytecodeParser::simulateOp(JSOp
MOZ_ASSERT(ndefs == 1);
offsetStack[stackDepth] = offsetStack[stackDepth + 3];
break;
case JSOp::IsGenClosing:
case JSOp::IsNoIter:
case JSOp::IsNullOrUndefined:
case JSOp::MoreIter:
+ case JSOp::CanSkipAwait:
// Keep the top value and push one more value.
MOZ_ASSERT(nuses == 1);
MOZ_ASSERT(ndefs == 2);
offsetStack[stackDepth + 1].set(offset, 1);
break;
+ case JSOp::MaybeExtractAwaitValue:
+ // Keep the top value and replace the second to top value.
+ MOZ_ASSERT(nuses == 2);
+ MOZ_ASSERT(ndefs == 2);
+ offsetStack[stackDepth].set(offset, 0);
+ break;
+
case JSOp::CheckPrivateField:
// Keep the top two values, and push one new value.
MOZ_ASSERT(nuses == 2);
MOZ_ASSERT(ndefs == 3);
offsetStack[stackDepth + 2].set(offset, 2);
break;
}
@@ -1941,16 +1950,18 @@ bool ExpressionDecompiler::decompilePC(j
return write(js_undefined_str);
case JSOp::GlobalThis:
case JSOp::NonSyntacticGlobalThis:
// |this| could convert to a very long object initialiser, so cite it by
// its keyword name.
return write(js_this_str);
case JSOp::NewTarget:
return write("new.target");
+ case JSOp::ImportMeta:
+ return write("import.meta");
case JSOp::Call:
case JSOp::CallContent:
case JSOp::CallIgnoresRv:
case JSOp::CallIter:
case JSOp::CallContentIter: {
uint16_t argc = GET_ARGC(pc);
return decompilePCForStackOperand(pc, -int32_t(argc + 2)) &&
write(argc ? "(...)" : "()");
@@ -2003,16 +2014,19 @@ bool ExpressionDecompiler::decompilePC(j
decompilePCForStackOperand(pc, -int32_t(argc + 3)) &&
write(argc ? "(...))" : "())");
}
case JSOp::SpreadNew:
return write("(new ") && decompilePCForStackOperand(pc, -4) &&
write("(...))");
+ case JSOp::DynamicImport:
+ return write("import(...)");
+
case JSOp::Typeof:
case JSOp::TypeofExpr:
return write("(typeof ") && decompilePCForStackOperand(pc, -1) &&
write(")");
case JSOp::InitElemArray:
return write("[...]");
@@ -2068,16 +2082,26 @@ bool ExpressionDecompiler::decompilePC(j
#ifdef DEBUG
if (isStackDump) {
// Special decompilation for stack dump.
switch (op) {
case JSOp::Arguments:
return write("arguments");
+ case JSOp::ArgumentsLength:
+ return write("arguments.length");
+
+ case JSOp::GetFrameArg:
+ return sprinter.printf("arguments[%u]", GET_ARGNO(pc));
+
+ case JSOp::GetActualArg:
+ return write("arguments[") && decompilePCForStackOperand(pc, -1) &&
+ write("]");
+
case JSOp::BindGName:
return write("GLOBAL");
case JSOp::BindName:
case JSOp::BindVar:
return write("ENV");
case JSOp::Callee:
@@ -2148,19 +2172,16 @@ bool ExpressionDecompiler::decompilePC(j
case JSOp::ToAsyncIter:
return write("ASYNCITER");
case JSOp::MoreIter:
// For stack dump, defIndex == 0 is not used.
MOZ_ASSERT(defIndex == 1);
return write("MOREITER");
- case JSOp::MutateProto:
- return write("SUCCEEDED");
-
case JSOp::NewInit:
case JSOp::NewObject:
case JSOp::ObjWithProto:
return write("OBJ");
case JSOp::OptimizeSpreadCall:
return write("OPTIMIZED");
@@ -2200,25 +2221,40 @@ bool ExpressionDecompiler::decompilePC(j
case JSOp::ResumeKind:
return write("RESUMEKIND");
case JSOp::AsyncAwait:
case JSOp::AsyncResolve:
return write("PROMISE");
+ case JSOp::CanSkipAwait:
+ // For stack dump, defIndex == 0 is not used.
+ MOZ_ASSERT(defIndex == 1);
+ return write("CAN_SKIP_AWAIT");
+
+ case JSOp::MaybeExtractAwaitValue:
+ // For stack dump, defIndex == 1 is not used.
+ MOZ_ASSERT(defIndex == 0);
+ return write("MAYBE_RESOLVED(") && decompilePCForStackOperand(pc, -2) &&
+ write(")");
+
case JSOp::CheckPrivateField:
return write("HasPrivateField");
case JSOp::NewPrivateName:
return write("PRIVATENAME");
case JSOp::CheckReturn:
return write("RVAL");
+ case JSOp::HasOwn:
+ return write("HasOwn(") && decompilePCForStackOperand(pc, -2) &&
+ write(", ") && decompilePCForStackOperand(pc, -1) && write(")");
+
default:
break;
}
return write("<unknown>");
}
#endif /* DEBUG */
return write("(intermediate value)");
Files
/js/src/vm/BytecodeUtil.cpp
Changesets
Diffs
/js/src/vm/BytecodeUtil.cpp