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/crankshaft/ia32/lithium-ia32.h" | 5 #include "src/crankshaft/ia32/lithium-ia32.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #if V8_TARGET_ARCH_IA32 | 9 #if V8_TARGET_ARCH_IA32 |
10 | 10 |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 | 344 |
345 void LStoreNamedField::PrintDataTo(StringStream* stream) { | 345 void LStoreNamedField::PrintDataTo(StringStream* stream) { |
346 object()->PrintTo(stream); | 346 object()->PrintTo(stream); |
347 std::ostringstream os; | 347 std::ostringstream os; |
348 os << hydrogen()->access() << " <- "; | 348 os << hydrogen()->access() << " <- "; |
349 stream->Add(os.str().c_str()); | 349 stream->Add(os.str().c_str()); |
350 value()->PrintTo(stream); | 350 value()->PrintTo(stream); |
351 } | 351 } |
352 | 352 |
353 | 353 |
354 void LStoreNamedGeneric::PrintDataTo(StringStream* stream) { | |
355 object()->PrintTo(stream); | |
356 stream->Add("."); | |
357 stream->Add(String::cast(*name())->ToCString().get()); | |
358 stream->Add(" <- "); | |
359 value()->PrintTo(stream); | |
360 } | |
361 | |
362 | |
363 void LLoadKeyed::PrintDataTo(StringStream* stream) { | 354 void LLoadKeyed::PrintDataTo(StringStream* stream) { |
364 elements()->PrintTo(stream); | 355 elements()->PrintTo(stream); |
365 stream->Add("["); | 356 stream->Add("["); |
366 key()->PrintTo(stream); | 357 key()->PrintTo(stream); |
367 if (hydrogen()->IsDehoisted()) { | 358 if (hydrogen()->IsDehoisted()) { |
368 stream->Add(" + %d]", base_offset()); | 359 stream->Add(" + %d]", base_offset()); |
369 } else { | 360 } else { |
370 stream->Add("]"); | 361 stream->Add("]"); |
371 } | 362 } |
372 } | 363 } |
(...skipping 1952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2325 LOperand* temp = (!is_in_object || needs_write_barrier || | 2316 LOperand* temp = (!is_in_object || needs_write_barrier || |
2326 needs_write_barrier_for_map) ? TempRegister() : NULL; | 2317 needs_write_barrier_for_map) ? TempRegister() : NULL; |
2327 | 2318 |
2328 // We need a temporary register for write barrier of the map field. | 2319 // We need a temporary register for write barrier of the map field. |
2329 LOperand* temp_map = needs_write_barrier_for_map ? TempRegister() : NULL; | 2320 LOperand* temp_map = needs_write_barrier_for_map ? TempRegister() : NULL; |
2330 | 2321 |
2331 return new(zone()) LStoreNamedField(obj, val, temp, temp_map); | 2322 return new(zone()) LStoreNamedField(obj, val, temp, temp_map); |
2332 } | 2323 } |
2333 | 2324 |
2334 | 2325 |
2335 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | |
2336 LOperand* context = UseFixed(instr->context(), esi); | |
2337 LOperand* object = | |
2338 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); | |
2339 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); | |
2340 LOperand* slot = FixedTemp(StoreWithVectorDescriptor::SlotRegister()); | |
2341 LOperand* vector = FixedTemp(StoreWithVectorDescriptor::VectorRegister()); | |
2342 | |
2343 LStoreNamedGeneric* result = | |
2344 new (zone()) LStoreNamedGeneric(context, object, value, slot, vector); | |
2345 return MarkAsCall(result, instr); | |
2346 } | |
2347 | |
2348 | |
2349 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { | 2326 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { |
2350 LOperand* context = UseFixed(instr->context(), esi); | 2327 LOperand* context = UseFixed(instr->context(), esi); |
2351 LOperand* left = UseFixed(instr->left(), edx); | 2328 LOperand* left = UseFixed(instr->left(), edx); |
2352 LOperand* right = UseFixed(instr->right(), eax); | 2329 LOperand* right = UseFixed(instr->right(), eax); |
2353 LStringAdd* string_add = new(zone()) LStringAdd(context, left, right); | 2330 LStringAdd* string_add = new(zone()) LStringAdd(context, left, right); |
2354 return MarkAsCall(DefineFixed(string_add, eax), instr); | 2331 return MarkAsCall(DefineFixed(string_add, eax), instr); |
2355 } | 2332 } |
2356 | 2333 |
2357 | 2334 |
2358 LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) { | 2335 LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) { |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2563 LOperand* index = UseTempRegister(instr->index()); | 2540 LOperand* index = UseTempRegister(instr->index()); |
2564 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2541 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
2565 LInstruction* result = DefineSameAsFirst(load); | 2542 LInstruction* result = DefineSameAsFirst(load); |
2566 return AssignPointerMap(result); | 2543 return AssignPointerMap(result); |
2567 } | 2544 } |
2568 | 2545 |
2569 } // namespace internal | 2546 } // namespace internal |
2570 } // namespace v8 | 2547 } // namespace v8 |
2571 | 2548 |
2572 #endif // V8_TARGET_ARCH_IA32 | 2549 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |