| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
| 8 | 8 |
| 9 #include "src/ic/call-optimization.h" | 9 #include "src/ic/call-optimization.h" |
| 10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 1); | 562 STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 1); |
| 563 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueDefaultValueIndex == 2); | 563 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueDefaultValueIndex == 2); |
| 564 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueOffset == 3); | 564 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueOffset == 3); |
| 565 STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == 4); | 565 STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == 4); |
| 566 STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 5); | 566 STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 5); |
| 567 STATIC_ASSERT(PropertyCallbackArguments::kArgsLength == 6); | 567 STATIC_ASSERT(PropertyCallbackArguments::kArgsLength == 6); |
| 568 DCHECK(!scratch2().is(reg)); | 568 DCHECK(!scratch2().is(reg)); |
| 569 DCHECK(!scratch3().is(reg)); | 569 DCHECK(!scratch3().is(reg)); |
| 570 DCHECK(!scratch4().is(reg)); | 570 DCHECK(!scratch4().is(reg)); |
| 571 __ push(receiver()); | 571 __ push(receiver()); |
| 572 if (heap()->InNewSpace(callback->data())) { | 572 // Push data from ExecutableAccessorInfo. |
| 573 __ Move(scratch3(), callback); | 573 Handle<Object> data(callback->data(), isolate()); |
| 574 __ ldr(scratch3(), | 574 if (data->IsUndefined() || data->IsSmi()) { |
| 575 FieldMemOperand(scratch3(), ExecutableAccessorInfo::kDataOffset)); | 575 __ Move(scratch3(), data); |
| 576 } else { | 576 } else { |
| 577 __ Move(scratch3(), Handle<Object>(callback->data(), isolate())); | 577 Handle<WeakCell> cell = |
| 578 isolate()->factory()->NewWeakCell(Handle<HeapObject>::cast(data)); |
| 579 // The callback is alive if this instruction is executed, |
| 580 // so the weak cell is not cleared and points to data. |
| 581 __ GetWeakValue(scratch3(), cell); |
| 578 } | 582 } |
| 579 __ push(scratch3()); | 583 __ push(scratch3()); |
| 580 __ LoadRoot(scratch3(), Heap::kUndefinedValueRootIndex); | 584 __ LoadRoot(scratch3(), Heap::kUndefinedValueRootIndex); |
| 581 __ mov(scratch4(), scratch3()); | 585 __ mov(scratch4(), scratch3()); |
| 582 __ Push(scratch3(), scratch4()); | 586 __ Push(scratch3(), scratch4()); |
| 583 __ mov(scratch4(), Operand(ExternalReference::isolate_address(isolate()))); | 587 __ mov(scratch4(), Operand(ExternalReference::isolate_address(isolate()))); |
| 584 __ Push(scratch4(), reg); | 588 __ Push(scratch4(), reg); |
| 585 __ mov(scratch2(), sp); // scratch2 = PropertyAccessorInfo::args_ | 589 __ mov(scratch2(), sp); // scratch2 = PropertyAccessorInfo::args_ |
| 586 __ push(name()); | 590 __ push(name()); |
| 587 | 591 |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 // Return the generated code. | 751 // Return the generated code. |
| 748 return GetCode(kind(), Code::NORMAL, name); | 752 return GetCode(kind(), Code::NORMAL, name); |
| 749 } | 753 } |
| 750 | 754 |
| 751 | 755 |
| 752 #undef __ | 756 #undef __ |
| 753 } | 757 } |
| 754 } // namespace v8::internal | 758 } // namespace v8::internal |
| 755 | 759 |
| 756 #endif // V8_TARGET_ARCH_ARM | 760 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |