v8/test/cctest/interpreter/bytecode_expectations/StaticPrivateMethodDeclaration.golden
Joyee Cheung 572234aa6b [class] exclude brand symbols in JSReceiver::GetPrivateEntries
This patch excludes brand symbols from the result of
JSReceiver::GetPrivateEntries so that the brands do not show up
when the instances are inspected from the DevTools (e.g. via
`Runtime.getProperties()`).

To implement this, we use a bit in the Symbols to denote whether
it's a brand symbol. A brand symbol is also a private name
symbol so that we can just reuse the IC for accessing private
names and do not need to jump through extra ORs.

Design doc: https://docs.google.com/document/d/1N91LObhQexnB0eE7EvGe57HsvNMFX16CaWu-XCTnnmY/edit

Bug: v8:8671, v8:9839, v8:8330
Change-Id: I24346aeedce3602395289052d1e1350ae9390354
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1909757
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/master@{#64899}
2019-11-11 23:40:47 +00:00

232 lines
5.9 KiB
Plaintext

#
# Autogenerated by generate-bytecode-expectations.
#
---
wrap: yes
private methods: yes
---
snippet: "
{
class A {
static #a() { return 1; }
}
}
"
frame size: 6
parameter count: 1
bytecode array length: 41
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateBlockContext), U8(0),
B(PushContext), R(1),
B(LdaTheHole),
B(Star), R(5),
B(CreateClosure), U8(2), U8(0), U8(2),
B(Star), R(2),
B(LdaConstant), U8(1),
B(Star), R(3),
B(Mov), R(2), R(4),
B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(3),
B(Star), R(3),
B(CreateClosure), U8(3), U8(1), U8(2),
B(StaCurrentContextSlot), U8(2),
B(PopContext), R(1),
B(Mov), R(4), R(0),
B(LdaUndefined),
/* 84 S> */ B(Return),
]
constant pool: [
SCOPE_INFO_TYPE,
FIXED_ARRAY_TYPE,
SHARED_FUNCTION_INFO_TYPE,
SHARED_FUNCTION_INFO_TYPE,
]
handlers: [
]
---
snippet: "
{
class A {
static get #a() { return 1; }
}
}
"
frame size: 6
parameter count: 1
bytecode array length: 51
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateBlockContext), U8(0),
B(PushContext), R(1),
B(LdaTheHole),
B(Star), R(5),
B(CreateClosure), U8(2), U8(0), U8(2),
B(Star), R(2),
B(LdaConstant), U8(1),
B(Star), R(3),
B(Mov), R(2), R(4),
B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(3),
B(Star), R(3),
B(CreateClosure), U8(3), U8(1), U8(2),
B(Star), R(4),
B(LdaNull),
B(Star), R(5),
B(CallRuntime), U16(Runtime::kCreatePrivateAccessors), R(4), U8(2),
B(StaCurrentContextSlot), U8(2),
B(PopContext), R(1),
B(Mov), R(2), R(0),
B(LdaUndefined),
/* 88 S> */ B(Return),
]
constant pool: [
SCOPE_INFO_TYPE,
FIXED_ARRAY_TYPE,
SHARED_FUNCTION_INFO_TYPE,
SHARED_FUNCTION_INFO_TYPE,
]
handlers: [
]
---
snippet: "
{
class A {
static set #a(val) { }
}
}
"
frame size: 6
parameter count: 1
bytecode array length: 51
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateBlockContext), U8(0),
B(PushContext), R(1),
B(LdaTheHole),
B(Star), R(5),
B(CreateClosure), U8(2), U8(0), U8(2),
B(Star), R(2),
B(LdaConstant), U8(1),
B(Star), R(3),
B(Mov), R(2), R(4),
B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(3),
B(Star), R(3),
B(LdaNull),
B(Star), R(4),
B(CreateClosure), U8(3), U8(1), U8(2),
B(Star), R(5),
B(CallRuntime), U16(Runtime::kCreatePrivateAccessors), R(4), U8(2),
B(StaCurrentContextSlot), U8(2),
B(PopContext), R(1),
B(Mov), R(2), R(0),
B(LdaUndefined),
/* 81 S> */ B(Return),
]
constant pool: [
SCOPE_INFO_TYPE,
FIXED_ARRAY_TYPE,
SHARED_FUNCTION_INFO_TYPE,
SHARED_FUNCTION_INFO_TYPE,
]
handlers: [
]
---
snippet: "
{
class A {
static get #a() { return 1; }
static set #a(val) { }
}
}
"
frame size: 6
parameter count: 1
bytecode array length: 54
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateBlockContext), U8(0),
B(PushContext), R(1),
B(LdaTheHole),
B(Star), R(5),
B(CreateClosure), U8(2), U8(0), U8(2),
B(Star), R(2),
B(LdaConstant), U8(1),
B(Star), R(3),
B(Mov), R(2), R(4),
B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(3),
B(Star), R(3),
B(CreateClosure), U8(3), U8(1), U8(2),
B(Star), R(4),
B(CreateClosure), U8(4), U8(2), U8(2),
B(Star), R(5),
B(CallRuntime), U16(Runtime::kCreatePrivateAccessors), R(4), U8(2),
B(StaCurrentContextSlot), U8(2),
B(PopContext), R(1),
B(Mov), R(2), R(0),
B(LdaUndefined),
/* 115 S> */ B(Return),
]
constant pool: [
SCOPE_INFO_TYPE,
FIXED_ARRAY_TYPE,
SHARED_FUNCTION_INFO_TYPE,
SHARED_FUNCTION_INFO_TYPE,
SHARED_FUNCTION_INFO_TYPE,
]
handlers: [
]
---
snippet: "
{
class A {
static #a() { }
#b() { }
}
}
"
frame size: 7
parameter count: 1
bytecode array length: 58
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateBlockContext), U8(0),
B(PushContext), R(1),
B(LdaConstant), U8(2),
B(Star), R(3),
B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(3), U8(1),
B(StaCurrentContextSlot), U8(4),
B(LdaTheHole),
B(Star), R(6),
B(CreateClosure), U8(3), U8(0), U8(2),
B(Star), R(2),
B(LdaConstant), U8(1),
B(Star), R(4),
B(Mov), R(2), R(5),
B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(3),
B(Star), R(4),
B(CreateClosure), U8(4), U8(1), U8(2),
B(StaCurrentContextSlot), U8(2),
B(CreateClosure), U8(5), U8(2), U8(2),
B(StaCurrentContextSlot), U8(3),
B(PopContext), R(1),
B(Mov), R(5), R(0),
B(LdaUndefined),
/* 87 S> */ B(Return),
]
constant pool: [
SCOPE_INFO_TYPE,
FIXED_ARRAY_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["A"],
SHARED_FUNCTION_INFO_TYPE,
SHARED_FUNCTION_INFO_TYPE,
SHARED_FUNCTION_INFO_TYPE,
]
handlers: [
]