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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
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 4535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4546 ExternalReference debug_is_active = | 4546 ExternalReference debug_is_active = |
4547 ExternalReference::debug_is_active_address(isolate()); | 4547 ExternalReference::debug_is_active_address(isolate()); |
4548 __ li(at, Operand(debug_is_active)); | 4548 __ li(at, Operand(debug_is_active)); |
4549 __ lb(v0, MemOperand(at)); | 4549 __ lb(v0, MemOperand(at)); |
4550 __ SmiTag(v0); | 4550 __ SmiTag(v0); |
4551 context()->Plug(v0); | 4551 context()->Plug(v0); |
4552 } | 4552 } |
4553 | 4553 |
4554 | 4554 |
4555 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { | 4555 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { |
4556 // Push the builtins object as the receiver. | 4556 // Push undefined as the receiver. |
4557 Register receiver = LoadDescriptor::ReceiverRegister(); | 4557 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex); |
4558 __ lw(receiver, GlobalObjectOperand()); | 4558 __ push(v0); |
4559 __ lw(receiver, FieldMemOperand(receiver, GlobalObject::kBuiltinsOffset)); | |
4560 __ push(receiver); | |
4561 | 4559 |
4562 // Load the function from the receiver. | 4560 __ lw(v0, GlobalObjectOperand()); |
4563 __ li(LoadDescriptor::NameRegister(), Operand(expr->name())); | 4561 __ lw(v0, FieldMemOperand(v0, GlobalObject::kNativeContextOffset)); |
4564 __ li(LoadDescriptor::SlotRegister(), | 4562 __ lw(v0, ContextOperand(v0, expr->context_index())); |
4565 Operand(SmiFromSlot(expr->CallRuntimeFeedbackSlot()))); | |
4566 CallLoadIC(NOT_INSIDE_TYPEOF); | |
4567 } | 4563 } |
4568 | 4564 |
4569 | 4565 |
4570 void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) { | 4566 void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) { |
4571 ZoneList<Expression*>* args = expr->arguments(); | 4567 ZoneList<Expression*>* args = expr->arguments(); |
4572 int arg_count = args->length(); | 4568 int arg_count = args->length(); |
4573 | 4569 |
4574 SetCallPosition(expr, arg_count); | 4570 SetCallPosition(expr, arg_count); |
4575 CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS); | 4571 CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS); |
4576 __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); | 4572 __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); |
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5378 reinterpret_cast<uint32_t>( | 5374 reinterpret_cast<uint32_t>( |
5379 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5375 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5380 return OSR_AFTER_STACK_CHECK; | 5376 return OSR_AFTER_STACK_CHECK; |
5381 } | 5377 } |
5382 | 5378 |
5383 | 5379 |
5384 } // namespace internal | 5380 } // namespace internal |
5385 } // namespace v8 | 5381 } // namespace v8 |
5386 | 5382 |
5387 #endif // V8_TARGET_ARCH_MIPS | 5383 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |