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 } | |
519 | 511 |
520 LEnvironment* LChunkBuilderBase::CreateEnvironment( | 512 LEnvironment* LChunkBuilderBase::CreateEnvironment( |
521 HEnvironment* hydrogen_env, int* argument_index_accumulator, | 513 HEnvironment* hydrogen_env, int* argument_index_accumulator, |
522 ZoneList<HValue*>* objects_to_materialize) { | 514 ZoneList<HValue*>* objects_to_materialize) { |
523 if (hydrogen_env == NULL) return NULL; | 515 if (hydrogen_env == NULL) return NULL; |
524 | 516 |
525 LEnvironment* outer = | 517 LEnvironment* outer = |
526 CreateEnvironment(hydrogen_env->outer(), argument_index_accumulator, | 518 CreateEnvironment(hydrogen_env->outer(), argument_index_accumulator, |
527 objects_to_materialize); | 519 objects_to_materialize); |
528 BailoutId ast_id = hydrogen_env->ast_id(); | 520 BailoutId ast_id = hydrogen_env->ast_id(); |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 | 649 |
658 LPhase::~LPhase() { | 650 LPhase::~LPhase() { |
659 if (ShouldProduceTraceOutput()) { | 651 if (ShouldProduceTraceOutput()) { |
660 isolate()->GetHTracer()->TraceLithium(name(), chunk_); | 652 isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
661 } | 653 } |
662 } | 654 } |
663 | 655 |
664 | 656 |
665 } // namespace internal | 657 } // namespace internal |
666 } // namespace v8 | 658 } // namespace v8 |
OLD | NEW |