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

Unified Diff: src/interpreter/bytecode-generator.cc

Issue 2510743002: [interpreter] Bytecode for StaDataPropertyInLiteral. (Closed)
Patch Set: Delete unused variable. Created 4 years, 1 month 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/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index fc7b1155d940a74fc780385df4b13bd0b896969c..66facce269a6eb9b16430403f030a4da937327e4 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -1481,7 +1481,10 @@ void BytecodeGenerator::VisitClassLiteralProperties(ClassLiteral* expr,
builder()
->LoadLiteral(Smi::FromInt(property->NeedsSetFunctionName()))
.StoreAccumulatorInRegister(set_function_name)
- .CallRuntime(Runtime::kDefineDataPropertyInLiteral, args);
+ .StoreAccumulatorInRegister(set_function_name);
Leszek Swirski 2016/11/17 16:58:48 you don't need this twice.
Franzi 2016/11/17 17:06:10 Good catch! Thanks.
+ builder()->LoadAccumulatorWithRegister(value);
+ builder()->StoreDataPropertyInLiteral(receiver, key, attr,
+ set_function_name);
break;
}
case ClassLiteral::Property::GETTER: {
@@ -1710,7 +1713,9 @@ void BytecodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
.StoreAccumulatorInRegister(args[3])
.LoadLiteral(Smi::FromInt(property->NeedsSetFunctionName()))
.StoreAccumulatorInRegister(args[4]);
- builder()->CallRuntime(Runtime::kDefineDataPropertyInLiteral, args);
+ builder()->LoadAccumulatorWithRegister(args[2]);
+ builder()->StoreDataPropertyInLiteral(args[0], args[1], args[3],
+ args[4]);
break;
}
case ObjectLiteral::Property::GETTER:
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698