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

Unified Diff: src/crankshaft/lithium-codegen.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: ppc, s390 and x87 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
« no previous file with comments | « src/crankshaft/lithium.cc ('k') | src/crankshaft/mips/lithium-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/lithium-codegen.cc
diff --git a/src/crankshaft/lithium-codegen.cc b/src/crankshaft/lithium-codegen.cc
index ff4e78f6a7aab863bb206b0fe847f085549bf6b9..53fedcf1df1d9de4abdd3f19d5f35ed48381d2b3 100644
--- a/src/crankshaft/lithium-codegen.cc
+++ b/src/crankshaft/lithium-codegen.cc
@@ -240,8 +240,8 @@ void LCodeGenBase::WriteTranslationFrame(LEnvironment* environment,
break;
}
case JS_GETTER: {
- DCHECK(translation_size == 1);
- DCHECK(height == 0);
+ DCHECK_EQ(1, translation_size);
+ DCHECK_EQ(0, height);
int shared_id = DefineDeoptimizationLiteral(
environment->entry() ? environment->entry()->shared()
: info()->shared_info());
@@ -255,8 +255,8 @@ void LCodeGenBase::WriteTranslationFrame(LEnvironment* environment,
break;
}
case JS_SETTER: {
- DCHECK(translation_size == 2);
- DCHECK(height == 0);
+ DCHECK_EQ(2, translation_size);
+ DCHECK_EQ(0, height);
int shared_id = DefineDeoptimizationLiteral(
environment->entry() ? environment->entry()->shared()
: info()->shared_info());
@@ -269,6 +269,20 @@ void LCodeGenBase::WriteTranslationFrame(LEnvironment* environment,
}
break;
}
+ case TAIL_CALLER_FUNCTION: {
+ DCHECK_EQ(0, translation_size);
+ int shared_id = DefineDeoptimizationLiteral(
+ environment->entry() ? environment->entry()->shared()
+ : info()->shared_info());
+ translation->BeginTailCallerFrame(shared_id);
+ if (info()->closure().is_identical_to(environment->closure())) {
+ translation->StoreJSFrameFunction();
+ } else {
+ int closure_id = DefineDeoptimizationLiteral(environment->closure());
+ translation->StoreLiteral(closure_id);
+ }
+ break;
+ }
case ARGUMENTS_ADAPTOR: {
int shared_id = DefineDeoptimizationLiteral(
environment->entry() ? environment->entry()->shared()
« no previous file with comments | « src/crankshaft/lithium.cc ('k') | src/crankshaft/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698