| 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 #include "src/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
| 6 | 6 |
| 7 #include "src/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
| 8 #include "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" |
| 9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
| 10 #include "src/ppc/macro-assembler-ppc.h" | 10 #include "src/ppc/macro-assembler-ppc.h" |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 case kArchCallCodeObject: { | 525 case kArchCallCodeObject: { |
| 526 EnsureSpaceForLazyDeopt(); | 526 EnsureSpaceForLazyDeopt(); |
| 527 if (HasRegisterInput(instr, 0)) { | 527 if (HasRegisterInput(instr, 0)) { |
| 528 __ addi(ip, i.InputRegister(0), | 528 __ addi(ip, i.InputRegister(0), |
| 529 Operand(Code::kHeaderSize - kHeapObjectTag)); | 529 Operand(Code::kHeaderSize - kHeapObjectTag)); |
| 530 __ Call(ip); | 530 __ Call(ip); |
| 531 } else { | 531 } else { |
| 532 __ Call(Handle<Code>::cast(i.InputHeapObject(0)), | 532 __ Call(Handle<Code>::cast(i.InputHeapObject(0)), |
| 533 RelocInfo::CODE_TARGET); | 533 RelocInfo::CODE_TARGET); |
| 534 } | 534 } |
| 535 AddSafepointAndDeopt(instr); | 535 RecordCallPosition(instr); |
| 536 DCHECK_EQ(LeaveRC, i.OutputRCBit()); | 536 DCHECK_EQ(LeaveRC, i.OutputRCBit()); |
| 537 break; | 537 break; |
| 538 } | 538 } |
| 539 case kArchCallJSFunction: { | 539 case kArchCallJSFunction: { |
| 540 EnsureSpaceForLazyDeopt(); | 540 EnsureSpaceForLazyDeopt(); |
| 541 Register func = i.InputRegister(0); | 541 Register func = i.InputRegister(0); |
| 542 if (FLAG_debug_code) { | 542 if (FLAG_debug_code) { |
| 543 // Check the function's context matches the context argument. | 543 // Check the function's context matches the context argument. |
| 544 __ LoadP(kScratchReg, | 544 __ LoadP(kScratchReg, |
| 545 FieldMemOperand(func, JSFunction::kContextOffset)); | 545 FieldMemOperand(func, JSFunction::kContextOffset)); |
| 546 __ cmp(cp, kScratchReg); | 546 __ cmp(cp, kScratchReg); |
| 547 __ Assert(eq, kWrongFunctionContext); | 547 __ Assert(eq, kWrongFunctionContext); |
| 548 } | 548 } |
| 549 __ LoadP(ip, FieldMemOperand(func, JSFunction::kCodeEntryOffset)); | 549 __ LoadP(ip, FieldMemOperand(func, JSFunction::kCodeEntryOffset)); |
| 550 __ Call(ip); | 550 __ Call(ip); |
| 551 AddSafepointAndDeopt(instr); | 551 RecordCallPosition(instr); |
| 552 DCHECK_EQ(LeaveRC, i.OutputRCBit()); | 552 DCHECK_EQ(LeaveRC, i.OutputRCBit()); |
| 553 break; | 553 break; |
| 554 } | 554 } |
| 555 case kArchJmp: | 555 case kArchJmp: |
| 556 AssembleArchJump(i.InputRpo(0)); | 556 AssembleArchJump(i.InputRpo(0)); |
| 557 DCHECK_EQ(LeaveRC, i.OutputRCBit()); | 557 DCHECK_EQ(LeaveRC, i.OutputRCBit()); |
| 558 break; | 558 break; |
| 559 case kArchLookupSwitch: | 559 case kArchLookupSwitch: |
| 560 AssembleArchLookupSwitch(instr); | 560 AssembleArchLookupSwitch(instr); |
| 561 DCHECK_EQ(LeaveRC, i.OutputRCBit()); | 561 DCHECK_EQ(LeaveRC, i.OutputRCBit()); |
| (...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1398 } | 1398 } |
| 1399 } | 1399 } |
| 1400 MarkLazyDeoptSite(); | 1400 MarkLazyDeoptSite(); |
| 1401 } | 1401 } |
| 1402 | 1402 |
| 1403 #undef __ | 1403 #undef __ |
| 1404 | 1404 |
| 1405 } // namespace compiler | 1405 } // namespace compiler |
| 1406 } // namespace internal | 1406 } // namespace internal |
| 1407 } // namespace v8 | 1407 } // namespace v8 |
| OLD | NEW |