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, ...@@ -5215,6 +5215,7 @@ void BytecodeGenerator::BuildPrivateBrandCheck(Property* property,
builder()->CompareReference(object).JumpIfTrue( builder()->CompareReference(object).JumpIfTrue(
ToBooleanMode::kAlreadyBoolean, &return_check); ToBooleanMode::kAlreadyBoolean, &return_check);
const AstRawString* name = scope->class_variable()->raw_name(); const AstRawString* name = scope->class_variable()->raw_name();
RegisterAllocationScope register_scope(this);
RegisterList args = register_allocator()->NewRegisterList(2); RegisterList args = register_allocator()->NewRegisterList(2);
builder() builder()
->LoadLiteral( ->LoadLiteral(
......
...@@ -51,7 +51,7 @@ snippet: " ...@@ -51,7 +51,7 @@ snippet: "
var test = B.test; var test = B.test;
test(); test();
" "
frame size: 5 frame size: 3
parameter count: 1 parameter count: 1
bytecode array length: 37 bytecode array length: 37
bytecodes: [ bytecodes: [
...@@ -66,10 +66,10 @@ bytecodes: [ ...@@ -66,10 +66,10 @@ bytecodes: [
/* 61 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2), /* 61 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2),
B(Throw), B(Throw),
B(Wide), B(LdaSmi), I16(289), B(Wide), B(LdaSmi), I16(289),
B(Star3), B(Star1),
B(LdaConstant), U8(1), B(LdaConstant), U8(1),
B(Star4), B(Star2),
B(CallRuntime), U16(Runtime::kNewTypeError), R(3), U8(2), B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2),
B(Throw), B(Throw),
] ]
constant pool: [ constant pool: [
...@@ -89,7 +89,7 @@ snippet: " ...@@ -89,7 +89,7 @@ snippet: "
var test = C.test; var test = C.test;
test(); test();
" "
frame size: 5 frame size: 3
parameter count: 1 parameter count: 1
bytecode array length: 37 bytecode array length: 37
bytecodes: [ bytecodes: [
...@@ -104,10 +104,10 @@ bytecodes: [ ...@@ -104,10 +104,10 @@ bytecodes: [
/* 61 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2), /* 61 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2),
B(Throw), B(Throw),
B(Wide), B(LdaSmi), I16(289), B(Wide), B(LdaSmi), I16(289),
B(Star3), B(Star1),
B(LdaConstant), U8(1), B(LdaConstant), U8(1),
B(Star4), B(Star2),
B(CallRuntime), U16(Runtime::kNewTypeError), R(3), U8(2), B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2),
B(Throw), B(Throw),
] ]
constant pool: [ constant pool: [
...@@ -133,7 +133,7 @@ snippet: " ...@@ -133,7 +133,7 @@ snippet: "
var test = D.test; var test = D.test;
test(); test();
" "
frame size: 6 frame size: 5
parameter count: 1 parameter count: 1
bytecode array length: 127 bytecode array length: 127
bytecodes: [ bytecodes: [
...@@ -150,13 +150,13 @@ bytecodes: [ ...@@ -150,13 +150,13 @@ bytecodes: [
/* 95 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(2), U8(2), /* 95 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(2), U8(2),
B(Throw), B(Throw),
B(CallRuntime), U16(Runtime::kLoadPrivateGetter), R(1), U8(1), B(CallRuntime), U16(Runtime::kLoadPrivateGetter), R(1), U8(1),
B(Star4), B(Star2),
B(CallProperty0), R(4), R(0), U8(0), B(CallProperty0), R(2), R(0), U8(0),
B(Inc), U8(2), B(Inc), U8(2),
B(Star4), B(Star2),
/* 97 E> */ B(CallRuntime), U16(Runtime::kLoadPrivateSetter), R(1), U8(1), /* 97 E> */ B(CallRuntime), U16(Runtime::kLoadPrivateSetter), R(1), U8(1),
B(Star5), B(Star3),
B(CallProperty1), R(5), R(0), R(4), U8(3), B(CallProperty1), R(3), R(0), R(2), U8(3),
/* 105 S> */ B(LdaImmutableCurrentContextSlot), U8(2), /* 105 S> */ B(LdaImmutableCurrentContextSlot), U8(2),
B(Star1), B(Star1),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
...@@ -172,8 +172,8 @@ bytecodes: [ ...@@ -172,8 +172,8 @@ bytecodes: [
/* 110 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(3), U8(2), /* 110 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(3), U8(2),
B(Throw), B(Throw),
B(CallRuntime), U16(Runtime::kLoadPrivateSetter), R(1), U8(1), B(CallRuntime), U16(Runtime::kLoadPrivateSetter), R(1), U8(1),
B(Star5), B(Star3),
B(CallProperty1), R(5), R(0), R(2), U8(5), B(CallProperty1), R(3), R(0), R(2), U8(5),
/* 122 S> */ B(LdaImmutableCurrentContextSlot), U8(2), /* 122 S> */ B(LdaImmutableCurrentContextSlot), U8(2),
B(Star1), B(Star1),
B(LdaCurrentContextSlot), U8(3), B(LdaCurrentContextSlot), U8(3),
...@@ -187,8 +187,8 @@ bytecodes: [ ...@@ -187,8 +187,8 @@ bytecodes: [
/* 134 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(2), U8(2), /* 134 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(2), U8(2),
B(Throw), B(Throw),
B(CallRuntime), U16(Runtime::kLoadPrivateGetter), R(1), U8(1), B(CallRuntime), U16(Runtime::kLoadPrivateGetter), R(1), U8(1),
B(Star4), B(Star2),
B(CallProperty0), R(4), R(0), U8(7), B(CallProperty0), R(2), R(0), U8(7),
/* 137 S> */ B(Return), /* 137 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -206,7 +206,7 @@ snippet: " ...@@ -206,7 +206,7 @@ snippet: "
var test = E.test; var test = E.test;
test(); test();
" "
frame size: 5 frame size: 3
parameter count: 1 parameter count: 1
bytecode array length: 37 bytecode array length: 37
bytecodes: [ bytecodes: [
...@@ -221,10 +221,10 @@ bytecodes: [ ...@@ -221,10 +221,10 @@ bytecodes: [
/* 65 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2), /* 65 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2),
B(Throw), B(Throw),
B(Wide), B(LdaSmi), I16(291), B(Wide), B(LdaSmi), I16(291),
B(Star3), B(Star1),
B(LdaConstant), U8(1), B(LdaConstant), U8(1),
B(Star4), B(Star2),
B(CallRuntime), U16(Runtime::kNewTypeError), R(3), U8(2), B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2),
B(Throw), B(Throw),
] ]
constant pool: [ constant pool: [
...@@ -243,7 +243,7 @@ snippet: " ...@@ -243,7 +243,7 @@ snippet: "
var test = F.test; var test = F.test;
test(); test();
" "
frame size: 5 frame size: 3
parameter count: 1 parameter count: 1
bytecode array length: 37 bytecode array length: 37
bytecodes: [ bytecodes: [
...@@ -258,10 +258,10 @@ bytecodes: [ ...@@ -258,10 +258,10 @@ bytecodes: [
/* 58 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2), /* 58 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2),
B(Throw), B(Throw),
B(Wide), B(LdaSmi), I16(290), B(Wide), B(LdaSmi), I16(290),
B(Star3), B(Star1),
B(LdaConstant), U8(1), B(LdaConstant), U8(1),
B(Star4), B(Star2),
B(CallRuntime), U16(Runtime::kNewTypeError), R(3), U8(2), B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2),
B(Throw), B(Throw),
] ]
constant pool: [ constant pool: [
...@@ -280,7 +280,7 @@ snippet: " ...@@ -280,7 +280,7 @@ snippet: "
var test = G.test; var test = G.test;
test(); test();
" "
frame size: 5 frame size: 3
parameter count: 1 parameter count: 1
bytecode array length: 37 bytecode array length: 37
bytecodes: [ bytecodes: [
...@@ -295,10 +295,10 @@ bytecodes: [ ...@@ -295,10 +295,10 @@ bytecodes: [
/* 65 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2), /* 65 E> */ B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2),
B(Throw), B(Throw),
B(Wide), B(LdaSmi), I16(291), B(Wide), B(LdaSmi), I16(291),
B(Star3), B(Star1),
B(LdaConstant), U8(1), B(LdaConstant), U8(1),
B(Star4), B(Star2),
B(CallRuntime), U16(Runtime::kNewTypeError), R(3), U8(2), B(CallRuntime), U16(Runtime::kNewTypeError), R(1), U8(2),
B(Throw), B(Throw),
] ]
constant pool: [ constant pool: [
......
...@@ -10,6 +10,11 @@ class C { ...@@ -10,6 +10,11 @@ class C {
assertEquals((C?.#m)(), C); assertEquals((C?.#m)(), C);
assertEquals(C?.#c?.#m(), C); assertEquals(C?.#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