| 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 #include "src/hydrogen-osr.h" | 7 #include "src/hydrogen-osr.h" |
| 8 #include "src/lithium-allocator-inl.h" | 8 #include "src/lithium-allocator-inl.h" |
| 9 #include "src/mips64/lithium-codegen-mips64.h" | 9 #include "src/mips64/lithium-codegen-mips64.h" |
| 10 #include "src/mips64/lithium-mips64.h" | 10 #include "src/mips64/lithium-mips64.h" |
| (...skipping 2012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2023 return instr->RequiresHoleCheck() | 2023 return instr->RequiresHoleCheck() |
| 2024 ? AssignEnvironment(DefineAsRegister(result)) | 2024 ? AssignEnvironment(DefineAsRegister(result)) |
| 2025 : DefineAsRegister(result); | 2025 : DefineAsRegister(result); |
| 2026 } | 2026 } |
| 2027 | 2027 |
| 2028 | 2028 |
| 2029 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 2029 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
| 2030 LOperand* context = UseFixed(instr->context(), cp); | 2030 LOperand* context = UseFixed(instr->context(), cp); |
| 2031 LOperand* global_object = UseFixed(instr->global_object(), | 2031 LOperand* global_object = UseFixed(instr->global_object(), |
| 2032 LoadIC::ReceiverRegister()); | 2032 LoadIC::ReceiverRegister()); |
| 2033 LOperand* vector = NULL; |
| 2034 if (FLAG_vector_ics) { |
| 2035 vector = FixedTemp(LoadIC::VectorRegister()); |
| 2036 } |
| 2033 LLoadGlobalGeneric* result = | 2037 LLoadGlobalGeneric* result = |
| 2034 new(zone()) LLoadGlobalGeneric(context, global_object); | 2038 new(zone()) LLoadGlobalGeneric(context, global_object, vector); |
| 2035 return MarkAsCall(DefineFixed(result, v0), instr); | 2039 return MarkAsCall(DefineFixed(result, v0), instr); |
| 2036 } | 2040 } |
| 2037 | 2041 |
| 2038 | 2042 |
| 2039 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { | 2043 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { |
| 2040 LOperand* value = UseRegister(instr->value()); | 2044 LOperand* value = UseRegister(instr->value()); |
| 2041 // Use a temp to check the value in the cell in the case where we perform | 2045 // Use a temp to check the value in the cell in the case where we perform |
| 2042 // a hole check. | 2046 // a hole check. |
| 2043 return instr->RequiresHoleCheck() | 2047 return instr->RequiresHoleCheck() |
| 2044 ? AssignEnvironment(new(zone()) LStoreGlobalCell(value, TempRegister())) | 2048 ? AssignEnvironment(new(zone()) LStoreGlobalCell(value, TempRegister())) |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2077 | 2081 |
| 2078 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { | 2082 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
| 2079 LOperand* obj = UseRegisterAtStart(instr->object()); | 2083 LOperand* obj = UseRegisterAtStart(instr->object()); |
| 2080 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); | 2084 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); |
| 2081 } | 2085 } |
| 2082 | 2086 |
| 2083 | 2087 |
| 2084 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 2088 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
| 2085 LOperand* context = UseFixed(instr->context(), cp); | 2089 LOperand* context = UseFixed(instr->context(), cp); |
| 2086 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); | 2090 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); |
| 2091 LOperand* vector = NULL; |
| 2092 if (FLAG_vector_ics) { |
| 2093 vector = FixedTemp(LoadIC::VectorRegister()); |
| 2094 } |
| 2095 |
| 2087 LInstruction* result = | 2096 LInstruction* result = |
| 2088 DefineFixed(new(zone()) LLoadNamedGeneric(context, object), v0); | 2097 DefineFixed(new(zone()) LLoadNamedGeneric(context, object, vector), v0); |
| 2089 return MarkAsCall(result, instr); | 2098 return MarkAsCall(result, instr); |
| 2090 } | 2099 } |
| 2091 | 2100 |
| 2092 | 2101 |
| 2093 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 2102 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
| 2094 HLoadFunctionPrototype* instr) { | 2103 HLoadFunctionPrototype* instr) { |
| 2095 return AssignEnvironment(DefineAsRegister( | 2104 return AssignEnvironment(DefineAsRegister( |
| 2096 new(zone()) LLoadFunctionPrototype(UseRegister(instr->function())))); | 2105 new(zone()) LLoadFunctionPrototype(UseRegister(instr->function())))); |
| 2097 } | 2106 } |
| 2098 | 2107 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2139 result = AssignEnvironment(result); | 2148 result = AssignEnvironment(result); |
| 2140 } | 2149 } |
| 2141 return result; | 2150 return result; |
| 2142 } | 2151 } |
| 2143 | 2152 |
| 2144 | 2153 |
| 2145 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 2154 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
| 2146 LOperand* context = UseFixed(instr->context(), cp); | 2155 LOperand* context = UseFixed(instr->context(), cp); |
| 2147 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); | 2156 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); |
| 2148 LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister()); | 2157 LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister()); |
| 2158 LOperand* vector = NULL; |
| 2159 if (FLAG_vector_ics) { |
| 2160 vector = FixedTemp(LoadIC::VectorRegister()); |
| 2161 } |
| 2149 | 2162 |
| 2150 LInstruction* result = | 2163 LInstruction* result = |
| 2151 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key), v0); | 2164 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector), |
| 2165 v0); |
| 2152 return MarkAsCall(result, instr); | 2166 return MarkAsCall(result, instr); |
| 2153 } | 2167 } |
| 2154 | 2168 |
| 2155 | 2169 |
| 2156 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { | 2170 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
| 2157 if (!instr->is_typed_elements()) { | 2171 if (!instr->is_typed_elements()) { |
| 2158 ASSERT(instr->elements()->representation().IsTagged()); | 2172 ASSERT(instr->elements()->representation().IsTagged()); |
| 2159 bool needs_write_barrier = instr->NeedsWriteBarrier(); | 2173 bool needs_write_barrier = instr->NeedsWriteBarrier(); |
| 2160 LOperand* object = NULL; | 2174 LOperand* object = NULL; |
| 2161 LOperand* val = NULL; | 2175 LOperand* val = NULL; |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2535 HAllocateBlockContext* instr) { | 2549 HAllocateBlockContext* instr) { |
| 2536 LOperand* context = UseFixed(instr->context(), cp); | 2550 LOperand* context = UseFixed(instr->context(), cp); |
| 2537 LOperand* function = UseRegisterAtStart(instr->function()); | 2551 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2538 LAllocateBlockContext* result = | 2552 LAllocateBlockContext* result = |
| 2539 new(zone()) LAllocateBlockContext(context, function); | 2553 new(zone()) LAllocateBlockContext(context, function); |
| 2540 return MarkAsCall(DefineFixed(result, cp), instr); | 2554 return MarkAsCall(DefineFixed(result, cp), instr); |
| 2541 } | 2555 } |
| 2542 | 2556 |
| 2543 | 2557 |
| 2544 } } // namespace v8::internal | 2558 } } // namespace v8::internal |
| OLD | NEW |