Commit c082b74c authored by Mythri's avatar Mythri Committed by Commit Bot

Cleanup after removing language mode parameter from SetProperty

SetProperty now infers the language mode from the closure and the context
So we no longer have to pass around the language mode. Cleanup by
removing the parameter where it is no longer needed.

Bug: v8:8580
Change-Id: I89452b5a762eb48a911f158d22c7bfa9e3bb1be4
Reviewed-on: https://chromium-review.googlesource.com/c/1421840
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59089}
parent 08f68102
...@@ -70,19 +70,18 @@ void Builtins::Generate_StoreIC_Uninitialized( ...@@ -70,19 +70,18 @@ void Builtins::Generate_StoreIC_Uninitialized(
StoreICUninitializedGenerator::Generate(state); StoreICUninitializedGenerator::Generate(state);
} }
// TODO(mythria): Check if we can remove feedback vector and slot parameters in
// descriptor.
void HandlerBuiltinsAssembler::Generate_KeyedStoreIC_Slow() { void HandlerBuiltinsAssembler::Generate_KeyedStoreIC_Slow() {
typedef StoreWithVectorDescriptor Descriptor; typedef StoreWithVectorDescriptor Descriptor;
Node* receiver = Parameter(Descriptor::kReceiver); Node* receiver = Parameter(Descriptor::kReceiver);
Node* name = Parameter(Descriptor::kName); Node* name = Parameter(Descriptor::kName);
Node* value = Parameter(Descriptor::kValue); Node* value = Parameter(Descriptor::kValue);
Node* slot = Parameter(Descriptor::kSlot);
Node* vector = Parameter(Descriptor::kVector);
Node* context = Parameter(Descriptor::kContext); Node* context = Parameter(Descriptor::kContext);
// The slow case calls into the runtime to complete the store without causing // The slow case calls into the runtime to complete the store without causing
// an IC miss that would otherwise cause a transition to the generic stub. // an IC miss that would otherwise cause a transition to the generic stub.
TailCallRuntime(Runtime::kKeyedStoreIC_Slow, context, value, slot, vector, TailCallRuntime(Runtime::kKeyedStoreIC_Slow, context, value, receiver, name);
receiver, name);
} }
TF_BUILTIN(KeyedStoreIC_Slow, HandlerBuiltinsAssembler) { TF_BUILTIN(KeyedStoreIC_Slow, HandlerBuiltinsAssembler) {
......
...@@ -627,7 +627,7 @@ TF_BUILTIN(ProxySetProperty, ProxiesCodeStubAssembler) { ...@@ -627,7 +627,7 @@ TF_BUILTIN(ProxySetProperty, ProxiesCodeStubAssembler) {
{ {
// 7.a. Return ? target.[[Set]](P, V, Receiver). // 7.a. Return ? target.[[Set]](P, V, Receiver).
CallRuntime(Runtime::kSetPropertyWithReceiver, context, target, name, value, CallRuntime(Runtime::kSetPropertyWithReceiver, context, target, name, value,
receiver, language_mode); receiver);
Return(value); Return(value);
} }
......
...@@ -241,8 +241,6 @@ void JSGenericLowering::LowerJSStoreNamed(Node* node) { ...@@ -241,8 +241,6 @@ void JSGenericLowering::LowerJSStoreNamed(Node* node) {
Node* outer_state = frame_state->InputAt(kFrameStateOuterStateInput); Node* outer_state = frame_state->InputAt(kFrameStateOuterStateInput);
node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name())); node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name()));
if (!p.feedback().IsValid()) { if (!p.feedback().IsValid()) {
node->InsertInput(
zone(), 3, jsgraph()->SmiConstant(static_cast<int>(p.language_mode())));
ReplaceWithRuntimeCall(node, Runtime::kSetNamedProperty); ReplaceWithRuntimeCall(node, Runtime::kSetNamedProperty);
return; return;
} }
......
...@@ -831,13 +831,8 @@ void AccessorAssembler::HandleStoreICNativeDataProperty( ...@@ -831,13 +831,8 @@ void AccessorAssembler::HandleStoreICNativeDataProperty(
Node* accessor_info = LoadDescriptorValue(LoadMap(holder), descriptor); Node* accessor_info = LoadDescriptorValue(LoadMap(holder), descriptor);
CSA_CHECK(this, IsAccessorInfo(accessor_info)); CSA_CHECK(this, IsAccessorInfo(accessor_info));
// TODO(8580): Get the language mode lazily when required to avoid the
// computation of GetLanguageMode here. Also make the computation of
// language mode not dependent on vector.
Node* language_mode = GetLanguageMode(p->vector, p->slot);
TailCallRuntime(Runtime::kStoreCallbackProperty, p->context, p->receiver, TailCallRuntime(Runtime::kStoreCallbackProperty, p->context, p->receiver,
holder, accessor_info, p->name, p->value, language_mode); holder, accessor_info, p->name, p->value);
} }
void AccessorAssembler::HandleStoreICHandlerCase( void AccessorAssembler::HandleStoreICHandlerCase(
...@@ -1476,7 +1471,7 @@ void AccessorAssembler::HandleStoreToProxy(const StoreICParameters* p, ...@@ -1476,7 +1471,7 @@ void AccessorAssembler::HandleStoreToProxy(const StoreICParameters* p,
BIND(&to_name_failed); BIND(&to_name_failed);
TailCallRuntime(Runtime::kSetPropertyWithReceiver, p->context, proxy, TailCallRuntime(Runtime::kSetPropertyWithReceiver, p->context, proxy,
p->name, p->value, p->receiver, language_mode); p->name, p->value, p->receiver);
} else { } else {
Node* name = CallBuiltin(Builtins::kToName, p->context, p->name); Node* name = CallBuiltin(Builtins::kToName, p->context, p->name);
TailCallBuiltin(Builtins::kProxySetProperty, p->context, proxy, name, TailCallBuiltin(Builtins::kProxySetProperty, p->context, proxy, name,
......
...@@ -2352,6 +2352,7 @@ RUNTIME_FUNCTION(Runtime_StoreICNoFeedback_Miss) { ...@@ -2352,6 +2352,7 @@ RUNTIME_FUNCTION(Runtime_StoreICNoFeedback_Miss) {
NamedPropertyType property_type = NamedPropertyType property_type =
static_cast<NamedPropertyType>(is_own_property_value); static_cast<NamedPropertyType>(is_own_property_value);
// TODO(mythria): Replace StoreNamedStrict/Sloppy with StoreNamed.
FeedbackSlotKind kind = FeedbackSlotKind::kStoreNamedStrict; FeedbackSlotKind kind = FeedbackSlotKind::kStoreNamedStrict;
if (property_type == NamedPropertyType::kOwn) { if (property_type == NamedPropertyType::kOwn) {
kind = FeedbackSlotKind::kStoreOwnNamed; kind = FeedbackSlotKind::kStoreOwnNamed;
...@@ -2384,6 +2385,7 @@ RUNTIME_FUNCTION(Runtime_StoreGlobalICNoFeedback_Miss) { ...@@ -2384,6 +2385,7 @@ RUNTIME_FUNCTION(Runtime_StoreGlobalICNoFeedback_Miss) {
Handle<Object> value = args.at(0); Handle<Object> value = args.at(0);
Handle<Name> key = args.at<Name>(1); Handle<Name> key = args.at<Name>(1);
// TODO(mythria): Replace StoreGlobalStrict/Sloppy with StoreNamed.
StoreGlobalIC ic(isolate, Handle<FeedbackVector>(), FeedbackSlot(), StoreGlobalIC ic(isolate, Handle<FeedbackVector>(), FeedbackSlot(),
FeedbackSlotKind::kStoreGlobalStrict); FeedbackSlotKind::kStoreGlobalStrict);
RETURN_RESULT_OR_FAILURE(isolate, ic.Store(key, value)); RETURN_RESULT_OR_FAILURE(isolate, ic.Store(key, value));
...@@ -2480,8 +2482,7 @@ RUNTIME_FUNCTION(Runtime_KeyedStoreICNoFeedback_Miss) { ...@@ -2480,8 +2482,7 @@ RUNTIME_FUNCTION(Runtime_KeyedStoreICNoFeedback_Miss) {
Handle<Object> receiver = args.at(1); Handle<Object> receiver = args.at(1);
Handle<Object> key = args.at(2); Handle<Object> key = args.at(2);
// TODO(mythria): Replace StoreKeyedStrict and StoreKeyedSloppy with // TODO(mythria): Replace StoreKeyedStrict/Sloppy with StoreKeyed.
// StoreKeyed.
KeyedStoreIC ic(isolate, Handle<FeedbackVector>(), FeedbackSlot(), KeyedStoreIC ic(isolate, Handle<FeedbackVector>(), FeedbackSlot(),
FeedbackSlotKind::kStoreKeyedStrict); FeedbackSlotKind::kStoreKeyedStrict);
RETURN_RESULT_OR_FAILURE(isolate, ic.Store(receiver, key, value)); RETURN_RESULT_OR_FAILURE(isolate, ic.Store(receiver, key, value));
...@@ -2509,14 +2510,13 @@ RUNTIME_FUNCTION(Runtime_StoreInArrayLiteralIC_Miss) { ...@@ -2509,14 +2510,13 @@ RUNTIME_FUNCTION(Runtime_StoreInArrayLiteralIC_Miss) {
return *value; return *value;
} }
// TODO(mythria): We don't need feedback and slot here. Remove those arguments.
RUNTIME_FUNCTION(Runtime_KeyedStoreIC_Slow) { RUNTIME_FUNCTION(Runtime_KeyedStoreIC_Slow) {
HandleScope scope(isolate); HandleScope scope(isolate);
DCHECK_EQ(5, args.length()); DCHECK_EQ(3, args.length());
// Runtime functions don't follow the IC's calling convention. // Runtime functions don't follow the IC's calling convention.
Handle<Object> value = args.at(0); Handle<Object> value = args.at(0);
Handle<Object> object = args.at(3); Handle<Object> object = args.at(1);
Handle<Object> key = args.at(4); Handle<Object> key = args.at(2);
RETURN_RESULT_OR_FAILURE( RETURN_RESULT_OR_FAILURE(
isolate, Runtime::SetObjectProperty(isolate, object, key, value, isolate, Runtime::SetObjectProperty(isolate, object, key, value,
StoreOrigin::kMaybeKeyed)); StoreOrigin::kMaybeKeyed));
......
...@@ -1020,19 +1020,8 @@ void KeyedStoreGenericAssembler::KeyedStoreGeneric( ...@@ -1020,19 +1020,8 @@ void KeyedStoreGenericAssembler::KeyedStoreGeneric(
{ {
if (IsKeyedStore()) { if (IsKeyedStore()) {
Comment("KeyedStoreGeneric_slow"); Comment("KeyedStoreGeneric_slow");
if (language_mode.IsJust()) {
TailCallRuntime(Runtime::kSetKeyedProperty, context, receiver, key, TailCallRuntime(Runtime::kSetKeyedProperty, context, receiver, key,
value, SmiConstant(language_mode.FromJust())); value);
} else {
TVARIABLE(Smi, var_language_mode, SmiConstant(LanguageMode::kStrict));
Label call_runtime(this);
BranchIfStrictMode(vector, slot, &call_runtime);
var_language_mode = SmiConstant(LanguageMode::kSloppy);
Goto(&call_runtime);
BIND(&call_runtime);
TailCallRuntime(Runtime::kSetKeyedProperty, context, receiver, key,
value, var_language_mode.value());
}
} else { } else {
DCHECK(IsStoreInLiteral()); DCHECK(IsStoreInLiteral());
TailCallRuntime(Runtime::kStoreDataPropertyInLiteral, context, receiver, TailCallRuntime(Runtime::kStoreDataPropertyInLiteral, context, receiver,
...@@ -1127,7 +1116,7 @@ void KeyedStoreGenericAssembler::SetProperty(TNode<Context> context, ...@@ -1127,7 +1116,7 @@ void KeyedStoreGenericAssembler::SetProperty(TNode<Context> context,
unique_name, value); unique_name, value);
} else { } else {
CallRuntime(Runtime::kSetKeyedProperty, context, receiver, unique_name, CallRuntime(Runtime::kSetKeyedProperty, context, receiver, unique_name,
value, SmiConstant(language_mode)); value);
} }
Goto(&done); Goto(&done);
} }
......
...@@ -2349,7 +2349,7 @@ void BytecodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { ...@@ -2349,7 +2349,7 @@ void BytecodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
VisitForEffect(property->value()); VisitForEffect(property->value());
} }
} else { } else {
RegisterList args = register_allocator()->NewRegisterList(4); RegisterList args = register_allocator()->NewRegisterList(3);
builder()->MoveRegister(literal, args[0]); builder()->MoveRegister(literal, args[0]);
builder()->SetExpressionPosition(property->key()); builder()->SetExpressionPosition(property->key());
...@@ -2357,10 +2357,7 @@ void BytecodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { ...@@ -2357,10 +2357,7 @@ void BytecodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
builder()->SetExpressionPosition(property->value()); builder()->SetExpressionPosition(property->value());
VisitForRegisterValue(property->value(), args[2]); VisitForRegisterValue(property->value(), args[2]);
if (property->emit_store()) { if (property->emit_store()) {
builder() builder()->CallRuntime(Runtime::kSetKeyedProperty, args);
->LoadLiteral(Smi::FromEnum(LanguageMode::kSloppy))
.StoreAccumulatorInRegister(args[3])
.CallRuntime(Runtime::kSetKeyedProperty, args);
Register value = args[2]; Register value = args[2];
VisitSetHomeObject(value, literal, property); VisitSetHomeObject(value, literal, property);
} }
...@@ -3645,13 +3642,13 @@ void BytecodeGenerator::BuildAssignment( ...@@ -3645,13 +3642,13 @@ void BytecodeGenerator::BuildAssignment(
case NAMED_SUPER_PROPERTY: { case NAMED_SUPER_PROPERTY: {
builder() builder()
->StoreAccumulatorInRegister(lhs_data.super_property_args()[3]) ->StoreAccumulatorInRegister(lhs_data.super_property_args()[3])
.CallRuntime(StoreToSuperRuntimeId(), lhs_data.super_property_args()); .CallRuntime(Runtime::kStoreToSuper, lhs_data.super_property_args());
break; break;
} }
case KEYED_SUPER_PROPERTY: { case KEYED_SUPER_PROPERTY: {
builder() builder()
->StoreAccumulatorInRegister(lhs_data.super_property_args()[3]) ->StoreAccumulatorInRegister(lhs_data.super_property_args()[3])
.CallRuntime(StoreKeyedToSuperRuntimeId(), .CallRuntime(Runtime::kStoreKeyedToSuper,
lhs_data.super_property_args()); lhs_data.super_property_args());
break; break;
} }
...@@ -4747,13 +4744,13 @@ void BytecodeGenerator::VisitCountOperation(CountOperation* expr) { ...@@ -4747,13 +4744,13 @@ void BytecodeGenerator::VisitCountOperation(CountOperation* expr) {
case NAMED_SUPER_PROPERTY: { case NAMED_SUPER_PROPERTY: {
builder() builder()
->StoreAccumulatorInRegister(super_property_args[3]) ->StoreAccumulatorInRegister(super_property_args[3])
.CallRuntime(StoreToSuperRuntimeId(), super_property_args); .CallRuntime(Runtime::kStoreToSuper, super_property_args);
break; break;
} }
case KEYED_SUPER_PROPERTY: { case KEYED_SUPER_PROPERTY: {
builder() builder()
->StoreAccumulatorInRegister(super_property_args[3]) ->StoreAccumulatorInRegister(super_property_args[3])
.CallRuntime(StoreKeyedToSuperRuntimeId(), super_property_args); .CallRuntime(Runtime::kStoreKeyedToSuper, super_property_args);
break; break;
} }
} }
...@@ -5860,16 +5857,6 @@ FeedbackSlot BytecodeGenerator::GetDummyCompareICSlot() { ...@@ -5860,16 +5857,6 @@ FeedbackSlot BytecodeGenerator::GetDummyCompareICSlot() {
return dummy_feedback_slot_.Get(); return dummy_feedback_slot_.Get();
} }
Runtime::FunctionId BytecodeGenerator::StoreToSuperRuntimeId() {
return is_strict(language_mode()) ? Runtime::kStoreToSuper_Strict
: Runtime::kStoreToSuper_Sloppy;
}
Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() {
return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict
: Runtime::kStoreKeyedToSuper_Sloppy;
}
} // namespace interpreter } // namespace interpreter
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
...@@ -658,11 +658,10 @@ IGNITION_HANDLER(StaNamedPropertyNoFeedback, ...@@ -658,11 +658,10 @@ IGNITION_HANDLER(StaNamedPropertyNoFeedback,
Node* object = LoadRegisterAtOperandIndex(0); Node* object = LoadRegisterAtOperandIndex(0);
Node* name = LoadConstantPoolEntryAtOperandIndex(1); Node* name = LoadConstantPoolEntryAtOperandIndex(1);
Node* value = GetAccumulator(); Node* value = GetAccumulator();
Node* language_mode = SmiFromInt32(BytecodeOperandFlag(2));
Node* context = GetContext(); Node* context = GetContext();
Node* result = CallRuntime(Runtime::kSetNamedProperty, context, object, name, Node* result =
value, language_mode); CallRuntime(Runtime::kSetNamedProperty, context, object, name, value);
SetAccumulator(result); SetAccumulator(result);
Dispatch(); Dispatch();
} }
......
...@@ -801,21 +801,7 @@ MaybeHandle<Object> StoreElementToSuper(Isolate* isolate, ...@@ -801,21 +801,7 @@ MaybeHandle<Object> StoreElementToSuper(Isolate* isolate,
} // anonymous namespace } // anonymous namespace
RUNTIME_FUNCTION(Runtime_StoreToSuper_Strict) { RUNTIME_FUNCTION(Runtime_StoreToSuper) {
HandleScope scope(isolate);
DCHECK_EQ(4, args.length());
CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0);
CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1);
CONVERT_ARG_HANDLE_CHECKED(Name, name, 2);
CONVERT_ARG_HANDLE_CHECKED(Object, value, 3);
RETURN_RESULT_OR_FAILURE(
isolate, StoreToSuper(isolate, home_object, receiver, name, value));
}
// TODO(mythria): Now that we don't need language mode merge this and
// Runtime_StoreToSuper_Strict functions.
RUNTIME_FUNCTION(Runtime_StoreToSuper_Sloppy) {
HandleScope scope(isolate); HandleScope scope(isolate);
DCHECK_EQ(4, args.length()); DCHECK_EQ(4, args.length());
CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0); CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0);
...@@ -847,21 +833,7 @@ static MaybeHandle<Object> StoreKeyedToSuper(Isolate* isolate, ...@@ -847,21 +833,7 @@ static MaybeHandle<Object> StoreKeyedToSuper(Isolate* isolate,
return StoreToSuper(isolate, home_object, receiver, name, value); return StoreToSuper(isolate, home_object, receiver, name, value);
} }
RUNTIME_FUNCTION(Runtime_StoreKeyedToSuper_Strict) { RUNTIME_FUNCTION(Runtime_StoreKeyedToSuper) {
HandleScope scope(isolate);
DCHECK_EQ(4, args.length());
CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0);
CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1);
CONVERT_ARG_HANDLE_CHECKED(Object, key, 2);
CONVERT_ARG_HANDLE_CHECKED(Object, value, 3);
RETURN_RESULT_OR_FAILURE(
isolate, StoreKeyedToSuper(isolate, home_object, receiver, key, value));
}
// TODO(mythria): Now that we don't need language mode merge this and
// Runtime_StoreKeyedToSuper_Strict functions.
RUNTIME_FUNCTION(Runtime_StoreKeyedToSuper_Sloppy) {
HandleScope scope(isolate); HandleScope scope(isolate);
DCHECK_EQ(4, args.length()); DCHECK_EQ(4, args.length());
CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0); CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0);
......
...@@ -544,10 +544,9 @@ RUNTIME_FUNCTION(Runtime_GetProperty) { ...@@ -544,10 +544,9 @@ RUNTIME_FUNCTION(Runtime_GetProperty) {
isolate, Runtime::GetObjectProperty(isolate, receiver_obj, key_obj)); isolate, Runtime::GetObjectProperty(isolate, receiver_obj, key_obj));
} }
// TODO(mythria): Remove language mode parameter to SetKeyedProperty
RUNTIME_FUNCTION(Runtime_SetKeyedProperty) { RUNTIME_FUNCTION(Runtime_SetKeyedProperty) {
HandleScope scope(isolate); HandleScope scope(isolate);
DCHECK_EQ(4, args.length()); DCHECK_EQ(3, args.length());
CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
CONVERT_ARG_HANDLE_CHECKED(Object, key, 1); CONVERT_ARG_HANDLE_CHECKED(Object, key, 1);
...@@ -558,10 +557,9 @@ RUNTIME_FUNCTION(Runtime_SetKeyedProperty) { ...@@ -558,10 +557,9 @@ RUNTIME_FUNCTION(Runtime_SetKeyedProperty) {
StoreOrigin::kMaybeKeyed)); StoreOrigin::kMaybeKeyed));
} }
// TODO(mythria): Remove language mode parameter to SetNamedProperty
RUNTIME_FUNCTION(Runtime_SetNamedProperty) { RUNTIME_FUNCTION(Runtime_SetNamedProperty) {
HandleScope scope(isolate); HandleScope scope(isolate);
DCHECK_EQ(4, args.length()); DCHECK_EQ(3, args.length());
CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
CONVERT_ARG_HANDLE_CHECKED(Object, key, 1); CONVERT_ARG_HANDLE_CHECKED(Object, key, 1);
......
...@@ -61,11 +61,10 @@ RUNTIME_FUNCTION(Runtime_GetPropertyWithReceiver) { ...@@ -61,11 +61,10 @@ RUNTIME_FUNCTION(Runtime_GetPropertyWithReceiver) {
&it, static_cast<OnNonExistent>(on_non_existent->value()))); &it, static_cast<OnNonExistent>(on_non_existent->value())));
} }
// TODO(mythria): Remove language_mode parameter.
RUNTIME_FUNCTION(Runtime_SetPropertyWithReceiver) { RUNTIME_FUNCTION(Runtime_SetPropertyWithReceiver) {
HandleScope scope(isolate); HandleScope scope(isolate);
DCHECK_EQ(5, args.length()); DCHECK_EQ(4, args.length());
CONVERT_ARG_HANDLE_CHECKED(JSReceiver, holder, 0); CONVERT_ARG_HANDLE_CHECKED(JSReceiver, holder, 0);
CONVERT_ARG_HANDLE_CHECKED(Object, key, 1); CONVERT_ARG_HANDLE_CHECKED(Object, key, 1);
CONVERT_ARG_HANDLE_CHECKED(Object, value, 2); CONVERT_ARG_HANDLE_CHECKED(Object, value, 2);
......
...@@ -85,10 +85,8 @@ namespace internal { ...@@ -85,10 +85,8 @@ namespace internal {
F(HomeObjectSymbol, 0, 1) \ F(HomeObjectSymbol, 0, 1) \
F(LoadFromSuper, 3, 1) \ F(LoadFromSuper, 3, 1) \
F(LoadKeyedFromSuper, 3, 1) \ F(LoadKeyedFromSuper, 3, 1) \
F(StoreKeyedToSuper_Sloppy, 4, 1) \ F(StoreKeyedToSuper, 4, 1) \
F(StoreKeyedToSuper_Strict, 4, 1) \ F(StoreToSuper, 4, 1) \
F(StoreToSuper_Sloppy, 4, 1) \
F(StoreToSuper_Strict, 4, 1) \
F(ThrowConstructorNonCallableError, 1, 1) \ F(ThrowConstructorNonCallableError, 1, 1) \
F(ThrowNotSuperConstructor, 2, 1) \ F(ThrowNotSuperConstructor, 2, 1) \
F(ThrowStaticPrototypeError, 0, 1) \ F(ThrowStaticPrototypeError, 0, 1) \
...@@ -316,8 +314,8 @@ namespace internal { ...@@ -316,8 +314,8 @@ namespace internal {
F(OptimizeObjectForAddingMultipleProperties, 2, 1) \ F(OptimizeObjectForAddingMultipleProperties, 2, 1) \
F(PerformSideEffectCheckForObject, 1, 1) \ F(PerformSideEffectCheckForObject, 1, 1) \
F(SetDataProperties, 2, 1) \ F(SetDataProperties, 2, 1) \
F(SetKeyedProperty, 4, 1) \ F(SetKeyedProperty, 3, 1) \
F(SetNamedProperty, 4, 1) \ F(SetNamedProperty, 3, 1) \
F(StoreDataPropertyInLiteral, 3, 1) \ F(StoreDataPropertyInLiteral, 3, 1) \
F(ShrinkPropertyDictionary, 1, 1) \ F(ShrinkPropertyDictionary, 1, 1) \
F(ToFastProperties, 1, 1) \ F(ToFastProperties, 1, 1) \
...@@ -363,7 +361,7 @@ namespace internal { ...@@ -363,7 +361,7 @@ namespace internal {
F(IsJSProxy, 1, 1) \ F(IsJSProxy, 1, 1) \
F(JSProxyGetHandler, 1, 1) \ F(JSProxyGetHandler, 1, 1) \
F(JSProxyGetTarget, 1, 1) \ F(JSProxyGetTarget, 1, 1) \
F(SetPropertyWithReceiver, 5, 1) F(SetPropertyWithReceiver, 4, 1)
#define FOR_EACH_INTRINSIC_REGEXP(F, I) \ #define FOR_EACH_INTRINSIC_REGEXP(F, I) \
I(IsRegExp, 1, 1) \ I(IsRegExp, 1, 1) \
...@@ -556,7 +554,7 @@ namespace internal { ...@@ -556,7 +554,7 @@ namespace internal {
F(KeyedStoreIC_Miss, 5, 1) \ F(KeyedStoreIC_Miss, 5, 1) \
F(KeyedStoreICNoFeedback_Miss, 3, 1) \ F(KeyedStoreICNoFeedback_Miss, 3, 1) \
F(StoreInArrayLiteralIC_Miss, 5, 1) \ F(StoreInArrayLiteralIC_Miss, 5, 1) \
F(KeyedStoreIC_Slow, 5, 1) \ F(KeyedStoreIC_Slow, 3, 1) \
F(LoadAccessorProperty, 4, 1) \ F(LoadAccessorProperty, 4, 1) \
F(LoadCallbackProperty, 4, 1) \ F(LoadCallbackProperty, 4, 1) \
F(LoadElementWithInterceptor, 2, 1) \ F(LoadElementWithInterceptor, 2, 1) \
......
...@@ -74,7 +74,7 @@ bytecodes: [ ...@@ -74,7 +74,7 @@ bytecodes: [
B(LdaSmi), I8(2), B(LdaSmi), I8(2),
B(Star), R(4), B(Star), R(4),
B(Mov), R(this), R(1), B(Mov), R(this), R(1),
/* 138 E> */ B(CallRuntime), U16(Runtime::kStoreToSuper_Strict), R(1), U8(4), /* 138 E> */ B(CallRuntime), U16(Runtime::kStoreToSuper), R(1), U8(4),
/* 143 S> */ B(LdaConstant), U8(0), /* 143 S> */ B(LdaConstant), U8(0),
/* 150 E> */ B(LdaKeyedProperty), R(closure), U8(2), /* 150 E> */ B(LdaKeyedProperty), R(closure), U8(2),
B(Star), R(2), B(Star), R(2),
......
...@@ -240,9 +240,9 @@ handlers: [ ...@@ -240,9 +240,9 @@ handlers: [
snippet: " snippet: "
var a = 1; return { 1: a }; var a = 1; return { 1: a };
" "
frame size: 6 frame size: 5
parameter count: 1 parameter count: 1
bytecode array length: 32 bytecode array length: 29
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1), /* 42 S> */ B(LdaSmi), I8(1),
...@@ -251,11 +251,9 @@ bytecodes: [ ...@@ -251,11 +251,9 @@ bytecodes: [
B(Star), R(1), B(Star), R(1),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(Star), R(3), B(Star), R(3),
B(LdaZero),
B(Star), R(5),
B(Mov), R(1), R(2), B(Mov), R(1), R(2),
B(Mov), R(0), R(4), B(Mov), R(0), R(4),
/* 57 E> */ B(CallRuntime), U16(Runtime::kSetKeyedProperty), R(2), U8(4), /* 57 E> */ B(CallRuntime), U16(Runtime::kSetKeyedProperty), R(2), U8(3),
B(Ldar), R(2), B(Ldar), R(2),
/* 61 S> */ B(Return), /* 61 S> */ B(Return),
] ]
......
...@@ -23504,8 +23504,8 @@ TEST(AccessCheckThrows) { ...@@ -23504,8 +23504,8 @@ TEST(AccessCheckThrows) {
CheckCorrectThrow("JSON.stringify(other)"); CheckCorrectThrow("JSON.stringify(other)");
CheckCorrectThrow("has_own_property(other, 'x')"); CheckCorrectThrow("has_own_property(other, 'x')");
CheckCorrectThrow("%GetProperty(other, 'x')"); CheckCorrectThrow("%GetProperty(other, 'x')");
CheckCorrectThrow("%SetKeyedProperty(other, 'x', 'foo', 0)"); CheckCorrectThrow("%SetKeyedProperty(other, 'x', 'foo')");
CheckCorrectThrow("%SetNamedProperty(other, 'y', 'foo', 1)"); CheckCorrectThrow("%SetNamedProperty(other, 'y', 'foo')");
STATIC_ASSERT(static_cast<int>(i::LanguageMode::kSloppy) == 0); STATIC_ASSERT(static_cast<int>(i::LanguageMode::kSloppy) == 0);
STATIC_ASSERT(static_cast<int>(i::LanguageMode::kStrict) == 1); STATIC_ASSERT(static_cast<int>(i::LanguageMode::kStrict) == 1);
CheckCorrectThrow("%DeleteProperty(other, 'x', 0)"); // 0 == SLOPPY CheckCorrectThrow("%DeleteProperty(other, 'x', 0)"); // 0 == SLOPPY
...@@ -16,4 +16,4 @@ f(str, 0); ...@@ -16,4 +16,4 @@ f(str, 0);
f(str, 0); f(str, 0);
// This is just to trigger elements validation, object already broken. // This is just to trigger elements validation, object already broken.
%SetKeyedProperty(str, 1, 'y', 0); %SetKeyedProperty(str, 1, 'y');
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