| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-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 1673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1684 if (reversed) { | 1684 if (reversed) { |
| 1685 Result constant_operand(value); | 1685 Result constant_operand(value); |
| 1686 LikelySmiBinaryOperation(op, &constant_operand, operand, | 1686 LikelySmiBinaryOperation(op, &constant_operand, operand, |
| 1687 overwrite_mode); | 1687 overwrite_mode); |
| 1688 } else { | 1688 } else { |
| 1689 // Only the least significant 5 bits of the shift value are used. | 1689 // Only the least significant 5 bits of the shift value are used. |
| 1690 // In the slow case, this masking is done inside the runtime call. | 1690 // In the slow case, this masking is done inside the runtime call. |
| 1691 int shift_value = int_value & 0x1f; | 1691 int shift_value = int_value & 0x1f; |
| 1692 operand->ToRegister(); | 1692 operand->ToRegister(); |
| 1693 if (shift_value == 0) { | 1693 if (shift_value == 0) { |
| 1694 // Spill operand so it can be overwritten in the slow case. |
| 1695 frame_->Spill(operand->reg()); |
| 1694 DeferredInlineSmiOperation* deferred = | 1696 DeferredInlineSmiOperation* deferred = |
| 1695 new DeferredInlineSmiOperation(op, | 1697 new DeferredInlineSmiOperation(op, |
| 1696 operand->reg(), | 1698 operand->reg(), |
| 1697 operand->reg(), | 1699 operand->reg(), |
| 1698 smi_value, | 1700 smi_value, |
| 1699 overwrite_mode); | 1701 overwrite_mode); |
| 1700 __ test(operand->reg(), Immediate(kSmiTagMask)); | 1702 __ test(operand->reg(), Immediate(kSmiTagMask)); |
| 1701 deferred->Branch(not_zero); | 1703 deferred->Branch(not_zero); |
| 1702 deferred->BindExit(); | 1704 deferred->BindExit(); |
| 1703 frame_->Push(operand); | 1705 frame_->Push(operand); |
| (...skipping 5627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7331 | 7333 |
| 7332 // Slow-case: Go through the JavaScript implementation. | 7334 // Slow-case: Go through the JavaScript implementation. |
| 7333 __ bind(&slow); | 7335 __ bind(&slow); |
| 7334 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); | 7336 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); |
| 7335 } | 7337 } |
| 7336 | 7338 |
| 7337 | 7339 |
| 7338 #undef __ | 7340 #undef __ |
| 7339 | 7341 |
| 7340 } } // namespace v8::internal | 7342 } } // namespace v8::internal |
| OLD | NEW |