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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
520 LEnvironment* LChunkBuilderBase::CreateEnvironment( | 520 LEnvironment* LChunkBuilderBase::CreateEnvironment( |
521 HEnvironment* hydrogen_env, int* argument_index_accumulator, | 521 HEnvironment* hydrogen_env, int* argument_index_accumulator, |
522 ZoneList<HValue*>* objects_to_materialize) { | 522 ZoneList<HValue*>* objects_to_materialize) { |
523 if (hydrogen_env == NULL) return NULL; | 523 if (hydrogen_env == NULL) return NULL; |
524 | 524 |
525 LEnvironment* outer = | 525 LEnvironment* outer = |
526 CreateEnvironment(hydrogen_env->outer(), argument_index_accumulator, | 526 CreateEnvironment(hydrogen_env->outer(), argument_index_accumulator, |
527 objects_to_materialize); | 527 objects_to_materialize); |
528 BailoutId ast_id = hydrogen_env->ast_id(); | 528 BailoutId ast_id = hydrogen_env->ast_id(); |
529 DCHECK(!ast_id.IsNone() || | 529 DCHECK(!ast_id.IsNone() || |
530 hydrogen_env->frame_type() != JS_FUNCTION); | 530 hydrogen_env->frame_type() != JS_FUNCTION); |
Michael Starzinger
2016/03/21 14:06:50
nit: I think this DCHECK can be made stronger ...
Igor Sheludko
2016/03/22 14:08:37
Done.
| |
531 | 531 |
532 if (hydrogen_env->frame_type() == TAIL_CALLER_FUNCTION) { | |
533 return new (zone()) | |
534 LEnvironment(hydrogen_env->closure(), hydrogen_env->frame_type(), | |
535 ast_id, 0, 0, 0, outer, hydrogen_env->entry(), zone()); | |
536 } | |
537 | |
532 int omitted_count = (hydrogen_env->frame_type() == JS_FUNCTION) | 538 int omitted_count = (hydrogen_env->frame_type() == JS_FUNCTION) |
533 ? 0 | 539 ? 0 |
534 : hydrogen_env->specials_count(); | 540 : hydrogen_env->specials_count(); |
535 | 541 |
536 int value_count = hydrogen_env->length() - omitted_count; | 542 int value_count = hydrogen_env->length() - omitted_count; |
537 LEnvironment* result = | 543 LEnvironment* result = |
538 new(zone()) LEnvironment(hydrogen_env->closure(), | 544 new(zone()) LEnvironment(hydrogen_env->closure(), |
539 hydrogen_env->frame_type(), | 545 hydrogen_env->frame_type(), |
540 ast_id, | 546 ast_id, |
541 hydrogen_env->parameter_count(), | 547 hydrogen_env->parameter_count(), |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
657 | 663 |
658 LPhase::~LPhase() { | 664 LPhase::~LPhase() { |
659 if (ShouldProduceTraceOutput()) { | 665 if (ShouldProduceTraceOutput()) { |
660 isolate()->GetHTracer()->TraceLithium(name(), chunk_); | 666 isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
661 } | 667 } |
662 } | 668 } |
663 | 669 |
664 | 670 |
665 } // namespace internal | 671 } // namespace internal |
666 } // namespace v8 | 672 } // namespace v8 |
OLD | NEW |