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 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1541 Expression* right, | 1541 Expression* right, |
1542 ConstantOperand constant) { | 1542 ConstantOperand constant) { |
1543 ASSERT(constant == kNoConstants); // Only handled case. | 1543 ASSERT(constant == kNoConstants); // Only handled case. |
1544 EmitBinaryOp(op, mode); | 1544 EmitBinaryOp(op, mode); |
1545 } | 1545 } |
1546 | 1546 |
1547 | 1547 |
1548 void FullCodeGenerator::EmitBinaryOp(Token::Value op, | 1548 void FullCodeGenerator::EmitBinaryOp(Token::Value op, |
1549 OverwriteMode mode) { | 1549 OverwriteMode mode) { |
1550 __ pop(r1); | 1550 __ pop(r1); |
1551 if (op == Token::ADD || op == Token::SUB) { | 1551 if (op == Token::ADD || op == Token::SUB || op == Token::MUL) { |
1552 TypeRecordingBinaryOpStub stub(op, mode); | 1552 TypeRecordingBinaryOpStub stub(op, mode); |
1553 __ CallStub(&stub); | 1553 __ CallStub(&stub); |
1554 } else { | 1554 } else { |
1555 GenericBinaryOpStub stub(op, mode, r1, r0); | 1555 GenericBinaryOpStub stub(op, mode, r1, r0); |
1556 __ CallStub(&stub); | 1556 __ CallStub(&stub); |
1557 } | 1557 } |
1558 context()->Plug(r0); | 1558 context()->Plug(r0); |
1559 } | 1559 } |
1560 | 1560 |
1561 | 1561 |
(...skipping 2054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3616 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. | 3616 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. |
3617 __ add(pc, r1, Operand(masm_->CodeObject())); | 3617 __ add(pc, r1, Operand(masm_->CodeObject())); |
3618 } | 3618 } |
3619 | 3619 |
3620 | 3620 |
3621 #undef __ | 3621 #undef __ |
3622 | 3622 |
3623 } } // namespace v8::internal | 3623 } } // namespace v8::internal |
3624 | 3624 |
3625 #endif // V8_TARGET_ARCH_ARM | 3625 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |