| 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/node-properties-inl.h" | 10 #include "src/compiler/node-properties-inl.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 break; | 122 break; |
| 123 case kArchCallCodeObject: { | 123 case kArchCallCodeObject: { |
| 124 if (HasImmediateInput(instr, 0)) { | 124 if (HasImmediateInput(instr, 0)) { |
| 125 Handle<Code> code = Handle<Code>::cast(i.InputHeapObject(0)); | 125 Handle<Code> code = Handle<Code>::cast(i.InputHeapObject(0)); |
| 126 __ call(code, RelocInfo::CODE_TARGET); | 126 __ call(code, RelocInfo::CODE_TARGET); |
| 127 } else { | 127 } else { |
| 128 Register reg = i.InputRegister(0); | 128 Register reg = i.InputRegister(0); |
| 129 __ call(Operand(reg, Code::kHeaderSize - kHeapObjectTag)); | 129 __ call(Operand(reg, Code::kHeaderSize - kHeapObjectTag)); |
| 130 } | 130 } |
| 131 AddSafepointAndDeopt(instr); | 131 AddSafepointAndDeopt(instr); |
| 132 AddNopForSmiCodeInlining(); | |
| 133 break; | 132 break; |
| 134 } | 133 } |
| 135 case kArchCallJSFunction: { | 134 case kArchCallJSFunction: { |
| 136 // TODO(jarin) The load of the context should be separated from the call. | 135 // TODO(jarin) The load of the context should be separated from the call. |
| 137 Register func = i.InputRegister(0); | 136 Register func = i.InputRegister(0); |
| 138 __ mov(esi, FieldOperand(func, JSFunction::kContextOffset)); | 137 __ mov(esi, FieldOperand(func, JSFunction::kContextOffset)); |
| 139 __ call(FieldOperand(func, JSFunction::kCodeEntryOffset)); | 138 __ call(FieldOperand(func, JSFunction::kCodeEntryOffset)); |
| 140 AddSafepointAndDeopt(instr); | 139 AddSafepointAndDeopt(instr); |
| 141 break; | 140 break; |
| 142 } | 141 } |
| (...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 // No other combinations are possible. | 939 // No other combinations are possible. |
| 941 UNREACHABLE(); | 940 UNREACHABLE(); |
| 942 } | 941 } |
| 943 } | 942 } |
| 944 | 943 |
| 945 | 944 |
| 946 void CodeGenerator::AddNopForSmiCodeInlining() { __ nop(); } | 945 void CodeGenerator::AddNopForSmiCodeInlining() { __ nop(); } |
| 947 | 946 |
| 948 #undef __ | 947 #undef __ |
| 949 | 948 |
| 950 } | 949 } // namespace compiler |
| 951 } | 950 } // namespace internal |
| 952 } // namespace v8::internal::compiler | 951 } // namespace v8 |
| OLD | NEW |