Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: src/interpreter/interpreter.cc

Issue 2586463002: Add CreateDataPropertyInLiteralFlags. (Closed)
Patch Set: Address review comments. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index be924980c26dff0f135b6fb93fb59e507c74eb43..cc2af9d90c76281663a71498e8e2b817f8e98396 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -817,11 +817,11 @@ void Interpreter::DoStaKeyedPropertyStrict(InterpreterAssembler* assembler) {
DoKeyedStoreIC(ic, assembler);
}
-// StaDataPropertyInLiteral <object> <name> <value> <attrs>
+// StaDataPropertyInLiteral <object> <name> <value> <flags>
//
-// Define a property <name> with value <value> in <object>. Use property
-// attributes <attrs> in the definition and set the name property of <value>
-// according to the flag in the accumulator.
+// Define a property <name> with value <value> in <object>. Property attributes
+// and whether set_function_name are stored in DataPropertyInLiteralFlags
+// <flags>.
//
// This definition is not observable and is used only for definitions
// in object or class literals.
@@ -832,15 +832,12 @@ void Interpreter::DoStaDataPropertyInLiteral(InterpreterAssembler* assembler) {
Node* name = __ LoadRegister(name_reg_index);
Node* value_reg_index = __ BytecodeOperandReg(2);
Node* value = __ LoadRegister(value_reg_index);
- Node* attrs_reg_index = __ BytecodeOperandReg(3);
- Node* attrs = __ LoadRegister(attrs_reg_index);
-
- Node* set_function_name = __ GetAccumulator();
+ Node* flags = __ SmiFromWord32(__ BytecodeOperandFlag(3));
Node* context = __ GetContext();
__ CallRuntime(Runtime::kDefineDataPropertyInLiteral, context, object, name,
- value, attrs, set_function_name);
+ value, flags);
__ Dispatch();
}
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698