| 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 ExitEffects(); | 369 ExitEffects(); |
| 370 then_effects.Alt(else_effects); | 370 then_effects.Alt(else_effects); |
| 371 store_.Seq(then_effects); | 371 store_.Seq(then_effects); |
| 372 | 372 |
| 373 NarrowType(expr, Bounds::Either( | 373 NarrowType(expr, Bounds::Either( |
| 374 expr->then_expression()->bounds(), | 374 expr->then_expression()->bounds(), |
| 375 expr->else_expression()->bounds(), zone())); | 375 expr->else_expression()->bounds(), zone())); |
| 376 } | 376 } |
| 377 | 377 |
| 378 | 378 |
| 379 // simulated build generates warning (fails compile) without pragma |
| 380 // when built using gcc 4.4.6 on intel linux |
| 381 #pragma GCC diagnostic ignored "-Wuninitialized" |
| 379 void AstTyper::VisitVariableProxy(VariableProxy* expr) { | 382 void AstTyper::VisitVariableProxy(VariableProxy* expr) { |
| 380 Variable* var = expr->var(); | 383 Variable* var = expr->var(); |
| 381 if (var->IsStackAllocated()) { | 384 if (var->IsStackAllocated()) { |
| 382 NarrowType(expr, store_.LookupBounds(variable_index(var))); | 385 NarrowType(expr, store_.LookupBounds(variable_index(var))); |
| 383 } | 386 } |
| 384 } | 387 } |
| 385 | 388 |
| 386 | 389 |
| 387 void AstTyper::VisitLiteral(Literal* expr) { | 390 void AstTyper::VisitLiteral(Literal* expr) { |
| 388 Type* type = Type::Constant(expr->value(), zone()); | 391 Type* type = Type::Constant(expr->value(), zone()); |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 void AstTyper::VisitModuleUrl(ModuleUrl* module) { | 774 void AstTyper::VisitModuleUrl(ModuleUrl* module) { |
| 772 } | 775 } |
| 773 | 776 |
| 774 | 777 |
| 775 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { | 778 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { |
| 776 RECURSE(Visit(stmt->body())); | 779 RECURSE(Visit(stmt->body())); |
| 777 } | 780 } |
| 778 | 781 |
| 779 | 782 |
| 780 } } // namespace v8::internal | 783 } } // namespace v8::internal |
| OLD | NEW |