From: svenpanne Date: Thu, 30 Apr 2015 09:10:21 +0000 (-0700) Subject: Detect simple tail calls X-Git-Tag: upstream/4.7.83~2890 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4b122b7504ab458faa4132c338809b40147751bf;p=platform%2Fupstream%2Fv8.git Detect simple tail calls This CL contains the first steps towards tail call optimization: * Structurally detect tail calls during instruction selection, looking for special return/call combinations. * Added new architecture-specific instructions for tail calls which jump instead of call and take care of frame adjustment. * Moved some code around. Currently we restrict tail calls to callees which only use registers for arguments/return value and to call sites which are explicitly marked as being OK for tail calls. This excludes, among other things, call sites in sloppy JS functions and our IC machinery (both need in general to be able to access the caller's frame). All this is behind a flag --turbo-tail-calls, which is currently off by default, so it can easily be toggled. Review URL: https://codereview.chromium.org/1108563002 Cr-Commit-Position: refs/heads/master@{#28150} --- diff --git a/src/compiler.cc b/src/compiler.cc index ef27b81..0f7f36e 100644 --- a/src/compiler.cc +++ b/src/compiler.cc @@ -62,7 +62,7 @@ PARSE_INFO_GETTER(Handle