| 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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 void AstTyper::VisitFunctionLiteral(FunctionLiteral* expr) {} | 342 void AstTyper::VisitFunctionLiteral(FunctionLiteral* expr) {} |
| 343 | 343 |
| 344 | 344 |
| 345 void AstTyper::VisitClassLiteral(ClassLiteral* expr) {} | 345 void AstTyper::VisitClassLiteral(ClassLiteral* expr) {} |
| 346 | 346 |
| 347 | 347 |
| 348 void AstTyper::VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) { | 348 void AstTyper::VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) { |
| 349 } | 349 } |
| 350 | 350 |
| 351 | 351 |
| 352 void AstTyper::VisitDoExpression(DoExpression* expr) { |
| 353 RECURSE(VisitBlock(expr->block())); |
| 354 RECURSE(VisitVariableProxy(expr->result())); |
| 355 NarrowType(expr, expr->result()->bounds()); |
| 356 } |
| 357 |
| 358 |
| 352 void AstTyper::VisitConditional(Conditional* expr) { | 359 void AstTyper::VisitConditional(Conditional* expr) { |
| 353 // Collect type feedback. | 360 // Collect type feedback. |
| 354 expr->condition()->RecordToBooleanTypeFeedback(oracle()); | 361 expr->condition()->RecordToBooleanTypeFeedback(oracle()); |
| 355 | 362 |
| 356 RECURSE(Visit(expr->condition())); | 363 RECURSE(Visit(expr->condition())); |
| 357 Effects then_effects = EnterEffects(); | 364 Effects then_effects = EnterEffects(); |
| 358 RECURSE(Visit(expr->then_expression())); | 365 RECURSE(Visit(expr->then_expression())); |
| 359 ExitEffects(); | 366 ExitEffects(); |
| 360 Effects else_effects = EnterEffects(); | 367 Effects else_effects = EnterEffects(); |
| 361 RECURSE(Visit(expr->else_expression())); | 368 RECURSE(Visit(expr->else_expression())); |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 void AstTyper::VisitImportDeclaration(ImportDeclaration* declaration) { | 812 void AstTyper::VisitImportDeclaration(ImportDeclaration* declaration) { |
| 806 } | 813 } |
| 807 | 814 |
| 808 | 815 |
| 809 void AstTyper::VisitExportDeclaration(ExportDeclaration* declaration) { | 816 void AstTyper::VisitExportDeclaration(ExportDeclaration* declaration) { |
| 810 } | 817 } |
| 811 | 818 |
| 812 | 819 |
| 813 } // namespace internal | 820 } // namespace internal |
| 814 } // namespace v8 | 821 } // namespace v8 |
| OLD | NEW |