| 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 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2036 return instr->RequiresHoleCheck() | 2036 return instr->RequiresHoleCheck() |
| 2037 ? AssignEnvironment(DefineAsRegister(result)) | 2037 ? AssignEnvironment(DefineAsRegister(result)) |
| 2038 : DefineAsRegister(result); | 2038 : DefineAsRegister(result); |
| 2039 } | 2039 } |
| 2040 | 2040 |
| 2041 | 2041 |
| 2042 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 2042 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
| 2043 LOperand* context = UseFixed(instr->context(), rsi); | 2043 LOperand* context = UseFixed(instr->context(), rsi); |
| 2044 LOperand* global_object = UseFixed(instr->global_object(), | 2044 LOperand* global_object = UseFixed(instr->global_object(), |
| 2045 LoadIC::ReceiverRegister()); | 2045 LoadIC::ReceiverRegister()); |
| 2046 LOperand* vector = NULL; |
| 2047 if (FLAG_vector_ics) { |
| 2048 vector = FixedTemp(LoadIC::VectorRegister()); |
| 2049 } |
| 2050 |
| 2046 LLoadGlobalGeneric* result = | 2051 LLoadGlobalGeneric* result = |
| 2047 new(zone()) LLoadGlobalGeneric(context, global_object); | 2052 new(zone()) LLoadGlobalGeneric(context, global_object, vector); |
| 2048 return MarkAsCall(DefineFixed(result, rax), instr); | 2053 return MarkAsCall(DefineFixed(result, rax), instr); |
| 2049 } | 2054 } |
| 2050 | 2055 |
| 2051 | 2056 |
| 2052 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { | 2057 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { |
| 2053 LOperand* value = UseRegister(instr->value()); | 2058 LOperand* value = UseRegister(instr->value()); |
| 2054 // Use a temp to avoid reloading the cell value address in the case where | 2059 // Use a temp to avoid reloading the cell value address in the case where |
| 2055 // we perform a hole check. | 2060 // we perform a hole check. |
| 2056 return instr->RequiresHoleCheck() | 2061 return instr->RequiresHoleCheck() |
| 2057 ? AssignEnvironment(new(zone()) LStoreGlobalCell(value, TempRegister())) | 2062 ? AssignEnvironment(new(zone()) LStoreGlobalCell(value, TempRegister())) |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2103 return DefineFixed(new(zone()) LLoadNamedField(obj), rax); | 2108 return DefineFixed(new(zone()) LLoadNamedField(obj), rax); |
| 2104 } | 2109 } |
| 2105 LOperand* obj = UseRegisterAtStart(instr->object()); | 2110 LOperand* obj = UseRegisterAtStart(instr->object()); |
| 2106 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); | 2111 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); |
| 2107 } | 2112 } |
| 2108 | 2113 |
| 2109 | 2114 |
| 2110 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 2115 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
| 2111 LOperand* context = UseFixed(instr->context(), rsi); | 2116 LOperand* context = UseFixed(instr->context(), rsi); |
| 2112 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); | 2117 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); |
| 2113 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric(context, object); | 2118 LOperand* vector = NULL; |
| 2119 if (FLAG_vector_ics) { |
| 2120 vector = FixedTemp(LoadIC::VectorRegister()); |
| 2121 } |
| 2122 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric( |
| 2123 context, object, vector); |
| 2114 return MarkAsCall(DefineFixed(result, rax), instr); | 2124 return MarkAsCall(DefineFixed(result, rax), instr); |
| 2115 } | 2125 } |
| 2116 | 2126 |
| 2117 | 2127 |
| 2118 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 2128 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
| 2119 HLoadFunctionPrototype* instr) { | 2129 HLoadFunctionPrototype* instr) { |
| 2120 return AssignEnvironment(DefineAsRegister( | 2130 return AssignEnvironment(DefineAsRegister( |
| 2121 new(zone()) LLoadFunctionPrototype(UseRegister(instr->function())))); | 2131 new(zone()) LLoadFunctionPrototype(UseRegister(instr->function())))); |
| 2122 } | 2132 } |
| 2123 | 2133 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2190 result = AssignEnvironment(result); | 2200 result = AssignEnvironment(result); |
| 2191 } | 2201 } |
| 2192 return result; | 2202 return result; |
| 2193 } | 2203 } |
| 2194 | 2204 |
| 2195 | 2205 |
| 2196 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 2206 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
| 2197 LOperand* context = UseFixed(instr->context(), rsi); | 2207 LOperand* context = UseFixed(instr->context(), rsi); |
| 2198 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); | 2208 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); |
| 2199 LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister()); | 2209 LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister()); |
| 2210 LOperand* vector = NULL; |
| 2211 if (FLAG_vector_ics) { |
| 2212 vector = FixedTemp(LoadIC::VectorRegister()); |
| 2213 } |
| 2200 | 2214 |
| 2201 LLoadKeyedGeneric* result = | 2215 LLoadKeyedGeneric* result = |
| 2202 new(zone()) LLoadKeyedGeneric(context, object, key); | 2216 new(zone()) LLoadKeyedGeneric(context, object, key, vector); |
| 2203 return MarkAsCall(DefineFixed(result, rax), instr); | 2217 return MarkAsCall(DefineFixed(result, rax), instr); |
| 2204 } | 2218 } |
| 2205 | 2219 |
| 2206 | 2220 |
| 2207 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { | 2221 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
| 2208 ElementsKind elements_kind = instr->elements_kind(); | 2222 ElementsKind elements_kind = instr->elements_kind(); |
| 2209 | 2223 |
| 2210 if ((kPointerSize == kInt64Size) && instr->IsDehoisted()) { | 2224 if ((kPointerSize == kInt64Size) && instr->IsDehoisted()) { |
| 2211 FindDehoistedKeyDefinitions(instr->key()); | 2225 FindDehoistedKeyDefinitions(instr->key()); |
| 2212 } | 2226 } |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2643 LOperand* function = UseRegisterAtStart(instr->function()); | 2657 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2644 LAllocateBlockContext* result = | 2658 LAllocateBlockContext* result = |
| 2645 new(zone()) LAllocateBlockContext(context, function); | 2659 new(zone()) LAllocateBlockContext(context, function); |
| 2646 return MarkAsCall(DefineFixed(result, rsi), instr); | 2660 return MarkAsCall(DefineFixed(result, rsi), instr); |
| 2647 } | 2661 } |
| 2648 | 2662 |
| 2649 | 2663 |
| 2650 } } // namespace v8::internal | 2664 } } // namespace v8::internal |
| 2651 | 2665 |
| 2652 #endif // V8_TARGET_ARCH_X64 | 2666 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |