OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 4379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4390 DCHECK(expr->arguments()->length() == 0); | 4390 DCHECK(expr->arguments()->length() == 0); |
4391 ExternalReference debug_is_active = | 4391 ExternalReference debug_is_active = |
4392 ExternalReference::debug_is_active_address(isolate()); | 4392 ExternalReference::debug_is_active_address(isolate()); |
4393 __ Mov(x10, debug_is_active); | 4393 __ Mov(x10, debug_is_active); |
4394 __ Ldrb(x0, MemOperand(x10)); | 4394 __ Ldrb(x0, MemOperand(x10)); |
4395 __ SmiTag(x0); | 4395 __ SmiTag(x0); |
4396 context()->Plug(x0); | 4396 context()->Plug(x0); |
4397 } | 4397 } |
4398 | 4398 |
4399 | 4399 |
4400 void FullCodeGenerator::EmitCallSuperWithSpread(CallRuntime* expr) { | |
4401 // Assert: expr === CallRuntime("ReflectConstruct") | |
4402 DCHECK_EQ(1, expr->arguments()->length()); | |
4403 CallRuntime* call = expr->arguments()->at(0)->AsCallRuntime(); | |
4404 | |
4405 ZoneList<Expression*>* args = call->arguments(); | |
4406 DCHECK_EQ(3, args->length()); | |
4407 | |
4408 SuperCallReference* super_call_ref = args->at(0)->AsSuperCallReference(); | |
4409 DCHECK_NOT_NULL(super_call_ref); | |
4410 | |
4411 // Load ReflectConstruct function | |
4412 EmitLoadJSRuntimeFunction(call); | |
4413 | |
4414 // Push the target function under the receiver. | |
4415 __ Pop(x10); | |
4416 __ Push(x0, x10); | |
4417 | |
4418 // Push super constructor | |
4419 EmitLoadSuperConstructor(super_call_ref); | |
4420 __ Push(result_register()); | |
4421 | |
4422 // Push arguments array | |
4423 VisitForStackValue(args->at(1)); | |
4424 | |
4425 // Push NewTarget | |
4426 DCHECK(args->at(2)->IsVariableProxy()); | |
4427 VisitForStackValue(args->at(2)); | |
4428 | |
4429 EmitCallJSRuntimeFunction(call); | |
4430 | |
4431 // Restore context register. | |
4432 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | |
4433 context()->DropAndPlug(1, x0); | |
4434 } | |
4435 | |
4436 | |
4437 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { | 4400 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { |
4438 // Push the builtins object as the receiver. | 4401 // Push the builtins object as the receiver. |
4439 __ Ldr(x10, GlobalObjectMemOperand()); | 4402 __ Ldr(x10, GlobalObjectMemOperand()); |
4440 __ Ldr(LoadDescriptor::ReceiverRegister(), | 4403 __ Ldr(LoadDescriptor::ReceiverRegister(), |
4441 FieldMemOperand(x10, GlobalObject::kBuiltinsOffset)); | 4404 FieldMemOperand(x10, GlobalObject::kBuiltinsOffset)); |
4442 __ Push(LoadDescriptor::ReceiverRegister()); | 4405 __ Push(LoadDescriptor::ReceiverRegister()); |
4443 | 4406 |
4444 // Load the function from the receiver. | 4407 // Load the function from the receiver. |
4445 Handle<String> name = expr->name(); | 4408 Handle<String> name = expr->name(); |
4446 __ Mov(LoadDescriptor::NameRegister(), Operand(name)); | 4409 __ Mov(LoadDescriptor::NameRegister(), Operand(name)); |
(...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5607 } | 5570 } |
5608 | 5571 |
5609 return INTERRUPT; | 5572 return INTERRUPT; |
5610 } | 5573 } |
5611 | 5574 |
5612 | 5575 |
5613 } // namespace internal | 5576 } // namespace internal |
5614 } // namespace v8 | 5577 } // namespace v8 |
5615 | 5578 |
5616 #endif // V8_TARGET_ARCH_ARM64 | 5579 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |