| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/typing.h" | 5 #include "src/typing.h" |
| 6 | 6 |
| 7 #include "src/frames.h" | 7 #include "src/frames.h" |
| 8 #include "src/frames-inl.h" | 8 #include "src/frames-inl.h" |
| 9 #include "src/ostreams.h" | 9 #include "src/ostreams.h" |
| 10 #include "src/parser.h" // for CompileTimeValue; TODO(rossberg): should move | 10 #include "src/parser.h" // for CompileTimeValue; TODO(rossberg): should move |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 | 400 |
| 401 void AstTyper::VisitObjectLiteral(ObjectLiteral* expr) { | 401 void AstTyper::VisitObjectLiteral(ObjectLiteral* expr) { |
| 402 ZoneList<ObjectLiteral::Property*>* properties = expr->properties(); | 402 ZoneList<ObjectLiteral::Property*>* properties = expr->properties(); |
| 403 for (int i = 0; i < properties->length(); ++i) { | 403 for (int i = 0; i < properties->length(); ++i) { |
| 404 ObjectLiteral::Property* prop = properties->at(i); | 404 ObjectLiteral::Property* prop = properties->at(i); |
| 405 | 405 |
| 406 // Collect type feedback. | 406 // Collect type feedback. |
| 407 if ((prop->kind() == ObjectLiteral::Property::MATERIALIZED_LITERAL && | 407 if ((prop->kind() == ObjectLiteral::Property::MATERIALIZED_LITERAL && |
| 408 !CompileTimeValue::IsCompileTimeValue(prop->value())) || | 408 !CompileTimeValue::IsCompileTimeValue(prop->value())) || |
| 409 prop->kind() == ObjectLiteral::Property::COMPUTED) { | 409 prop->kind() == ObjectLiteral::Property::COMPUTED) { |
| 410 if (prop->key()->value()->IsInternalizedString() && prop->emit_store()) { | 410 if (!prop->is_computed_name() && |
| 411 prop->key()->AsLiteral()->value()->IsInternalizedString() && |
| 412 prop->emit_store()) { |
| 411 prop->RecordTypeFeedback(oracle()); | 413 prop->RecordTypeFeedback(oracle()); |
| 412 } | 414 } |
| 413 } | 415 } |
| 414 | 416 |
| 415 RECURSE(Visit(prop->value())); | 417 RECURSE(Visit(prop->value())); |
| 416 } | 418 } |
| 417 | 419 |
| 418 NarrowType(expr, Bounds(Type::Object(zone()))); | 420 NarrowType(expr, Bounds(Type::Object(zone()))); |
| 419 } | 421 } |
| 420 | 422 |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 void AstTyper::VisitModuleUrl(ModuleUrl* module) { | 807 void AstTyper::VisitModuleUrl(ModuleUrl* module) { |
| 806 } | 808 } |
| 807 | 809 |
| 808 | 810 |
| 809 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { | 811 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { |
| 810 RECURSE(Visit(stmt->body())); | 812 RECURSE(Visit(stmt->body())); |
| 811 } | 813 } |
| 812 | 814 |
| 813 | 815 |
| 814 } } // namespace v8::internal | 816 } } // namespace v8::internal |
| OLD | NEW |