Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/typing-asm.h" | 7 #include "src/typing-asm.h" |
| 8 | 8 |
| 9 #include "src/ast.h" | 9 #include "src/ast.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 428 return_type_ = save_return_type; | 428 return_type_ = save_return_type; |
| 429 IntersectResult(expr, type); | 429 IntersectResult(expr, type); |
| 430 } | 430 } |
| 431 | 431 |
| 432 | 432 |
| 433 void AsmTyper::VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) { | 433 void AsmTyper::VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) { |
| 434 FAIL(expr, "function info literal encountered"); | 434 FAIL(expr, "function info literal encountered"); |
| 435 } | 435 } |
| 436 | 436 |
| 437 | 437 |
| 438 void AsmTyper::VisitDoExpression(DoExpression* expr) { | |
|
rossberg
2015/10/13 10:44:33
This function needs to fail, do-expressions are no
caitp (gmail)
2015/10/13 15:06:00
Done
| |
| 439 RECURSE(VisitBlock(expr->block())); | |
| 440 RECURSE(VisitVariableProxy(expr->result())); | |
| 441 } | |
| 442 | |
| 443 | |
| 438 void AsmTyper::VisitConditional(Conditional* expr) { | 444 void AsmTyper::VisitConditional(Conditional* expr) { |
| 439 RECURSE(VisitWithExpectation(expr->condition(), cache_.kInt32, | 445 RECURSE(VisitWithExpectation(expr->condition(), cache_.kInt32, |
| 440 "condition expected to be integer")); | 446 "condition expected to be integer")); |
| 441 RECURSE(VisitWithExpectation( | 447 RECURSE(VisitWithExpectation( |
| 442 expr->then_expression(), expected_type_, | 448 expr->then_expression(), expected_type_, |
| 443 "conditional then branch type mismatch with enclosing expression")); | 449 "conditional then branch type mismatch with enclosing expression")); |
| 444 Type* then_type = computed_type_; | 450 Type* then_type = computed_type_; |
| 445 RECURSE(VisitWithExpectation( | 451 RECURSE(VisitWithExpectation( |
| 446 expr->else_expression(), expected_type_, | 452 expr->else_expression(), expected_type_, |
| 447 "conditional else branch type mismatch with enclosing expression")); | 453 "conditional else branch type mismatch with enclosing expression")); |
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1067 computed_type_->Print(); | 1073 computed_type_->Print(); |
| 1068 PrintF("Expected type: "); | 1074 PrintF("Expected type: "); |
| 1069 expected_type_->Print(); | 1075 expected_type_->Print(); |
| 1070 #endif | 1076 #endif |
| 1071 FAIL(expr, msg); | 1077 FAIL(expr, msg); |
| 1072 } | 1078 } |
| 1073 expected_type_ = save; | 1079 expected_type_ = save; |
| 1074 } | 1080 } |
| 1075 } // namespace internal | 1081 } // namespace internal |
| 1076 } // namespace v8 | 1082 } // namespace v8 |
| OLD | NEW |