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/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_); | 443 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_); |
444 int32_t arg_count = info_->scope()->num_parameters() + 1; | 444 int32_t arg_count = info_->scope()->num_parameters() + 1; |
445 int32_t sp_delta = arg_count * kPointerSize; | 445 int32_t sp_delta = arg_count * kPointerSize; |
446 SetReturnPosition(literal()); | 446 SetReturnPosition(literal()); |
447 __ LeaveFrame(StackFrame::JAVA_SCRIPT, sp_delta); | 447 __ LeaveFrame(StackFrame::JAVA_SCRIPT, sp_delta); |
448 __ blr(); | 448 __ blr(); |
449 } | 449 } |
450 } | 450 } |
451 } | 451 } |
452 | 452 |
| 453 void FullCodeGenerator::RestoreContext() { |
| 454 __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 455 } |
453 | 456 |
454 void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { | 457 void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { |
455 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); | 458 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
456 codegen()->GetVar(result_register(), var); | 459 codegen()->GetVar(result_register(), var); |
457 codegen()->PushOperand(result_register()); | 460 codegen()->PushOperand(result_register()); |
458 } | 461 } |
459 | 462 |
460 | 463 |
461 void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const {} | 464 void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const {} |
462 | 465 |
(...skipping 3245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3708 Label* if_false = NULL; | 3711 Label* if_false = NULL; |
3709 Label* fall_through = NULL; | 3712 Label* fall_through = NULL; |
3710 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, | 3713 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, |
3711 &if_false, &fall_through); | 3714 &if_false, &fall_through); |
3712 | 3715 |
3713 Token::Value op = expr->op(); | 3716 Token::Value op = expr->op(); |
3714 VisitForStackValue(expr->left()); | 3717 VisitForStackValue(expr->left()); |
3715 switch (op) { | 3718 switch (op) { |
3716 case Token::IN: | 3719 case Token::IN: |
3717 VisitForStackValue(expr->right()); | 3720 VisitForStackValue(expr->right()); |
3718 CallRuntimeWithOperands(Runtime::kHasProperty); | 3721 EmitHasProperty(); |
3719 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); | 3722 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); |
3720 __ CompareRoot(r3, Heap::kTrueValueRootIndex); | 3723 __ CompareRoot(r3, Heap::kTrueValueRootIndex); |
3721 Split(eq, if_true, if_false, fall_through); | 3724 Split(eq, if_true, if_false, fall_through); |
3722 break; | 3725 break; |
3723 | 3726 |
3724 case Token::INSTANCEOF: { | 3727 case Token::INSTANCEOF: { |
3725 VisitForAccumulatorValue(expr->right()); | 3728 VisitForAccumulatorValue(expr->right()); |
3726 PopOperand(r4); | 3729 PopOperand(r4); |
3727 InstanceOfStub stub(isolate()); | 3730 InstanceOfStub stub(isolate()); |
3728 __ CallStub(&stub); | 3731 __ CallStub(&stub); |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3964 | 3967 |
3965 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); | 3968 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); |
3966 | 3969 |
3967 DCHECK(interrupt_address == | 3970 DCHECK(interrupt_address == |
3968 isolate->builtins()->OnStackReplacement()->entry()); | 3971 isolate->builtins()->OnStackReplacement()->entry()); |
3969 return ON_STACK_REPLACEMENT; | 3972 return ON_STACK_REPLACEMENT; |
3970 } | 3973 } |
3971 } // namespace internal | 3974 } // namespace internal |
3972 } // namespace v8 | 3975 } // namespace v8 |
3973 #endif // V8_TARGET_ARCH_PPC | 3976 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |