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/crankshaft/arm64/lithium-arm64.h" | 5 #include "src/crankshaft/arm64/lithium-arm64.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" | 9 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" |
10 #include "src/crankshaft/hydrogen-osr.h" | 10 #include "src/crankshaft/hydrogen-osr.h" |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 } | 245 } |
246 | 246 |
247 | 247 |
248 void LStoreContextSlot::PrintDataTo(StringStream* stream) { | 248 void LStoreContextSlot::PrintDataTo(StringStream* stream) { |
249 context()->PrintTo(stream); | 249 context()->PrintTo(stream); |
250 stream->Add("[%d] <- ", slot_index()); | 250 stream->Add("[%d] <- ", slot_index()); |
251 value()->PrintTo(stream); | 251 value()->PrintTo(stream); |
252 } | 252 } |
253 | 253 |
254 | 254 |
255 void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) { | |
256 object()->PrintTo(stream); | |
257 stream->Add("["); | |
258 key()->PrintTo(stream); | |
259 stream->Add("] <- "); | |
260 value()->PrintTo(stream); | |
261 } | |
262 | |
263 | |
264 void LStoreNamedField::PrintDataTo(StringStream* stream) { | 255 void LStoreNamedField::PrintDataTo(StringStream* stream) { |
265 object()->PrintTo(stream); | 256 object()->PrintTo(stream); |
266 std::ostringstream os; | 257 std::ostringstream os; |
267 os << hydrogen()->access(); | 258 os << hydrogen()->access(); |
268 stream->Add(os.str().c_str()); | 259 stream->Add(os.str().c_str()); |
269 stream->Add(" <- "); | 260 stream->Add(" <- "); |
270 value()->PrintTo(stream); | 261 value()->PrintTo(stream); |
271 } | 262 } |
272 | 263 |
273 | 264 |
(...skipping 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2193 | 2184 |
2194 } else { | 2185 } else { |
2195 DCHECK(instr->elements()->representation().IsTagged()); | 2186 DCHECK(instr->elements()->representation().IsTagged()); |
2196 DCHECK(instr->value()->representation().IsSmiOrTagged() || | 2187 DCHECK(instr->value()->representation().IsSmiOrTagged() || |
2197 instr->value()->representation().IsInteger32()); | 2188 instr->value()->representation().IsInteger32()); |
2198 return new(zone()) LStoreKeyedFixed(elements, key, val, temp); | 2189 return new(zone()) LStoreKeyedFixed(elements, key, val, temp); |
2199 } | 2190 } |
2200 } | 2191 } |
2201 | 2192 |
2202 | 2193 |
2203 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { | |
2204 LOperand* context = UseFixed(instr->context(), cp); | |
2205 LOperand* object = | |
2206 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); | |
2207 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); | |
2208 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); | |
2209 | |
2210 DCHECK(instr->object()->representation().IsTagged()); | |
2211 DCHECK(instr->key()->representation().IsTagged()); | |
2212 DCHECK(instr->value()->representation().IsTagged()); | |
2213 | |
2214 LOperand* slot = FixedTemp(StoreWithVectorDescriptor::SlotRegister()); | |
2215 LOperand* vector = FixedTemp(StoreWithVectorDescriptor::VectorRegister()); | |
2216 | |
2217 LStoreKeyedGeneric* result = new (zone()) | |
2218 LStoreKeyedGeneric(context, object, key, value, slot, vector); | |
2219 return MarkAsCall(result, instr); | |
2220 } | |
2221 | |
2222 | |
2223 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { | 2194 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { |
2224 // TODO(jbramley): It might be beneficial to allow value to be a constant in | 2195 // TODO(jbramley): It might be beneficial to allow value to be a constant in |
2225 // some cases. x64 makes use of this with FLAG_track_fields, for example. | 2196 // some cases. x64 makes use of this with FLAG_track_fields, for example. |
2226 | 2197 |
2227 LOperand* object = UseRegister(instr->object()); | 2198 LOperand* object = UseRegister(instr->object()); |
2228 LOperand* value; | 2199 LOperand* value; |
2229 LOperand* temp0 = NULL; | 2200 LOperand* temp0 = NULL; |
2230 LOperand* temp1 = NULL; | 2201 LOperand* temp1 = NULL; |
2231 | 2202 |
2232 if (instr->access().IsExternalMemory() || | 2203 if (instr->access().IsExternalMemory() || |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2561 | 2532 |
2562 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { | 2533 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { |
2563 LOperand* receiver = UseRegister(instr->receiver()); | 2534 LOperand* receiver = UseRegister(instr->receiver()); |
2564 LOperand* function = UseRegister(instr->function()); | 2535 LOperand* function = UseRegister(instr->function()); |
2565 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function); | 2536 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function); |
2566 return AssignEnvironment(DefineAsRegister(result)); | 2537 return AssignEnvironment(DefineAsRegister(result)); |
2567 } | 2538 } |
2568 | 2539 |
2569 } // namespace internal | 2540 } // namespace internal |
2570 } // namespace v8 | 2541 } // namespace v8 |
OLD | NEW |