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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 | 259 |
260 void AsmTyper::VisitExpressionStatement(ExpressionStatement* stmt) { | 260 void AsmTyper::VisitExpressionStatement(ExpressionStatement* stmt) { |
261 RECURSE(VisitWithExpectation(stmt->expression(), Type::Any(), | 261 RECURSE(VisitWithExpectation(stmt->expression(), Type::Any(), |
262 "expression statement expected to be any")); | 262 "expression statement expected to be any")); |
263 } | 263 } |
264 | 264 |
265 | 265 |
266 void AsmTyper::VisitEmptyStatement(EmptyStatement* stmt) {} | 266 void AsmTyper::VisitEmptyStatement(EmptyStatement* stmt) {} |
267 | 267 |
268 | 268 |
| 269 void AsmTyper::VisitDelegateStatement(DelegateStatement* stmt) { |
| 270 Visit(stmt->statement()); |
| 271 } |
| 272 |
| 273 |
269 void AsmTyper::VisitEmptyParentheses(EmptyParentheses* expr) { UNREACHABLE(); } | 274 void AsmTyper::VisitEmptyParentheses(EmptyParentheses* expr) { UNREACHABLE(); } |
270 | 275 |
271 | 276 |
272 void AsmTyper::VisitIfStatement(IfStatement* stmt) { | 277 void AsmTyper::VisitIfStatement(IfStatement* stmt) { |
273 if (!in_function_) { | 278 if (!in_function_) { |
274 FAIL(stmt, "if statement inside module body"); | 279 FAIL(stmt, "if statement inside module body"); |
275 } | 280 } |
276 RECURSE(VisitWithExpectation(stmt->condition(), cache_.kInt32, | 281 RECURSE(VisitWithExpectation(stmt->condition(), cache_.kInt32, |
277 "if condition expected to be integer")); | 282 "if condition expected to be integer")); |
278 RECURSE(Visit(stmt->then_statement())); | 283 RECURSE(Visit(stmt->then_statement())); |
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1061 computed_type_->Print(); | 1066 computed_type_->Print(); |
1062 PrintF("Expected type: "); | 1067 PrintF("Expected type: "); |
1063 expected_type_->Print(); | 1068 expected_type_->Print(); |
1064 #endif | 1069 #endif |
1065 FAIL(expr, msg); | 1070 FAIL(expr, msg); |
1066 } | 1071 } |
1067 expected_type_ = save; | 1072 expected_type_ = save; |
1068 } | 1073 } |
1069 } | 1074 } |
1070 } // namespace v8::internal | 1075 } // namespace v8::internal |
OLD | NEW |