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

Issue 9265004: Support inlining at call-sites with mismatched number of arguments. (Closed)

Created:
8 years, 11 months ago by Vyacheslav Egorov (Chromium)
Modified:
8 years, 11 months ago
CC:
v8-dev
Visibility:
Public.

Description

Support inlining at call-sites with mismatched number of arguments. Committed: https://code.google.com/p/v8/source/detail?r=10483

Patch Set 1 #

Total comments: 2

Patch Set 2 : finished implementation, extended tests, ported to x64&arm #

Total comments: 19
Unified diffs Side-by-side diffs Delta from patch set Stats (+1213 lines, -448 lines) Patch
M src/accessors.cc View 1 3 chunks +8 lines, -6 lines 0 comments Download
M src/arm/builtins-arm.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/arm/deoptimizer-arm.cc View 1 5 chunks +118 lines, -8 lines 10 comments Download
M src/arm/frames-arm.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M src/arm/lithium-arm.cc View 1 4 chunks +11 lines, -3 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 1 2 chunks +10 lines, -2 lines 0 comments Download
M src/deoptimizer.h View 1 17 chunks +48 lines, -15 lines 2 comments Download
M src/deoptimizer.cc View 1 25 chunks +221 lines, -89 lines 1 comment Download
M src/frames.cc View 1 4 chunks +14 lines, -11 lines 0 comments Download
M src/heap.h View 1 3 chunks +7 lines, -1 line 0 comments Download
M src/hydrogen.h View 1 4 chunks +17 lines, -0 lines 0 comments Download
M src/hydrogen.cc View 1 15 chunks +57 lines, -19 lines 0 comments Download
M src/hydrogen-instructions.h View 1 3 chunks +4 lines, -0 lines 0 comments Download
M src/ia32/builtins-ia32.cc View 2 chunks +2 lines, -1 line 0 comments Download
M src/ia32/deoptimizer-ia32.cc View 1 5 chunks +118 lines, -9 lines 4 comments Download
M src/ia32/frames-ia32.h View 1 2 chunks +2 lines, -2 lines 2 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 2 chunks +10 lines, -2 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 1 4 chunks +11 lines, -3 lines 0 comments Download
M src/lithium.h View 2 chunks +5 lines, -0 lines 0 comments Download
M src/objects.cc View 1 3 chunks +12 lines, -3 lines 0 comments Download
M src/runtime.cc View 1 30 chunks +68 lines, -56 lines 0 comments Download
M src/x64/builtins-x64.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/x64/deoptimizer-x64.cc View 1 5 chunks +123 lines, -9 lines 0 comments Download
M src/x64/frames-x64.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 2 chunks +10 lines, -2 lines 0 comments Download
M src/x64/lithium-x64.cc View 1 4 chunks +11 lines, -3 lines 0 comments Download
A + test/mjsunit/compiler/inline-arity-mismatch.js View 1 2 chunks +23 lines, -43 lines 0 comments Download
M test/mjsunit/compiler/regress-funarguments.js View 1 4 chunks +12 lines, -8 lines 0 comments Download
M test/mjsunit/debug-evaluate-locals-optimized.js View 1 4 chunks +97 lines, -63 lines 0 comments Download
M test/mjsunit/debug-evaluate-locals-optimized-double.js View 1 4 chunks +108 lines, -65 lines 0 comments Download
M test/mjsunit/regress/regress-1229.js View 1 2 chunks +80 lines, -23 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Kevin Millikin (Chromium)
This approach seems straightforward. https://chromiumcodereview.appspot.com/9265004/diff/1/src/hydrogen-instructions.h File src/hydrogen-instructions.h (right): https://chromiumcodereview.appspot.com/9265004/diff/1/src/hydrogen-instructions.h#newcode1315 src/hydrogen-instructions.h:1315: int arguments, Make it sound ...
8 years, 11 months ago (2012-01-19 10:26:34 UTC) #1
Vyacheslav Egorov (Chromium)
Hi Kevin, The change is fully ready for your review. (it was rebased so difference ...
8 years, 11 months ago (2012-01-23 19:49:34 UTC) #2
Kevin Millikin (Chromium)
Hairy. LGTM. https://chromiumcodereview.appspot.com/9265004/diff/4001/src/arm/deoptimizer-arm.cc File src/arm/deoptimizer-arm.cc (right): https://chromiumcodereview.appspot.com/9265004/diff/4001/src/arm/deoptimizer-arm.cc#newcode373 src/arm/deoptimizer-arm.cc:373: // The top address for the bottommost ...
8 years, 11 months ago (2012-01-24 00:08:54 UTC) #3
Vyacheslav Egorov (Chromium)
8 years, 11 months ago (2012-01-24 08:49:20 UTC) #4
Thanks for the review. Landed.

https://chromiumcodereview.appspot.com/9265004/diff/4001/src/arm/deoptimizer-...
File src/arm/deoptimizer-arm.cc (right):

https://chromiumcodereview.appspot.com/9265004/diff/4001/src/arm/deoptimizer-...
src/arm/deoptimizer-arm.cc:373: // The top address for the bottommost output
frame can be computed from
On 2012/01/24 00:08:54, Kevin Millikin wrote:
> The first half of this comment can be dropped.  Suggest:
> 
> "The top address of the frame is computed from the previous frame's top and
this
> frame's size." 

Done.

https://chromiumcodereview.appspot.com/9265004/diff/4001/src/arm/deoptimizer-...
src/arm/deoptimizer-arm.cc:391: // Compute caller's PC
On 2012/01/24 00:08:54, Kevin Millikin wrote:
> Read caller's PC from the previous frame.

Done.

https://chromiumcodereview.appspot.com/9265004/diff/4001/src/arm/deoptimizer-...
src/arm/deoptimizer-arm.cc:401: // Compute caller's FP
On 2012/01/24 00:08:54, Kevin Millikin wrote:
> Read caller's FP from the previous frame, and set this frame's FP.

Done.

https://chromiumcodereview.appspot.com/9265004/diff/4001/src/arm/deoptimizer-...
src/arm/deoptimizer-arm.cc:413: // For the bottommost output frame the context
can be gotten from the input
On 2012/01/24 00:08:54, Kevin Millikin wrote:
> Comment is just wrong:
> 
> "A marker value is used in place of the context."

Done.

https://chromiumcodereview.appspot.com/9265004/diff/4001/src/arm/deoptimizer-...
src/arm/deoptimizer-arm.cc:436: // Number of incomming arguments.
On 2012/01/24 00:08:54, Kevin Millikin wrote:
> incomming => incoming

Done.

https://chromiumcodereview.appspot.com/9265004/diff/4001/src/deoptimizer.h
File src/deoptimizer.h (right):

https://chromiumcodereview.appspot.com/9265004/diff/4001/src/deoptimizer.h#ne...
src/deoptimizer.h:439: StackFrame::Type GetType() const { return type_; }
On 2012/01/24 00:08:54, Kevin Millikin wrote:
> Type and Kind are too generic (kind was before).   Suggest
> GetFrameType/SetFrameType and GetCodeKind/SetCodeKind.

Done.

https://chromiumcodereview.appspot.com/9265004/diff/4001/src/ia32/deoptimizer...
File src/ia32/deoptimizer-ia32.cc (right):

https://chromiumcodereview.appspot.com/9265004/diff/4001/src/ia32/deoptimizer...
src/ia32/deoptimizer-ia32.cc:442: void
Deoptimizer::DoComputeArgumentsAdaptorFrame(TranslationIterator* iterator,
On 2012/01/24 00:08:54, Kevin Millikin wrote:
> My suggestions about the comments in the ARM version mostly apply here as
well.

Done.

https://chromiumcodereview.appspot.com/9265004/diff/4001/src/ia32/deoptimizer...
src/ia32/deoptimizer-ia32.cc:451: unsigned fixed_frame_size = 5 * kPointerSize;
On 2012/01/24 00:08:54, Kevin Millikin wrote:
> You could compute this as
> 
> StandardFrameConstants::kFixedFrameSize + kPointerSize
> 
> (with a comment that the extra pointer is the arg count (?)).  Or better, add
a
> named constant to ArgumentsAdaptorFrameConstants.

Done.

https://chromiumcodereview.appspot.com/9265004/diff/4001/src/ia32/frames-ia32.h
File src/ia32/frames-ia32.h (right):

https://chromiumcodereview.appspot.com/9265004/diff/4001/src/ia32/frames-ia32...
src/ia32/frames-ia32.h:100: static const int kFixedFrameSize    =  4;
On 2012/01/24 00:08:54, Kevin Millikin wrote:
> Currently unused, nice.  Maybe a comment is needed here that we're counting
the
> marker, context, caller fp, and caller pc as the fixed fields.

Done.

Powered by Google App Engine
This is Rietveld 408576698