| 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/compiler/osr.h" | 10 #include "src/compiler/osr.h" |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 IA32OperandConverter i(this, instr); | 301 IA32OperandConverter i(this, instr); |
| 302 | 302 |
| 303 switch (ArchOpcodeField::decode(instr->opcode())) { | 303 switch (ArchOpcodeField::decode(instr->opcode())) { |
| 304 case kArchCallCodeObject: { | 304 case kArchCallCodeObject: { |
| 305 EnsureSpaceForLazyDeopt(); | 305 EnsureSpaceForLazyDeopt(); |
| 306 if (HasImmediateInput(instr, 0)) { | 306 if (HasImmediateInput(instr, 0)) { |
| 307 Handle<Code> code = Handle<Code>::cast(i.InputHeapObject(0)); | 307 Handle<Code> code = Handle<Code>::cast(i.InputHeapObject(0)); |
| 308 __ call(code, RelocInfo::CODE_TARGET); | 308 __ call(code, RelocInfo::CODE_TARGET); |
| 309 } else { | 309 } else { |
| 310 Register reg = i.InputRegister(0); | 310 Register reg = i.InputRegister(0); |
| 311 __ call(Operand(reg, Code::kHeaderSize - kHeapObjectTag)); | 311 __ add(reg, Immediate(Code::kHeaderSize - kHeapObjectTag)); |
| 312 __ call(reg); |
| 312 } | 313 } |
| 313 RecordCallPosition(instr); | 314 RecordCallPosition(instr); |
| 314 break; | 315 break; |
| 315 } | 316 } |
| 316 case kArchTailCallCodeObject: { | 317 case kArchTailCallCodeObject: { |
| 317 AssembleDeconstructActivationRecord(); | 318 AssembleDeconstructActivationRecord(); |
| 318 if (HasImmediateInput(instr, 0)) { | 319 if (HasImmediateInput(instr, 0)) { |
| 319 Handle<Code> code = Handle<Code>::cast(i.InputHeapObject(0)); | 320 Handle<Code> code = Handle<Code>::cast(i.InputHeapObject(0)); |
| 320 __ jmp(code, RelocInfo::CODE_TARGET); | 321 __ jmp(code, RelocInfo::CODE_TARGET); |
| 321 } else { | 322 } else { |
| (...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1554 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 1555 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
| 1555 __ Nop(padding_size); | 1556 __ Nop(padding_size); |
| 1556 } | 1557 } |
| 1557 } | 1558 } |
| 1558 | 1559 |
| 1559 #undef __ | 1560 #undef __ |
| 1560 | 1561 |
| 1561 } // namespace compiler | 1562 } // namespace compiler |
| 1562 } // namespace internal | 1563 } // namespace internal |
| 1563 } // namespace v8 | 1564 } // namespace v8 |
| OLD | NEW |