Commit Graph

31530 Commits

Author SHA1 Message Date
clemensh
6fa656fde2 [wasm] Check for duplicate export names
Without this check, instantiation of the wasm module would fail on
DefineOwnProperty on the exports object for the duplicate export.
Now we detect this as validation error.

R=rossberg@chromium.org, titzer@chromium.org, ahaas@chromium.org

Review-Url: https://codereview.chromium.org/2065043002
Cr-Commit-Position: refs/heads/master@{#37038}
2016-06-16 12:19:04 +00:00
bmeurer
93e26314af [builtins] Introduce proper Float64Exp operator.
Import base::ieee754::exp() from FreeBSD msun and introduce a Float64Exp
TurboFan operator based on that, similar to what we do for Float64Log.
Rewrite Math.exp() as TurboFan builtin and use that operator to also
inline Math.exp() into optimized TurboFan functions.

BUG=v8:3266,v8:3468,v8:3493,v8:5086,v8:5108
R=mvstanton@chromium.org

Review-Url: https://codereview.chromium.org/2077533002
Cr-Commit-Position: refs/heads/master@{#37037}
2016-06-16 12:10:27 +00:00
clemensh
b16d51efa9 [wasm] Make reported "column number" 1-based
We report the byte offset as column number, but devtools assumes them
to be 1-based and subtracts one unconditionally before further
processing it. It's a bit unfortunate, but because of that we have to
just add 1 to the reported column number on the public StackTrace API.

R=ahaas@chromium.org, titzer@chromium.org
BUG=chromium:613110

Review-Url: https://codereview.chromium.org/2071563002
Cr-Commit-Position: refs/heads/master@{#37036}
2016-06-16 12:07:33 +00:00
mvstanton
d9bf520a22 [builtins] Introduce proper Float64Log2 and Float64Log10 operators.
BUG=v8:5095

Review-Url: https://codereview.chromium.org/2063693002
Cr-Commit-Position: refs/heads/master@{#37035}
2016-06-16 11:25:06 +00:00
ishell
76a5144354 [es8] Unstage syntactic tail calls.
BUG=v8:4915
LOG=Y

Review-Url: https://codereview.chromium.org/2072683002
Cr-Commit-Position: refs/heads/master@{#37034}
2016-06-16 11:22:11 +00:00
ishell
5fcd3eb8a3 [ic] LoadICState cleanup.
LoadICState was used to hold the TypeofMode flag which is relevant only for LoadGlobalIC.
This CL removes usage of this state from LoadIC and KeyedLoadIC and renames the state
class to LoadGlobalICState.

BUG=chromium:576312
LOG=Y

Review-Url: https://codereview.chromium.org/2065373003
Cr-Commit-Position: refs/heads/master@{#37033}
2016-06-16 11:22:10 +00:00
Michael Starzinger
424d4f3bd2 [d8] Make exception reporting more resilient.
This is a follow-up to a recent fix to make the exception reporting even
more resilient. The original regression test flushed out more issues on
different configurations.

TBR=yangguo@chromium.org
TEST=mjsunit/regress/regress-crbug-620253
BUG=chromium:620253
NOTREECHECKS=true

Review URL: https://codereview.chromium.org/2071783002 .

Cr-Commit-Position: refs/heads/master@{#37032}
2016-06-16 11:19:03 +00:00
mstarzinger
e55384b28e [d8] Make exception reporting more resilient.
This makes sure exception reporting done by the debug shell behaves
gracefully even near the stack limit. When line number determination
fails we just fallback to not printing source information.

R=yangguo@chromium.org
TEST=mjsunit/regress/regress-crbug-620253
BUG=chromium:620253

Review-Url: https://codereview.chromium.org/2069543007
Cr-Commit-Position: refs/heads/master@{#37031}
2016-06-16 10:14:08 +00:00
ishell
d6b3b7e61c [ic] Remove --new-load-global-ic switch.
BUG=chromium:576312
LOG=Y

Review-Url: https://codereview.chromium.org/2062343002
Cr-Commit-Position: refs/heads/master@{#37030}
2016-06-16 09:48:18 +00:00
bmeurer
47fb39e4de Revert of [turbofan] Properly handle dictionary maps in the prototype chain. (patchset #1 id:1 of https://codereview.chromium.org/2067423003/ )
Reason for revert:
As discussed offline with Toon, this is not the correct fix here.

Original issue's description:
> [turbofan] Properly handle dictionary maps in the prototype chain.
>
> Dictionary prototypes don't have stable maps, but still don't matter for
> element access. Generalized the JSNativeContextSpecialization a bit to
> handle everything that Crankshaft can handle in this regard.
>
> R=jarin@chromium.org
> BUG=chromium:616709
>
> Committed: https://crrev.com/1c7bdc7f6f4d9512f4982590bd949f265ee9c8c3
> Cr-Commit-Position: refs/heads/master@{#37019}

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

Review-Url: https://codereview.chromium.org/2076493002
Cr-Commit-Position: refs/heads/master@{#37029}
2016-06-16 09:17:35 +00:00
clemensh
175fc180b7 [wasm] Add functionality to decode a function offset table
This will be needed during debugging to know function boundaries within
the wasm module bytes, and to extract the bytes for a single function
to disassemble it.

R=titzer@chromium.org
BUG=chromium:613110

Review-Url: https://codereview.chromium.org/2055783002
Cr-Commit-Position: refs/heads/master@{#37028}
2016-06-16 08:46:00 +00:00
machenbach
acfff97cb7 [gn] Fix targets for x86 v8_target_arch
Those were wrongly translated from gyp with ia32. This should
land before renaming v8_target_arch to v8_target_cpu.

BUG=chromium:620527
NOTRY=true
TBR=vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/2065323004
Cr-Commit-Position: refs/heads/master@{#37027}
2016-06-16 08:06:54 +00:00
clemensh
12aa132d87 [wasm] Implement AST printing into an ostream
This will be used for disassembling individual wasm function for
showing them in devtools.
The PrintAst function now also optionally provides an offset table
mapping from byte offset to line and column in the generated text.

R=titzer@chromium.org, ahaas@chromium.org
BUG=chromium:613110

Review-Url: https://codereview.chromium.org/2050213002
Cr-Commit-Position: refs/heads/master@{#37026}
2016-06-16 07:49:48 +00:00
cbruni
13d08bc338 [tools] make ic-explorer deal with empty map records from --trace-ic
BUG=

Review-Url: https://codereview.chromium.org/2062323003
Cr-Commit-Position: refs/heads/master@{#37025}
2016-06-16 07:08:19 +00:00
jarin
a49c4b0a47 [turbofan] Type feedback for numeric comparisons.
Review-Url: https://codereview.chromium.org/2035383003
Cr-Commit-Position: refs/heads/master@{#37024}
2016-06-16 06:37:31 +00:00
bjaideep
b95de04412 PPC: [Heap] Fix comparing against new space top pointer
Port d6473f5c14

Original commit message:

    See bug description.

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

BUG=chromium:619382
LOG=N

Review-Url: https://codereview.chromium.org/2066603007
Cr-Commit-Position: refs/heads/master@{#37023}
2016-06-16 06:26:20 +00:00
bjaideep
3adefd712c PPC: use Cmpi to handle case when kMaxRegularHeapObjectSize > 16bits
R=joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2069363002
Cr-Commit-Position: refs/heads/master@{#37022}
2016-06-16 05:49:52 +00:00
bjaideep
aa2e6a73ae PPC: [wasm] Relocatable Globals.
Port 2d1f977c93

Original commit message:

    Support for relocatable globals, to facilitate compilation before
    instantiation.

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

BUG=v8:5072
LOG=N

Review-Url: https://codereview.chromium.org/2069163003
Cr-Commit-Position: refs/heads/master@{#37021}
2016-06-16 05:38:43 +00:00
bmeurer
daf462a61b [turbofan] Properly mark the Check/Checked operators are pure.
Those operators don't have JavaScript observable side effects and would
otherwise block load elimination and other optimizations.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2075443003
Cr-Commit-Position: refs/heads/master@{#37020}
2016-06-16 05:35:50 +00:00
bmeurer
1c7bdc7f6f [turbofan] Properly handle dictionary maps in the prototype chain.
Dictionary prototypes don't have stable maps, but still don't matter for
element access. Generalized the JSNativeContextSpecialization a bit to
handle everything that Crankshaft can handle in this regard.

R=jarin@chromium.org
BUG=chromium:616709

Review-Url: https://codereview.chromium.org/2067423003
Cr-Commit-Position: refs/heads/master@{#37019}
2016-06-16 05:27:20 +00:00
bmeurer
4d0768dc4b [turbofan] The Check and Checked operators don't produce control.
These operators don't need to be part of the control chain.

Drive-by-fix: Properly wire the effects during representation selection.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2073683002
Cr-Commit-Position: refs/heads/master@{#37018}
2016-06-16 05:21:47 +00:00
bbudge
886f6b33a7 [arm] BitcastF32U32 uses float registers.
LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2050563002
Cr-Commit-Position: refs/heads/master@{#37017}
2016-06-16 04:06:12 +00:00
v8-autoroll
7596b5c6b2 Update V8 DEPS.
Rolling v8/build to 76e9bd0241b00735b5bc402c926d7cb141a726ef

Rolling v8/buildtools to 3780bc523aad1d68a5bd00e05c453a80b2ba0b35

Rolling v8/tools/clang to 8b0c8f71a4d41c7d2cd0d898f3547e9984f79b5d

Rolling v8/tools/mb to bc05800a7cd7833ad7c2d1423cd8b2153470c9bd

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

Review-Url: https://codereview.chromium.org/2069333002
Cr-Commit-Position: refs/heads/master@{#37016}
2016-06-16 03:24:22 +00:00
gsathya
3624a5e110 Promises: Add regression test for promise resolution with proxy
BUG=v8:5004

Review-Url: https://codereview.chromium.org/2070213002
Cr-Commit-Position: refs/heads/master@{#37015}
2016-06-16 02:00:26 +00:00
jyan
c304d414d8 S390: [debugger] simplify debug stepping.
Port 3e2d60d853

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

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2069193003
Cr-Commit-Position: refs/heads/master@{#37014}
2016-06-15 19:01:08 +00:00
bbudge
70d83fbdd1 [Turbofan] Make operand canonicalization distinguish between FP types.
Review-Url: https://codereview.chromium.org/2054343002
Cr-Commit-Position: refs/heads/master@{#37013}
2016-06-15 18:52:27 +00:00
jyan
2dedf2154e S390: [turbofan] Prevent storing signalling NaNs into holey double arrays.
Port 6470ddadf9

Original commit message:

    This introduces SilenceNaN operator, which makes sure that we only
    store quiet NaNs into holey arrays. We omit the NaN silencing code
    at instruction selection time if the input is an operation that
    cannot possibly produce signalling NaNs.

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

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2070583002
Cr-Commit-Position: refs/heads/master@{#37012}
2016-06-15 16:49:33 +00:00
mtrofin
c5e3c9bf56 [wasm] Support for memory size relocation for asm-wasm.
Only Intel needed changes, arm and mips work as expected.

BUG=

Review-Url: https://codereview.chromium.org/2061833003
Cr-Commit-Position: refs/heads/master@{#37011}
2016-06-15 16:43:34 +00:00
mlippautz
5846acc240 [heap] Add inlined fast path for JSArrayBuffer (un)register in tracker
BUG=chromium:619491,chromium:611688
LOG=N
R=ulan@chromium.org

Review-Url: https://codereview.chromium.org/2065013002
Cr-Commit-Position: refs/heads/master@{#37010}
2016-06-15 16:43:33 +00:00
Michael Achenbach
6368b0d90b [mb] Whitespace change to test mb switch
Cr-Commit-Position: refs/heads/master@{#37009}
2016-06-15 16:06:59 +00:00
yangguo
533453f929 [snapshot] support multiple contexts in the same snapshot.
R=jochen@chromium.org, vogelheim@chromium.org
BUG=chromium:617892

Review-Url: https://codereview.chromium.org/2055203002
Cr-Commit-Position: refs/heads/master@{#37008}
2016-06-15 15:39:06 +00:00
bjaideep
85bef23774 PPC: [debugger] simplify debug stepping.
Port 3e2d60d853

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

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2065423002
Cr-Commit-Position: refs/heads/master@{#37007}
2016-06-15 13:47:11 +00:00
ishell
b6aa77d95f [ic] Enable new LoadGlobalIC machinery.
BUG=chromium:576312
LOG=Y

Review-Url: https://codereview.chromium.org/2066763004
Cr-Commit-Position: refs/heads/master@{#37006}
2016-06-15 13:32:53 +00:00
alph
9df23510ea Introduce JIT code events dispatcher for the isolate.
The patch introduces a dedicated dispatching class for JIT code events. It is
set as a helper on the isolate.
This allows classes across v8 to break their dependency on Logger and CpuProfiler.
These two became just regular clients of the dispatcher.

BUG=v8:4789

Review-Url: https://codereview.chromium.org/2061623002
Cr-Commit-Position: refs/heads/master@{#37005}
2016-06-15 13:24:26 +00:00
neis
6073a342f9 [interpreter] Teach register optimizer about SuspendGenerator.
When seeing a SuspendGenerator bytecode, the register optimizer must flush its
state.

R=oth@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2071443002
Cr-Commit-Position: refs/heads/master@{#37004}
2016-06-15 13:10:17 +00:00
bmeurer
2267ccb1bb [turbofan] Introduce a dedicated CheckBounds operator.
This CheckBounds simplified operator is similar to the HBoundsCheck in
Crankshaft, and is hooked up to the new type feedback support in the
SimplifiedLowering. We use it to check the index bounds for keyed
property accesses.

Note to perf sheriffs: This will tank quite a few benchmarks, as the
operator makes some redundant branch elimination ineffective for
certain patterns of keyed accesses. This does require more serious
redundancy elimination, which we will do in a separate CL. So ignore
any regressions from this CL, we know there will be a few.

R=jarin@chromium.org
BUG=v8:4470,v8:5100

Committed: https://crrev.com/85e5567dae66a918500ae94c5568221137a0f5d4
Review-Url: https://codereview.chromium.org/2035893004
Cr-Original-Commit-Position: refs/heads/master@{#36947}
Cr-Commit-Position: refs/heads/master@{#37003}
2016-06-15 13:07:22 +00:00
ishell
c170a4c4d5 [ic] LoadGlobalIC is now able to cache PropertyCells in the feedback vector.
The new approach is that instead of compiling custom handlers for
every global object's PropertyCell it uses single dispatcher that
caches PropertyCells in respective slot of the feedback vector.

Currently the new LoadGlobalIC machinery is disabled.

This CL also removes unused LoadGlobalViaContext* stuff.

BUG=chromium:576312
LOG=Y

Review-Url: https://codereview.chromium.org/2065113002
Cr-Commit-Position: refs/heads/master@{#37002}
2016-06-15 12:39:12 +00:00
bmeurer
502dd40c33 [turbofan] Introduce CheckHole and CheckHoleNaN operators.
These simplified operators are used to perform the hole checks when
loading elements from a holey array. Depending on the CheckHoleMode,
they either return the hole as undefined or some NaN, or deoptimize
if the value is the hole or the hole NaN.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2066223002
Cr-Commit-Position: refs/heads/master@{#37001}
2016-06-15 12:25:27 +00:00
caitpotter88
fd4d385b6d [liveedit]: fail to patch if target is outside of async function on stack
If an active generator is found on the stack (FUNCTION_BLOCKED_UNDER_GENERATOR),
and the target function is not found on top of that generator, add the error.

Based on test by wingo@igalia.com and littledan@chromium.org
(https://codereview.chromium.org/2035643003/)

LOG=N
BUG=v8:4483
R=yangguo@chromium.org, littledan@chromium.org

Review-Url: https://codereview.chromium.org/2058733002
Cr-Commit-Position: refs/heads/master@{#37000}
2016-06-15 12:25:26 +00:00
jarin
a5dd1c4631 [turbofan] Stage binop type feedback.
Review-Url: https://codereview.chromium.org/2059403003
Cr-Commit-Position: refs/heads/master@{#36999}
2016-06-15 12:14:07 +00:00
machenbach
a774fa5142 [gn] Fix config for icu data file and swarming
Fix after:
https://codereview.chromium.org/2042253002/
https://codereview.chromium.org/2049743002/

Using the data file is the default now and it shouldn't
be overridden in v8's build_overrides. Also the isolate
logic now needs to include the gni file specifying the
flag.

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

Review-Url: https://codereview.chromium.org/2062363002
Cr-Commit-Position: refs/heads/master@{#36998}
2016-06-15 11:59:57 +00:00
machenbach
6d96d19f1f Revert of Reland: Add a trace-event for each runtime-stats timer (CL 2052523002) (patchset #2 id:20001 of https://codereview.chromium.org/2063853002/ )
Reason for revert:
[Sheriff] Speculative revert for http://crbug.com/620279

Original issue's description:
> Reland: Add a trace-event for each runtime-stats timer (CL 2052523002)
>
> The trace-events will have a high overhead when turned on, but they are in a disabled-by-default category.
>
> As long as the off overhead is negligible, this CL allows us to understand the behavior of V8 rather than its performance at the moment.
>
> The original CL was failing the TSAN builder, the variable in question was intended to be accessed quickly with no guarantee.
> Switched to using an Atomic variable with no barrier read/write.
>
> BUG=v8:5089
>
> patch from issue 2052523002 at patchset 100001 (http://crrev.com/2052523002#ps100001)
>
> Committed: https://crrev.com/fd7080cbefc21f2f890b5db00d4eadf163e2cbbf
> Cr-Commit-Position: refs/heads/master@{#36973}

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

Review-Url: https://codereview.chromium.org/2068143002
Cr-Commit-Position: refs/heads/master@{#36997}
2016-06-15 11:45:37 +00:00
jarin
14a1a7edf4 [turbofan] Mark side-effect-free calls to string ops as kEliminatable.
Review-Url: https://codereview.chromium.org/2063373003
Cr-Commit-Position: refs/heads/master@{#36996}
2016-06-15 11:39:40 +00:00
mstarzinger
d21b50ad6a [test] Bump stack size of regression test.
This is to make sure the test in question does not run out of stack
space during bootstrapping on any configuration. Our fuzzers take the
test an run it against a broad spectrum of configuration. The new size
of 100 is used throughout our test suite as "the smallest" stack size.

R=jkummerow@chromium.org
TEST=mjsunit/regress/regress-1132
BUG=chromium:619744

Review-Url: https://codereview.chromium.org/2068993002
Cr-Commit-Position: refs/heads/master@{#36995}
2016-06-15 11:19:43 +00:00
bgeron
c6732a9fb1 [turbofan] node-marker.h: Fix an incorrect comment, and elaborate.
R=bmeurer@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2068463005
Cr-Commit-Position: refs/heads/master@{#36994}
2016-06-15 10:59:28 +00:00
alph
231ae291d3 Remove Isolate::cpu_profiler() usage in api.cc
Driveby: some surrounding code refactoring/cleanup.

BUG=v8:4789

Review-Url: https://codereview.chromium.org/2056253003
Cr-Commit-Position: refs/heads/master@{#36993}
2016-06-15 09:59:36 +00:00
mostynb
9d12ad0df0 include stdlib.h when using calloc
Small followup to https://codereview.chromium.org/2042253002

BUG=chromium:616033

Review-Url: https://codereview.chromium.org/2061163003
Cr-Commit-Position: refs/heads/master@{#36992}
2016-06-15 08:58:30 +00:00
yangguo
fc378ce19e Skip mjsunit/harmony/regexp-property-lu-ui for MSAN.
TBR=machenbach@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2068083002
Cr-Commit-Position: refs/heads/master@{#36991}
2016-06-15 08:25:21 +00:00
mlippautz
49b2320167 [heap] Add page evacuation mode for new->new
Adds an evacuation mode that allows moving pages within new space without
copying objects.

Basic idea:
a) Move page within new space
b) Sweep page to make iterable and process ArrayBuffers
c) Finish sweep till next scavenge

Threshold is currently 70% live bytes, i.e., the same threshold we use
to determine fragmented pages.

BUG=chromium:581412
LOG=N
CQ_EXTRA_TRYBOTS=tryserver.v8:v8_linux_arm64_gc_stress_dbg,v8_linux_gc_stress_dbg,v8_mac_gc_stress_dbg,v8_linux64_tsan_rel,v8_mac64_asan_rel

Review-Url: https://codereview.chromium.org/1957323003
Cr-Commit-Position: refs/heads/master@{#36990}
2016-06-15 08:19:43 +00:00
jarin
5921cfe4b1 Revert of [turbofan] Stage binop type feedback. (patchset #1 id:1 of https://codereview.chromium.org/2059403003/ )
Reason for revert:
Blows up on the waterfall.

Original issue's description:
> [turbofan] Stage binop type feedback.
>
> Committed: https://crrev.com/28fbec405548c43088cade1cd17d8407ca948a21
> Cr-Commit-Position: refs/heads/master@{#36988}

TBR=mvstanton@chromium.org,bmeurer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2066193002
Cr-Commit-Position: refs/heads/master@{#36989}
2016-06-15 07:24:01 +00:00