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