Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Side by Side Diff: src/crankshaft/lithium.cc

Issue 1782743003: [crankshaft] Support inlining of function calls in tail position (in ES6 sense). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@tco-crank-4
Patch Set: Other ports Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698