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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 | 364 |
365 | 365 |
366 void AstTyper::VisitVariableProxy(VariableProxy* expr) { | 366 void AstTyper::VisitVariableProxy(VariableProxy* expr) { |
367 Variable* var = expr->var(); | 367 Variable* var = expr->var(); |
368 if (var->IsStackAllocated()) { | 368 if (var->IsStackAllocated()) { |
369 NarrowType(expr, store_.LookupBounds(variable_index(var))); | 369 NarrowType(expr, store_.LookupBounds(variable_index(var))); |
370 } | 370 } |
371 } | 371 } |
372 | 372 |
373 | 373 |
| 374 void AstTyper::VisitRestParameter(RestParameter* node) { |
| 375 // This node should be evicted from the tree before typing ever occurs. |
| 376 UNREACHABLE(); |
| 377 } |
| 378 |
| 379 |
374 void AstTyper::VisitLiteral(Literal* expr) { | 380 void AstTyper::VisitLiteral(Literal* expr) { |
375 Type* type = Type::Constant(expr->value(), zone()); | 381 Type* type = Type::Constant(expr->value(), zone()); |
376 NarrowType(expr, Bounds(type)); | 382 NarrowType(expr, Bounds(type)); |
377 } | 383 } |
378 | 384 |
379 | 385 |
380 void AstTyper::VisitRegExpLiteral(RegExpLiteral* expr) { | 386 void AstTyper::VisitRegExpLiteral(RegExpLiteral* expr) { |
381 // TODO(rossberg): Reintroduce RegExp type. | 387 // TODO(rossberg): Reintroduce RegExp type. |
382 NarrowType(expr, Bounds(Type::Object(zone()))); | 388 NarrowType(expr, Bounds(Type::Object(zone()))); |
383 } | 389 } |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 void AstTyper::VisitImportDeclaration(ImportDeclaration* declaration) { | 783 void AstTyper::VisitImportDeclaration(ImportDeclaration* declaration) { |
778 } | 784 } |
779 | 785 |
780 | 786 |
781 void AstTyper::VisitExportDeclaration(ExportDeclaration* declaration) { | 787 void AstTyper::VisitExportDeclaration(ExportDeclaration* declaration) { |
782 } | 788 } |
783 | 789 |
784 | 790 |
785 } // namespace internal | 791 } // namespace internal |
786 } // namespace v8 | 792 } // namespace v8 |
OLD | NEW |