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 GenericBinaryOpStub stub(op, mode, r1, r0); | 1551 if (op == Token::ADD) { |
1552 __ CallStub(&stub); | 1552 TypeRecordingBinaryOpStub stub(op, mode); |
| 1553 __ CallStub(&stub); |
| 1554 } else { |
| 1555 GenericBinaryOpStub stub(op, mode, r1, r0); |
| 1556 __ CallStub(&stub); |
| 1557 } |
1553 context()->Plug(r0); | 1558 context()->Plug(r0); |
1554 } | 1559 } |
1555 | 1560 |
1556 | 1561 |
1557 void FullCodeGenerator::EmitAssignment(Expression* expr, int bailout_ast_id) { | 1562 void FullCodeGenerator::EmitAssignment(Expression* expr, int bailout_ast_id) { |
1558 // Invalid left-hand sides are rewritten to have a 'throw | 1563 // Invalid left-hand sides are rewritten to have a 'throw |
1559 // ReferenceError' on the left-hand side. | 1564 // ReferenceError' on the left-hand side. |
1560 if (!expr->IsValidLeftHandSide()) { | 1565 if (!expr->IsValidLeftHandSide()) { |
1561 VisitForEffect(expr); | 1566 VisitForEffect(expr); |
1562 return; | 1567 return; |
(...skipping 2048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3611 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. | 3616 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. |
3612 __ add(pc, r1, Operand(masm_->CodeObject())); | 3617 __ add(pc, r1, Operand(masm_->CodeObject())); |
3613 } | 3618 } |
3614 | 3619 |
3615 | 3620 |
3616 #undef __ | 3621 #undef __ |
3617 | 3622 |
3618 } } // namespace v8::internal | 3623 } } // namespace v8::internal |
3619 | 3624 |
3620 #endif // V8_TARGET_ARCH_ARM | 3625 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |