OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 } | 640 } |
641 | 641 |
642 __ CallRuntime(function, arg_count); | 642 __ CallRuntime(function, arg_count); |
643 Move(expr->context(), eax); | 643 Move(expr->context(), eax); |
644 } | 644 } |
645 | 645 |
646 | 646 |
647 void FastCodeGenerator::VisitBinaryOperation(BinaryOperation* expr) { | 647 void FastCodeGenerator::VisitBinaryOperation(BinaryOperation* expr) { |
648 switch (expr->op()) { | 648 switch (expr->op()) { |
649 case Token::COMMA: | 649 case Token::COMMA: |
650 ASSERT_EQ(Expression::kValue, expr->left()->context()); | 650 ASSERT_EQ(Expression::kEffect, expr->left()->context()); |
651 ASSERT_EQ(expr->context(), expr->right()->context()); | 651 ASSERT_EQ(expr->context(), expr->right()->context()); |
652 Visit(expr->left()); | 652 Visit(expr->left()); |
653 Visit(expr->right()); | 653 Visit(expr->right()); |
654 break; | 654 break; |
655 | 655 |
656 case Token::OR: | 656 case Token::OR: |
657 case Token::AND: | 657 case Token::AND: |
658 EmitLogicalOperation(expr); | 658 EmitLogicalOperation(expr); |
659 break; | 659 break; |
660 | 660 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 } | 768 } |
769 // Save or discard the right-hand value as needed. | 769 // Save or discard the right-hand value as needed. |
770 Visit(right); | 770 Visit(right); |
771 ASSERT_EQ(context, right->context()); | 771 ASSERT_EQ(context, right->context()); |
772 | 772 |
773 __ bind(&done); | 773 __ bind(&done); |
774 } | 774 } |
775 | 775 |
776 | 776 |
777 } } // namespace v8::internal | 777 } } // namespace v8::internal |
OLD | NEW |