| 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 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM | 
| 6 | 6 | 
| 7 #include "src/ic/handler-compiler.h" | 7 #include "src/ic/handler-compiler.h" | 
| 8 | 8 | 
| 9 #include "src/field-type.h" | 9 #include "src/field-type.h" | 
| 10 #include "src/ic/call-optimization.h" | 10 #include "src/ic/call-optimization.h" | 
| (...skipping 10 matching lines...) Expand all  Loading... | 
| 21     MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder, | 21     MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder, | 
| 22     int accessor_index, int expected_arguments, Register scratch) { | 22     int accessor_index, int expected_arguments, Register scratch) { | 
| 23   // ----------- S t a t e ------------- | 23   // ----------- S t a t e ------------- | 
| 24   //  -- r0    : receiver | 24   //  -- r0    : receiver | 
| 25   //  -- r2    : name | 25   //  -- r2    : name | 
| 26   //  -- lr    : return address | 26   //  -- lr    : return address | 
| 27   // ----------------------------------- | 27   // ----------------------------------- | 
| 28   { | 28   { | 
| 29     FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 29     FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 
| 30 | 30 | 
|  | 31     // Save context register | 
|  | 32     __ push(cp); | 
|  | 33 | 
| 31     if (accessor_index >= 0) { | 34     if (accessor_index >= 0) { | 
| 32       DCHECK(!holder.is(scratch)); | 35       DCHECK(!holder.is(scratch)); | 
| 33       DCHECK(!receiver.is(scratch)); | 36       DCHECK(!receiver.is(scratch)); | 
| 34       // Call the JavaScript getter with the receiver on the stack. | 37       // Call the JavaScript getter with the receiver on the stack. | 
| 35       if (map->IsJSGlobalObjectMap()) { | 38       if (map->IsJSGlobalObjectMap()) { | 
| 36         // Swap in the global receiver. | 39         // Swap in the global receiver. | 
| 37         __ ldr(scratch, | 40         __ ldr(scratch, | 
| 38                FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); | 41                FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); | 
| 39         receiver = scratch; | 42         receiver = scratch; | 
| 40       } | 43       } | 
| 41       __ push(receiver); | 44       __ push(receiver); | 
| 42       ParameterCount actual(0); | 45       ParameterCount actual(0); | 
| 43       ParameterCount expected(expected_arguments); | 46       ParameterCount expected(expected_arguments); | 
| 44       __ LoadAccessor(r1, holder, accessor_index, ACCESSOR_GETTER); | 47       __ LoadAccessor(r1, holder, accessor_index, ACCESSOR_GETTER); | 
| 45       __ InvokeFunction(r1, expected, actual, CALL_FUNCTION, | 48       __ InvokeFunction(r1, expected, actual, CALL_FUNCTION, | 
| 46                         CheckDebugStepCallWrapper()); | 49                         CheckDebugStepCallWrapper()); | 
| 47     } else { | 50     } else { | 
| 48       // If we generate a global code snippet for deoptimization only, remember | 51       // If we generate a global code snippet for deoptimization only, remember | 
| 49       // the place to continue after deoptimization. | 52       // the place to continue after deoptimization. | 
| 50       masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); | 53       masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); | 
| 51     } | 54     } | 
| 52 | 55 | 
| 53     // Restore context register. | 56     // Restore context register. | 
| 54     __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 57     __ pop(cp); | 
| 55   } | 58   } | 
| 56   __ Ret(); | 59   __ Ret(); | 
| 57 } | 60 } | 
| 58 | 61 | 
| 59 | 62 | 
| 60 void NamedStoreHandlerCompiler::GenerateStoreViaSetter( | 63 void NamedStoreHandlerCompiler::GenerateStoreViaSetter( | 
| 61     MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder, | 64     MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder, | 
| 62     int accessor_index, int expected_arguments, Register scratch) { | 65     int accessor_index, int expected_arguments, Register scratch) { | 
| 63   // ----------- S t a t e ------------- | 66   // ----------- S t a t e ------------- | 
| 64   //  -- lr    : return address | 67   //  -- lr    : return address | 
| 65   // ----------------------------------- | 68   // ----------------------------------- | 
| 66   { | 69   { | 
| 67     FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 70     FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 
| 68 | 71 | 
|  | 72     // Save context register | 
|  | 73     __ push(cp); | 
| 69     // Save value register, so we can restore it later. | 74     // Save value register, so we can restore it later. | 
| 70     __ push(value()); | 75     __ push(value()); | 
| 71 | 76 | 
| 72     if (accessor_index >= 0) { | 77     if (accessor_index >= 0) { | 
| 73       DCHECK(!holder.is(scratch)); | 78       DCHECK(!holder.is(scratch)); | 
| 74       DCHECK(!receiver.is(scratch)); | 79       DCHECK(!receiver.is(scratch)); | 
| 75       DCHECK(!value().is(scratch)); | 80       DCHECK(!value().is(scratch)); | 
| 76       // Call the JavaScript setter with receiver and value on the stack. | 81       // Call the JavaScript setter with receiver and value on the stack. | 
| 77       if (map->IsJSGlobalObjectMap()) { | 82       if (map->IsJSGlobalObjectMap()) { | 
| 78         // Swap in the global receiver. | 83         // Swap in the global receiver. | 
| (...skipping 10 matching lines...) Expand all  Loading... | 
| 89     } else { | 94     } else { | 
| 90       // If we generate a global code snippet for deoptimization only, remember | 95       // If we generate a global code snippet for deoptimization only, remember | 
| 91       // the place to continue after deoptimization. | 96       // the place to continue after deoptimization. | 
| 92       masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); | 97       masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); | 
| 93     } | 98     } | 
| 94 | 99 | 
| 95     // We have to return the passed value, not the return value of the setter. | 100     // We have to return the passed value, not the return value of the setter. | 
| 96     __ pop(r0); | 101     __ pop(r0); | 
| 97 | 102 | 
| 98     // Restore context register. | 103     // Restore context register. | 
| 99     __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 104     __ pop(cp); | 
| 100   } | 105   } | 
| 101   __ Ret(); | 106   __ Ret(); | 
| 102 } | 107 } | 
| 103 | 108 | 
| 104 | 109 | 
| 105 void PropertyHandlerCompiler::PushVectorAndSlot(Register vector, | 110 void PropertyHandlerCompiler::PushVectorAndSlot(Register vector, | 
| 106                                                 Register slot) { | 111                                                 Register slot) { | 
| 107   MacroAssembler* masm = this->masm(); | 112   MacroAssembler* masm = this->masm(); | 
| 108   __ push(vector); | 113   __ push(vector); | 
| 109   __ push(slot); | 114   __ push(slot); | 
| (...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 792   // Return the generated code. | 797   // Return the generated code. | 
| 793   return GetCode(kind(), Code::NORMAL, name); | 798   return GetCode(kind(), Code::NORMAL, name); | 
| 794 } | 799 } | 
| 795 | 800 | 
| 796 | 801 | 
| 797 #undef __ | 802 #undef __ | 
| 798 }  // namespace internal | 803 }  // namespace internal | 
| 799 }  // namespace v8 | 804 }  // namespace v8 | 
| 800 | 805 | 
| 801 #endif  // V8_TARGET_ARCH_ARM | 806 #endif  // V8_TARGET_ARCH_ARM | 
| OLD | NEW | 
|---|