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 #if V8_TARGET_ARCH_PPC | 5 #if V8_TARGET_ARCH_PPC |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...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 __ mov(ip, Operand(debug_is_active)); | 4551 __ mov(ip, Operand(debug_is_active)); |
4552 __ lbz(r3, MemOperand(ip)); | 4552 __ lbz(r3, MemOperand(ip)); |
4553 __ SmiTag(r3); | 4553 __ SmiTag(r3); |
4554 context()->Plug(r3); | 4554 context()->Plug(r3); |
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(r3, Heap::kUndefinedValueRootIndex); |
4561 __ LoadP(receiver, GlobalObjectOperand()); | 4561 __ push(r3); |
4562 __ LoadP(receiver, FieldMemOperand(receiver, GlobalObject::kBuiltinsOffset)); | |
4563 __ push(receiver); | |
4564 | 4562 |
4565 // Load the function from the receiver. | 4563 __ LoadP(r3, GlobalObjectOperand()); |
4566 __ mov(LoadDescriptor::NameRegister(), Operand(expr->name())); | 4564 __ LoadP(r3, FieldMemOperand(r3, GlobalObject::kNativeContextOffset)); |
4567 __ mov(LoadDescriptor::SlotRegister(), | 4565 __ LoadP(r3, ContextOperand(r3, 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 __ LoadP(r4, MemOperand(sp, (arg_count + 1) * kPointerSize), r0); | 4575 __ LoadP(r4, MemOperand(sp, (arg_count + 1) * kPointerSize), r0); |
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5389 return ON_STACK_REPLACEMENT; | 5385 return ON_STACK_REPLACEMENT; |
5390 } | 5386 } |
5391 | 5387 |
5392 DCHECK(interrupt_address == | 5388 DCHECK(interrupt_address == |
5393 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5389 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5394 return OSR_AFTER_STACK_CHECK; | 5390 return OSR_AFTER_STACK_CHECK; |
5395 } | 5391 } |
5396 } // namespace internal | 5392 } // namespace internal |
5397 } // namespace v8 | 5393 } // namespace v8 |
5398 #endif // V8_TARGET_ARCH_PPC | 5394 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |