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/crankshaft/typing.h" | 5 #include "src/crankshaft/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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 for (int i = 0; i < values->length(); ++i) { | 430 for (int i = 0; i < values->length(); ++i) { |
431 Expression* value = values->at(i); | 431 Expression* value = values->at(i); |
432 RECURSE(Visit(value)); | 432 RECURSE(Visit(value)); |
433 } | 433 } |
434 | 434 |
435 NarrowType(expr, Bounds(Type::Object(zone()))); | 435 NarrowType(expr, Bounds(Type::Object(zone()))); |
436 } | 436 } |
437 | 437 |
438 | 438 |
439 void AstTyper::VisitAssignment(Assignment* expr) { | 439 void AstTyper::VisitAssignment(Assignment* expr) { |
| 440 RETURN_IF_VISIT_NODE(expr->destructuring_assignment()); |
| 441 |
440 // Collect type feedback. | 442 // Collect type feedback. |
441 Property* prop = expr->target()->AsProperty(); | 443 Property* prop = expr->target()->AsProperty(); |
442 if (prop != NULL) { | 444 if (prop != NULL) { |
443 FeedbackVectorSlot slot = expr->AssignmentSlot(); | 445 FeedbackVectorSlot slot = expr->AssignmentSlot(); |
444 expr->set_is_uninitialized(oracle()->StoreIsUninitialized(slot)); | 446 expr->set_is_uninitialized(oracle()->StoreIsUninitialized(slot)); |
445 if (!expr->IsUninitialized()) { | 447 if (!expr->IsUninitialized()) { |
446 SmallMapList* receiver_types = expr->GetReceiverTypes(); | 448 SmallMapList* receiver_types = expr->GetReceiverTypes(); |
447 if (prop->key()->IsPropertyName()) { | 449 if (prop->key()->IsPropertyName()) { |
448 Literal* lit_key = prop->key()->AsLiteral(); | 450 Literal* lit_key = prop->key()->AsLiteral(); |
449 DCHECK(lit_key != NULL && lit_key->value()->IsString()); | 451 DCHECK(lit_key != NULL && lit_key->value()->IsString()); |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 void AstTyper::VisitImportDeclaration(ImportDeclaration* declaration) { | 792 void AstTyper::VisitImportDeclaration(ImportDeclaration* declaration) { |
791 } | 793 } |
792 | 794 |
793 | 795 |
794 void AstTyper::VisitExportDeclaration(ExportDeclaration* declaration) { | 796 void AstTyper::VisitExportDeclaration(ExportDeclaration* declaration) { |
795 } | 797 } |
796 | 798 |
797 | 799 |
798 } // namespace internal | 800 } // namespace internal |
799 } // namespace v8 | 801 } // namespace v8 |
OLD | NEW |