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