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

Side by Side Diff: src/typing.cc

Issue 798243004: ES6 computed property names (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Disable test on windows Created 5 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 unified diff | Download patch
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 401
402 void AstTyper::VisitObjectLiteral(ObjectLiteral* expr) { 402 void AstTyper::VisitObjectLiteral(ObjectLiteral* expr) {
403 ZoneList<ObjectLiteral::Property*>* properties = expr->properties(); 403 ZoneList<ObjectLiteral::Property*>* properties = expr->properties();
404 for (int i = 0; i < properties->length(); ++i) { 404 for (int i = 0; i < properties->length(); ++i) {
405 ObjectLiteral::Property* prop = properties->at(i); 405 ObjectLiteral::Property* prop = properties->at(i);
406 406
407 // Collect type feedback. 407 // Collect type feedback.
408 if ((prop->kind() == ObjectLiteral::Property::MATERIALIZED_LITERAL && 408 if ((prop->kind() == ObjectLiteral::Property::MATERIALIZED_LITERAL &&
409 !CompileTimeValue::IsCompileTimeValue(prop->value())) || 409 !CompileTimeValue::IsCompileTimeValue(prop->value())) ||
410 prop->kind() == ObjectLiteral::Property::COMPUTED) { 410 prop->kind() == ObjectLiteral::Property::COMPUTED) {
411 if (prop->key()->value()->IsInternalizedString() && prop->emit_store()) { 411 if (!prop->is_computed_name() &&
412 prop->key()->AsLiteral()->value()->IsInternalizedString() &&
413 prop->emit_store()) {
412 prop->RecordTypeFeedback(oracle()); 414 prop->RecordTypeFeedback(oracle());
413 } 415 }
414 } 416 }
415 417
416 RECURSE(Visit(prop->value())); 418 RECURSE(Visit(prop->value()));
417 } 419 }
418 420
419 NarrowType(expr, Bounds(Type::Object(zone()))); 421 NarrowType(expr, Bounds(Type::Object(zone())));
420 } 422 }
421 423
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 void AstTyper::VisitModuleUrl(ModuleUrl* module) { 810 void AstTyper::VisitModuleUrl(ModuleUrl* module) {
809 } 811 }
810 812
811 813
812 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { 814 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) {
813 RECURSE(Visit(stmt->body())); 815 RECURSE(Visit(stmt->body()));
814 } 816 }
815 817
816 818
817 } } // namespace v8::internal 819 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698