| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/lithium-allocator-inl.h" | 7 #include "src/lithium-allocator-inl.h" |
| 8 #include "src/arm64/lithium-arm64.h" | 8 #include "src/arm64/lithium-arm64.h" |
| 9 #include "src/arm64/lithium-codegen-arm64.h" | 9 #include "src/arm64/lithium-codegen-arm64.h" |
| 10 #include "src/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 } | 266 } |
| 267 | 267 |
| 268 | 268 |
| 269 void LStoreContextSlot::PrintDataTo(StringStream* stream) { | 269 void LStoreContextSlot::PrintDataTo(StringStream* stream) { |
| 270 context()->PrintTo(stream); | 270 context()->PrintTo(stream); |
| 271 stream->Add("[%d] <- ", slot_index()); | 271 stream->Add("[%d] <- ", slot_index()); |
| 272 value()->PrintTo(stream); | 272 value()->PrintTo(stream); |
| 273 } | 273 } |
| 274 | 274 |
| 275 | 275 |
| 276 void LFillElements::PrintDataTo(StringStream* stream) { |
| 277 elements()->PrintTo(stream); |
| 278 stream->Add("["); |
| 279 from()->PrintTo(stream); |
| 280 stream->Add("-"); |
| 281 to()->PrintTo(stream); |
| 282 stream->Add("] <- "); |
| 283 value()->PrintTo(stream); |
| 284 } |
| 285 |
| 286 |
| 287 void LCopyElements::PrintDataTo(StringStream* stream) { |
| 288 dst()->PrintTo(stream); |
| 289 stream->Add("[0-"); |
| 290 length()->PrintTo(stream); |
| 291 stream->Add("] <- "); |
| 292 src()->PrintTo(stream); |
| 293 stream->Add("[0-"); |
| 294 length()->PrintTo(stream); |
| 295 stream->Add("]"); |
| 296 } |
| 297 |
| 298 |
| 276 void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) { | 299 void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) { |
| 277 object()->PrintTo(stream); | 300 object()->PrintTo(stream); |
| 278 stream->Add("["); | 301 stream->Add("["); |
| 279 key()->PrintTo(stream); | 302 key()->PrintTo(stream); |
| 280 stream->Add("] <- "); | 303 stream->Add("] <- "); |
| 281 value()->PrintTo(stream); | 304 value()->PrintTo(stream); |
| 282 } | 305 } |
| 283 | 306 |
| 284 | 307 |
| 285 void LStoreNamedField::PrintDataTo(StringStream* stream) { | 308 void LStoreNamedField::PrintDataTo(StringStream* stream) { |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 new(zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER, | 431 new(zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER, |
| 409 LUnallocated::USED_AT_START)); | 432 LUnallocated::USED_AT_START)); |
| 410 } | 433 } |
| 411 | 434 |
| 412 | 435 |
| 413 LOperand* LChunkBuilder::UseRegisterOrConstant(HValue* value) { | 436 LOperand* LChunkBuilder::UseRegisterOrConstant(HValue* value) { |
| 414 return value->IsConstant() ? UseConstant(value) : UseRegister(value); | 437 return value->IsConstant() ? UseConstant(value) : UseRegister(value); |
| 415 } | 438 } |
| 416 | 439 |
| 417 | 440 |
| 441 LOperand* LChunkBuilder::UseRegisterAndClobberOrConstant(HValue* value) { |
| 442 return value->IsConstant() |
| 443 ? UseConstant(value) |
| 444 : UseRegisterAndClobber(value); |
| 445 } |
| 446 |
| 447 |
| 418 LOperand* LChunkBuilder::UseRegisterOrConstantAtStart(HValue* value) { | 448 LOperand* LChunkBuilder::UseRegisterOrConstantAtStart(HValue* value) { |
| 419 return value->IsConstant() ? UseConstant(value) : UseRegisterAtStart(value); | 449 return value->IsConstant() ? UseConstant(value) : UseRegisterAtStart(value); |
| 420 } | 450 } |
| 421 | 451 |
| 422 | 452 |
| 423 LConstantOperand* LChunkBuilder::UseConstant(HValue* value) { | 453 LConstantOperand* LChunkBuilder::UseConstant(HValue* value) { |
| 424 return chunk_->DefineConstantOperand(HConstant::cast(value)); | 454 return chunk_->DefineConstantOperand(HConstant::cast(value)); |
| 425 } | 455 } |
| 426 | 456 |
| 427 | 457 |
| (...skipping 1877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2305 if (instr->RequiresHoleCheck()) { | 2335 if (instr->RequiresHoleCheck()) { |
| 2306 return AssignEnvironment(new(zone()) LStoreGlobalCell(value, | 2336 return AssignEnvironment(new(zone()) LStoreGlobalCell(value, |
| 2307 TempRegister(), | 2337 TempRegister(), |
| 2308 TempRegister())); | 2338 TempRegister())); |
| 2309 } else { | 2339 } else { |
| 2310 return new(zone()) LStoreGlobalCell(value, TempRegister(), NULL); | 2340 return new(zone()) LStoreGlobalCell(value, TempRegister(), NULL); |
| 2311 } | 2341 } |
| 2312 } | 2342 } |
| 2313 | 2343 |
| 2314 | 2344 |
| 2345 LInstruction* LChunkBuilder::DoFillElements(HFillElements* instr) { |
| 2346 LOperand* elements = UseRegister(instr->elements()); |
| 2347 LOperand* from = UseRegisterOrConstant(instr->from()); |
| 2348 LOperand* to = UseRegisterAndClobberOrConstant(instr->to()); |
| 2349 LOperand* value = UseRegister(instr->value()); |
| 2350 return new(zone()) LFillElements(elements, from, to, value); |
| 2351 } |
| 2352 |
| 2353 |
| 2354 LInstruction* LChunkBuilder::DoCopyElements(HCopyElements* instr) { |
| 2355 LOperand* src = UseRegister(instr->src()); |
| 2356 LOperand* dst = UseRegister(instr->dst()); |
| 2357 LOperand* length = UseRegisterAndClobber(instr->length()); |
| 2358 return new(zone()) LCopyElements(src, dst, length); |
| 2359 } |
| 2360 |
| 2361 |
| 2315 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { | 2362 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
| 2316 LOperand* key = UseRegisterOrConstant(instr->key()); | 2363 LOperand* key = UseRegisterOrConstant(instr->key()); |
| 2317 LOperand* temp = NULL; | 2364 LOperand* temp = NULL; |
| 2318 LOperand* elements = NULL; | 2365 LOperand* elements = NULL; |
| 2319 LOperand* val = NULL; | 2366 LOperand* val = NULL; |
| 2320 | 2367 |
| 2321 if (!instr->is_typed_elements() && | 2368 if (!instr->is_typed_elements() && |
| 2322 instr->value()->representation().IsTagged() && | 2369 instr->value()->representation().IsTagged() && |
| 2323 instr->NeedsWriteBarrier()) { | 2370 instr->NeedsWriteBarrier()) { |
| 2324 // RecordWrite() will clobber all registers. | 2371 // RecordWrite() will clobber all registers. |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2716 HAllocateBlockContext* instr) { | 2763 HAllocateBlockContext* instr) { |
| 2717 LOperand* context = UseFixed(instr->context(), cp); | 2764 LOperand* context = UseFixed(instr->context(), cp); |
| 2718 LOperand* function = UseRegisterAtStart(instr->function()); | 2765 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2719 LAllocateBlockContext* result = | 2766 LAllocateBlockContext* result = |
| 2720 new(zone()) LAllocateBlockContext(context, function); | 2767 new(zone()) LAllocateBlockContext(context, function); |
| 2721 return MarkAsCall(DefineFixed(result, cp), instr); | 2768 return MarkAsCall(DefineFixed(result, cp), instr); |
| 2722 } | 2769 } |
| 2723 | 2770 |
| 2724 | 2771 |
| 2725 } } // namespace v8::internal | 2772 } } // namespace v8::internal |
| OLD | NEW |