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

Side by Side Diff: src/typing.cc

Issue 967243002: Polish Maybe API a bit, removing useless creativity and fixing some signatures. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Simplified friendship. Added check in FromJust. Created 5 years, 9 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
« include/v8.h ('K') | « src/type-info.cc ('k') | no next file » | 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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 store_.Seq(variable_index(proxy->var()), Effect(expr->bounds())); 648 store_.Seq(variable_index(proxy->var()), Effect(expr->bounds()));
649 } 649 }
650 } 650 }
651 651
652 652
653 void AstTyper::VisitBinaryOperation(BinaryOperation* expr) { 653 void AstTyper::VisitBinaryOperation(BinaryOperation* expr) {
654 // Collect type feedback. 654 // Collect type feedback.
655 Type* type; 655 Type* type;
656 Type* left_type; 656 Type* left_type;
657 Type* right_type; 657 Type* right_type;
658 Maybe<int> fixed_right_arg; 658 Maybe<int> fixed_right_arg = Nothing<int>();
659 Handle<AllocationSite> allocation_site; 659 Handle<AllocationSite> allocation_site;
660 oracle()->BinaryType(expr->BinaryOperationFeedbackId(), 660 oracle()->BinaryType(expr->BinaryOperationFeedbackId(),
661 &left_type, &right_type, &type, &fixed_right_arg, 661 &left_type, &right_type, &type, &fixed_right_arg,
662 &allocation_site, expr->op()); 662 &allocation_site, expr->op());
663 NarrowLowerType(expr, type); 663 NarrowLowerType(expr, type);
664 NarrowLowerType(expr->left(), left_type); 664 NarrowLowerType(expr->left(), left_type);
665 NarrowLowerType(expr->right(), right_type); 665 NarrowLowerType(expr->right(), right_type);
666 expr->set_allocation_site(allocation_site); 666 expr->set_allocation_site(allocation_site);
667 expr->set_fixed_right_arg(fixed_right_arg); 667 expr->set_fixed_right_arg(fixed_right_arg);
668 if (expr->op() == Token::OR || expr->op() == Token::AND) { 668 if (expr->op() == Token::OR || expr->op() == Token::AND) {
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 void AstTyper::VisitModuleUrl(ModuleUrl* module) { 819 void AstTyper::VisitModuleUrl(ModuleUrl* module) {
820 } 820 }
821 821
822 822
823 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { 823 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) {
824 RECURSE(Visit(stmt->body())); 824 RECURSE(Visit(stmt->body()));
825 } 825 }
826 826
827 827
828 } } // namespace v8::internal 828 } } // namespace v8::internal
OLDNEW
« include/v8.h ('K') | « src/type-info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698