Commit 6a8b90c3 authored by Simon Zünd's avatar Simon Zünd Committed by V8 LUCI CQ

[debug] Fix source position around class literals

This CL builds upon https://crrev.com/c/3284887 (and partly reverts it).

Class literals are a bit iffy when it comes to source position and
debugging. Mainly the debugger assumes the following invariant:
When we are paused inside a class scope, then we expect the class's
BlockContext to be pushed already. On the other hand, when we are
paused outside a class scope in a function, we don't expect to find
the class's BlockContext.

The problem is that there are cases where we can either pause
"inside" or "outside" the class scope. E.g.:

  * `var x = class {};` will break on `class` which is inside
    the class scope, so we expect the BlockContext to be pushed

  * `new class x {};` will break on `new` which is outside the
    class scope, so we expect the BlockContext to not be pushed
    yet.

The issue with the fix in https://crrev.com/c/3284887 is that it
adjusted the break position for the bytecode of class literals to
ALWAYS be after the BlockContext is pushed. This breaks the
second example above. We need to tighten the fix a bit and only
defer the break position if the "current source position" is
inside the class's scope. This way we always guarantee that the
BlockContext is pushed or not, depending if the source position
that corresponds to the break position is inside or outside the
class's scope.

Note 1: The CL updates a lot of the bytecode expectations. This
is because the class literals are often the first statement in
the snippet so we don't need to defer the break position.

Note 2: We add a mirrored debugger test to the inspector test so
the fuzzer can have some more fun.

Fixed: chromim:1350842
Change-Id: I9b5a409f77be80db674217a685a3fc9f8a0a71cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3827871Reviewed-by: 's avatarShu-yu Guo <syg@chromium.org>
Reviewed-by: 's avatarKim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82473}
parent 8140809e
......@@ -510,7 +510,11 @@ class V8_EXPORT_PRIVATE BytecodeArrayBuilder final {
SetStatementPosition(stmt->position());
}
BytecodeSourceInfo PopSourcePosition() {
base::Optional<BytecodeSourceInfo> MaybePopSourcePosition(int scope_start) {
if (!latest_source_info_.is_valid() ||
latest_source_info_.source_position() < scope_start) {
return base::nullopt;
}
BytecodeSourceInfo source_info = latest_source_info_;
latest_source_info_.set_invalid();
return source_info;
......
......@@ -2811,11 +2811,19 @@ void BytecodeGenerator::VisitClassLiteral(ClassLiteral* expr, Register name) {
// Make sure to associate the source position for the class
// after the block context is created. Otherwise we have a mismatch
// between the scope and the context, where we already are in a
// block context for the class, but not yet in the class scope.
BytecodeSourceInfo source_info = builder()->PopSourcePosition();
// block context for the class, but not yet in the class scope. Only do
// this if the current source position is inside the class scope though.
// For example:
// * `var x = class {};` will break on `class` which is inside
// the class scope, so we expect the BlockContext to be pushed.
//
// * `new class x {};` will break on `new` which is outside the
// class scope, so we expect the BlockContext to not be pushed yet.
base::Optional<BytecodeSourceInfo> source_info =
builder()->MaybePopSourcePosition(expr->scope()->start_position());
BuildNewLocalBlockContext(expr->scope());
ContextScope scope(this, expr->scope());
builder()->PushSourcePosition(source_info);
if (source_info) builder()->PushSourcePosition(*source_info);
BuildClassLiteral(expr, name);
} else {
BuildClassLiteral(expr, name);
......
// Copyright 2022 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
debug.Debug.setBreakPoint(f, 2);
function f() {
function id(x) { return x; } // Force context allocation of `f`.
new class tmp {
#foo = id(42);
};
}
f();
......@@ -12,11 +12,10 @@ const script = `
debugger;
class tmpName {
new class tmpName {
#thisWorks = this.constructor.name;
#thisFails = identity(this.constructor.name);
};
new tmpName;
})();
`;
......
......@@ -1445,6 +1445,9 @@ TEST_F(BytecodeGeneratorTest, CallNew) {
"}\n"
"function f() { return new bar(3, 4, 5); }\n"
"f();\n",
"function f() { new class {}; }\n"
"f();\n",
};
CHECK(CompareTexts(BuildActual(printer(), snippets),
......
......@@ -84,3 +84,36 @@ constant pool: [
handlers: [
]
---
snippet: "
function f() { new class {}; }
f();
"
frame size: 5
parameter count: 1
bytecode array length: 33
bytecodes: [
/* 15 S> */ B(CreateBlockContext), U8(0),
B(PushContext), R(0),
B(LdaTheHole),
B(Star4),
B(CreateClosure), U8(2), U8(0), U8(2),
B(Star1),
B(LdaConstant), U8(1),
B(Star2),
B(Mov), R(1), R(3),
B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(3),
B(PopContext), R(0),
B(Ldar), R(3),
/* 15 E> */ B(Construct), R(3), R(0), U8(0), U8(0),
B(LdaUndefined),
/* 29 S> */ B(Return),
]
constant pool: [
SCOPE_INFO_TYPE,
FIXED_ARRAY_TYPE,
SHARED_FUNCTION_INFO_TYPE,
]
handlers: [
]
......@@ -16,11 +16,11 @@ frame size: 7
parameter count: 1
bytecode array length: 34
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(1),
B(LdaTheHole),
B(Star5),
/* 30 E> */ B(CreateClosure), U8(2), U8(0), U8(2),
B(CreateClosure), U8(2), U8(0), U8(2),
B(Star2),
B(LdaConstant), U8(1),
B(Star3),
......@@ -53,11 +53,11 @@ frame size: 7
parameter count: 1
bytecode array length: 34
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(1),
B(LdaTheHole),
B(Star5),
/* 30 E> */ B(CreateClosure), U8(2), U8(0), U8(2),
B(CreateClosure), U8(2), U8(0), U8(2),
B(Star2),
B(LdaConstant), U8(1),
B(Star3),
......@@ -187,9 +187,9 @@ frame size: 7
parameter count: 1
bytecode array length: 58
bytecodes: [
B(CreateBlockContext), U8(0),
/* 34 S> */ B(CreateBlockContext), U8(0),
B(PushContext), R(1),
/* 34 S> */ B(LdaTheHole),
B(LdaTheHole),
B(Star5),
B(CreateClosure), U8(2), U8(0), U8(2),
B(Star2),
......
......@@ -14,11 +14,11 @@ frame size: 6
parameter count: 1
bytecode array length: 41
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(1),
B(LdaTheHole),
B(Star5),
/* 30 E> */ B(CreateClosure), U8(2), U8(0), U8(2),
B(CreateClosure), U8(2), U8(0), U8(2),
B(Star2),
B(LdaConstant), U8(1),
B(Star3),
......@@ -51,11 +51,11 @@ frame size: 6
parameter count: 1
bytecode array length: 43
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(1),
B(LdaTheHole),
B(Star5),
/* 30 E> */ B(CreateClosure), U8(2), U8(0), U8(2),
B(CreateClosure), U8(2), U8(0), U8(2),
B(Star2),
B(LdaConstant), U8(1),
B(Star3),
......@@ -90,11 +90,11 @@ frame size: 7
parameter count: 1
bytecode array length: 103
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(1),
B(LdaTheHole),
B(Star5),
/* 30 E> */ B(CreateClosure), U8(2), U8(0), U8(2),
B(CreateClosure), U8(2), U8(0), U8(2),
B(Star2),
B(LdaConstant), U8(1),
B(Star3),
......
......@@ -18,11 +18,11 @@ frame size: 6
parameter count: 1
bytecode array length: 56
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(1),
B(LdaConstant), U8(2),
B(Star3),
/* 30 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(3), U8(1),
B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(3), U8(1),
B(StaCurrentContextSlot), U8(3),
B(LdaTheHole),
B(Star5),
......@@ -66,11 +66,11 @@ frame size: 6
parameter count: 1
bytecode array length: 53
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(1),
B(LdaConstant), U8(2),
B(Star3),
/* 30 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(3), U8(1),
B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(3), U8(1),
B(StaCurrentContextSlot), U8(3),
B(LdaTheHole),
B(Star5),
......@@ -113,11 +113,11 @@ frame size: 6
parameter count: 1
bytecode array length: 53
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(1),
B(LdaConstant), U8(2),
B(Star3),
/* 30 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(3), U8(1),
B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(3), U8(1),
B(StaCurrentContextSlot), U8(3),
B(LdaTheHole),
B(Star5),
......@@ -166,11 +166,11 @@ frame size: 7
parameter count: 1
bytecode array length: 111
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(2),
B(LdaConstant), U8(2),
B(Star4),
/* 30 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(4), U8(1),
B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(4), U8(1),
B(StaCurrentContextSlot), U8(3),
B(LdaTheHole),
B(Star6),
......@@ -188,11 +188,11 @@ bytecodes: [
B(StaCurrentContextSlot), U8(2),
B(PopContext), R(2),
B(Mov), R(3), R(0),
B(CreateBlockContext), U8(6),
/* 38 E> */ B(CreateBlockContext), U8(6),
B(PushContext), R(2),
B(LdaConstant), U8(8),
B(Star4),
/* 38 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(4), U8(1),
B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(4), U8(1),
B(StaCurrentContextSlot), U8(3),
/* 118 E> */ B(CreateClosure), U8(9), U8(3), U8(2),
B(Star3),
......@@ -243,11 +243,11 @@ frame size: 8
parameter count: 1
bytecode array length: 99
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(2),
B(LdaTheHole),
B(Star6),
/* 30 E> */ B(CreateClosure), U8(2), U8(0), U8(2),
B(CreateClosure), U8(2), U8(0), U8(2),
B(Star3),
B(LdaConstant), U8(1),
B(Star4),
......@@ -257,11 +257,11 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
B(PopContext), R(2),
B(Mov), R(5), R(0),
B(CreateBlockContext), U8(4),
/* 38 E> */ B(CreateBlockContext), U8(4),
B(PushContext), R(2),
B(LdaConstant), U8(6),
B(Star4),
/* 38 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(4), U8(1),
B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(4), U8(1),
B(StaCurrentContextSlot), U8(3),
/* 77 E> */ B(CreateClosure), U8(7), U8(2), U8(2),
B(Star3),
......@@ -314,11 +314,11 @@ frame size: 8
parameter count: 1
bytecode array length: 99
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(2),
B(LdaTheHole),
B(Star6),
/* 30 E> */ B(CreateClosure), U8(2), U8(0), U8(2),
B(CreateClosure), U8(2), U8(0), U8(2),
B(Star3),
B(LdaConstant), U8(1),
B(Star4),
......@@ -328,11 +328,11 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
B(PopContext), R(2),
B(Mov), R(5), R(0),
B(CreateBlockContext), U8(4),
/* 38 E> */ B(CreateBlockContext), U8(4),
B(PushContext), R(2),
B(LdaConstant), U8(6),
B(Star4),
/* 38 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(4), U8(1),
B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(4), U8(1),
B(StaCurrentContextSlot), U8(3),
/* 80 E> */ B(CreateClosure), U8(7), U8(2), U8(2),
B(Star3),
......
......@@ -26,13 +26,13 @@ frame size: 7
parameter count: 1
bytecode array length: 114
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(2),
B(LdaConstant), U8(2),
B(Star4),
B(LdaConstant), U8(2),
B(Star4),
/* 30 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateNameSymbol), R(4), U8(1),
B(CallRuntime), U16(Runtime::kCreatePrivateNameSymbol), R(4), U8(1),
B(StaCurrentContextSlot), U8(2),
B(LdaTheHole),
B(Star6),
......@@ -47,13 +47,13 @@ bytecodes: [
B(SetNamedProperty), R(3), U8(5), U8(0),
B(PopContext), R(2),
B(Mov), R(5), R(0),
B(CreateBlockContext), U8(6),
/* 38 E> */ B(CreateBlockContext), U8(6),
B(PushContext), R(2),
B(LdaConstant), U8(2),
B(Star4),
B(LdaConstant), U8(2),
B(Star4),
/* 38 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateNameSymbol), R(4), U8(1),
B(CallRuntime), U16(Runtime::kCreatePrivateNameSymbol), R(4), U8(1),
B(StaCurrentContextSlot), U8(2),
B(LdaTheHole),
B(Star6),
......@@ -129,13 +129,13 @@ frame size: 12
parameter count: 1
bytecode array length: 232
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(3),
B(LdaConstant), U8(2),
B(Star5),
B(LdaConstant), U8(2),
B(Star5),
/* 30 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateNameSymbol), R(5), U8(1),
B(CallRuntime), U16(Runtime::kCreatePrivateNameSymbol), R(5), U8(1),
B(StaCurrentContextSlot), U8(2),
B(LdaTheHole),
B(Star11),
......@@ -157,13 +157,13 @@ bytecodes: [
B(SetNamedProperty), R(4), U8(7), U8(0),
B(PopContext), R(3),
B(Mov), R(6), R(0),
B(CreateBlockContext), U8(8),
/* 38 E> */ B(CreateBlockContext), U8(8),
B(PushContext), R(3),
B(LdaConstant), U8(2),
B(Star5),
B(LdaConstant), U8(2),
B(Star5),
/* 38 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateNameSymbol), R(5), U8(1),
B(CallRuntime), U16(Runtime::kCreatePrivateNameSymbol), R(5), U8(1),
B(StaCurrentContextSlot), U8(2),
B(LdaConstant), U8(10),
B(Star5),
......@@ -195,13 +195,13 @@ bytecodes: [
B(SetNamedProperty), R(4), U8(7), U8(2),
B(PopContext), R(3),
B(Mov), R(6), R(1),
B(CreateBlockContext), U8(17),
/* 140 E> */ B(CreateBlockContext), U8(17),
B(PushContext), R(3),
B(LdaConstant), U8(2),
B(Star5),
B(LdaConstant), U8(2),
B(Star5),
/* 140 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateNameSymbol), R(5), U8(1),
B(CallRuntime), U16(Runtime::kCreatePrivateNameSymbol), R(5), U8(1),
B(StaCurrentContextSlot), U8(2),
/* 356 E> */ B(CreateClosure), U8(19), U8(8), U8(2),
B(Star4),
......
......@@ -17,11 +17,11 @@ frame size: 6
parameter count: 1
bytecode array length: 45
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(1),
B(LdaConstant), U8(2),
B(Star3),
/* 30 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(3), U8(1),
B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(3), U8(1),
B(StaCurrentContextSlot), U8(3),
B(CreateClosure), U8(3), U8(0), U8(2),
B(StaCurrentContextSlot), U8(2),
......@@ -63,11 +63,11 @@ frame size: 7
parameter count: 1
bytecode array length: 89
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(2),
B(LdaConstant), U8(2),
B(Star4),
/* 30 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(4), U8(1),
B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(4), U8(1),
B(StaCurrentContextSlot), U8(3),
B(CreateClosure), U8(3), U8(0), U8(2),
B(StaCurrentContextSlot), U8(2),
......@@ -81,11 +81,11 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(3),
B(PopContext), R(2),
B(Mov), R(5), R(0),
B(CreateBlockContext), U8(5),
/* 38 E> */ B(CreateBlockContext), U8(5),
B(PushContext), R(2),
B(LdaConstant), U8(7),
B(Star4),
/* 38 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(4), U8(1),
B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(4), U8(1),
B(StaCurrentContextSlot), U8(3),
B(CreateClosure), U8(8), U8(2), U8(2),
B(StaCurrentContextSlot), U8(2),
......@@ -129,11 +129,11 @@ frame size: 8
parameter count: 1
bytecode array length: 82
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(2),
B(LdaTheHole),
B(Star6),
/* 30 E> */ B(CreateClosure), U8(2), U8(0), U8(2),
B(CreateClosure), U8(2), U8(0), U8(2),
B(Star3),
B(LdaConstant), U8(1),
B(Star4),
......@@ -143,11 +143,11 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
B(PopContext), R(2),
B(Mov), R(5), R(0),
B(CreateBlockContext), U8(4),
/* 38 E> */ B(CreateBlockContext), U8(4),
B(PushContext), R(2),
B(LdaConstant), U8(6),
B(Star4),
/* 38 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(4), U8(1),
B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(4), U8(1),
B(StaCurrentContextSlot), U8(3),
B(CreateClosure), U8(7), U8(2), U8(2),
B(StaCurrentContextSlot), U8(2),
......
......@@ -25,10 +25,10 @@ frame size: 8
parameter count: 1
bytecode array length: 104
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(2),
B(LdaTheHole),
/* 30 E> */ B(StaCurrentContextSlot), U8(2),
B(StaCurrentContextSlot), U8(2),
B(LdaTheHole),
B(Star6),
B(CreateClosure), U8(2), U8(0), U8(2),
......@@ -45,10 +45,10 @@ bytecodes: [
B(SetNamedProperty), R(3), U8(5), U8(0),
B(PopContext), R(2),
B(Mov), R(5), R(0),
B(CreateBlockContext), U8(6),
/* 38 E> */ B(CreateBlockContext), U8(6),
B(PushContext), R(2),
B(LdaTheHole),
/* 38 E> */ B(StaCurrentContextSlot), U8(2),
B(StaCurrentContextSlot), U8(2),
B(LdaTheHole),
B(Star6),
B(CreateClosure), U8(8), U8(2), U8(2),
......@@ -121,10 +121,10 @@ frame size: 12
parameter count: 1
bytecode array length: 199
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(3),
B(LdaTheHole),
/* 30 E> */ B(StaCurrentContextSlot), U8(2),
B(StaCurrentContextSlot), U8(2),
B(LdaTheHole),
B(Star11),
B(CreateClosure), U8(3), U8(0), U8(2),
......@@ -148,10 +148,10 @@ bytecodes: [
B(SetNamedProperty), R(4), U8(7), U8(0),
B(PopContext), R(3),
B(Mov), R(6), R(0),
B(CreateBlockContext), U8(8),
/* 38 E> */ B(CreateBlockContext), U8(8),
B(PushContext), R(3),
B(LdaTheHole),
/* 38 E> */ B(StaCurrentContextSlot), U8(2),
B(StaCurrentContextSlot), U8(2),
B(LdaTheHole),
B(Star11),
B(CreateClosure), U8(11), U8(3), U8(2),
......@@ -177,10 +177,10 @@ bytecodes: [
B(SetNamedProperty), R(4), U8(7), U8(2),
B(PopContext), R(3),
B(Mov), R(6), R(1),
B(CreateBlockContext), U8(15),
/* 90 E> */ B(CreateBlockContext), U8(15),
B(PushContext), R(3),
B(LdaTheHole),
/* 90 E> */ B(StaCurrentContextSlot), U8(2),
B(StaCurrentContextSlot), U8(2),
/* 236 E> */ B(CreateClosure), U8(17), U8(7), U8(2),
B(Star4),
B(LdaConstant), U8(16),
......
......@@ -29,10 +29,10 @@ frame size: 9
parameter count: 1
bytecode array length: 166
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(2),
B(LdaTheHole),
/* 30 E> */ B(StaCurrentContextSlot), U8(2),
B(StaCurrentContextSlot), U8(2),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(3),
B(LdaTheHole),
......@@ -62,10 +62,10 @@ bytecodes: [
B(CallProperty0), R(6), R(3), U8(3),
B(PopContext), R(2),
B(Mov), R(3), R(0),
B(CreateBlockContext), U8(9),
/* 38 E> */ B(CreateBlockContext), U8(9),
B(PushContext), R(2),
B(LdaTheHole),
/* 38 E> */ B(StaCurrentContextSlot), U8(2),
B(StaCurrentContextSlot), U8(2),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(3),
B(LdaTheHole),
......@@ -161,10 +161,10 @@ frame size: 12
parameter count: 1
bytecode array length: 298
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(3),
B(LdaTheHole),
/* 30 E> */ B(StaCurrentContextSlot), U8(2),
B(StaCurrentContextSlot), U8(2),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(3),
B(LdaTheHole),
......@@ -201,10 +201,10 @@ bytecodes: [
B(CallProperty0), R(7), R(4), U8(3),
B(PopContext), R(3),
B(Mov), R(4), R(0),
B(CreateBlockContext), U8(11),
/* 38 E> */ B(CreateBlockContext), U8(11),
B(PushContext), R(3),
B(LdaTheHole),
/* 38 E> */ B(StaCurrentContextSlot), U8(2),
B(StaCurrentContextSlot), U8(2),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(3),
B(LdaTheHole),
......@@ -243,10 +243,10 @@ bytecodes: [
B(CallProperty0), R(7), R(4), U8(7),
B(PopContext), R(3),
B(Mov), R(4), R(1),
B(CreateBlockContext), U8(19),
/* 122 E> */ B(CreateBlockContext), U8(19),
B(PushContext), R(3),
B(LdaTheHole),
/* 122 E> */ B(StaCurrentContextSlot), U8(2),
B(StaCurrentContextSlot), U8(2),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(3),
/* 313 E> */ B(CreateClosure), U8(21), U8(9), U8(2),
......
......@@ -17,9 +17,9 @@ frame size: 6
parameter count: 1
bytecode array length: 35
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(1),
/* 30 E> */ B(CreateClosure), U8(2), U8(0), U8(2),
B(CreateClosure), U8(2), U8(0), U8(2),
B(StaCurrentContextSlot), U8(2),
B(LdaTheHole),
B(Star5),
......@@ -55,11 +55,11 @@ frame size: 6
parameter count: 1
bytecode array length: 43
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(1),
B(LdaTheHole),
B(Star5),
/* 30 E> */ B(CreateClosure), U8(2), U8(0), U8(2),
B(CreateClosure), U8(2), U8(0), U8(2),
B(Star2),
B(LdaConstant), U8(1),
B(Star3),
......@@ -97,11 +97,11 @@ frame size: 6
parameter count: 1
bytecode array length: 43
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(1),
B(LdaTheHole),
B(Star5),
/* 30 E> */ B(CreateClosure), U8(2), U8(0), U8(2),
B(CreateClosure), U8(2), U8(0), U8(2),
B(Star2),
B(LdaConstant), U8(1),
B(Star3),
......@@ -140,11 +140,11 @@ frame size: 6
parameter count: 1
bytecode array length: 46
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(1),
B(LdaTheHole),
B(Star5),
/* 30 E> */ B(CreateClosure), U8(2), U8(0), U8(2),
B(CreateClosure), U8(2), U8(0), U8(2),
B(Star2),
B(LdaConstant), U8(1),
B(Star3),
......@@ -184,11 +184,11 @@ frame size: 6
parameter count: 1
bytecode array length: 51
bytecodes: [
B(CreateBlockContext), U8(0),
/* 30 E> */ B(CreateBlockContext), U8(0),
B(PushContext), R(1),
B(LdaConstant), U8(2),
B(Star3),
/* 30 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(3), U8(1),
B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(3), U8(1),
B(StaCurrentContextSlot), U8(4),
B(CreateClosure), U8(3), U8(0), U8(2),
B(StaCurrentContextSlot), U8(2),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment