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/typing-asm.h" | 5 #include "src/typing-asm.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/v8.h" | 9 #include "src/v8.h" |
10 | 10 |
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1064 } | 1064 } |
1065 IntersectResult(expr, fun_type->Result()); | 1065 IntersectResult(expr, fun_type->Result()); |
1066 return; | 1066 return; |
1067 } | 1067 } |
1068 | 1068 |
1069 FAIL(expr, "ill-typed new operator"); | 1069 FAIL(expr, "ill-typed new operator"); |
1070 } | 1070 } |
1071 | 1071 |
1072 | 1072 |
1073 void AsmTyper::VisitCallRuntime(CallRuntime* expr) { | 1073 void AsmTyper::VisitCallRuntime(CallRuntime* expr) { |
1074 // Allow runtime calls for now. | 1074 FAIL(expr, "runtime call not allowed"); |
1075 } | 1075 } |
1076 | 1076 |
1077 | 1077 |
1078 void AsmTyper::VisitUnaryOperation(UnaryOperation* expr) { | 1078 void AsmTyper::VisitUnaryOperation(UnaryOperation* expr) { |
1079 if (!in_function_) { | 1079 if (!in_function_) { |
1080 FAIL(expr, "unary operator inside module body"); | 1080 FAIL(expr, "unary operator inside module body"); |
1081 } | 1081 } |
1082 switch (expr->op()) { | 1082 switch (expr->op()) { |
1083 case Token::NOT: // Used to encode != and !== | 1083 case Token::NOT: // Used to encode != and !== |
1084 RECURSE(VisitWithExpectation(expr->expression(), cache_.kAsmInt, | 1084 RECURSE(VisitWithExpectation(expr->expression(), cache_.kAsmInt, |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1615 } | 1615 } |
1616 | 1616 |
1617 | 1617 |
1618 void AsmTyper::VisitRewritableExpression(RewritableExpression* expr) { | 1618 void AsmTyper::VisitRewritableExpression(RewritableExpression* expr) { |
1619 RECURSE(Visit(expr->expression())); | 1619 RECURSE(Visit(expr->expression())); |
1620 } | 1620 } |
1621 | 1621 |
1622 | 1622 |
1623 } // namespace internal | 1623 } // namespace internal |
1624 } // namespace v8 | 1624 } // namespace v8 |
OLD | NEW |