OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/scopes.h" | 10 #include "src/scopes.h" |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 RecordCallPosition(instr); | 560 RecordCallPosition(instr); |
561 break; | 561 break; |
562 } | 562 } |
563 case kArchTailCallCodeObject: { | 563 case kArchTailCallCodeObject: { |
564 AssembleDeconstructActivationRecord(); | 564 AssembleDeconstructActivationRecord(); |
565 if (HasImmediateInput(instr, 0)) { | 565 if (HasImmediateInput(instr, 0)) { |
566 Handle<Code> code = Handle<Code>::cast(i.InputHeapObject(0)); | 566 Handle<Code> code = Handle<Code>::cast(i.InputHeapObject(0)); |
567 __ jmp(code, RelocInfo::CODE_TARGET); | 567 __ jmp(code, RelocInfo::CODE_TARGET); |
568 } else { | 568 } else { |
569 Register reg = i.InputRegister(0); | 569 Register reg = i.InputRegister(0); |
570 int entry = Code::kHeaderSize - kHeapObjectTag; | 570 __ addp(reg, Immediate(Code::kHeaderSize - kHeapObjectTag)); |
571 __ jmp(Operand(reg, entry)); | 571 __ jmp(reg); |
572 } | 572 } |
573 break; | 573 break; |
574 } | 574 } |
575 case kArchCallJSFunction: { | 575 case kArchCallJSFunction: { |
576 EnsureSpaceForLazyDeopt(); | 576 EnsureSpaceForLazyDeopt(); |
577 Register func = i.InputRegister(0); | 577 Register func = i.InputRegister(0); |
578 if (FLAG_debug_code) { | 578 if (FLAG_debug_code) { |
579 // Check the function's context matches the context argument. | 579 // Check the function's context matches the context argument. |
580 __ cmpp(rsi, FieldOperand(func, JSFunction::kContextOffset)); | 580 __ cmpp(rsi, FieldOperand(func, JSFunction::kContextOffset)); |
581 __ Assert(equal, kWrongFunctionContext); | 581 __ Assert(equal, kWrongFunctionContext); |
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1773 __ Nop(padding_size); | 1773 __ Nop(padding_size); |
1774 } | 1774 } |
1775 } | 1775 } |
1776 } | 1776 } |
1777 | 1777 |
1778 #undef __ | 1778 #undef __ |
1779 | 1779 |
1780 } // namespace internal | 1780 } // namespace internal |
1781 } // namespace compiler | 1781 } // namespace compiler |
1782 } // namespace v8 | 1782 } // namespace v8 |
OLD | NEW |