Make sure that --print-ast works even when the class expression has no
name.
This also updates the printer to print the properties of the class
literal.
BUG=v8:4138
LOG=N
R=rossberg
Review URL: https://codereview.chromium.org/1165613003
Cr-Commit-Position: refs/heads/master@{#28728}
This is basically a port of the majority of optimizations that are
applied to for-in in full codegen. But it is not done during graph
building, but instead during typed lowering, which way less adhoc than
what the other compilers do.
Review URL: https://codereview.chromium.org/1155313008
Cr-Commit-Position: refs/heads/master@{#28726}
Implements the strong mode proposal's restrictions on the behaviour of the
delete operator for strong objects.
Setting the strong bit is still wip, so this change will only affect those
objects that have the bit correctly set. The tests reflect this, and will be
expanded as more objects can be marked as strong.
Attempt 2, last version did not work with API.
BUG=v8:3956
LOG=N
Review URL: https://codereview.chromium.org/1156573002
Cr-Commit-Position: refs/heads/master@{#28724}
port 388e791df9 (r28672).
original commit message:
The list of inlined functions is used in exactly two places - for live
edit and to prevent code flushing for inlined functions - and those are
fine with SharedFunctionInfo and don't require a closure.
This is one additional step towards inlining based on SharedFunctionInfo
instead of JSFunction.
BUG=
Review URL: https://codereview.chromium.org/1143003003
Cr-Commit-Position: refs/heads/master@{#28719}
port 5450fc07ba (r18659)
original commit message:
Also adapt code generation to pass the slot to the
store/keyed-store ic. AST nodes ObjectLiteral, Assignment,
ForEach, Call and CountOperation now include one or more
feedback vector ic slot ids.
BUG=
Review URL: https://codereview.chromium.org/1155383003
Cr-Commit-Position: refs/heads/master@{#28718}
port 44e9810345 (r28644)
original commit message:
When we enter a method that needs access to the [[HomeObject]]
we allocate a local variable `.home_object` and assign it the
value from the [[HomeObject]] private symbol. Something along
the lines of:
method() {
var .home_object = %ThisFunction()[home_object_symbol];
...
}
BUG=
Review URL: https://codereview.chromium.org/1158543004
Cr-Commit-Position: refs/heads/master@{#28717}
port eca5b5d7ab (r28622).
original commit message:
* Hash code is now just done with a private own symbol instead of the hidden string, which predates symbols.
* In the long run we should do all hidden properties this way and get rid of the
hidden magic 0-length string with the zero hash code. The advantages include
less complexity and being able to do things from JS in a natural way.
* Initially, the performance of weak set regressed, because it's a little harder
to do the lookup in C++. Instead of heroics in C++ to make things faster I
moved some functionality into JS and got the performance back. JS is supposed to be good at looking up named properties on objects.
* This also changes hash codes of Smis so that they are always Smis.
Performance figures are in the comments to the code review. Summary: Most of js-perf-test/Collections is neutral. Set and Map with object keys are 40-50% better. WeakMap is -5% and WeakSet is +9%.
In the code review comments is a patch with an example of the heroics we could do in C++ to make lookup faster (I hope we don't have to do this. Instead of checking for the property, then doing a new
In a similar vein we could give the magic zero hash code to the hash code
symbol. Then when we look up the hash code we would sometimes see the table
with all the hidden properties. This dual use of the field for either the hash
code or the table with all hidden properties and the hash code is rather ugly,
and this CL gets rid of it. I'd be loath to bring it back. On the benchmarks quoted above it's slightly slower than moving the hash code lookup to JS like in this CL.
One worry is that the benchmark results above are more monomorphic than real
world code, so may be overstating the performance benefits of moving to JS. I
think this is part of a general issue we have with handling polymorphic code in
JS and any solutions there will benefit this solution, which boils down to
regular property access. Any improvement there will lift all boats.
BUG=
Review URL: https://codereview.chromium.org/1153963010
Cr-Commit-Position: refs/heads/master@{#28716}
port 32de677805 (r29615)
original commit message:
The reason is that this information will be needed to compute the number of
vector ic slots done at numbering time.
BUG=
Review URL: https://codereview.chromium.org/1165693002
Cr-Commit-Position: refs/heads/master@{#28715}
This introduces two new operators for loads of variables bound to
Variable::LOOKUP locations. Currently they all still lower to runtime
calls, but will allow optimization during typed lowering.
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/1155103004
Cr-Commit-Position: refs/heads/master@{#28713}
In a nutshell: The FILTER_KEY builtin is gone, and was replaced by a
simple runtime call to ForInFilter, which does everything and is even
cheaper (because FILTER_KEY used to call into the runtime anyway).
And ForInFilter returns either the name or undefined, which makes it
possible to remove the control flow construction from the AstGraphBuilder,
and thereby make both the initialization and the per-loop code of for-in
optimizable later (in typed lowering).
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/1160983004
Cr-Commit-Position: refs/heads/master@{#28711}
Use __ARM_ARCH_6ZK__ instead of __ARM_ARCH_6KZ__. The architecture is
technically called ARMv6KZ, but GCC has always called it 6ZK.
Clang defines __ARM_ARCH_6K__ for this target, and is unaffected.
BUG=v8:3978
LOG=N
Review URL: https://codereview.chromium.org/1145973004
Cr-Commit-Position: refs/heads/master@{#28709}
If we crash V8 due to out-of-memory then we print the last 3 GCs on
stdout as we crash. Also records the last 3 GCs on the stack so that
it will be part of the minidump.
R=hpayer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1159513003
Cr-Commit-Position: refs/heads/master@{#28704}
Moves alignment fill calculations into two static Heap methods.
Adds a Heap method to handle the complex case where filler is potentially needed before and after a heap object.
Makes DoubleAlignForDeserialization explicitly fill after an already
aligned object.
LOG=N
BUG=v8:4124
Committed: https://crrev.com/fcfb080eb9a637f0ae066bed4c45095e60df8a84
Cr-Commit-Position: refs/heads/master@{#28687}
Review URL: https://codereview.chromium.org/1150593003
Cr-Commit-Position: refs/heads/master@{#28702}
The point of this change is so that when emitting code for a call in
FullCodegen::VisitCall, the statement position is not associated to
any code that loads the function, but to the actual CallIC.
R=mvstanton@chromium.org
BUG=chromium:481896
LOG=N
Review URL: https://codereview.chromium.org/1157543004
Cr-Commit-Position: refs/heads/master@{#28701}
Implements the strong mode proposal's restrictions on changing a strong object's
writable, non-configurable property to non-writable.
Setting the strong bit is still wip, so this change will only affect those
objects that have the bit correctly set. The tests reflect this, and will be
expanded as more objects can be marked as strong.
BUG=v8:3956
LOG=N
Review URL: https://codereview.chromium.org/1142393003
Cr-Commit-Position: refs/heads/master@{#28698}
vmov immediate was always emitting movt for some immediates wether or
not the CPU supported ARMv7.
BUG=v8:4019
LOG=n
Review URL: https://codereview.chromium.org/1160093002
Cr-Commit-Position: refs/heads/master@{#28691}
Reason for revert:
Breaks mjsunit, webkit, mozilla, benchmarks.
TBR=hpayer@chromium.org
Original issue's description:
> Clean up aligned allocation code in preparation for SIMD alignments.
>
> Moves alignment fill calculations into two static Heap methods.
> Adds a Heap method to handle the complex case where filler is potentially needed before and after a heap object.
> Makes DoubleAlignForDeserialization explicitly fill after an already
> aligned object.
>
> LOG=N
> BUG=v8:4124
>
> Committed: https://crrev.com/fcfb080eb9a637f0ae066bed4c45095e60df8a84
> Cr-Commit-Position: refs/heads/master@{#28687}
TBR=hpayer@chromium.org,bmeurer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4124
Review URL: https://codereview.chromium.org/1159123002
Cr-Commit-Position: refs/heads/master@{#28688}
Moves alignment fill calculations into two static Heap methods.
Adds a Heap method to handle the complex case where filler is potentially needed before and after a heap object.
Makes DoubleAlignForDeserialization explicitly fill after an already
aligned object.
LOG=N
BUG=v8:4124
Review URL: https://codereview.chromium.org/1150593003
Cr-Commit-Position: refs/heads/master@{#28687}
This introduces a conservative prediction for each exception handler
whether it will locally catch an exception or re-throw it to outside
the code bondaries. It will allow for a more intuitive prediction of
whether an exception is considered "caught" or "uncaught".
R=bmeurer@chromium.org,yangguo@chromium.org
BUG=chromium:492522
LOG=N
Review URL: https://codereview.chromium.org/1158563008
Cr-Commit-Position: refs/heads/master@{#28681}