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

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

Issue 2612903002: [ignition] Avoid unnecessary ToName calls in VisitClassLiteralProperties (Closed)
Patch Set: Created 3 years, 11 months 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 | « no previous file | test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden » ('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 6013b21faa18477a573f24bfeecc72e84112d054..8a265f6240d8e25ed6edc669f721ecb3e173212a 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -1470,8 +1470,12 @@ void BytecodeGenerator::VisitClassLiteralProperties(ClassLiteral* expr,
old_receiver = new_receiver;
}
- VisitForAccumulatorValue(property->key());
- builder()->ConvertAccumulatorToName(key);
+ if (property->key()->IsStringLiteral()) {
+ VisitForRegisterValue(property->key(), key);
+ } else {
+ VisitForAccumulatorValue(property->key());
+ builder()->ConvertAccumulatorToName(key);
+ }
if (property->is_static() && property->is_computed_name()) {
// The static prototype property is read only. We handle the non computed
« no previous file with comments | « no previous file | test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698