DescriptionInline zero argument array constructor.
patch from issue 54583003 (dependent code).
Zero arguments - very easy
1 argument - three special cases:
a) If length is a constant in valid array length range,
no need to check it at runtime.
b) respect DoNotInline feedback on the AllocationSite for
cases that the argument is not a smi or is an integer
with a length that should create a dictionary.
c) if kind feedback is non-holey, and length is non-constant,
we'd have to generate a lot of code to be correct.
Don't inline this case.
N arguments - one special case:
a) If a deopt ever occurs because an input argument isn't
compatible with the elements kind, then set the
DoNotInline flag.
BUG=
R=verwaest@chromium.org
Committed: https://code.google.com/p/v8/source/detail?r=17741
Patch Set 1 #Patch Set 2 : Now inline all array constructors up to 5 arguments #Patch Set 3 : Better code generation if array length is constant. #Patch Set 4 : Optimized single argument constructor. #Patch Set 5 : REBASE #Patch Set 6 : Even better codegen for 1 arg case, and refactoring. #
Total comments: 33
Patch Set 7 : Comment response, inline tracing, and making HForceRepresentation idef #
Total comments: 30
Patch Set 8 : Addressed feedback. #Patch Set 9 : REBASE #Patch Set 10 : Ports #Patch Set 11 : Improved arm generated code #Patch Set 12 : REBASE #Patch Set 13 : Added comment to CreateArrayDispatchOneArgument #
Messages
Total messages: 8 (0 generated)
|