| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
| 8 | 8 |
| 9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
| 10 // | 10 // |
| (...skipping 4705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4716 DCHECK(expr->arguments()->length() == 0); | 4716 DCHECK(expr->arguments()->length() == 0); |
| 4717 ExternalReference debug_is_active = | 4717 ExternalReference debug_is_active = |
| 4718 ExternalReference::debug_is_active_address(isolate()); | 4718 ExternalReference::debug_is_active_address(isolate()); |
| 4719 __ li(at, Operand(debug_is_active)); | 4719 __ li(at, Operand(debug_is_active)); |
| 4720 __ lb(v0, MemOperand(at)); | 4720 __ lb(v0, MemOperand(at)); |
| 4721 __ SmiTag(v0); | 4721 __ SmiTag(v0); |
| 4722 context()->Plug(v0); | 4722 context()->Plug(v0); |
| 4723 } | 4723 } |
| 4724 | 4724 |
| 4725 | 4725 |
| 4726 void FullCodeGenerator::EmitCallSuperWithSpread(CallRuntime* expr) { | |
| 4727 // Assert: expr == CallRuntime("ReflectConstruct") | |
| 4728 DCHECK_EQ(1, expr->arguments()->length()); | |
| 4729 CallRuntime* call = expr->arguments()->at(0)->AsCallRuntime(); | |
| 4730 | |
| 4731 ZoneList<Expression*>* args = call->arguments(); | |
| 4732 DCHECK_EQ(3, args->length()); | |
| 4733 | |
| 4734 SuperCallReference* super_call_ref = args->at(0)->AsSuperCallReference(); | |
| 4735 DCHECK_NOT_NULL(super_call_ref); | |
| 4736 | |
| 4737 // Load ReflectConstruct function | |
| 4738 EmitLoadJSRuntimeFunction(call); | |
| 4739 | |
| 4740 // Push the target function under the receiver | |
| 4741 __ lw(at, MemOperand(sp, 0)); | |
| 4742 __ push(at); | |
| 4743 __ sw(v0, MemOperand(sp, kPointerSize)); | |
| 4744 | |
| 4745 // Push super constructor | |
| 4746 EmitLoadSuperConstructor(super_call_ref); | |
| 4747 __ Push(result_register()); | |
| 4748 | |
| 4749 // Push arguments array | |
| 4750 VisitForStackValue(args->at(1)); | |
| 4751 | |
| 4752 // Push NewTarget | |
| 4753 DCHECK(args->at(2)->IsVariableProxy()); | |
| 4754 VisitForStackValue(args->at(2)); | |
| 4755 | |
| 4756 EmitCallJSRuntimeFunction(call); | |
| 4757 | |
| 4758 // Restore context register. | |
| 4759 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | |
| 4760 context()->DropAndPlug(1, v0); | |
| 4761 } | |
| 4762 | |
| 4763 | |
| 4764 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { | 4726 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { |
| 4765 // Push the builtins object as the receiver. | 4727 // Push the builtins object as the receiver. |
| 4766 Register receiver = LoadDescriptor::ReceiverRegister(); | 4728 Register receiver = LoadDescriptor::ReceiverRegister(); |
| 4767 __ lw(receiver, GlobalObjectOperand()); | 4729 __ lw(receiver, GlobalObjectOperand()); |
| 4768 __ lw(receiver, FieldMemOperand(receiver, GlobalObject::kBuiltinsOffset)); | 4730 __ lw(receiver, FieldMemOperand(receiver, GlobalObject::kBuiltinsOffset)); |
| 4769 __ push(receiver); | 4731 __ push(receiver); |
| 4770 | 4732 |
| 4771 // Load the function from the receiver. | 4733 // Load the function from the receiver. |
| 4772 __ li(LoadDescriptor::NameRegister(), Operand(expr->name())); | 4734 __ li(LoadDescriptor::NameRegister(), Operand(expr->name())); |
| 4773 __ li(LoadDescriptor::SlotRegister(), | 4735 __ li(LoadDescriptor::SlotRegister(), |
| (...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5583 reinterpret_cast<uint32_t>( | 5545 reinterpret_cast<uint32_t>( |
| 5584 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5546 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5585 return OSR_AFTER_STACK_CHECK; | 5547 return OSR_AFTER_STACK_CHECK; |
| 5586 } | 5548 } |
| 5587 | 5549 |
| 5588 | 5550 |
| 5589 } // namespace internal | 5551 } // namespace internal |
| 5590 } // namespace v8 | 5552 } // namespace v8 |
| 5591 | 5553 |
| 5592 #endif // V8_TARGET_ARCH_MIPS | 5554 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |