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 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1106 | 1106 |
1107 intish_ = 0; | 1107 intish_ = 0; |
1108 | 1108 |
1109 if (left_type->Is(cache_.kAsmFixnum) && right_type->Is(cache_.kAsmInt)) { | 1109 if (left_type->Is(cache_.kAsmFixnum) && right_type->Is(cache_.kAsmInt)) { |
1110 left_type = right_type; | 1110 left_type = right_type; |
1111 } | 1111 } |
1112 if (right_type->Is(cache_.kAsmFixnum) && left_type->Is(cache_.kAsmInt)) { | 1112 if (right_type->Is(cache_.kAsmFixnum) && left_type->Is(cache_.kAsmInt)) { |
1113 right_type = left_type; | 1113 right_type = left_type; |
1114 } | 1114 } |
1115 if (!conversion) { | 1115 if (!conversion) { |
1116 if (!left_type->Is(right_type) || !right_type->Is(left_type)) { | 1116 if (!left_type->Is(cache_.kAsmInt) || !right_type->Is(cache_.kAsmInt)) { |
1117 FAIL(expr, "ill-typed bitwise operation"); | 1117 FAIL(expr, "ill-typed bitwise operation"); |
1118 } | 1118 } |
1119 } | 1119 } |
1120 IntersectResult(expr, result_type); | 1120 IntersectResult(expr, result_type); |
1121 } | 1121 } |
1122 | 1122 |
1123 | 1123 |
1124 void AsmTyper::VisitBinaryOperation(BinaryOperation* expr) { | 1124 void AsmTyper::VisitBinaryOperation(BinaryOperation* expr) { |
1125 if (!in_function_) { | 1125 if (!in_function_) { |
1126 if (expr->op() != Token::BIT_OR && expr->op() != Token::MUL) { | 1126 if (expr->op() != Token::BIT_OR && expr->op() != Token::MUL) { |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1560 } | 1560 } |
1561 | 1561 |
1562 | 1562 |
1563 void AsmTyper::VisitRewritableExpression(RewritableExpression* expr) { | 1563 void AsmTyper::VisitRewritableExpression(RewritableExpression* expr) { |
1564 RECURSE(Visit(expr->expression())); | 1564 RECURSE(Visit(expr->expression())); |
1565 } | 1565 } |
1566 | 1566 |
1567 | 1567 |
1568 } // namespace internal | 1568 } // namespace internal |
1569 } // namespace v8 | 1569 } // namespace v8 |
OLD | NEW |