Chromium Code Reviews| 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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 426 } | 426 } |
| 427 | 427 |
| 428 | 428 |
| 429 void AstTyper::VisitArrayLiteral(ArrayLiteral* expr) { | 429 void AstTyper::VisitArrayLiteral(ArrayLiteral* expr) { |
| 430 ZoneList<Expression*>* values = expr->values(); | 430 ZoneList<Expression*>* values = expr->values(); |
| 431 for (int i = 0; i < values->length(); ++i) { | 431 for (int i = 0; i < values->length(); ++i) { |
| 432 Expression* value = values->at(i); | 432 Expression* value = values->at(i); |
| 433 RECURSE(Visit(value)); | 433 RECURSE(Visit(value)); |
| 434 } | 434 } |
| 435 | 435 |
| 436 NarrowType(expr, Bounds(Type::Array(zone()))); | 436 NarrowType(expr, Bounds(Type::OtherObject(zone()))); |
|
rossberg
2015/04/10 11:41:55
OtherObject is supposed to be an internal detail o
titzer
2015/04/10 12:35:59
Done.
| |
| 437 } | 437 } |
| 438 | 438 |
| 439 | 439 |
| 440 void AstTyper::VisitAssignment(Assignment* expr) { | 440 void AstTyper::VisitAssignment(Assignment* expr) { |
| 441 // Collect type feedback. | 441 // Collect type feedback. |
| 442 Property* prop = expr->target()->AsProperty(); | 442 Property* prop = expr->target()->AsProperty(); |
| 443 if (prop != NULL) { | 443 if (prop != NULL) { |
| 444 TypeFeedbackId id = expr->AssignmentFeedbackId(); | 444 TypeFeedbackId id = expr->AssignmentFeedbackId(); |
| 445 expr->set_is_uninitialized(oracle()->StoreIsUninitialized(id)); | 445 expr->set_is_uninitialized(oracle()->StoreIsUninitialized(id)); |
| 446 if (!expr->IsUninitialized()) { | 446 if (!expr->IsUninitialized()) { |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 822 void AstTyper::VisitModuleUrl(ModuleUrl* module) { | 822 void AstTyper::VisitModuleUrl(ModuleUrl* module) { |
| 823 } | 823 } |
| 824 | 824 |
| 825 | 825 |
| 826 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { | 826 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { |
| 827 RECURSE(Visit(stmt->body())); | 827 RECURSE(Visit(stmt->body())); |
| 828 } | 828 } |
| 829 | 829 |
| 830 | 830 |
| 831 } } // namespace v8::internal | 831 } } // namespace v8::internal |
| OLD | NEW |