| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 3647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3658 __ Bind(&runtime_allocation); | 3658 __ Bind(&runtime_allocation); |
| 3659 if (FLAG_debug_code) { | 3659 if (FLAG_debug_code) { |
| 3660 // Because result is in the pointer map, we need to make sure it has a valid | 3660 // Because result is in the pointer map, we need to make sure it has a valid |
| 3661 // tagged value before we call the runtime. We speculatively set it to the | 3661 // tagged value before we call the runtime. We speculatively set it to the |
| 3662 // input (for abs(+x)) or to a smi (for abs(-SMI_MIN)), so it should already | 3662 // input (for abs(+x)) or to a smi (for abs(-SMI_MIN)), so it should already |
| 3663 // be valid. | 3663 // be valid. |
| 3664 Label result_ok; | 3664 Label result_ok; |
| 3665 Register input = ToRegister(instr->value()); | 3665 Register input = ToRegister(instr->value()); |
| 3666 __ JumpIfSmi(result, &result_ok); | 3666 __ JumpIfSmi(result, &result_ok); |
| 3667 __ Cmp(input, result); | 3667 __ Cmp(input, result); |
| 3668 // TODO(all): Shouldn't we assert here? | 3668 __ Assert(eq, kUnexpectedValue); |
| 3669 DeoptimizeIf(ne, instr->environment()); | |
| 3670 __ Bind(&result_ok); | 3669 __ Bind(&result_ok); |
| 3671 } | 3670 } |
| 3672 | 3671 |
| 3673 { PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); | 3672 { PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); |
| 3674 CallRuntimeFromDeferred(Runtime::kAllocateHeapNumber, 0, instr, | 3673 CallRuntimeFromDeferred(Runtime::kAllocateHeapNumber, 0, instr, |
| 3675 instr->context()); | 3674 instr->context()); |
| 3676 __ StoreToSafepointRegisterSlot(x0, result); | 3675 __ StoreToSafepointRegisterSlot(x0, result); |
| 3677 } | 3676 } |
| 3678 // The inline (non-deferred) code will store result_bits into result. | 3677 // The inline (non-deferred) code will store result_bits into result. |
| 3679 } | 3678 } |
| (...skipping 1986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5666 __ Bind(&out_of_object); | 5665 __ Bind(&out_of_object); |
| 5667 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5666 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
| 5668 // Index is equal to negated out of object property index plus 1. | 5667 // Index is equal to negated out of object property index plus 1. |
| 5669 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5668 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
| 5670 __ Ldr(result, FieldMemOperand(result, | 5669 __ Ldr(result, FieldMemOperand(result, |
| 5671 FixedArray::kHeaderSize - kPointerSize)); | 5670 FixedArray::kHeaderSize - kPointerSize)); |
| 5672 __ Bind(&done); | 5671 __ Bind(&done); |
| 5673 } | 5672 } |
| 5674 | 5673 |
| 5675 } } // namespace v8::internal | 5674 } } // namespace v8::internal |
| OLD | NEW |