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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 } else { | 596 } else { |
597 RECURSE(IntersectResult(expr, cache_.kAsmUnsigned)); | 597 RECURSE(IntersectResult(expr, cache_.kAsmUnsigned)); |
598 } | 598 } |
599 } else if (value->ToInt32(&i)) { | 599 } else if (value->ToInt32(&i)) { |
600 RECURSE(IntersectResult(expr, cache_.kAsmSigned)); | 600 RECURSE(IntersectResult(expr, cache_.kAsmSigned)); |
601 } else { | 601 } else { |
602 FAIL(expr, "illegal number"); | 602 FAIL(expr, "illegal number"); |
603 } | 603 } |
604 } else if (!is_return && value->IsString()) { | 604 } else if (!is_return && value->IsString()) { |
605 RECURSE(IntersectResult(expr, Type::String())); | 605 RECURSE(IntersectResult(expr, Type::String())); |
606 } else if (value->IsUndefined()) { | 606 } else if (value->IsUndefined(isolate_)) { |
607 RECURSE(IntersectResult(expr, Type::Undefined())); | 607 RECURSE(IntersectResult(expr, Type::Undefined())); |
608 } else { | 608 } else { |
609 FAIL(expr, "illegal literal"); | 609 FAIL(expr, "illegal literal"); |
610 } | 610 } |
611 } | 611 } |
612 | 612 |
613 | 613 |
614 void AsmTyper::VisitLiteral(Literal* expr) { VisitLiteral(expr, false); } | 614 void AsmTyper::VisitLiteral(Literal* expr) { VisitLiteral(expr, false); } |
615 | 615 |
616 | 616 |
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1630 } | 1630 } |
1631 | 1631 |
1632 | 1632 |
1633 void AsmTyper::VisitRewritableExpression(RewritableExpression* expr) { | 1633 void AsmTyper::VisitRewritableExpression(RewritableExpression* expr) { |
1634 RECURSE(Visit(expr->expression())); | 1634 RECURSE(Visit(expr->expression())); |
1635 } | 1635 } |
1636 | 1636 |
1637 | 1637 |
1638 } // namespace internal | 1638 } // namespace internal |
1639 } // namespace v8 | 1639 } // namespace v8 |
OLD | NEW |