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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 // We have to return the passed value, not the return value of the setter. | 260 // We have to return the passed value, not the return value of the setter. |
261 __ Pop(x0); | 261 __ Pop(x0); |
262 | 262 |
263 // Restore context register. | 263 // Restore context register. |
264 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 264 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
265 } | 265 } |
266 __ Ret(); | 266 __ Ret(); |
267 } | 267 } |
268 | 268 |
269 | 269 |
270 void NamedLoadHandlerCompiler::GenerateSlow(MacroAssembler* masm) { | |
271 // Push receiver and key for runtime call. | |
272 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); | |
273 | |
274 // The slow case calls into the runtime to complete the load without causing | |
275 // an IC miss that would otherwise cause a transition to the generic stub. | |
276 ExternalReference ref = | |
277 ExternalReference(IC_Utility(IC::kLoadIC_Slow), masm->isolate()); | |
278 __ TailCallExternalReference(ref, 2, 1); | |
279 } | |
280 | |
281 | |
282 void ElementHandlerCompiler::GenerateLoadSlow(MacroAssembler* masm) { | |
283 // Push receiver and key for runtime call. | |
284 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); | |
285 | |
286 // The slow case calls into the runtime to complete the load without causing | |
287 // an IC miss that would otherwise cause a transition to the generic stub. | |
288 ExternalReference ref = | |
289 ExternalReference(IC_Utility(IC::kKeyedLoadIC_Slow), masm->isolate()); | |
290 __ TailCallExternalReference(ref, 2, 1); | |
291 } | |
292 | |
293 | |
294 void NamedLoadHandlerCompiler::GenerateLoadViaGetter( | 270 void NamedLoadHandlerCompiler::GenerateLoadViaGetter( |
295 MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder, | 271 MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder, |
296 int accessor_index, int expected_arguments, Register scratch) { | 272 int accessor_index, int expected_arguments, Register scratch) { |
297 { | 273 { |
298 FrameScope scope(masm, StackFrame::INTERNAL); | 274 FrameScope scope(masm, StackFrame::INTERNAL); |
299 | 275 |
300 if (accessor_index >= 0) { | 276 if (accessor_index >= 0) { |
301 DCHECK(!AreAliased(holder, scratch)); | 277 DCHECK(!AreAliased(holder, scratch)); |
302 DCHECK(!AreAliased(receiver, scratch)); | 278 DCHECK(!AreAliased(receiver, scratch)); |
303 // Call the JavaScript getter with the receiver on the stack. | 279 // Call the JavaScript getter with the receiver on the stack. |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
821 // Return the generated code. | 797 // Return the generated code. |
822 return GetCode(kind(), Code::FAST, name); | 798 return GetCode(kind(), Code::FAST, name); |
823 } | 799 } |
824 | 800 |
825 | 801 |
826 #undef __ | 802 #undef __ |
827 } // namespace internal | 803 } // namespace internal |
828 } // namespace v8 | 804 } // namespace v8 |
829 | 805 |
830 #endif // V8_TARGET_ARCH_IA32 | 806 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |