Commit 3c3330f6 authored by Maya Lekova's avatar Maya Lekova Committed by Commit Bot

Revert "[interpreter] Separate bytecodes for one-shot property loads and stores"

This reverts commit eccf1867.

Reason for revert: Speculative revert because it seems to introduce a pretty stable flake on gc stress tests, see https://bugs.chromium.org/p/v8/issues/detail?id=8229

Original change's description:
> [interpreter] Separate bytecodes for one-shot property loads and stores
> 
> Create LdaNamedPropertyNoFeedback and StaNamedPropertyNoFeedback
> for one-shot property loads and stores. This CL replaces the runtime
> calls with new bytecodes for named property load stores in one-shot code.
> the runtime calls needed extra set of consecutive registers and
> additional move instructions. This increased the size of
> bytecode-array and possibly extended the life time of objects.
> By replacing them with NoFeedback bytecodes we avoid these issues.
> 
> Bug: v8:8072
> Change-Id: I20a38a5ce9940026171d870d354787fe0b7c5a6f
> Reviewed-on: https://chromium-review.googlesource.com/1196725
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Chandan Reddy <chandanreddy@google.com>
> Cr-Commit-Position: refs/heads/master@{#56211}

TBR=rmcilroy@chromium.org,yangguo@chromium.org,jarin@chromium.org,neis@chromium.org,cbruni@chromium.org,chandanreddy@google.com

Change-Id: I445db58e6d4c275b434fabad5fad775bf259033f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8072
Reviewed-on: https://chromium-review.googlesource.com/1245421Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56232}
parent 0d81c8bf
......@@ -1339,17 +1339,6 @@ void BytecodeGraphBuilder::VisitLdaNamedProperty() {
environment()->BindAccumulator(node, Environment::kAttachFrameState);
}
void BytecodeGraphBuilder::VisitLdaNamedPropertyNoFeedback() {
PrepareEagerCheckpoint();
Node* object =
environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
Handle<Name> name(
Name::cast(bytecode_iterator().GetConstantForIndexOperand(1)), isolate());
const Operator* op = javascript()->LoadNamed(name, VectorSlotPair());
Node* node = NewNode(op, object);
environment()->BindAccumulator(node, Environment::kAttachFrameState);
}
void BytecodeGraphBuilder::VisitLdaKeyedProperty() {
PrepareEagerCheckpoint();
Node* key = environment()->LookupAccumulator();
......@@ -1413,21 +1402,6 @@ void BytecodeGraphBuilder::VisitStaNamedProperty() {
BuildNamedStore(StoreMode::kNormal);
}
void BytecodeGraphBuilder::VisitStaNamedPropertyNoFeedback() {
PrepareEagerCheckpoint();
Node* value = environment()->LookupAccumulator();
Node* object =
environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
Handle<Name> name(
Name::cast(bytecode_iterator().GetConstantForIndexOperand(1)), isolate());
LanguageMode language_mode =
static_cast<LanguageMode>(bytecode_iterator().GetFlagOperand(2));
const Operator* op =
javascript()->StoreNamed(language_mode, name, VectorSlotPair());
Node* node = NewNode(op, object, value);
environment()->RecordAfterState(node, Environment::kAttachFrameState);
}
void BytecodeGraphBuilder::VisitStaNamedOwnProperty() {
BuildNamedStore(StoreMode::kOwn);
}
......
......@@ -169,12 +169,6 @@ void JSGenericLowering::LowerJSLoadNamed(Node* node) {
Node* frame_state = NodeProperties::GetFrameStateInput(node);
Node* outer_state = frame_state->InputAt(kFrameStateOuterStateInput);
node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name()));
if (!p.feedback().IsValid()) {
Callable callable =
Builtins::CallableFor(isolate(), Builtins::kGetProperty);
ReplaceWithStubCall(node, callable, flags);
return;
}
node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index()));
if (outer_state->opcode() != IrOpcode::kFrameState) {
Callable callable = Builtins::CallableFor(
......@@ -237,12 +231,6 @@ void JSGenericLowering::LowerJSStoreNamed(Node* node) {
Node* frame_state = NodeProperties::GetFrameStateInput(node);
Node* outer_state = frame_state->InputAt(kFrameStateOuterStateInput);
node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name()));
if (!p.feedback().IsValid()) {
node->InsertInput(
zone(), 3, jsgraph()->SmiConstant(static_cast<int>(p.language_mode())));
ReplaceWithRuntimeCall(node, Runtime::kSetNamedProperty);
return;
}
node->InsertInput(zone(), 3, jsgraph()->SmiConstant(p.feedback().index()));
if (outer_state->opcode() != IrOpcode::kFrameState) {
Callable callable =
......
......@@ -492,17 +492,23 @@ JSTypeHintLowering::ReduceStoreKeyedOperation(const Operator* op, Node* obj,
return LoweringResult::NoChange();
}
JSTypeHintLowering::LoweringResult JSTypeHintLowering::BuildSoftDeopt(
Node* effect, Node* control, DeoptimizeReason reason) const {
Node* deoptimize = jsgraph()->graph()->NewNode(
jsgraph()->common()->Deoptimize(DeoptimizeKind::kSoft, reason,
VectorSlotPair()),
jsgraph()->Dead(), effect, control);
Node* frame_state = NodeProperties::FindFrameStateBefore(deoptimize);
deoptimize->ReplaceInput(0, frame_state);
return LoweringResult::Exit(deoptimize);
}
Node* JSTypeHintLowering::TryBuildSoftDeopt(FeedbackNexus& nexus, Node* effect,
Node* control,
DeoptimizeReason reason) const {
if ((flags() & kBailoutOnUninitialized) && nexus.IsUninitialized()) {
Node* deoptimize = jsgraph()->graph()->NewNode(
jsgraph()->common()->Deoptimize(DeoptimizeKind::kSoft, reason,
VectorSlotPair()),
jsgraph()->Dead(), effect, control);
Node* frame_state = NodeProperties::FindFrameStateBefore(deoptimize);
deoptimize->ReplaceInput(0, frame_state);
return deoptimize;
LoweringResult deoptimize = BuildSoftDeopt(effect, control, reason);
return deoptimize.control();
}
return nullptr;
}
......
......@@ -151,6 +151,9 @@ class JSTypeHintLowering {
Node* control,
FeedbackSlot slot) const;
LoweringResult BuildSoftDeopt(Node* effect, Node* control,
DeoptimizeReason reson) const;
private:
friend class JSSpeculativeBinopBuilder;
Node* TryBuildSoftDeopt(FeedbackNexus& nexus, Node* effect, Node* control,
......
......@@ -730,6 +730,7 @@ void Verifier::Visitor::Check(Node* node, const AllNodes& all) {
case IrOpcode::kJSLoadNamed:
// Type can be anything.
CheckTypeIs(node, Type::Any());
CHECK(NamedAccessOf(node->op()).feedback().IsValid());
break;
case IrOpcode::kJSLoadGlobal:
// Type can be anything.
......@@ -744,6 +745,7 @@ void Verifier::Visitor::Check(Node* node, const AllNodes& all) {
case IrOpcode::kJSStoreNamed:
// Type is empty.
CheckNotTyped(node);
CHECK(NamedAccessOf(node->op()).feedback().IsValid());
break;
case IrOpcode::kJSStoreGlobal:
// Type is empty.
......
......@@ -418,7 +418,6 @@ bool BytecodeHasNoSideEffect(interpreter::Bytecode bytecode) {
case Bytecode::kLdaLookupSlot:
case Bytecode::kLdaGlobal:
case Bytecode::kLdaNamedProperty:
case Bytecode::kLdaNamedPropertyNoFeedback:
case Bytecode::kLdaKeyedProperty:
case Bytecode::kLdaGlobalInsideTypeof:
case Bytecode::kLdaLookupSlotInsideTypeof:
......@@ -843,7 +842,6 @@ bool BytecodeRequiresRuntimeCheck(interpreter::Bytecode bytecode) {
typedef interpreter::Bytecode Bytecode;
switch (bytecode) {
case Bytecode::kStaNamedProperty:
case Bytecode::kStaNamedPropertyNoFeedback:
case Bytecode::kStaNamedOwnProperty:
case Bytecode::kStaKeyedProperty:
case Bytecode::kStaInArrayLiteral:
......
......@@ -797,13 +797,6 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::LoadNamedProperty(
return *this;
}
BytecodeArrayBuilder& BytecodeArrayBuilder::LoadNamedPropertyNoFeedback(
Register object, const AstRawString* name) {
size_t name_index = GetConstantPoolEntry(name);
OutputLdaNamedPropertyNoFeedback(object, name_index);
return *this;
}
BytecodeArrayBuilder& BytecodeArrayBuilder::LoadKeyedProperty(
Register object, int feedback_slot) {
OutputLdaKeyedProperty(object, feedback_slot);
......@@ -854,14 +847,6 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::StoreNamedProperty(
return StoreNamedProperty(object, name_index, feedback_slot, language_mode);
}
BytecodeArrayBuilder& BytecodeArrayBuilder::StoreNamedPropertyNoFeedback(
Register object, const AstRawString* name, LanguageMode language_mode) {
size_t name_index = GetConstantPoolEntry(name);
OutputStaNamedPropertyNoFeedback(object, name_index,
static_cast<uint8_t>(language_mode));
return *this;
}
BytecodeArrayBuilder& BytecodeArrayBuilder::StoreNamedOwnProperty(
Register object, const AstRawString* name, int feedback_slot) {
size_t name_index = GetConstantPoolEntry(name);
......
......@@ -120,10 +120,6 @@ class V8_EXPORT_PRIVATE BytecodeArrayBuilder final {
BytecodeArrayBuilder& LoadNamedProperty(Register object,
const AstRawString* name,
int feedback_slot);
// Named load property without feedback
BytecodeArrayBuilder& LoadNamedPropertyNoFeedback(Register object,
const AstRawString* name);
// Keyed load property. The key should be in the accumulator.
BytecodeArrayBuilder& LoadKeyedProperty(Register object, int feedback_slot);
// Named load property of the @@iterator symbol.
......@@ -149,12 +145,6 @@ class V8_EXPORT_PRIVATE BytecodeArrayBuilder final {
const AstRawString* name,
int feedback_slot,
LanguageMode language_mode);
// Store a property named by a property name without feedback slot. The value
// to be stored should be in the accumulator.
BytecodeArrayBuilder& StoreNamedPropertyNoFeedback(
Register object, const AstRawString* name, LanguageMode language_mode);
// Store a property named by a constant from the constant pool. The value to
// be stored should be in the accumulator.
BytecodeArrayBuilder& StoreNamedProperty(Register object,
......
......@@ -2868,7 +2868,13 @@ void BytecodeGenerator::BuildLoadNamedProperty(Property* property,
Register object,
const AstRawString* name) {
if (ShouldOptimizeAsOneShot()) {
builder()->LoadNamedPropertyNoFeedback(object, name);
RegisterList args = register_allocator()->NewRegisterList(2);
size_t name_index = builder()->GetConstantPoolEntry(name);
builder()
->MoveRegister(object, args[0])
.LoadConstantPoolEntry(name_index)
.StoreAccumulatorInRegister(args[1])
.CallRuntime(Runtime::kInlineGetProperty, args);
} else {
FeedbackSlot slot = GetCachedLoadICSlot(property->obj(), name);
builder()->LoadNamedProperty(object, name, feedback_index(slot));
......@@ -2885,7 +2891,16 @@ void BytecodeGenerator::BuildStoreNamedProperty(Property* property,
}
if (ShouldOptimizeAsOneShot()) {
builder()->StoreNamedPropertyNoFeedback(object, name, language_mode());
RegisterList args = register_allocator()->NewRegisterList(4);
size_t name_index = builder()->GetConstantPoolEntry(name);
builder()
->MoveRegister(object, args[0])
.StoreAccumulatorInRegister(args[2])
.LoadConstantPoolEntry(name_index)
.StoreAccumulatorInRegister(args[1])
.LoadLiteral(Smi::FromEnum(language_mode()))
.StoreAccumulatorInRegister(args[3])
.CallRuntime(Runtime::kSetNamedProperty, args);
} else {
FeedbackSlot slot = GetCachedStoreICSlot(property->obj(), name);
builder()->StoreNamedProperty(object, name, feedback_index(slot),
......
......@@ -98,8 +98,6 @@ namespace interpreter {
/* Property loads (LoadIC) operations */ \
V(LdaNamedProperty, AccumulatorUse::kWrite, OperandType::kReg, \
OperandType::kIdx, OperandType::kIdx) \
V(LdaNamedPropertyNoFeedback, AccumulatorUse::kWrite, OperandType::kReg, \
OperandType::kIdx) \
V(LdaKeyedProperty, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
\
......@@ -112,8 +110,6 @@ namespace interpreter {
/* Propery stores (StoreIC) operations */ \
V(StaNamedProperty, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx, OperandType::kIdx) \
V(StaNamedPropertyNoFeedback, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx, OperandType::kFlag8) \
V(StaNamedOwnProperty, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx, OperandType::kIdx) \
V(StaKeyedProperty, AccumulatorUse::kReadWrite, OperandType::kReg, \
......
......@@ -518,18 +518,6 @@ IGNITION_HANDLER(LdaNamedProperty, InterpreterAssembler) {
}
}
// LdaPropertyNofeedback <object> <slot>
//
// Calls the GetProperty builtin for <object> and the key in the accumulator.
IGNITION_HANDLER(LdaNamedPropertyNoFeedback, InterpreterAssembler) {
Node* object = LoadRegisterAtOperandIndex(0);
Node* name = LoadConstantPoolEntryAtOperandIndex(1);
Node* context = GetContext();
Node* result = CallBuiltin(Builtins::kGetProperty, context, object, name);
SetAccumulator(result);
Dispatch();
}
// KeyedLoadIC <object> <slot>
//
// Calls the KeyedLoadIC at FeedBackVector slot <slot> for <object> and the key
......@@ -595,24 +583,6 @@ IGNITION_HANDLER(StaNamedOwnProperty, InterpreterStoreNamedPropertyAssembler) {
StaNamedProperty(ic);
}
// StaNamedPropertyNoFeedback <object> <name_index>
//
// Calls the SetPropertyBuiltin for <object> and the name in constant pool entry
// <name_index> with the value in the accumulator.
IGNITION_HANDLER(StaNamedPropertyNoFeedback,
InterpreterStoreNamedPropertyAssembler) {
Node* object = LoadRegisterAtOperandIndex(0);
Node* name = LoadConstantPoolEntryAtOperandIndex(1);
Node* value = GetAccumulator();
Node* language_mode = SmiFromInt32(BytecodeOperandFlag(2));
Node* context = GetContext();
Node* result = CallRuntime(Runtime::kSetNamedProperty, context, object, name,
value, language_mode);
SetAccumulator(result);
Dispatch();
}
// StaKeyedProperty <object> <key> <slot>
//
// Calls the KeyedStoreIC at FeedbackVector slot <slot> for <object> and
......
......@@ -206,6 +206,12 @@ Node* IntrinsicsGenerator::HasProperty(
args, context, Builtins::CallableFor(isolate(), Builtins::kHasProperty));
}
Node* IntrinsicsGenerator::GetProperty(
const InterpreterAssembler::RegListNodePair& args, Node* context) {
return IntrinsicAsStubCall(
args, context, Builtins::CallableFor(isolate(), Builtins::kGetProperty));
}
Node* IntrinsicsGenerator::RejectPromise(
const InterpreterAssembler::RegListNodePair& args, Node* context) {
return IntrinsicAsStubCall(
......
......@@ -25,6 +25,7 @@ namespace interpreter {
V(CreateIterResultObject, create_iter_result_object, 2) \
V(CreateAsyncFromSyncIterator, create_async_from_sync_iterator, 1) \
V(HasProperty, has_property, 2) \
V(GetProperty, get_property, 2) \
V(IsArray, is_array, 1) \
V(IsJSReceiver, is_js_receiver, 1) \
V(IsSmi, is_smi, 1) \
......
......@@ -19,9 +19,9 @@ snippet: "
})();
"
frame size: 3
frame size: 6
parameter count: 1
bytecode array length: 40
bytecode array length: 82
bytecodes: [
B(CreateMappedArguments),
B(Star), R(0),
......@@ -31,14 +31,32 @@ bytecodes: [
/* 45 S> */ B(LdaGlobal), U8(0), U8(2),
B(Star), R(1),
B(LdaSmi), I8(2),
/* 50 E> */ B(StaNamedPropertyNoFeedback), R(1), U8(1), U8(0),
B(Star), R(4),
B(LdaConstant), U8(1),
B(Star), R(3),
B(LdaZero),
B(Star), R(5),
B(Mov), R(1), R(2),
/* 50 E> */ B(CallRuntime), U16(Runtime::kSetNamedProperty), R(2), U8(4),
/* 63 S> */ B(LdaGlobal), U8(0), U8(2),
B(Star), R(1),
/* 70 E> */ B(LdaGlobal), U8(0), U8(2),
B(Star), R(2),
/* 72 E> */ B(LdaNamedPropertyNoFeedback), R(2), U8(1),
/* 68 E> */ B(StaNamedPropertyNoFeedback), R(1), U8(2), U8(0),
/* 101 S> */ B(LdaNamedPropertyNoFeedback), R(0), U8(3),
B(LdaConstant), U8(1),
B(Star), R(4),
B(Mov), R(2), R(3),
/* 72 E> */ B(InvokeIntrinsic), U8(Runtime::k_GetProperty), R(3), U8(2),
B(Star), R(4),
B(LdaConstant), U8(2),
B(Star), R(3),
B(LdaZero),
B(Star), R(5),
B(Mov), R(1), R(2),
/* 68 E> */ B(CallRuntime), U16(Runtime::kSetNamedProperty), R(2), U8(4),
/* 84 S> */ B(LdaConstant), U8(3),
B(Star), R(3),
B(Mov), R(0), R(2),
/* 101 E> */ B(InvokeIntrinsic), U8(Runtime::k_GetProperty), R(2), U8(2),
/* 108 S> */ B(Return),
]
constant pool: [
......@@ -63,9 +81,9 @@ snippet: "
})();
"
frame size: 3
frame size: 4
parameter count: 1
bytecode array length: 69
bytecode array length: 77
bytecodes: [
B(CreateMappedArguments),
B(Star), R(0),
......@@ -94,7 +112,10 @@ bytecodes: [
B(Inc), U8(15),
/* 66 E> */ B(StaGlobal), U8(1), U8(2),
B(JumpLoop), U8(50), I8(0),
/* 149 S> */ B(LdaNamedPropertyNoFeedback), R(0), U8(4),
/* 132 S> */ B(LdaConstant), U8(4),
B(Star), R(3),
B(Mov), R(0), R(2),
/* 149 E> */ B(InvokeIntrinsic), U8(Runtime::k_GetProperty), R(2), U8(2),
/* 156 S> */ B(Return),
]
constant pool: [
......@@ -122,9 +143,9 @@ snippet: "
})();
"
frame size: 3
frame size: 4
parameter count: 1
bytecode array length: 70
bytecode array length: 78
bytecodes: [
B(CreateMappedArguments),
B(Star), R(0),
......@@ -153,7 +174,10 @@ bytecodes: [
B(Dec), U8(15),
/* 129 E> */ B(StaGlobal), U8(1), U8(2),
B(JumpLoop), U8(50), I8(0),
/* 168 S> */ B(LdaNamedPropertyNoFeedback), R(0), U8(4),
/* 151 S> */ B(LdaConstant), U8(4),
B(Star), R(3),
B(Mov), R(0), R(2),
/* 168 E> */ B(InvokeIntrinsic), U8(Runtime::k_GetProperty), R(2), U8(2),
/* 175 S> */ B(Return),
]
constant pool: [
......@@ -181,9 +205,9 @@ snippet: "
})();
"
frame size: 3
frame size: 4
parameter count: 1
bytecode array length: 70
bytecode array length: 78
bytecodes: [
B(CreateMappedArguments),
B(Star), R(0),
......@@ -212,7 +236,10 @@ bytecodes: [
/* 141 E> */ B(TestGreaterThan), R(1), U8(15),
B(JumpIfFalse), U8(5),
B(JumpLoop), U8(50), I8(0),
/* 171 S> */ B(LdaNamedPropertyNoFeedback), R(0), U8(4),
/* 154 S> */ B(LdaConstant), U8(4),
B(Star), R(3),
B(Mov), R(0), R(2),
/* 171 E> */ B(InvokeIntrinsic), U8(Runtime::k_GetProperty), R(2), U8(2),
/* 178 S> */ B(Return),
]
constant pool: [
......@@ -242,9 +269,9 @@ snippet: "
})();
"
frame size: 4
frame size: 6
parameter count: 1
bytecode array length: 71
bytecode array length: 121
bytecodes: [
B(CreateMappedArguments),
B(Star), R(0),
......@@ -257,23 +284,44 @@ bytecodes: [
/* 31 E> */ B(StaGlobal), U8(1), U8(0),
/* 95 S> */ B(LdaGlobal), U8(1), U8(2),
B(Star), R(1),
/* 101 E> */ B(LdaNamedPropertyNoFeedback), R(1), U8(2),
B(LdaConstant), U8(2),
B(Star), R(3),
B(Mov), R(1), R(2),
/* 101 E> */ B(InvokeIntrinsic), U8(Runtime::k_GetProperty), R(2), U8(2),
B(Star), R(1),
B(LdaSmi), I8(3),
/* 104 E> */ B(TestLessThan), R(1), U8(4),
B(JumpIfFalse), U8(15),
B(JumpIfFalse), U8(28),
/* 121 S> */ B(LdaGlobal), U8(1), U8(2),
B(Star), R(1),
B(LdaSmi), I8(3),
/* 126 E> */ B(StaNamedPropertyNoFeedback), R(1), U8(2), U8(0),
B(Jump), U8(19),
B(Star), R(4),
B(LdaConstant), U8(2),
B(Star), R(3),
B(LdaZero),
B(Star), R(5),
B(Mov), R(1), R(2),
/* 126 E> */ B(CallRuntime), U16(Runtime::kSetNamedProperty), R(2), U8(4),
B(Jump), U8(40),
/* 158 S> */ B(LdaGlobal), U8(1), U8(2),
B(Star), R(1),
/* 165 E> */ B(LdaGlobal), U8(1), U8(2),
B(Star), R(2),
/* 167 E> */ B(LdaNamedPropertyNoFeedback), R(2), U8(3),
/* 163 E> */ B(StaNamedPropertyNoFeedback), R(1), U8(2), U8(0),
/* 206 S> */ B(LdaNamedPropertyNoFeedback), R(0), U8(4),
B(LdaConstant), U8(3),
B(Star), R(4),
B(Mov), R(2), R(3),
/* 167 E> */ B(InvokeIntrinsic), U8(Runtime::k_GetProperty), R(3), U8(2),
B(Star), R(4),
B(LdaConstant), U8(2),
B(Star), R(3),
B(LdaZero),
B(Star), R(5),
B(Mov), R(1), R(2),
/* 163 E> */ B(CallRuntime), U16(Runtime::kSetNamedProperty), R(2), U8(4),
/* 189 S> */ B(LdaConstant), U8(4),
B(Star), R(3),
B(Mov), R(0), R(2),
/* 206 E> */ B(InvokeIntrinsic), U8(Runtime::k_GetProperty), R(2), U8(2),
/* 213 S> */ B(Return),
]
constant pool: [
......@@ -297,7 +345,7 @@ snippet: "
"
frame size: 5
parameter count: 1
bytecode array length: 24
bytecode array length: 32
bytecodes: [
B(CreateMappedArguments),
B(Star), R(0),
......@@ -308,7 +356,10 @@ bytecodes: [
B(Star), R(4),
B(CallRuntime), U16(Runtime::kCreateArrayLiteralWithoutAllocationSite), R(3), U8(2),
/* 31 E> */ B(StaGlobal), U8(1), U8(0),
/* 77 S> */ B(LdaNamedPropertyNoFeedback), R(0), U8(2),
/* 60 S> */ B(LdaConstant), U8(2),
B(Star), R(3),
B(Mov), R(0), R(2),
/* 77 E> */ B(InvokeIntrinsic), U8(Runtime::k_GetProperty), R(2), U8(2),
/* 84 S> */ B(Return),
]
constant pool: [
......@@ -330,7 +381,7 @@ snippet: "
"
frame size: 5
parameter count: 1
bytecode array length: 24
bytecode array length: 32
bytecodes: [
B(CreateMappedArguments),
B(Star), R(0),
......@@ -341,7 +392,10 @@ bytecodes: [
B(Star), R(4),
B(CallRuntime), U16(Runtime::kCreateArrayLiteralWithoutAllocationSite), R(3), U8(2),
/* 31 E> */ B(StaGlobal), U8(1), U8(0),
/* 62 S> */ B(LdaNamedPropertyNoFeedback), R(0), U8(2),
/* 45 S> */ B(LdaConstant), U8(2),
B(Star), R(3),
B(Mov), R(0), R(2),
/* 62 E> */ B(InvokeIntrinsic), U8(Runtime::k_GetProperty), R(2), U8(2),
/* 69 S> */ B(Return),
]
constant pool: [
......@@ -374,21 +428,30 @@ snippet: "
"
frame size: 8
parameter count: 1
bytecode array length: 137
bytecode array length: 193
bytecodes: [
B(CreateMappedArguments),
B(Star), R(0),
/* 237 E> */ B(StackCheck),
/* 255 S> */ B(LdaNamedPropertyNoFeedback), R(this), U8(0),
/* 250 S> */ B(LdaConstant), U8(0),
B(Star), R(4),
B(Mov), R(this), R(3),
/* 255 E> */ B(InvokeIntrinsic), U8(Runtime::k_GetProperty), R(3), U8(2),
B(Star), R(1),
/* 255 E> */ B(CallNoFeedback), R(1), R(this), U8(1),
/* 274 S> */ B(LdaNamedPropertyNoFeedback), R(this), U8(1),
/* 255 E> */ B(CallNoFeedback), R(1), R(3), U8(1),
/* 269 S> */ B(LdaConstant), U8(1),
B(Star), R(4),
B(Mov), R(this), R(3),
/* 274 E> */ B(InvokeIntrinsic), U8(Runtime::k_GetProperty), R(3), U8(2),
B(Star), R(1),
B(LdaSmi), I8(1),
B(Star), R(3),
B(Mov), R(this), R(2),
/* 274 E> */ B(CallNoFeedback), R(1), R(2), U8(2),
/* 294 S> */ B(LdaNamedPropertyNoFeedback), R(this), U8(2),
/* 289 S> */ B(LdaConstant), U8(2),
B(Star), R(4),
B(Mov), R(this), R(3),
/* 294 E> */ B(InvokeIntrinsic), U8(Runtime::k_GetProperty), R(3), U8(2),
B(Star), R(1),
B(LdaSmi), I8(1),
B(Star), R(3),
......@@ -396,7 +459,10 @@ bytecodes: [
B(Star), R(4),
B(Mov), R(this), R(2),
/* 294 E> */ B(CallNoFeedback), R(1), R(2), U8(3),
/* 317 S> */ B(LdaNamedPropertyNoFeedback), R(this), U8(3),
/* 312 S> */ B(LdaConstant), U8(3),
B(Star), R(4),
B(Mov), R(this), R(3),
/* 317 E> */ B(InvokeIntrinsic), U8(Runtime::k_GetProperty), R(3), U8(2),
B(Star), R(1),
B(LdaSmi), I8(1),
B(Star), R(3),
......@@ -406,7 +472,10 @@ bytecodes: [
B(Star), R(5),
B(Mov), R(this), R(2),
/* 317 E> */ B(CallNoFeedback), R(1), R(2), U8(4),
/* 343 S> */ B(LdaNamedPropertyNoFeedback), R(this), U8(4),
/* 338 S> */ B(LdaConstant), U8(4),
B(Star), R(4),
B(Mov), R(this), R(3),
/* 343 E> */ B(InvokeIntrinsic), U8(Runtime::k_GetProperty), R(3), U8(2),
B(Star), R(1),
B(LdaSmi), I8(1),
B(Star), R(3),
......@@ -418,7 +487,10 @@ bytecodes: [
B(Star), R(6),
B(Mov), R(this), R(2),
/* 343 E> */ B(CallNoFeedback), R(1), R(2), U8(5),
/* 372 S> */ B(LdaNamedPropertyNoFeedback), R(this), U8(5),
/* 367 S> */ B(LdaConstant), U8(5),
B(Star), R(4),
B(Mov), R(this), R(3),
/* 372 E> */ B(InvokeIntrinsic), U8(Runtime::k_GetProperty), R(3), U8(2),
B(Star), R(1),
B(LdaSmi), I8(1),
B(Star), R(3),
......@@ -432,7 +504,10 @@ bytecodes: [
B(Star), R(7),
B(Mov), R(this), R(2),
/* 372 E> */ B(CallNoFeedback), R(1), R(2), U8(6),
/* 416 S> */ B(LdaNamedPropertyNoFeedback), R(0), U8(6),
/* 399 S> */ B(LdaConstant), U8(6),
B(Star), R(3),
B(Mov), R(0), R(2),
/* 416 E> */ B(InvokeIntrinsic), U8(Runtime::k_GetProperty), R(2), U8(2),
/* 423 S> */ B(Return),
]
constant pool: [
......@@ -469,7 +544,7 @@ snippet: "
"
frame size: 8
parameter count: 1
bytecode array length: 140
bytecode array length: 148
bytecodes: [
B(CreateMappedArguments),
B(Star), R(0),
......@@ -534,7 +609,10 @@ bytecodes: [
B(LdaSmi), I8(5),
B(Star), R(7),
/* 294 E> */ B(CallNoFeedback), R(1), R(2), U8(6),
/* 338 S> */ B(LdaNamedPropertyNoFeedback), R(0), U8(6),
/* 321 S> */ B(LdaConstant), U8(6),
B(Star), R(3),
B(Mov), R(0), R(2),
/* 338 E> */ B(InvokeIntrinsic), U8(Runtime::k_GetProperty), R(2), U8(2),
/* 345 S> */ B(Return),
]
constant pool: [
......@@ -565,9 +643,9 @@ snippet: "
}
"
frame size: 3
frame size: 6
parameter count: 1
bytecode array length: 46
bytecode array length: 80
bytecodes: [
B(CreateMappedArguments),
B(Star), R(0),
......@@ -577,17 +655,32 @@ bytecodes: [
/* 111 S> */ B(LdaGlobal), U8(0), U8(2),
B(Star), R(1),
B(LdaSmi), I8(3),
/* 115 E> */ B(StaNamedPropertyNoFeedback), R(1), U8(1), U8(0),
B(Star), R(4),
B(LdaConstant), U8(1),
B(Star), R(3),
B(LdaZero),
B(Star), R(5),
B(Mov), R(1), R(2),
/* 115 E> */ B(CallRuntime), U16(Runtime::kSetNamedProperty), R(2), U8(4),
/* 130 S> */ B(LdaGlobal), U8(0), U8(2),
B(Star), R(1),
B(LdaSmi), I8(4),
/* 134 E> */ B(StaNamedPropertyNoFeedback), R(1), U8(2), U8(0),
B(Star), R(4),
B(LdaConstant), U8(2),
B(Star), R(3),
B(LdaZero),
B(Star), R(5),
B(Mov), R(1), R(2),
/* 134 E> */ B(CallRuntime), U16(Runtime::kSetNamedProperty), R(2), U8(4),
/* 149 S> */ B(LdaUndefined),
B(Star), R(2),
B(LdaGlobal), U8(3), U8(4),
B(Star), R(1),
/* 149 E> */ B(CallNoFeedback), R(1), R(2), U8(1),
/* 182 S> */ B(LdaNamedPropertyNoFeedback), R(0), U8(4),
/* 165 S> */ B(LdaConstant), U8(4),
B(Star), R(3),
B(Mov), R(0), R(2),
/* 182 E> */ B(InvokeIntrinsic), U8(Runtime::k_GetProperty), R(2), U8(2),
/* 189 S> */ B(Return),
]
constant pool: [
......
......@@ -20,9 +20,9 @@ snippet: "
l['a'] = l['b'];
"
frame size: 4
frame size: 7
parameter count: 1
bytecode array length: 77
bytecode array length: 128
bytecodes: [
/* 0 E> */ B(StackCheck),
/* 7 S> */ B(LdaConstant), U8(0),
......@@ -33,25 +33,46 @@ bytecodes: [
/* 9 E> */ B(StaGlobal), U8(1), U8(0),
/* 60 S> */ B(LdaGlobal), U8(1), U8(3),
B(Star), R(1),
/* 65 E> */ B(LdaNamedPropertyNoFeedback), R(1), U8(2),
B(LdaConstant), U8(2),
B(Star), R(3),
B(Mov), R(1), R(2),
/* 65 E> */ B(InvokeIntrinsic), U8(Runtime::k_GetProperty), R(2), U8(2),
B(Star), R(1),
/* 73 E> */ B(LdaGlobal), U8(1), U8(3),
B(Star), R(2),
/* 74 E> */ B(LdaNamedPropertyNoFeedback), R(2), U8(3),
B(LdaConstant), U8(3),
B(Star), R(4),
B(Mov), R(2), R(3),
/* 74 E> */ B(InvokeIntrinsic), U8(Runtime::k_GetProperty), R(3), U8(2),
/* 71 E> */ B(Add), R(1), U8(2),
/* 62 E> */ B(StaGlobal), U8(4), U8(5),
/* 87 S> */ B(LdaGlobal), U8(1), U8(3),
B(Star), R(1),
B(LdaSmi), I8(7),
/* 94 E> */ B(StaNamedPropertyNoFeedback), R(1), U8(3), U8(0),
B(Star), R(4),
B(LdaConstant), U8(3),
B(Star), R(3),
B(LdaZero),
B(Star), R(5),
B(Mov), R(1), R(2),
/* 94 E> */ B(CallRuntime), U16(Runtime::kSetNamedProperty), R(2), U8(4),
/* 105 S> */ B(LdaGlobal), U8(1), U8(3),
B(Star), R(1),
/* 114 E> */ B(LdaGlobal), U8(1), U8(3),
B(Star), R(2),
/* 115 E> */ B(LdaNamedPropertyNoFeedback), R(2), U8(3),
B(LdaConstant), U8(3),
B(Star), R(4),
B(Mov), R(2), R(3),
/* 115 E> */ B(InvokeIntrinsic), U8(Runtime::k_GetProperty), R(3), U8(2),
B(Star), R(2),
/* 112 E> */ B(StaNamedPropertyNoFeedback), R(1), U8(2), U8(0),
B(Mov), R(2), R(0),
B(LdaConstant), U8(2),
B(Star), R(4),
B(LdaZero),
B(Star), R(6),
B(Mov), R(1), R(3),
B(Mov), R(2), R(5),
/* 112 E> */ B(CallRuntime), U16(Runtime::kSetNamedProperty), R(3), U8(4),
B(Mov), R(5), R(0),
B(Ldar), R(0),
/* 128 S> */ B(Return),
]
......@@ -286,9 +307,9 @@ snippet: "
}
"
frame size: 4
frame size: 7
parameter count: 1
bytecode array length: 75
bytecode array length: 111
bytecodes: [
/* 0 E> */ B(StackCheck),
/* 7 S> */ B(LdaConstant), U8(0),
......@@ -299,25 +320,40 @@ bytecodes: [
/* 9 E> */ B(StaGlobal), U8(1), U8(0),
/* 63 S> */ B(LdaGlobal), U8(1), U8(2),
B(Star), R(1),
/* 68 E> */ B(LdaNamedPropertyNoFeedback), R(1), U8(2),
B(LdaConstant), U8(2),
B(Star), R(3),
B(Mov), R(1), R(2),
/* 68 E> */ B(InvokeIntrinsic), U8(Runtime::k_GetProperty), R(2), U8(2),
B(Star), R(1),
B(LdaSmi), I8(3),
/* 74 E> */ B(TestLessThan), R(1), U8(4),
B(JumpIfFalse), U8(22),
B(JumpIfFalse), U8(36),
/* 89 S> */ B(LdaGlobal), U8(1), U8(2),
B(Star), R(1),
B(LdaSmi), I8(3),
B(Star), R(2),
/* 96 E> */ B(StaNamedPropertyNoFeedback), R(1), U8(2), U8(0),
B(Mov), R(2), R(0),
B(LdaConstant), U8(2),
B(Star), R(4),
B(LdaZero),
B(Star), R(6),
B(Mov), R(1), R(3),
B(Mov), R(2), R(5),
/* 96 E> */ B(CallRuntime), U16(Runtime::kSetNamedProperty), R(3), U8(4),
B(Mov), R(5), R(0),
B(Ldar), R(2),
B(Jump), U8(20),
B(Jump), U8(34),
/* 124 S> */ B(LdaGlobal), U8(1), U8(2),
B(Star), R(1),
B(LdaSmi), I8(3),
B(Star), R(2),
/* 131 E> */ B(StaNamedPropertyNoFeedback), R(1), U8(3), U8(0),
B(Mov), R(2), R(0),
B(LdaConstant), U8(3),
B(Star), R(4),
B(LdaZero),
B(Star), R(6),
B(Mov), R(1), R(3),
B(Mov), R(2), R(5),
/* 131 E> */ B(CallRuntime), U16(Runtime::kSetNamedProperty), R(3), U8(4),
B(Mov), R(5), R(0),
B(Ldar), R(2),
B(Ldar), R(0),
/* 150 S> */ B(Return),
......
......@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --no-enable-one-shot-optimization
Debug = debug.Debug
var exception = null;
......
......@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --no-enable-one-shot-optimization
Debug = debug.Debug
var exception = null;
......
......@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --no-enable-one-shot-optimization
Debug = debug.Debug;
// StaCurrentContextSlot
......
......@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --no-enable-one-shot-optimization
Debug = debug.Debug
var exception = null;
......
......@@ -134,12 +134,9 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
// Emit load / store property operations.
builder.LoadNamedProperty(reg, name, load_slot.ToInt())
.LoadNamedPropertyNoFeedback(reg, name)
.LoadKeyedProperty(reg, keyed_load_slot.ToInt())
.StoreNamedProperty(reg, name, sloppy_store_slot.ToInt(),
LanguageMode::kSloppy)
.StoreNamedPropertyNoFeedback(reg, name, LanguageMode::kStrict)
.StoreNamedPropertyNoFeedback(reg, name, LanguageMode::kSloppy)
.StoreKeyedProperty(reg, reg, sloppy_keyed_store_slot.ToInt(),
LanguageMode::kSloppy)
.StoreNamedProperty(reg, name, strict_store_slot.ToInt(),
......
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