Commit 7d6deeb9 authored by Shu-yu Guo's avatar Shu-yu Guo Committed by V8 LUCI CQ

[interpreter] Add missing RegisterAllocationScope

Bug: v8:12563
Change-Id: I564c973d5d03c198bffc8edba8d9a3b7ec66c8e6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3423581
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78897}
parent 8dc46df6
......@@ -5215,6 +5215,7 @@ void BytecodeGenerator::BuildPrivateBrandCheck(Property* property,
builder()->CompareReference(object).JumpIfTrue(
ToBooleanMode::kAlreadyBoolean, &return_check);
const AstRawString* name = scope->class_variable()->raw_name();
RegisterAllocationScope register_scope(this);
RegisterList args = register_allocator()->NewRegisterList(2);
builder()
->LoadLiteral(
......
......@@ -51,7 +51,7 @@ snippet: "
var test = B.test;
test();
"
frame size: 5
frame size: 3
parameter count: 1
bytecode array length: 37
bytecodes: [
......@@ -66,10 +66,10 @@ bytecodes: [
/* 61 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2),
B(Throw),
B(Wide), B(LdaSmi), I16(289),
B(Star3),
B(Star1),
B(LdaConstant), U8(1),
B(Star4),
B(CallRuntime), U16(Runtime::kNewTypeError), R(3), U8(2),
B(Star2),
B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2),
B(Throw),
]
constant pool: [
......@@ -89,7 +89,7 @@ snippet: "
var test = C.test;
test();
"
frame size: 5
frame size: 3
parameter count: 1
bytecode array length: 37
bytecodes: [
......@@ -104,10 +104,10 @@ bytecodes: [
/* 61 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2),
B(Throw),
B(Wide), B(LdaSmi), I16(289),
B(Star3),
B(Star1),
B(LdaConstant), U8(1),
B(Star4),
B(CallRuntime), U16(Runtime::kNewTypeError), R(3), U8(2),
B(Star2),
B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2),
B(Throw),
]
constant pool: [
......@@ -133,7 +133,7 @@ snippet: "
var test = D.test;
test();
"
frame size: 6
frame size: 5
parameter count: 1
bytecode array length: 127
bytecodes: [
......@@ -150,13 +150,13 @@ bytecodes: [
/* 95 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(2), U8(2),
B(Throw),
B(CallRuntime), U16(Runtime::kLoadPrivateGetter), R(1), U8(1),
B(Star4),
B(CallProperty0), R(4), R(0), U8(0),
B(Star2),
B(CallProperty0), R(2), R(0), U8(0),
B(Inc), U8(2),
B(Star4),
B(Star2),
/* 97 E> */ B(CallRuntime), U16(Runtime::kLoadPrivateSetter), R(1), U8(1),
B(Star5),
B(CallProperty1), R(5), R(0), R(4), U8(3),
B(Star3),
B(CallProperty1), R(3), R(0), R(2), U8(3),
/* 105 S> */ B(LdaImmutableCurrentContextSlot), U8(2),
B(Star1),
B(LdaSmi), I8(1),
......@@ -172,8 +172,8 @@ bytecodes: [
/* 110 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(3), U8(2),
B(Throw),
B(CallRuntime), U16(Runtime::kLoadPrivateSetter), R(1), U8(1),
B(Star5),
B(CallProperty1), R(5), R(0), R(2), U8(5),
B(Star3),
B(CallProperty1), R(3), R(0), R(2), U8(5),
/* 122 S> */ B(LdaImmutableCurrentContextSlot), U8(2),
B(Star1),
B(LdaCurrentContextSlot), U8(3),
......@@ -187,8 +187,8 @@ bytecodes: [
/* 134 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(2), U8(2),
B(Throw),
B(CallRuntime), U16(Runtime::kLoadPrivateGetter), R(1), U8(1),
B(Star4),
B(CallProperty0), R(4), R(0), U8(7),
B(Star2),
B(CallProperty0), R(2), R(0), U8(7),
/* 137 S> */ B(Return),
]
constant pool: [
......@@ -206,7 +206,7 @@ snippet: "
var test = E.test;
test();
"
frame size: 5
frame size: 3
parameter count: 1
bytecode array length: 37
bytecodes: [
......@@ -221,10 +221,10 @@ bytecodes: [
/* 65 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2),
B(Throw),
B(Wide), B(LdaSmi), I16(291),
B(Star3),
B(Star1),
B(LdaConstant), U8(1),
B(Star4),
B(CallRuntime), U16(Runtime::kNewTypeError), R(3), U8(2),
B(Star2),
B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2),
B(Throw),
]
constant pool: [
......@@ -243,7 +243,7 @@ snippet: "
var test = F.test;
test();
"
frame size: 5
frame size: 3
parameter count: 1
bytecode array length: 37
bytecodes: [
......@@ -258,10 +258,10 @@ bytecodes: [
/* 58 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2),
B(Throw),
B(Wide), B(LdaSmi), I16(290),
B(Star3),
B(Star1),
B(LdaConstant), U8(1),
B(Star4),
B(CallRuntime), U16(Runtime::kNewTypeError), R(3), U8(2),
B(Star2),
B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2),
B(Throw),
]
constant pool: [
......@@ -280,7 +280,7 @@ snippet: "
var test = G.test;
test();
"
frame size: 5
frame size: 3
parameter count: 1
bytecode array length: 37
bytecodes: [
......@@ -295,10 +295,10 @@ bytecodes: [
/* 65 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2),
B(Throw),
B(Wide), B(LdaSmi), I16(291),
B(Star3),
B(Star1),
B(LdaConstant), U8(1),
B(Star4),
B(CallRuntime), U16(Runtime::kNewTypeError), R(3), U8(2),
B(Star2),
B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2),
B(Throw),
]
constant pool: [
......
......@@ -10,6 +10,11 @@ class C {
assertEquals((C?.#m)(), C);
assertEquals(C?.#c?.#m(), C);
assertEquals((C?.#c?.#m)(), C);
assertEquals(C?.#m(42), C);
assertEquals((C?.#m)(42), C);
assertEquals(C?.#c?.#m(42), C);
assertEquals((C?.#c?.#m)(42), C);
}
}
......
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