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 "v8.h" | 5 #include "v8.h" |
6 #include "lithium.h" | 6 #include "lithium.h" |
7 #include "scopes.h" | 7 #include "scopes.h" |
8 #include "serialize.h" | 8 #include "serialize.h" |
9 | 9 |
10 #if V8_TARGET_ARCH_IA32 | 10 #if V8_TARGET_ARCH_IA32 |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 zone()); | 502 zone()); |
503 int argument_index = *argument_index_accumulator; | 503 int argument_index = *argument_index_accumulator; |
504 | 504 |
505 // Store the environment description into the environment | 505 // Store the environment description into the environment |
506 // (with holes for nested objects) | 506 // (with holes for nested objects) |
507 for (int i = 0; i < hydrogen_env->length(); ++i) { | 507 for (int i = 0; i < hydrogen_env->length(); ++i) { |
508 if (hydrogen_env->is_special_index(i)) continue; | 508 if (hydrogen_env->is_special_index(i)) continue; |
509 | 509 |
510 LOperand* op; | 510 LOperand* op; |
511 HValue* value = hydrogen_env->values()->at(i); | 511 HValue* value = hydrogen_env->values()->at(i); |
512 CHECK(!value->IsPushArgument()); // Do not deopt outgoing arguments | 512 CHECK(!value->IsPushArguments()); // Do not deopt outgoing arguments |
513 if (value->IsArgumentsObject() || value->IsCapturedObject()) { | 513 if (value->IsArgumentsObject() || value->IsCapturedObject()) { |
514 op = LEnvironment::materialization_marker(); | 514 op = LEnvironment::materialization_marker(); |
515 } else { | 515 } else { |
516 op = UseAny(value); | 516 op = UseAny(value); |
517 } | 517 } |
518 result->AddValue(op, | 518 result->AddValue(op, |
519 value->representation(), | 519 value->representation(), |
520 value->CheckFlag(HInstruction::kUint32)); | 520 value->CheckFlag(HInstruction::kUint32)); |
521 } | 521 } |
522 | 522 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 result->AddNewObject(is_arguments ? length - 1 : length, is_arguments); | 583 result->AddNewObject(is_arguments ? length - 1 : length, is_arguments); |
584 } | 584 } |
585 // Store the captured object's fields into the environment | 585 // Store the captured object's fields into the environment |
586 for (int i = is_arguments ? 1 : 0; i < length; ++i) { | 586 for (int i = is_arguments ? 1 : 0; i < length; ++i) { |
587 LOperand* op; | 587 LOperand* op; |
588 HValue* arg_value = value->OperandAt(i); | 588 HValue* arg_value = value->OperandAt(i); |
589 if (arg_value->IsArgumentsObject() || arg_value->IsCapturedObject()) { | 589 if (arg_value->IsArgumentsObject() || arg_value->IsCapturedObject()) { |
590 // Insert a hole for nested objects | 590 // Insert a hole for nested objects |
591 op = LEnvironment::materialization_marker(); | 591 op = LEnvironment::materialization_marker(); |
592 } else { | 592 } else { |
593 ASSERT(!arg_value->IsPushArgument()); | 593 ASSERT(!arg_value->IsPushArguments()); |
594 // For ordinary values, tell the register allocator we need the value | 594 // For ordinary values, tell the register allocator we need the value |
595 // to be alive here | 595 // to be alive here |
596 op = UseAny(arg_value); | 596 op = UseAny(arg_value); |
597 } | 597 } |
598 result->AddValue(op, | 598 result->AddValue(op, |
599 arg_value->representation(), | 599 arg_value->representation(), |
600 arg_value->CheckFlag(HInstruction::kUint32)); | 600 arg_value->CheckFlag(HInstruction::kUint32)); |
601 } | 601 } |
602 // Recursively store all the nested captured objects into the environment | 602 // Recursively store all the nested captured objects into the environment |
603 for (int i = is_arguments ? 1 : 0; i < length; ++i) { | 603 for (int i = is_arguments ? 1 : 0; i < length; ++i) { |
(...skipping 14 matching lines...) Expand all Loading... |
618 | 618 |
619 | 619 |
620 LPhase::~LPhase() { | 620 LPhase::~LPhase() { |
621 if (ShouldProduceTraceOutput()) { | 621 if (ShouldProduceTraceOutput()) { |
622 isolate()->GetHTracer()->TraceLithium(name(), chunk_); | 622 isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
623 } | 623 } |
624 } | 624 } |
625 | 625 |
626 | 626 |
627 } } // namespace v8::internal | 627 } } // namespace v8::internal |
OLD | NEW |