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 |
270 void NamedLoadHandlerCompiler::GenerateLoadViaGetter( | 294 void NamedLoadHandlerCompiler::GenerateLoadViaGetter( |
271 MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder, | 295 MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder, |
272 int accessor_index, int expected_arguments, Register scratch) { | 296 int accessor_index, int expected_arguments, Register scratch) { |
273 { | 297 { |
274 FrameScope scope(masm, StackFrame::INTERNAL); | 298 FrameScope scope(masm, StackFrame::INTERNAL); |
275 | 299 |
276 if (accessor_index >= 0) { | 300 if (accessor_index >= 0) { |
277 DCHECK(!AreAliased(holder, scratch)); | 301 DCHECK(!AreAliased(holder, scratch)); |
278 DCHECK(!AreAliased(receiver, scratch)); | 302 DCHECK(!AreAliased(receiver, scratch)); |
279 // Call the JavaScript getter with the receiver on the stack. | 303 // Call the JavaScript getter with the receiver on the stack. |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 // Return the generated code. | 821 // Return the generated code. |
798 return GetCode(kind(), Code::FAST, name); | 822 return GetCode(kind(), Code::FAST, name); |
799 } | 823 } |
800 | 824 |
801 | 825 |
802 #undef __ | 826 #undef __ |
803 } // namespace internal | 827 } // namespace internal |
804 } // namespace v8 | 828 } // namespace v8 |
805 | 829 |
806 #endif // V8_TARGET_ARCH_IA32 | 830 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |