Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index a6843115bb27104727e5a926999433b295e0be01..8000d8f102c0d963f1b01614ca8f7a29339341d0 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -5565,6 +5565,7 @@ void HOptimizedGraphBuilder::VisitObjectLiteral(ObjectLiteral* expr) { |
DCHECK(!HasStackOverflow()); |
DCHECK(current_block() != NULL); |
DCHECK(current_block()->HasPredecessor()); |
+ |
expr->BuildConstantProperties(isolate()); |
Handle<JSFunction> closure = function_state()->compilation_info()->closure(); |
HInstruction* literal; |
@@ -5620,9 +5621,10 @@ void HOptimizedGraphBuilder::VisitObjectLiteral(ObjectLiteral* expr) { |
for (int i = 0; i < expr->properties()->length(); i++) { |
ObjectLiteral::Property* property = expr->properties()->at(i); |
+ if (property->is_computed_name()) return Bailout(kComputedPropertyName); |
if (property->IsCompileTimeValue()) continue; |
- Literal* key = property->key(); |
+ Literal* key = property->key()->AsLiteral(); |
Expression* value = property->value(); |
switch (property->kind()) { |
@@ -5648,7 +5650,7 @@ void HOptimizedGraphBuilder::VisitObjectLiteral(ObjectLiteral* expr) { |
} |
Handle<Map> map = property->GetReceiverType(); |
- Handle<String> name = property->key()->AsPropertyName(); |
+ Handle<String> name = key->AsPropertyName(); |
HInstruction* store; |
if (map.is_null()) { |
// If we don't know the monomorphic type, do a generic store. |