| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 if (proxy != NULL && proxy->var()->IsStackAllocated()) { | 622 if (proxy != NULL && proxy->var()->IsStackAllocated()) { |
| 623 store_.Seq(variable_index(proxy->var()), Effect(expr->bounds())); | 623 store_.Seq(variable_index(proxy->var()), Effect(expr->bounds())); |
| 624 } | 624 } |
| 625 } | 625 } |
| 626 | 626 |
| 627 | 627 |
| 628 void AstTyper::VisitBinaryOperation(BinaryOperation* expr) { | 628 void AstTyper::VisitBinaryOperation(BinaryOperation* expr) { |
| 629 // Collect type feedback. | 629 // Collect type feedback. |
| 630 Handle<Type> type, left_type, right_type; | 630 Handle<Type> type, left_type, right_type; |
| 631 Maybe<int> fixed_right_arg; | 631 Maybe<int> fixed_right_arg; |
| 632 Handle<AllocationSite> allocation_site; | |
| 633 oracle()->BinaryType(expr->BinaryOperationFeedbackId(), | 632 oracle()->BinaryType(expr->BinaryOperationFeedbackId(), |
| 634 &left_type, &right_type, &type, &fixed_right_arg, | 633 &left_type, &right_type, &type, &fixed_right_arg, expr->op()); |
| 635 &allocation_site, expr->op()); | |
| 636 NarrowLowerType(expr, type); | 634 NarrowLowerType(expr, type); |
| 637 NarrowLowerType(expr->left(), left_type); | 635 NarrowLowerType(expr->left(), left_type); |
| 638 NarrowLowerType(expr->right(), right_type); | 636 NarrowLowerType(expr->right(), right_type); |
| 639 expr->set_allocation_site(allocation_site); | |
| 640 expr->set_fixed_right_arg(fixed_right_arg); | 637 expr->set_fixed_right_arg(fixed_right_arg); |
| 641 if (expr->op() == Token::OR || expr->op() == Token::AND) { | 638 if (expr->op() == Token::OR || expr->op() == Token::AND) { |
| 642 expr->left()->RecordToBooleanTypeFeedback(oracle()); | 639 expr->left()->RecordToBooleanTypeFeedback(oracle()); |
| 643 } | 640 } |
| 644 | 641 |
| 645 switch (expr->op()) { | 642 switch (expr->op()) { |
| 646 case Token::COMMA: | 643 case Token::COMMA: |
| 647 RECURSE(Visit(expr->left())); | 644 RECURSE(Visit(expr->left())); |
| 648 RECURSE(Visit(expr->right())); | 645 RECURSE(Visit(expr->right())); |
| 649 NarrowType(expr, expr->right()->bounds()); | 646 NarrowType(expr, expr->right()->bounds()); |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 void AstTyper::VisitModuleUrl(ModuleUrl* module) { | 792 void AstTyper::VisitModuleUrl(ModuleUrl* module) { |
| 796 } | 793 } |
| 797 | 794 |
| 798 | 795 |
| 799 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { | 796 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { |
| 800 RECURSE(Visit(stmt->body())); | 797 RECURSE(Visit(stmt->body())); |
| 801 } | 798 } |
| 802 | 799 |
| 803 | 800 |
| 804 } } // namespace v8::internal | 801 } } // namespace v8::internal |
| OLD | NEW |