Commit Graph

32180 Commits

Author SHA1 Message Date
ssanfilippo
9b9f885e99 Revert of Implement .eh_frame writer and disassembler. (patchset #72 id:2030001 of https://codereview.chromium.org/2023503002/ )
Reason for revert:
The STATIC_CONST_MEMBER_DEFINITION in eh-frame-writer-unittest.cc causes a compiler error on V8 Win64 - clang buildbot. Removing that bit should be sufficient.

Original issue's description:
> Implement .eh_frame writer and disassembler.
>
> Also, CodeGenerator::MakeCodeEpilogue now accepts an optional pointer
> to a EhFrameWriter and will attach unwinding information to the code
> object when passed one.
>
> BUG=v8:4899
> LOG=N
>
> Committed: https://crrev.com/27d810e63b744b5b3d9aa28ff21413247773e6c2
> Cr-Commit-Position: refs/heads/master@{#37683}

TBR=rmcilroy@chromium.org,jarin@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4899

Review-Url: https://codereview.chromium.org/2143033002
Cr-Commit-Position: refs/heads/master@{#37688}
2016-07-12 16:17:34 +00:00
epertoso
60c95d85ab [turbofan] Move TryCloneBranch in the EffectControlLinearizer pass.
When trying to clone a branch, the ControlFlowOptimizer gave up as soon as it found a Phi/EffectPhi node that could not be placed directly below the IfTrue or IfFalse control paths.

Moving the step in the EffectControlLinearizer phase, after the first schedule, works around the problem by looking at the successor blocks.

BUG=

Review-Url: https://codereview.chromium.org/2139593002
Cr-Commit-Position: refs/heads/master@{#37687}
2016-07-12 15:23:36 +00:00
neis
8f1f1cb1c7 Move catch prediction into frontend and make it aware of rethrows.
This solves an issue with throws inside for-of always being marked as caught.

BUG=v8:5183

Review-Url: https://codereview.chromium.org/2146493002
Cr-Commit-Position: refs/heads/master@{#37686}
2016-07-12 15:23:35 +00:00
hpayer
ea90556a2f [heap] Untangle Marking and friends from heap dependencies.
BUG=

Review-Url: https://codereview.chromium.org/2139133003
Cr-Commit-Position: refs/heads/master@{#37685}
2016-07-12 15:10:52 +00:00
bbudge
0ddd158b74 [Turbofan] Register-register swap for x64 can use movapd instruction.
LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2144613002
Cr-Commit-Position: refs/heads/master@{#37684}
2016-07-12 15:04:30 +00:00
ssanfilippo
27d810e63b Implement .eh_frame writer and disassembler.
Also, CodeGenerator::MakeCodeEpilogue now accepts an optional pointer
to a EhFrameWriter and will attach unwinding information to the code
object when passed one.

BUG=v8:4899
LOG=N

Review-Url: https://codereview.chromium.org/2023503002
Cr-Commit-Position: refs/heads/master@{#37683}
2016-07-12 15:04:29 +00:00
cbruni
d234118e29 Revert of making heap verification more aggressive (patchset #7 id:120001 of https://codereview.chromium.org/2126613002/ )
Reason for revert:
failing gc stress tests: https://build.chromium.org/p/client.v8/builders/V8%20Mac%20GC%20Stress/builds/7223/steps/Mjsunit/logs/stdio

Original issue's description:
> [runtime] making heap verification more aggressive
>
> - check that packed elements do not contain the_hole (with fix)
> - verify argument objects with elements kind
> - use JSObjectVerifiy in all JSObject "subclasses"
> - change initialization order for ArrayLiteralBoilerplate to simplify verification
>
> BUG=v8:5188
>
> Committed: https://crrev.com/599aa2e106ca8ab79f5cc489d1b93b6a26b19714
> Cr-Commit-Position: refs/heads/master@{#37680}

TBR=ishell@chromium.org,ulan@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5188

Review-Url: https://codereview.chromium.org/2140163002
Cr-Commit-Position: refs/heads/master@{#37682}
2016-07-12 14:07:17 +00:00
bmeurer
7ea8b9eca8 [turbofan] Remove some dead code from the EffectControlLinearizer.
The manual input trimming inside the EffectControlLinearizer is no
longer necessary, since we have to do explicit graph trimming before
running the MemoryOptimizer anyways these days.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2144603002
Cr-Commit-Position: refs/heads/master@{#37681}
2016-07-12 13:35:27 +00:00
cbruni
599aa2e106 [runtime] making heap verification more aggressive
- check that packed elements do not contain the_hole (with fix)
- verify argument objects with elements kind
- use JSObjectVerifiy in all JSObject "subclasses"
- change initialization order for ArrayLiteralBoilerplate to simplify verification

BUG=v8:5188

Review-Url: https://codereview.chromium.org/2126613002
Cr-Commit-Position: refs/heads/master@{#37680}
2016-07-12 13:32:03 +00:00
machenbach
c70dc6acd7 [gn] Add file needed for gn on mac to run
BUG=chromium:474921,chromium:626064

Review-Url: https://codereview.chromium.org/2134223003
Cr-Commit-Position: refs/heads/master@{#37679}
2016-07-12 13:22:24 +00:00
mstarzinger
6e38f4270a [test] Remove NaCl support from test runner harness.
R=machenbach@chromium.org

Review-Url: https://codereview.chromium.org/2141013002
Cr-Commit-Position: refs/heads/master@{#37678}
2016-07-12 13:18:49 +00:00
mstarzinger
88402eccc7 [turbofan] Re-enable tests no longer failing on ARM hardware.
R=machenbach@chromium.org

Review-Url: https://codereview.chromium.org/2141563002
Cr-Commit-Position: refs/heads/master@{#37677}
2016-07-12 12:44:11 +00:00
oth
b215c9e5b8 Address compilation warnings for android build.
LOG=N
BUG=

Review-Url: https://codereview.chromium.org/2135573002
Cr-Commit-Position: refs/heads/master@{#37676}
2016-07-12 11:21:56 +00:00
machenbach
1e978ec00a [gn] Let gyp/gn comparison be more verbose on error
The step fails on windows. This'll help investigating why.

BUG=chromium:474921
TBR=tandrii@chromium.org, vogelheim@chromium.org, jochen@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2141903002
Cr-Commit-Position: refs/heads/master@{#37675}
2016-07-12 11:18:40 +00:00
mstarzinger
570e88406f [interpreter] Widen set of applied binary op reductions.
This widens the set of binary operator reductions that are applied by
TurboFan when graphs are built from bytecode. By now we only insert
number conversions to inputs of integer binary ops (i.e. bitwise and
shifts), others no longer require a "before" frame state input.

R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2135973003
Cr-Commit-Position: refs/heads/master@{#37674}
2016-07-12 10:34:19 +00:00
jgruber
a0c7ab6306 Remove detailed from simple stack trace functionality
This is another point where we add inconsistent behavior between simple and
detailed stack traces. The functionality also does not seem to be used in
chrome anymore when uncaught exceptions are thrown.  Remove it to reduce
maintenance burden.

BUG=624285
R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2141523002
Cr-Commit-Position: refs/heads/master@{#37673}
2016-07-12 10:24:57 +00:00
bmeurer
b93cde3744 [turbofan] Allow non-speculative operators to consume feedback types.
Turn the retyping pass of SimplifiedLowering into a proper phase, and
make it possible to propagate feedback types through non-speculative
operators. This defers the output representation selection to the
retyping phase, and checks that we don't mess up.

As a first user, we consume input type feedback for NumberAbs as well.
Long-term we can add all other operators to the mix.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2139203002
Cr-Commit-Position: refs/heads/master@{#37672}
2016-07-12 10:09:07 +00:00
ahaas
b571026f26 [test] Change or replace unrepresentable number in the lists of float test values.
I removed or replaced some values in the list of float and double values
in value-helper.h which cannot be represented precisely as floats or
doubles, respectively.

R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2135243004
Cr-Commit-Position: refs/heads/master@{#37671}
2016-07-12 10:09:06 +00:00
mstarzinger
f3ca214222 [turbofan] Speed up structural graph verification.
This removes the checking for use-def and def-use chain links from the
graph verification. Presence of such links can only be violated by a bug
in the actual {Node} implementation itself. That container class is also
covered by unit tests.

The verification in question was useful in the early days when the graph
implementation itself was prone to bugs. By now it has stabilized and
spending O(n^2) time during graph verification is too wasteful to still
be considered a reasonable trade-off.

R=jarin@chromium.org
TEST=unittests/NodeTest.*

Review-Url: https://codereview.chromium.org/2140973003
Cr-Commit-Position: refs/heads/master@{#37670}
2016-07-12 09:31:12 +00:00
bmeurer
85969edead [turbofan] Unify BooleanToNumber, StringToNumber and PlainPrimitiveToNumber.
The PlainPrimitiveToNumber operator performs a superset of the operations
previously performed by the BooleanToNumber and StringToNumber operators,
so we can just use the special lowering rules for PlainPrimitiveToNumber
based on the input type and get rid of the specialized operators.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2139183002
Cr-Commit-Position: refs/heads/master@{#37669}
2016-07-12 09:15:11 +00:00
danno
e92e911814 [turbofan] Robustify tail parameter stack size computations
This CL separates the check whether something is tail-callable from
the computation of the size of the stack parameters that a function
takes.

In order to track this precisely, the stack parameter size calculation
uses the recently landed MachineType information that's embedded
in return and parameter value LinkageLocations.

Review-Url: https://codereview.chromium.org/2121753002
Cr-Commit-Position: refs/heads/master@{#37668}
2016-07-12 08:40:49 +00:00
machenbach
bbb61d8aea [gn] Experiment: Reset -O3 to -O2.
Temporary commit to see performance data. Will be reverted
shortly after.

BUG=chromium:622332
TBR=vogelheim, jochen
NOTRY=true

Review-Url: https://codereview.chromium.org/2135313002
Cr-Commit-Position: refs/heads/master@{#37667}
2016-07-12 08:37:30 +00:00
yangguo
02130bfb99 [debug] use handle list instead of fixed array for temporary storage.
R=jgruber@chromium.org

Review-Url: https://codereview.chromium.org/2139613002
Cr-Commit-Position: refs/heads/master@{#37666}
2016-07-12 07:44:05 +00:00
bmeurer
4e862dd964 [intrinsics] Remove obsolete intrinsics.
Remove obsolete definitions from macros.py, and drop the now obsolete
%_ToPrimitive, %_ToPrimitive_Number, %_ToPrimitive_String, %_ToName
and the %ToPrimitive_String intrinsics/runtime entries.

R=yangguo@chromium.org
BUG=v8:5049

Review-Url: https://codereview.chromium.org/2137203002
Cr-Commit-Position: refs/heads/master@{#37665}
2016-07-12 06:41:23 +00:00
yangguo
bbb2159d4c [regexp] Fix regexp source escaping with preceding backslashes.
R=franzih@chromium.org
BUG=chromium:515897

Review-Url: https://codereview.chromium.org/2137033002
Cr-Commit-Position: refs/heads/master@{#37664}
2016-07-12 05:36:17 +00:00
diaoyuanjie
64ff8f8daa [turbofan] Renamed tracing flags for TurboFan reducers and graph trimmer
Added trace printout for replacements in Turbofan reducers.
Renamed graph trimmer trace flag to avoid confusion.

Review-Url: https://codereview.chromium.org/2123283006
Cr-Commit-Position: refs/heads/master@{#37663}
2016-07-12 03:56:10 +00:00
v8-autoroll
491c36735a Update V8 DEPS.
Rolling v8/build to 3cd1ead0173f28d3aa6b28590495ae67340a3a5e

Rolling v8/third_party/icu to b5ecbb29a26532f72ef482569b223d5a51fd50bf

Rolling v8/tools/mb to 9a768a4d908ec89978a95e1c04c62336f5cfbcd2

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org

Review-Url: https://codereview.chromium.org/2144483002
Cr-Commit-Position: refs/heads/master@{#37662}
2016-07-12 03:27:53 +00:00
bbudge
3848099911 [Turbofan] Add support for 16 byte frame slots.
AllocateSpillSlot can now handle requests for 16 byte slots.

LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2139663002
Cr-Commit-Position: refs/heads/master@{#37661}
2016-07-12 03:27:52 +00:00
alph
69fd22da2a Make use of v8::TickSample instead of v8::internal::TickSample in logger.
BUG=v8:4789

Committed: https://crrev.com/c3a16f0a9f0976411ee25df627534be5f6955c32
Review-Url: https://codereview.chromium.org/2133533002
Cr-Original-Commit-Position: refs/heads/master@{#37618}
Cr-Commit-Position: refs/heads/master@{#37660}
2016-07-12 02:13:12 +00:00
bjaideep
0ac774095f PPC/s390: [builtins] Construct builtin frame in String/Number ctors
Port d49d3864d7

R=jgruber@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=v8:5173
LOG=N

Review-Url: https://codereview.chromium.org/2141723003
Cr-Commit-Position: refs/heads/master@{#37659}
2016-07-11 22:04:26 +00:00
diaoyuanjie
1d26ed290b [turbofan] Fixed segmentation fault while printing TurboFan node
Graph trimmer can set Input as null and subsequent
printing call could cause segmentation fault.

R=bmeurer@chromium.org, jarin@chromium.org

Review-Url: https://codereview.chromium.org/2134443002
Cr-Commit-Position: refs/heads/master@{#37658}
2016-07-11 20:43:00 +00:00
jochen
992e34c216 Don't compile functions in a context the caller doesn't have access to
Instead just return undefined

A side effect of this is that it's no longer possible to compile
functions in a detached context.

BUG=chromium:541703
R=verwaest@chromium.org,bmeurer@chromium.org
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng

Review-Url: https://codereview.chromium.org/2034083002
Cr-Commit-Position: refs/heads/master@{#37657}
2016-07-11 20:11:51 +00:00
jwolfe
b8668fa846 Recognize HTMLCloseComment after multiline comment
When the scanner finds a '-->', it's either part of an HTMLCloseComment
or a '--' followed by a '>'. Previously, only a preceding newline would
make it an HTMLCloseComment. Now, a preceding multiline comment also
makes it an HTMLCloseComment. The effect is that now the following is
not a SyntaxError:

x/*
*/-->this is now a comment

BUG=v8:5142
LOG=y

Review-Url: https://codereview.chromium.org/2119763003
Cr-Commit-Position: refs/heads/master@{#37656}
2016-07-11 20:05:24 +00:00
littledan
77cbe27689 Narrowly address async function stack overflow parsing case
This patch just checks for a stack overflow and returns failure
from the cases which Clusterfuzz found. However, there may be
more locations in the parser which need similar treatment.

R=caitpotter88@gmail.com,neis
BUG=v8:4483,chromium:624300

Review-Url: https://codereview.chromium.org/2135503002
Cr-Commit-Position: refs/heads/master@{#37655}
2016-07-11 19:33:43 +00:00
bbudge
56d013d481 [Turbofan] Support 128 bit moves/swaps for x64.
LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2139513002
Cr-Commit-Position: refs/heads/master@{#37654}
2016-07-11 18:21:50 +00:00
aseemgarg
8474f24450 [wasm] throw in case of assignment to module parameters
BUG=613928
R=bradnelson@chromium.org
TEST=regress-613928.js

Review-Url: https://codereview.chromium.org/2123283007
Cr-Commit-Position: refs/heads/master@{#37653}
2016-07-11 17:41:30 +00:00
bmeurer
42c296487e [turbofan] Remove dead code from SimplifiedLowering.
This is follow-up cleanup for the flags that are no longer used inside
SimplifiedLowering.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2132403002
Cr-Commit-Position: refs/heads/master@{#37652}
2016-07-11 16:04:52 +00:00
ishell
b030a6f59d [runtime] Follow-up fix for "Better encapsulation of dictionary objects handling in lookup iterator."
BUG=chromium:626715

Review-Url: https://codereview.chromium.org/2135253002
Cr-Commit-Position: refs/heads/master@{#37651}
2016-07-11 15:51:58 +00:00
bbudge
d8d75782fb [Turbofan] Change AlignSavedCalleeRegisterSlots to AlignFrame.
Clean up call sites.

LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2124983004
Cr-Commit-Position: refs/heads/master@{#37650}
2016-07-11 15:41:50 +00:00
bbudge
f797c4b889 [Simd128] Add CpuFeatures::SupportsSimd128 method.
All architectures return false for now.

LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2135573003
Cr-Commit-Position: refs/heads/master@{#37649}
2016-07-11 15:36:45 +00:00
hpayer
8551daee4d TestCodeFlushingIncrementalScavenge should not allocate on black pages.
BUG=

Review-Url: https://codereview.chromium.org/2138783002
Cr-Commit-Position: refs/heads/master@{#37648}
2016-07-11 15:20:05 +00:00
jochen
f592f2e516 Fix small typo in NewRemoteContext comment
R=verwaest@chromium.org,dcheng@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2137943003
Cr-Commit-Position: refs/heads/master@{#37647}
2016-07-11 14:32:48 +00:00
mstarzinger
136e60a7ce [turbofan] Remove eager frame state from comparisons.
This removes the frame state input representing the before-state from
nodes having any comparison operator. Lowering that inserts number
conversions of the inputs has to be disabled when deoptimization is
enabled, because the frame state layout is no longer known.

R=jarin@chromium.org
BUG=v8:5021

Review-Url: https://codereview.chromium.org/2134173002
Cr-Commit-Position: refs/heads/master@{#37646}
2016-07-11 14:25:42 +00:00
mstarzinger
ecfec3b039 [turbofan] Respect pretenuring of heap numbers.
This extends pretenuring decisions based on allocation sites to heap
numbers that are allocated as part of object literals. It ensures memory
locality of a bigger enclosure of the deep copy of an object literal.

R=bmeurer@chromium.org
TEST=cctest/test-heap/OptimizedPretenuringMixedInObjectProperties

Review-Url: https://codereview.chromium.org/2135933002
Cr-Commit-Position: refs/heads/master@{#37645}
2016-07-11 14:15:24 +00:00
jgruber
a991558719 [builtins] Show builtin frames in PrintStack()
Builtin frames can simply use the existing JavaScriptFrame::Print
method. Builtin exit frames need their own implementation which can print
the function name, receiver and parameters.

R=bmeurer@chromium.org, yangguo@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2134093002
Cr-Commit-Position: refs/heads/master@{#37644}
2016-07-11 13:28:59 +00:00
bmeurer
41b882573e [turbofan] CheckBounds with Unsigned32 inputs is also supported.
If the first input to CheckBounds is already an Unsigned32, then
we can just truncate both inputs to word32 and lower the bounds
check.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2138753002
Cr-Commit-Position: refs/heads/master@{#37643}
2016-07-11 13:16:20 +00:00
titzer
9be74f6687 [wasm] Add a BytecodeIterator and use in non-performance-critical situations.
R=ahaas@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2135693002
Cr-Commit-Position: refs/heads/master@{#37642}
2016-07-11 13:00:27 +00:00
titzer
85fac49992 [turbofan] Remove unnecessary code at end of every TurboFan function.
R=jarin@chromium.org, mstarzinger@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2132393002
Cr-Commit-Position: refs/heads/master@{#37641}
2016-07-11 12:41:31 +00:00
peterssen
e28b16265a Fix FastAccessorAssembler inverted jump conditions
BUG=chromium:508898

Review-Url: https://codereview.chromium.org/2135153002
Cr-Commit-Position: refs/heads/master@{#37640}
2016-07-11 12:38:17 +00:00
bmeurer
897b6f789d [turbofan] Always run type propagation in SimplifiedLowering.
This unifies phases in SimplifiedLowering, and will enable
more optimizations, i.e. we can do the output representation
during typing then, which in turn should allow us to use the
feedback type even in unchecked operators (i.e. NumberAbs).

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2137003002
Cr-Commit-Position: refs/heads/master@{#37639}
2016-07-11 12:10:07 +00:00