OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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.h" | 5 #include "src/typing.h" |
6 | 6 |
7 #include "src/frames.h" | 7 #include "src/frames.h" |
8 #include "src/frames-inl.h" | 8 #include "src/frames-inl.h" |
9 #include "src/ostreams.h" | 9 #include "src/ostreams.h" |
10 #include "src/parser.h" // for CompileTimeValue; TODO(rossberg): should move | 10 #include "src/parser.h" // for CompileTimeValue; TODO(rossberg): should move |
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
719 Type::String(zone()) : | 719 Type::String(zone()) : |
720 l.upper->Is(Type::Number()) && r.upper->Is(Type::Number()) ? | 720 l.upper->Is(Type::Number()) && r.upper->Is(Type::Number()) ? |
721 Type::Number(zone()) : Type::NumberOrString(zone()); | 721 Type::Number(zone()) : Type::NumberOrString(zone()); |
722 NarrowType(expr, Bounds(lower, upper)); | 722 NarrowType(expr, Bounds(lower, upper)); |
723 break; | 723 break; |
724 } | 724 } |
725 case Token::SUB: | 725 case Token::SUB: |
726 case Token::MUL: | 726 case Token::MUL: |
727 case Token::DIV: | 727 case Token::DIV: |
728 case Token::MOD: | 728 case Token::MOD: |
| 729 case Token::EXP: |
729 RECURSE(Visit(expr->left())); | 730 RECURSE(Visit(expr->left())); |
730 RECURSE(Visit(expr->right())); | 731 RECURSE(Visit(expr->right())); |
731 NarrowType(expr, Bounds(Type::SignedSmall(zone()), Type::Number(zone()))); | 732 NarrowType(expr, Bounds(Type::SignedSmall(zone()), Type::Number(zone()))); |
732 break; | 733 break; |
733 default: | 734 default: |
734 UNREACHABLE(); | 735 UNREACHABLE(); |
735 } | 736 } |
736 } | 737 } |
737 | 738 |
738 | 739 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 void AstTyper::VisitModuleUrl(ModuleUrl* module) { | 806 void AstTyper::VisitModuleUrl(ModuleUrl* module) { |
806 } | 807 } |
807 | 808 |
808 | 809 |
809 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { | 810 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { |
810 RECURSE(Visit(stmt->body())); | 811 RECURSE(Visit(stmt->body())); |
811 } | 812 } |
812 | 813 |
813 | 814 |
814 } } // namespace v8::internal | 815 } } // namespace v8::internal |
OLD | NEW |