| 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/arm/lithium-arm.h" | 5 #include "src/crankshaft/arm/lithium-arm.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/crankshaft/arm/lithium-codegen-arm.h" | 9 #include "src/crankshaft/arm/lithium-codegen-arm.h" |
| 10 #include "src/crankshaft/hydrogen-osr.h" | 10 #include "src/crankshaft/hydrogen-osr.h" |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 | 297 |
| 298 void LStoreNamedField::PrintDataTo(StringStream* stream) { | 298 void LStoreNamedField::PrintDataTo(StringStream* stream) { |
| 299 object()->PrintTo(stream); | 299 object()->PrintTo(stream); |
| 300 std::ostringstream os; | 300 std::ostringstream os; |
| 301 os << hydrogen()->access() << " <- "; | 301 os << hydrogen()->access() << " <- "; |
| 302 stream->Add(os.str().c_str()); | 302 stream->Add(os.str().c_str()); |
| 303 value()->PrintTo(stream); | 303 value()->PrintTo(stream); |
| 304 } | 304 } |
| 305 | 305 |
| 306 | 306 |
| 307 void LStoreNamedGeneric::PrintDataTo(StringStream* stream) { | |
| 308 object()->PrintTo(stream); | |
| 309 stream->Add("."); | |
| 310 stream->Add(String::cast(*name())->ToCString().get()); | |
| 311 stream->Add(" <- "); | |
| 312 value()->PrintTo(stream); | |
| 313 } | |
| 314 | |
| 315 | |
| 316 void LLoadKeyed::PrintDataTo(StringStream* stream) { | 307 void LLoadKeyed::PrintDataTo(StringStream* stream) { |
| 317 elements()->PrintTo(stream); | 308 elements()->PrintTo(stream); |
| 318 stream->Add("["); | 309 stream->Add("["); |
| 319 key()->PrintTo(stream); | 310 key()->PrintTo(stream); |
| 320 if (hydrogen()->IsDehoisted()) { | 311 if (hydrogen()->IsDehoisted()) { |
| 321 stream->Add(" + %d]", base_offset()); | 312 stream->Add(" + %d]", base_offset()); |
| 322 } else { | 313 } else { |
| 323 stream->Add("]"); | 314 stream->Add("]"); |
| 324 } | 315 } |
| 325 } | 316 } |
| (...skipping 1943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2269 val = UseRegister(instr->value()); | 2260 val = UseRegister(instr->value()); |
| 2270 } | 2261 } |
| 2271 | 2262 |
| 2272 // We need a temporary register for write barrier of the map field. | 2263 // We need a temporary register for write barrier of the map field. |
| 2273 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; | 2264 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; |
| 2274 | 2265 |
| 2275 return new(zone()) LStoreNamedField(obj, val, temp); | 2266 return new(zone()) LStoreNamedField(obj, val, temp); |
| 2276 } | 2267 } |
| 2277 | 2268 |
| 2278 | 2269 |
| 2279 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | |
| 2280 LOperand* context = UseFixed(instr->context(), cp); | |
| 2281 LOperand* obj = | |
| 2282 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); | |
| 2283 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); | |
| 2284 LOperand* slot = FixedTemp(StoreWithVectorDescriptor::SlotRegister()); | |
| 2285 LOperand* vector = FixedTemp(StoreWithVectorDescriptor::VectorRegister()); | |
| 2286 | |
| 2287 LStoreNamedGeneric* result = | |
| 2288 new (zone()) LStoreNamedGeneric(context, obj, val, slot, vector); | |
| 2289 return MarkAsCall(result, instr); | |
| 2290 } | |
| 2291 | |
| 2292 | |
| 2293 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { | 2270 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { |
| 2294 LOperand* context = UseFixed(instr->context(), cp); | 2271 LOperand* context = UseFixed(instr->context(), cp); |
| 2295 LOperand* left = UseFixed(instr->left(), r1); | 2272 LOperand* left = UseFixed(instr->left(), r1); |
| 2296 LOperand* right = UseFixed(instr->right(), r0); | 2273 LOperand* right = UseFixed(instr->right(), r0); |
| 2297 return MarkAsCall( | 2274 return MarkAsCall( |
| 2298 DefineFixed(new(zone()) LStringAdd(context, left, right), r0), | 2275 DefineFixed(new(zone()) LStringAdd(context, left, right), r0), |
| 2299 instr); | 2276 instr); |
| 2300 } | 2277 } |
| 2301 | 2278 |
| 2302 | 2279 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2497 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2474 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2498 LOperand* object = UseRegister(instr->object()); | 2475 LOperand* object = UseRegister(instr->object()); |
| 2499 LOperand* index = UseTempRegister(instr->index()); | 2476 LOperand* index = UseTempRegister(instr->index()); |
| 2500 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2477 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
| 2501 LInstruction* result = DefineSameAsFirst(load); | 2478 LInstruction* result = DefineSameAsFirst(load); |
| 2502 return AssignPointerMap(result); | 2479 return AssignPointerMap(result); |
| 2503 } | 2480 } |
| 2504 | 2481 |
| 2505 } // namespace internal | 2482 } // namespace internal |
| 2506 } // namespace v8 | 2483 } // namespace v8 |
| OLD | NEW |