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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |