Commit 54e4b1fb authored by franzih's avatar franzih Committed by Commit bot

[turbofan] Add JSStoreDataPropertyInLiteral operator.

BUG=v8:5624

Review-Url: https://codereview.chromium.org/2518513002
Cr-Commit-Position: refs/heads/master@{#41119}
parent e84f0adb
......@@ -803,10 +803,9 @@ void BytecodeGraphBuilder::VisitStaDataPropertyInLiteral() {
environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(3));
Node* set_function_name = environment()->LookupAccumulator();
const Operator* op =
javascript()->CallRuntime(Runtime::kDefineDataPropertyInLiteral);
Node* store = NewNode(op, object, name, value, attrs, set_function_name);
environment()->RecordAfterState(store, Environment::kAttachFrameState);
const Operator* op = javascript()->StoreDataPropertyInLiteral();
Node* node = NewNode(op, object, name, value, attrs, set_function_name);
environment()->RecordAfterState(node, Environment::kAttachFrameState);
}
void BytecodeGraphBuilder::VisitLdaContextSlot() {
......
......@@ -337,6 +337,9 @@ void JSGenericLowering::LowerJSStoreGlobal(Node* node) {
ReplaceWithStubCall(node, callable, flags);
}
void JSGenericLowering::LowerJSStoreDataPropertyInLiteral(Node* node) {
ReplaceWithRuntimeCall(node, Runtime::kDefineDataPropertyInLiteral);
}
void JSGenericLowering::LowerJSDeleteProperty(Node* node) {
LanguageMode language_mode = OpParameter<LanguageMode>(node);
......@@ -345,7 +348,6 @@ void JSGenericLowering::LowerJSDeleteProperty(Node* node) {
: Runtime::kDeleteProperty_Sloppy);
}
void JSGenericLowering::LowerJSInstanceOf(Node* node) {
CallDescriptor::Flags flags = FrameStateFlagForCall(node);
Callable callable = CodeFactory::InstanceOf(isolate());
......
......@@ -455,7 +455,8 @@ CompareOperationHint CompareOperationHintOf(const Operator* op) {
V(LoadMessage, Operator::kNoThrow, 0, 1) \
V(StoreMessage, Operator::kNoThrow, 1, 0) \
V(GeneratorRestoreContinuation, Operator::kNoThrow, 1, 1) \
V(StackCheck, Operator::kNoWrite, 0, 0)
V(StackCheck, Operator::kNoWrite, 0, 0) \
V(StoreDataPropertyInLiteral, Operator::kNoProperties, 5, 0)
#define BINARY_OP_LIST(V) \
V(BitwiseOr) \
......
......@@ -489,6 +489,8 @@ class V8_EXPORT_PRIVATE JSOperatorBuilder final
const Operator* StoreNamed(LanguageMode language_mode, Handle<Name> name,
VectorSlotPair const& feedback);
const Operator* StoreDataPropertyInLiteral();
const Operator* DeleteProperty(LanguageMode language_mode);
const Operator* HasProperty();
......
......@@ -122,25 +122,26 @@
JS_CONVERSION_UNOP_LIST(V) \
JS_OTHER_UNOP_LIST(V)
#define JS_OBJECT_OP_LIST(V) \
V(JSCreate) \
V(JSCreateArguments) \
V(JSCreateArray) \
V(JSCreateClosure) \
V(JSCreateIterResultObject) \
V(JSCreateKeyValueArray) \
V(JSCreateLiteralArray) \
V(JSCreateLiteralObject) \
V(JSCreateLiteralRegExp) \
V(JSLoadProperty) \
V(JSLoadNamed) \
V(JSLoadGlobal) \
V(JSStoreProperty) \
V(JSStoreNamed) \
V(JSStoreGlobal) \
V(JSDeleteProperty) \
V(JSHasProperty) \
V(JSInstanceOf) \
#define JS_OBJECT_OP_LIST(V) \
V(JSCreate) \
V(JSCreateArguments) \
V(JSCreateArray) \
V(JSCreateClosure) \
V(JSCreateIterResultObject) \
V(JSCreateKeyValueArray) \
V(JSCreateLiteralArray) \
V(JSCreateLiteralObject) \
V(JSCreateLiteralRegExp) \
V(JSLoadProperty) \
V(JSLoadNamed) \
V(JSLoadGlobal) \
V(JSStoreProperty) \
V(JSStoreNamed) \
V(JSStoreGlobal) \
V(JSStoreDataPropertyInLiteral) \
V(JSDeleteProperty) \
V(JSHasProperty) \
V(JSInstanceOf) \
V(JSOrdinaryHasInstance)
#define JS_CONTEXT_OP_LIST(V) \
......
......@@ -78,6 +78,7 @@ bool OperatorProperties::HasFrameStateInput(const Operator* op) {
case IrOpcode::kJSStoreProperty:
case IrOpcode::kJSLoadGlobal:
case IrOpcode::kJSStoreGlobal:
case IrOpcode::kJSStoreDataPropertyInLiteral:
case IrOpcode::kJSDeleteProperty:
// Context operations
......
......@@ -1233,6 +1233,10 @@ Type* Typer::Visitor::TypeJSStoreGlobal(Node* node) {
return nullptr;
}
Type* Typer::Visitor::TypeJSStoreDataPropertyInLiteral(Node* node) {
UNREACHABLE();
return nullptr;
}
Type* Typer::Visitor::TypeJSDeleteProperty(Node* node) {
return Type::Boolean();
......
......@@ -598,6 +598,7 @@ void Verifier::Visitor::Check(Node* node) {
case IrOpcode::kJSStoreProperty:
case IrOpcode::kJSStoreNamed:
case IrOpcode::kJSStoreGlobal:
case IrOpcode::kJSStoreDataPropertyInLiteral:
// Type is empty.
CheckNotTyped(node);
break;
......
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