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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: src/crankshaft/lithium.cc
diff --git a/src/crankshaft/lithium.cc b/src/crankshaft/lithium.cc
index a1a73e4beb84042075fdf72be63a93ea8b170a06..12e1f5fe2473520366d5e446103fedbab4d8c19b 100644
--- a/src/crankshaft/lithium.cc
+++ b/src/crankshaft/lithium.cc
@@ -529,6 +529,12 @@ LEnvironment* LChunkBuilderBase::CreateEnvironment(
DCHECK(!ast_id.IsNone() ||
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.
+ if (hydrogen_env->frame_type() == TAIL_CALLER_FUNCTION) {
+ return new (zone())
+ LEnvironment(hydrogen_env->closure(), hydrogen_env->frame_type(),
+ ast_id, 0, 0, 0, outer, hydrogen_env->entry(), zone());
+ }
+
int omitted_count = (hydrogen_env->frame_type() == JS_FUNCTION)
? 0
: hydrogen_env->specials_count();

Powered by Google App Engine
This is Rietveld 408576698