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 |