Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(391)

Side by Side Diff: src/typing.cc

Issue 953563002: Implement experimental exponentiation operator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use Number() instead of OrderedNumber() to include NaN Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/token.h ('k') | test/cctest/compiler/test-run-jsops.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/token.h ('k') | test/cctest/compiler/test-run-jsops.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698