| 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 #if V8_TARGET_ARCH_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 6 | 6 |
| 7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
| 8 // | 8 // |
| 9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
| 10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
| (...skipping 4538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4549 ExternalReference debug_is_active = | 4549 ExternalReference debug_is_active = |
| 4550 ExternalReference::debug_is_active_address(isolate()); | 4550 ExternalReference::debug_is_active_address(isolate()); |
| 4551 __ li(at, Operand(debug_is_active)); | 4551 __ li(at, Operand(debug_is_active)); |
| 4552 __ lbu(v0, MemOperand(at)); | 4552 __ lbu(v0, MemOperand(at)); |
| 4553 __ SmiTag(v0); | 4553 __ SmiTag(v0); |
| 4554 context()->Plug(v0); | 4554 context()->Plug(v0); |
| 4555 } | 4555 } |
| 4556 | 4556 |
| 4557 | 4557 |
| 4558 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { | 4558 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { |
| 4559 // Push the builtins object as the receiver. | 4559 // Push undefined as the receiver. |
| 4560 Register receiver = LoadDescriptor::ReceiverRegister(); | 4560 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex); |
| 4561 __ ld(receiver, GlobalObjectOperand()); | 4561 __ push(v0); |
| 4562 __ ld(receiver, FieldMemOperand(receiver, GlobalObject::kBuiltinsOffset)); | |
| 4563 __ push(receiver); | |
| 4564 | 4562 |
| 4565 // Load the function from the receiver. | 4563 __ ld(v0, GlobalObjectOperand()); |
| 4566 __ li(LoadDescriptor::NameRegister(), Operand(expr->name())); | 4564 __ ld(v0, FieldMemOperand(v0, GlobalObject::kNativeContextOffset)); |
| 4567 __ li(LoadDescriptor::SlotRegister(), | 4565 __ ld(v0, ContextOperand(v0, expr->context_index())); |
| 4568 Operand(SmiFromSlot(expr->CallRuntimeFeedbackSlot()))); | |
| 4569 CallLoadIC(NOT_INSIDE_TYPEOF); | |
| 4570 } | 4566 } |
| 4571 | 4567 |
| 4572 | 4568 |
| 4573 void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) { | 4569 void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) { |
| 4574 ZoneList<Expression*>* args = expr->arguments(); | 4570 ZoneList<Expression*>* args = expr->arguments(); |
| 4575 int arg_count = args->length(); | 4571 int arg_count = args->length(); |
| 4576 | 4572 |
| 4577 SetCallPosition(expr, arg_count); | 4573 SetCallPosition(expr, arg_count); |
| 4578 CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS); | 4574 CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS); |
| 4579 __ ld(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); | 4575 __ ld(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); |
| (...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5384 reinterpret_cast<uint64_t>( | 5380 reinterpret_cast<uint64_t>( |
| 5385 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5381 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5386 return OSR_AFTER_STACK_CHECK; | 5382 return OSR_AFTER_STACK_CHECK; |
| 5387 } | 5383 } |
| 5388 | 5384 |
| 5389 | 5385 |
| 5390 } // namespace internal | 5386 } // namespace internal |
| 5391 } // namespace v8 | 5387 } // namespace v8 |
| 5392 | 5388 |
| 5393 #endif // V8_TARGET_ARCH_MIPS64 | 5389 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |