port 35c28ce0a7 (r29758).
original commit message:
Prior to this patch, we enter a global debug mode whenever a break point
is set. By entering this mode, all code is deoptimized and activated
frames are recompiled and redirected to newly compiled debug code.
After this patch, we only deoptimize/redirect for functions we want to
debug. Trigger for this is Debug::EnsureDebugInfo, and having DebugInfo
object attached to the SFI prevents optimization/inlining.
The result is that we can have optimized code for functions without break
points alongside functions that do have break points, which are not
optimized.
BUG=
Review URL: https://codereview.chromium.org/1249503002
Cr-Commit-Position: refs/heads/master@{#29765}
Port 35c28ce0a7
Original commit message:
Prior to this patch, we enter a global debug mode whenever a break point
is set. By entering this mode, all code is deoptimized and activated
frames are recompiled and redirected to newly compiled debug code.
After this patch, we only deoptimize/redirect for functions we want to
debug. Trigger for this is Debug::EnsureDebugInfo, and having DebugInfo
object attached to the SFI prevents optimization/inlining.
The result is that we can have optimized code for functions without break
points alongside functions that do have break points, which are not
optimized.
R=yangguo@chromium.org, dstence@us.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:4132
LOG=N
Review URL: https://codereview.chromium.org/1244823002
Cr-Commit-Position: refs/heads/master@{#29764}
In many cases, the context that TurboFan's ASTGraphBuilder or subsequent
reduction operations attaches to nodes does not need to be that exact
context, but rather only needs to be one with the same native context,
because it is used internally only to fetch the native context, e.g. for
creating and throwing exceptions.
This reducer recognizes common cases where the context that is specified
for a node can be relaxed to a canonical, less specific one. This
relaxed context can either be the enclosing function's context or a specific
Module or Script context that is explicitly created within the function.
This optimization is especially important for TurboFan-generated code stubs
which use context specialization and inlining to generate optimal code.
Without context relaxation, many extraneous moves are generated to pass
exactly the right context to internal functions like ToNumber and
AllocateHeapNumber, which only need the native context. By turning context
relaxation on, these moves disappear because all these common internal
context uses are unified to the context passed into the stub function, which
is typically already in the correct context register and remains there for
short stubs. It also eliminates the explicit use of a specialized context
constant in the code stub in these cases, which could cause memory leaks.
Review URL: https://codereview.chromium.org/1244583003
Cr-Commit-Position: refs/heads/master@{#29763}
Note that this just narrows the existing workaround for any 'this' in
derived constructors (having a temporal dead zone) so that we can still
recognize static cases correctly (i.e. when 'this' is provably outside
or inside the temporal dead zone).
R=rossberg@chromium.org
Review URL: https://codereview.chromium.org/1245653002
Cr-Commit-Position: refs/heads/master@{#29762}
This will be used to compute the base pointer of the new unified
representation for both on-heap and external typed arrays. The idea is
that either the external or the tagged pointer is 0 (although in
practice, if the tagged pointer is non-0, the external pointer will
contain the offset from the start of the on-heap typed array to the data
in the on-heap typed array).
The HAdd is marked as depending on new-space promotion, as the tagged
pointer might move during GC, and so the result of the addition needs to
be recomputed.
BUG=v8:3996
R=jarin@chromium.org
LOG=n
Review URL: https://codereview.chromium.org/1244693002
Cr-Commit-Position: refs/heads/master@{#29760}
Prior to this patch, we enter a global debug mode whenever a break point
is set. By entering this mode, all code is deoptimized and activated
frames are recompiled and redirected to newly compiled debug code.
After this patch, we only deoptimize/redirect for functions we want to
debug. Trigger for this is Debug::EnsureDebugInfo, and having DebugInfo
object attached to the SFI prevents optimization/inlining.
The result is that we can have optimized code for functions without break
points alongside functions that do have break points, which are not
optimized.
R=mstarzinger@chromium.org, ulan@chromium.org
BUG=v8:4132
LOG=Y
Review URL: https://codereview.chromium.org/1233073005
Cr-Commit-Position: refs/heads/master@{#29758}
This enables --noflush-optimized-code-cache which allows preserving
entries in the optimized code map accross GCs. This only applies to
values being reachable through other paths.
R=hpayer@chromium.org,hablich@chromium.org
Review URL: https://codereview.chromium.org/1217863006
Cr-Commit-Position: refs/heads/master@{#29755}
This adds the implicit function variable for a function literal to the
declarations list in scope analysis, instead of specially handling it
throughout all back-ends.
R=rossberg@chromium.org
Review URL: https://codereview.chromium.org/1245603003
Cr-Commit-Position: refs/heads/master@{#29754}
This implements the missing %DefaultConstructorCallSuper runtime
functionality, thereby allowing all compilers to fall-back to that
implementation when the appropriate intrinsic is missing.
R=rossberg@chromium.org
Review URL: https://codereview.chromium.org/1240993002
Cr-Commit-Position: refs/heads/master@{#29753}
We should not install the SIMD object on the global object unless
support for SIMD is actually turned on by the flag. Otherwise calling
SIMD.Float32x4() will hit unreachable code. We accidentally SIMD.
R=rossberg@chromium.org
Review URL: https://codereview.chromium.org/1240223002
Cr-Commit-Position: refs/heads/master@{#29749}
This removes a dependency on the size of the pool. Whilst the size is
checked in debug mode, it is still more robust to use a label.
This should also be cherry-picked to fix 4.4.63.20. (At that time, the
size of the pool was _not_ checked, and was sometimes wrong.)
This partially reverts 879550c, "[arm] Don't call branch_offset within
CheckConstPool." However, branch_offset now only blocks the constant
pool if it is not already blocked.
BUG=
Review URL: https://codereview.chromium.org/1227403006
Cr-Commit-Position: refs/heads/master@{#29746}
NumberFormat previously just used a min of 0 digits after the decimal and a max of 3. This CL changes it so that we use the ICU currency data, and set the min and max to the number of numbers after the decimal point for each currency.
This CL also fixes a small bug where if the minimum fraction digits is above 3 but the maximum fraction digits isn't set, then it returns with only three numbers after the decimal point.
BUG=435465,473104,304722
LOG=Y
Review URL: https://codereview.chromium.org/1231613006
Cr-Commit-Position: refs/heads/master@{#29734}
port 3285e3bf07 (r29719).
original commit message:
Additionally, push the allocation site or undefined independently of creatin
BUG=
Review URL: https://codereview.chromium.org/1229023003
Cr-Commit-Position: refs/heads/master@{#29723}
Additionally, push the allocation site or undefined independently of creating a memento to preserve a fixed size for the construct frames.
BUG=
Review URL: https://codereview.chromium.org/1239593003
Cr-Commit-Position: refs/heads/master@{#29719}
Rolling v8/buildtools to 125d157607de4d7c95bf8b02dd580aae17962f19
Rolling v8/third_party/android_tools to 2abd22b08cd757f88362f44b02484de43e4b9611
Rolling v8/third_party/icu to ffeeae138703e692f07d2c438203f32b84e7a094
Rolling v8/tools/clang to f729011d84762dfae62bbf4218580367dbfc7451
TBR=machenbach@chromium.org
Review URL: https://codereview.chromium.org/1238783004
Cr-Commit-Position: refs/heads/master@{#29718}
- Test that TypedArray properties cannot be set in strict mode
Properties like %TypedArray%.prototype.length have a getter and no
setter. This test verifies that property, which was apparently not
true in the past or had no test ensuring throwing in this case.
- Test that TypedArray integer indexed properties (array elements)
are not configurable
Both of these have passed for some time, but there are open bugs against
them and apparently no tests verifying that they are fixed.
BUG=v8:3048, v8:3799
LOG=N
R=adamk
Review URL: https://codereview.chromium.org/1232843005
Cr-Commit-Position: refs/heads/master@{#29717}
This is a change from ES5 to ES6: When reversing an array, first it is checked
whether the element exists, before the element is looked up. The order in ES6
is
[[HasElement]] lower
[[Get]] lower (if present)
[[HasElement]] upper
[[Get]] upper (if present)
In ES5, on the other hand, the order was
[[Get]] lower
[[Get]] upper
[[HasElement]] lower
[[HasElement]] upper
To mitigate the performance impact, this patch implements a new, third copy
of reversing arrays if %_HasPackedElements. This allows us to skip all
membership tests, and a quick and dirty benchmark shows that the new version
is faster:
Over 4 runs, the slowest for the new version:
d8> var start = Date.now(); for (var i = 0; i < 100000000; i++) [1, 2, 3, 4, 5].reverse(); Date.now() - start
4658
Over 3 runs, the fastest for the old version:
d8> var start = Date.now(); for (var i = 0; i < 100000000; i++) [1, 2, 3, 4, 5].reverse(); Date.now() - start
5176
BUG=v8:4223
R=adamk
LOG=Y
Review URL: https://codereview.chromium.org/1238593003
Cr-Commit-Position: refs/heads/master@{#29716}