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 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 store_.Seq(variable_index(proxy->var()), Effect(expr->bounds())); | 536 store_.Seq(variable_index(proxy->var()), Effect(expr->bounds())); |
537 } | 537 } |
538 } | 538 } |
539 | 539 |
540 | 540 |
541 void AstTyper::VisitBinaryOperation(BinaryOperation* expr) { | 541 void AstTyper::VisitBinaryOperation(BinaryOperation* expr) { |
542 // Collect type feedback. | 542 // Collect type feedback. |
543 Handle<Type> type, left_type, right_type; | 543 Handle<Type> type, left_type, right_type; |
544 Maybe<int> fixed_right_arg; | 544 Maybe<int> fixed_right_arg; |
545 oracle()->BinaryType(expr->BinaryOperationFeedbackId(), | 545 oracle()->BinaryType(expr->BinaryOperationFeedbackId(), |
546 &left_type, &right_type, &type, &fixed_right_arg, expr->op()); | 546 &left_type, &right_type, &type, &fixed_right_arg); |
547 NarrowLowerType(expr, type); | 547 NarrowLowerType(expr, type); |
548 NarrowLowerType(expr->left(), left_type); | 548 NarrowLowerType(expr->left(), left_type); |
549 NarrowLowerType(expr->right(), right_type); | 549 NarrowLowerType(expr->right(), right_type); |
550 expr->set_fixed_right_arg(fixed_right_arg); | 550 expr->set_fixed_right_arg(fixed_right_arg); |
551 if (expr->op() == Token::OR || expr->op() == Token::AND) { | 551 if (expr->op() == Token::OR || expr->op() == Token::AND) { |
552 expr->left()->RecordToBooleanTypeFeedback(oracle()); | 552 expr->left()->RecordToBooleanTypeFeedback(oracle()); |
553 } | 553 } |
554 | 554 |
555 switch (expr->op()) { | 555 switch (expr->op()) { |
556 case Token::COMMA: | 556 case Token::COMMA: |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
695 void AstTyper::VisitModuleUrl(ModuleUrl* module) { | 695 void AstTyper::VisitModuleUrl(ModuleUrl* module) { |
696 } | 696 } |
697 | 697 |
698 | 698 |
699 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { | 699 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { |
700 RECURSE(Visit(stmt->body())); | 700 RECURSE(Visit(stmt->body())); |
701 } | 701 } |
702 | 702 |
703 | 703 |
704 } } // namespace v8::internal | 704 } } // namespace v8::internal |
OLD | NEW |