| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1543 Expression* right, | 1543 Expression* right, |
| 1544 ConstantOperand constant) { | 1544 ConstantOperand constant) { |
| 1545 ASSERT(constant == kNoConstants); // Only handled case. | 1545 ASSERT(constant == kNoConstants); // Only handled case. |
| 1546 EmitBinaryOp(op, mode); | 1546 EmitBinaryOp(op, mode); |
| 1547 } | 1547 } |
| 1548 | 1548 |
| 1549 | 1549 |
| 1550 void FullCodeGenerator::EmitBinaryOp(Token::Value op, | 1550 void FullCodeGenerator::EmitBinaryOp(Token::Value op, |
| 1551 OverwriteMode mode) { | 1551 OverwriteMode mode) { |
| 1552 __ pop(r1); | 1552 __ pop(r1); |
| 1553 if (op == Token::ADD || op == Token::SUB || op == Token::MUL) { | 1553 if (op == Token::ADD || |
| 1554 op == Token::SUB || |
| 1555 op == Token::MUL || |
| 1556 op == Token::DIV || |
| 1557 op == Token::MOD) { |
| 1554 TypeRecordingBinaryOpStub stub(op, mode); | 1558 TypeRecordingBinaryOpStub stub(op, mode); |
| 1555 __ CallStub(&stub); | 1559 __ CallStub(&stub); |
| 1556 } else { | 1560 } else { |
| 1557 GenericBinaryOpStub stub(op, mode, r1, r0); | 1561 GenericBinaryOpStub stub(op, mode, r1, r0); |
| 1558 __ CallStub(&stub); | 1562 __ CallStub(&stub); |
| 1559 } | 1563 } |
| 1560 context()->Plug(r0); | 1564 context()->Plug(r0); |
| 1561 } | 1565 } |
| 1562 | 1566 |
| 1563 | 1567 |
| (...skipping 2054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3618 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. | 3622 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. |
| 3619 __ add(pc, r1, Operand(masm_->CodeObject())); | 3623 __ add(pc, r1, Operand(masm_->CodeObject())); |
| 3620 } | 3624 } |
| 3621 | 3625 |
| 3622 | 3626 |
| 3623 #undef __ | 3627 #undef __ |
| 3624 | 3628 |
| 3625 } } // namespace v8::internal | 3629 } } // namespace v8::internal |
| 3626 | 3630 |
| 3627 #endif // V8_TARGET_ARCH_ARM | 3631 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |