| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/hydrogen-osr.h" | 9 #include "src/hydrogen-osr.h" |
| 10 #include "src/lithium-allocator-inl.h" | 10 #include "src/lithium-allocator-inl.h" |
| (...skipping 2022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2033 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { | 2033 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { |
| 2034 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; | 2034 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; |
| 2035 return instr->RequiresHoleCheck() | 2035 return instr->RequiresHoleCheck() |
| 2036 ? AssignEnvironment(DefineAsRegister(result)) | 2036 ? AssignEnvironment(DefineAsRegister(result)) |
| 2037 : DefineAsRegister(result); | 2037 : DefineAsRegister(result); |
| 2038 } | 2038 } |
| 2039 | 2039 |
| 2040 | 2040 |
| 2041 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 2041 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
| 2042 LOperand* context = UseFixed(instr->context(), rsi); | 2042 LOperand* context = UseFixed(instr->context(), rsi); |
| 2043 LOperand* global_object = UseFixed(instr->global_object(), rax); | 2043 LOperand* global_object = UseFixed(instr->global_object(), |
| 2044 LoadIC::ReceiverRegister()); |
| 2044 LLoadGlobalGeneric* result = | 2045 LLoadGlobalGeneric* result = |
| 2045 new(zone()) LLoadGlobalGeneric(context, global_object); | 2046 new(zone()) LLoadGlobalGeneric(context, global_object); |
| 2046 return MarkAsCall(DefineFixed(result, rax), instr); | 2047 return MarkAsCall(DefineFixed(result, rax), instr); |
| 2047 } | 2048 } |
| 2048 | 2049 |
| 2049 | 2050 |
| 2050 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { | 2051 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { |
| 2051 LOperand* value = UseRegister(instr->value()); | 2052 LOperand* value = UseRegister(instr->value()); |
| 2052 // Use a temp to avoid reloading the cell value address in the case where | 2053 // Use a temp to avoid reloading the cell value address in the case where |
| 2053 // we perform a hole check. | 2054 // we perform a hole check. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2100 LOperand* obj = UseRegisterOrConstantAtStart(instr->object()); | 2101 LOperand* obj = UseRegisterOrConstantAtStart(instr->object()); |
| 2101 return DefineFixed(new(zone()) LLoadNamedField(obj), rax); | 2102 return DefineFixed(new(zone()) LLoadNamedField(obj), rax); |
| 2102 } | 2103 } |
| 2103 LOperand* obj = UseRegisterAtStart(instr->object()); | 2104 LOperand* obj = UseRegisterAtStart(instr->object()); |
| 2104 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); | 2105 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); |
| 2105 } | 2106 } |
| 2106 | 2107 |
| 2107 | 2108 |
| 2108 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 2109 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
| 2109 LOperand* context = UseFixed(instr->context(), rsi); | 2110 LOperand* context = UseFixed(instr->context(), rsi); |
| 2110 LOperand* object = UseFixed(instr->object(), rax); | 2111 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); |
| 2111 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric(context, object); | 2112 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric(context, object); |
| 2112 return MarkAsCall(DefineFixed(result, rax), instr); | 2113 return MarkAsCall(DefineFixed(result, rax), instr); |
| 2113 } | 2114 } |
| 2114 | 2115 |
| 2115 | 2116 |
| 2116 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 2117 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
| 2117 HLoadFunctionPrototype* instr) { | 2118 HLoadFunctionPrototype* instr) { |
| 2118 return AssignEnvironment(DefineAsRegister( | 2119 return AssignEnvironment(DefineAsRegister( |
| 2119 new(zone()) LLoadFunctionPrototype(UseRegister(instr->function())))); | 2120 new(zone()) LLoadFunctionPrototype(UseRegister(instr->function())))); |
| 2120 } | 2121 } |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2186 // LCodeGen::DoLoadKeyedFixedArray | 2187 // LCodeGen::DoLoadKeyedFixedArray |
| 2187 instr->RequiresHoleCheck()) { | 2188 instr->RequiresHoleCheck()) { |
| 2188 result = AssignEnvironment(result); | 2189 result = AssignEnvironment(result); |
| 2189 } | 2190 } |
| 2190 return result; | 2191 return result; |
| 2191 } | 2192 } |
| 2192 | 2193 |
| 2193 | 2194 |
| 2194 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 2195 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
| 2195 LOperand* context = UseFixed(instr->context(), rsi); | 2196 LOperand* context = UseFixed(instr->context(), rsi); |
| 2196 LOperand* object = UseFixed(instr->object(), rdx); | 2197 LOperand* object = UseFixed(instr->object(), KeyedLoadIC::ReceiverRegister()); |
| 2197 LOperand* key = UseFixed(instr->key(), rax); | 2198 LOperand* key = UseFixed(instr->key(), KeyedLoadIC::NameRegister()); |
| 2198 | 2199 |
| 2199 LLoadKeyedGeneric* result = | 2200 LLoadKeyedGeneric* result = |
| 2200 new(zone()) LLoadKeyedGeneric(context, object, key); | 2201 new(zone()) LLoadKeyedGeneric(context, object, key); |
| 2201 return MarkAsCall(DefineFixed(result, rax), instr); | 2202 return MarkAsCall(DefineFixed(result, rax), instr); |
| 2202 } | 2203 } |
| 2203 | 2204 |
| 2204 | 2205 |
| 2205 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { | 2206 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
| 2206 ElementsKind elements_kind = instr->elements_kind(); | 2207 ElementsKind elements_kind = instr->elements_kind(); |
| 2207 | 2208 |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2640 LOperand* function = UseRegisterAtStart(instr->function()); | 2641 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2641 LAllocateBlockContext* result = | 2642 LAllocateBlockContext* result = |
| 2642 new(zone()) LAllocateBlockContext(context, function); | 2643 new(zone()) LAllocateBlockContext(context, function); |
| 2643 return MarkAsCall(DefineFixed(result, rsi), instr); | 2644 return MarkAsCall(DefineFixed(result, rsi), instr); |
| 2644 } | 2645 } |
| 2645 | 2646 |
| 2646 | 2647 |
| 2647 } } // namespace v8::internal | 2648 } } // namespace v8::internal |
| 2648 | 2649 |
| 2649 #endif // V8_TARGET_ARCH_X64 | 2650 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |