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/lithium.h" | 5 #include "src/crankshaft/lithium.h" |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 | 8 |
9 #if V8_TARGET_ARCH_IA32 | 9 #if V8_TARGET_ARCH_IA32 |
10 #include "src/crankshaft/ia32/lithium-ia32.h" // NOLINT | 10 #include "src/crankshaft/ia32/lithium-ia32.h" // NOLINT |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 info()->AbortOptimization(reason); | 501 info()->AbortOptimization(reason); |
502 status_ = ABORTED; | 502 status_ = ABORTED; |
503 } | 503 } |
504 | 504 |
505 | 505 |
506 void LChunkBuilderBase::Retry(BailoutReason reason) { | 506 void LChunkBuilderBase::Retry(BailoutReason reason) { |
507 info()->RetryOptimization(reason); | 507 info()->RetryOptimization(reason); |
508 status_ = ABORTED; | 508 status_ = ABORTED; |
509 } | 509 } |
510 | 510 |
| 511 LInstruction* LChunkBuilderBase::AssignEnvironment(LInstruction* instr, |
| 512 HEnvironment* hydrogen_env) { |
| 513 int argument_index_accumulator = 0; |
| 514 ZoneList<HValue*> objects_to_materialize(0, zone()); |
| 515 instr->set_environment(CreateEnvironment( |
| 516 hydrogen_env, &argument_index_accumulator, &objects_to_materialize)); |
| 517 return instr; |
| 518 } |
511 | 519 |
512 LEnvironment* LChunkBuilderBase::CreateEnvironment( | 520 LEnvironment* LChunkBuilderBase::CreateEnvironment( |
513 HEnvironment* hydrogen_env, int* argument_index_accumulator, | 521 HEnvironment* hydrogen_env, int* argument_index_accumulator, |
514 ZoneList<HValue*>* objects_to_materialize) { | 522 ZoneList<HValue*>* objects_to_materialize) { |
515 if (hydrogen_env == NULL) return NULL; | 523 if (hydrogen_env == NULL) return NULL; |
516 | 524 |
517 LEnvironment* outer = | 525 LEnvironment* outer = |
518 CreateEnvironment(hydrogen_env->outer(), argument_index_accumulator, | 526 CreateEnvironment(hydrogen_env->outer(), argument_index_accumulator, |
519 objects_to_materialize); | 527 objects_to_materialize); |
520 BailoutId ast_id = hydrogen_env->ast_id(); | 528 BailoutId ast_id = hydrogen_env->ast_id(); |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 | 657 |
650 LPhase::~LPhase() { | 658 LPhase::~LPhase() { |
651 if (ShouldProduceTraceOutput()) { | 659 if (ShouldProduceTraceOutput()) { |
652 isolate()->GetHTracer()->TraceLithium(name(), chunk_); | 660 isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
653 } | 661 } |
654 } | 662 } |
655 | 663 |
656 | 664 |
657 } // namespace internal | 665 } // namespace internal |
658 } // namespace v8 | 666 } // namespace v8 |
OLD | NEW |