Commit Graph

31806 Commits

Author SHA1 Message Date
bmeurer
7ceed92ac0 [builtins] Introduce proper Float64Log1p operator.
Import base::ieee754::log1p() from fdlibm and introduce a Float64Log1p
TurboFan operator based on that, similar to what we do for Float64Log.
Rewrite Math.log1p() as TurboFan builtin and use that operator to also
inline Math.log1p() into optimized TurboFan functions.

Also unify the handling of the special IEEE 754 functions somewhat in
the TurboFan backends. At some point we can hopefully express this
completely in the InstructionSelector (once we have an idea what to do
with the ST(0) return issue on IA-32/X87).

Drive-by-fix: Add some more test coverage for the log function.

R=yangguo@chromium.org
BUG=v8:5086,v8:5092

Review-Url: https://codereview.chromium.org/2060743002
Cr-Commit-Position: refs/heads/master@{#36914}
2016-06-13 05:48:02 +00:00
bmeurer
b01622c312 [ieee754] Import ANSIfied msun log from FreeBSD.
Instead of manually adopting the ancient fdlibm sources, import the msun
versions from FreeBSD instead, which were already adopted to ANSI C.
Still under the same copyright.

R=yangguo@chromium.org
BUG=v8:5065,v8:5086

Review-Url: https://codereview.chromium.org/2065473002
Cr-Commit-Position: refs/heads/master@{#36913}
2016-06-13 04:38:18 +00:00
mtrofin
8e1ccba3b0 [turbofan] Retiring Greedy Allocator
We were able to achieve our goals for register allocation independent of
the allocation algorithm. Performance data so far is inconclusive re. the
value of the Greedy algorithm, compared to the particular Linear Scan
implementation we're currently using, and the performance measurement
techniques we currently use are too imprecise to help with this matter.

Retiring the algorithm to lower maintenance and evolution cost (e.g. lower
cost of adding aliasing support). Once we improve benchmarking stability,
and establish a suite sensitive enough for codegen improvement studies,
we may revive the algorithm, should the need arise.

BUG=

Review-Url: https://codereview.chromium.org/2060673002
Cr-Commit-Position: refs/heads/master@{#36912}
2016-06-13 04:24:12 +00:00
mtrofin
8c1ba59aee RelocInfo modes were not propagated when computing
MemoryOperands, on IA32. This needed to be fixed so that we can
compile wasm code before creating instances, since the compiled code
needs to be patched up for memory and globals references.

This surfaces in asm-to-wasm scenarios.

Added testing (rather, enhanced existing tests).
Note patch#1 where we fail on ia32, and patch#2 with the fix.

BUG=v8:5072

Review-Url: https://codereview.chromium.org/2061583002
Cr-Commit-Position: refs/heads/master@{#36911}
2016-06-13 04:21:16 +00:00
bmeurer
35f5b3dca4 Revert of Add a trace-event for each runtime-stats timer (patchset #6 id:100001 of https://codereview.chromium.org/2052523002/ )
Reason for revert:
Seems to break TSAN, see http://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/10057

Original issue's description:
> 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.
>
> BUG=v8:5089
>
> Committed: https://crrev.com/44ec143f26769bd103662643bfeafc7d0834cc90
> Cr-Commit-Position: refs/heads/master@{#36909}

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/2064553002
Cr-Commit-Position: refs/heads/master@{#36910}
2016-06-13 04:21:15 +00:00
fmeawad
44ec143f26 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.

BUG=v8:5089

Review-Url: https://codereview.chromium.org/2052523002
Cr-Commit-Position: refs/heads/master@{#36909}
2016-06-12 16:21:16 +00:00
v8-autoroll
2fc6d926c3 Update V8 DEPS.
Rolling v8/build to ea70305807f935b36a930586aa08c66bfc6fbf8d

Rolling v8/tools/mb to 649b5791b19e4ed3df0c5542b23950d34ca8f3e7

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

Review-Url: https://codereview.chromium.org/2063593002
Cr-Commit-Position: refs/heads/master@{#36908}
2016-06-12 03:25:30 +00:00
peria
7a3150d13d Make String::CanMakeExternal ignore the length of new strings.
It is expected that temporarily used strings die while they are
in new heap.  So we can avoid to pay a heavy cost to externalize
them.  If they are used for times, externalization will happen
when they move to an old heap.

BUG=chrmoium:606093

Review-Url: https://codereview.chromium.org/2046933002
Cr-Commit-Position: refs/heads/master@{#36907}
2016-06-11 05:13:08 +00:00
v8-autoroll
3469d72d04 Update V8 DEPS.
Rolling v8/build to e3d91384eb1f9ee5d3a26ad790f87fc51f3cfc61

Rolling v8/tools/clang to 7f07c3fce21f45df52cf39f0f52277d19b7e3573

Rolling v8/tools/mb to ad1b97c34985d6c464b5b74e75c7c9ec9716fec2

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

Review-Url: https://codereview.chromium.org/2057403004
Cr-Commit-Position: refs/heads/master@{#36906}
2016-06-11 03:24:51 +00:00
gsathya
604445b55b Parser: reuse has_extends, instead of doing a check again
Review-Url: https://codereview.chromium.org/2053393004
Cr-Commit-Position: refs/heads/master@{#36905}
2016-06-11 01:22:36 +00:00
jyan
d86458b1bc S390: [stubs] Remove N-argument Hydrogen-based Array constructor stub
Port c8ac0d8693

Original commit message:

    Instead, always tail call to the runtime. Also, cleanup the various versions
    of the runtime call that is used for Array construction fallback. There can be
    only one.

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

Review-Url: https://codereview.chromium.org/2060483002
Cr-Commit-Position: refs/heads/master@{#36904}
2016-06-10 19:43:44 +00:00
littledan
5d7b9ece16 Async/await event listener test
This patch adds a test for async/await analogous to a previous Promise test.
It also fixes a typo in promise.js and makes a previous Promise test more
correct by ensuring that all assertions run before completion, fixing the
test expectations for the real result (which seems correct).

BUG=v8:4483
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

Review-Url: https://codereview.chromium.org/2037653002
Cr-Commit-Position: refs/heads/master@{#36903}
2016-06-10 19:15:35 +00:00
jyan
87ccb1d8af S390: Remove more dead code now that legacy const is gone
Port 757221e574

Original commit message:

    Neither globals nor lookup slots can be hole-initialized anymore, thus
    removing some dead code from the code generators and runtime-scopes.

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

Review-Url: https://codereview.chromium.org/2060473002
Cr-Commit-Position: refs/heads/master@{#36902}
2016-06-10 19:12:23 +00:00
bjaideep
7f6f6ad1ba PPC: [stubs] Remove N-argument Hydrogen-based Array constructor stub
Port c8ac0d8693

Original commit message:

    Instead, always tail call to the runtime. Also, cleanup the various versions
    of the runtime call that is used for Array construction fallback. There can be
    only one.

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

BUG=chromium:608675
LOG=N

Review-Url: https://codereview.chromium.org/2057253002
Cr-Commit-Position: refs/heads/master@{#36901}
2016-06-10 18:03:13 +00:00
bjaideep
c7cddee678 PPC: Move hashmap into src/base.
Port 2fd55667a6

Original commit message:

    We ported hashmap.h into libsampler as a workaround before, so the main focus of
    this patch is to reduce code duplication. This patch moves the hashmap into
    src/base as well as creates DefaultAllocationPolicy using malloc and free.

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

BUG=v8:5050
LOG=N

Review-Url: https://codereview.chromium.org/2057263002
Cr-Commit-Position: refs/heads/master@{#36900}
2016-06-10 17:54:39 +00:00
bjaideep
817dcf2819 PPC: Remove more dead code now that legacy const is gone
Port 757221e574

Original commit message:

    Neither globals nor lookup slots can be hole-initialized anymore, thus
    removing some dead code from the code generators and runtime-scopes.

R=adamk@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/2061443002
Cr-Commit-Position: refs/heads/master@{#36899}
2016-06-10 17:54:38 +00:00
alph
3282b515e9 Make use of std::map for profiler code map.
Review-Url: https://codereview.chromium.org/2047243002
Cr-Commit-Position: refs/heads/master@{#36898}
2016-06-10 16:40:24 +00:00
nikolaos
dfb8d3331e Reduce the memory footprint of expression classifiers
This patch attempts to reduce the (stack) memory footprint of
expression classifiers.  Instead of keeping space in each
classifier for all possible error messages that will
(potentially) be reported, if an expression turns out to be
a pattern or a non-pattern, such error messages are placed in
a list shared by the FunctionState and each classifier keeps a
couple of indices in this list.  This requires that classifiers
are used strictly in a stack-based fashion, which is also in line
with my previous patch for revisiting non-pattern rewriting.

R=adamk@chromium.org
BUG=chromium:528697

Review-Url: https://codereview.chromium.org/1708193003
Cr-Commit-Position: refs/heads/master@{#36897}
2016-06-10 16:37:19 +00:00
neis
6e700b7f76 [interpreter] Fix debug stepping for generators.
In commit b3bfc0bd58, I corrected the source
position of yield-exceptions by not setting the "return position" on returns
that correspond to yields. It turns out that this caused a bug with debug
stepping. The proper fix is to keep the return position on those returns but
additionally attach the yield's source position to the Throw emitted in
VisitYield.

R=rmcilroy@chromium.org, yangguo@chromium.org
BUG=v8:4907

Review-Url: https://codereview.chromium.org/2051783002
Cr-Commit-Position: refs/heads/master@{#36896}
2016-06-10 13:30:20 +00:00
neis
6899f878ac [generators] Improve a test.
R=mstarzinger@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2056283002
Cr-Commit-Position: refs/heads/master@{#36895}
2016-06-10 13:27:27 +00:00
ulan
29b695ef13 Tune the memory pressure handler to perform a second GC immediately
after the first GC if time allows and there is memory to be freed.

BUG=chromium:618958
LOG=NO

Review-Url: https://codereview.chromium.org/2057103002
Cr-Commit-Position: refs/heads/master@{#36894}
2016-06-10 13:18:47 +00:00
cbruni
102cb061e1 [tools] Fix Callstats-Group classifier regexp in callstats.py
BUG=

Review-Url: https://codereview.chromium.org/2058003002
Cr-Commit-Position: refs/heads/master@{#36893}
2016-06-10 13:18:46 +00:00
ahaas
6c3d43766e [wasm] Turn on parallel compilation by default.
This CL sets the default value of the flag wasm_num_compilation_tasks to 10.
The actual number of compilation tasks is the minimum of the flag value and
V8::GetCurrentPlatform()->NumberOfAvailableBackgroundThreads(), which is 8
on my machine.

R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2054093002
Cr-Commit-Position: refs/heads/master@{#36892}
2016-06-10 12:00:42 +00:00
jkummerow
3b87e9aa03 Fix stale IC::receiver_map_ after prototype fastification
BUG=chromium:618845

Review-Url: https://codereview.chromium.org/2058063002
Cr-Commit-Position: refs/heads/master@{#36891}
2016-06-10 11:43:33 +00:00
yangguo
6f6f1f62ea [snapshot] make snapshot sink a non-dynamic member of the serializer.
R=vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/2052433003
Cr-Commit-Position: refs/heads/master@{#36890}
2016-06-10 11:26:54 +00:00
oth
235ed54a16 [interpreter] Compilation fix for operand scale on ARM builder.
TBR=rmcilroy@chromium.org
BUG=v8:4280
LOG=N

Review-Url: https://codereview.chromium.org/2056243002
Cr-Commit-Position: refs/heads/master@{#36889}
2016-06-10 11:26:53 +00:00
danno
c8ac0d8693 [stubs] Remove N-argument Hydrogen-based Array constructor stub
Instead, always tail call to the runtime. Also, cleanup the various versions
of the runtime call that is used for Array construction fallback. There can be
only one.

BUG=chromium:608675
LOG=N

Review-Url: https://codereview.chromium.org/2024253002
Cr-Commit-Position: refs/heads/master@{#36888}
2016-06-10 11:01:55 +00:00
yangguo
75aada429e [snapshot] pass arguments as pointers, not references.
R=vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/2051043003
Cr-Commit-Position: refs/heads/master@{#36887}
2016-06-10 10:59:04 +00:00
jarin
b4274ce38e [turbofan] Fix bad merge.
TBR=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2057063002
Cr-Commit-Position: refs/heads/master@{#36886}
2016-06-10 10:42:20 +00:00
oth
85882a6320 [interpreter] Remove OperandScale from front stages of pipeline.
BUG=v8:4280
LOG=N

Review-Url: https://codereview.chromium.org/2041913002
Cr-Commit-Position: refs/heads/master@{#36885}
2016-06-10 10:36:38 +00:00
rmcilroy
4ff921bc27 [Interpreter] Update Blink TestExpectationsIgnition.
Remove expectations which were failing due to eager compilation now that we compile lazily in Ignition, and add intersection-observer/observer-exceptions.html which has recently started failing.

BUG=v8:5096
TBR=machenbach@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2053323002
Cr-Commit-Position: refs/heads/master@{#36884}
2016-06-10 10:33:29 +00:00
cbruni
01a423e00f [--prof] Adding support for RuntimeCallTimerScope based tick separation
BUG=

Review-Url: https://codereview.chromium.org/2050713002
Cr-Commit-Position: refs/heads/master@{#36883}
2016-06-10 09:16:42 +00:00
asaka
8c1b2623cc Replace std::trunc() with trunc() to support cross-compiling
Fix-up of https://codereview.chromium.org/1965443003 required for
certain toolchains that do not support std::trunc().

BUG=

Review-Url: https://codereview.chromium.org/2056693002
Cr-Commit-Position: refs/heads/master@{#36882}
2016-06-10 08:01:47 +00:00
jarin
2890137bdc [turbofan] Introduce PlainPrimitiveToNumber.
This should solve the problem with missing checkpoints after JSToNumber
(PlainPrimitiveToNumber is marked no-write, so the frame-state
propagation should see through it.)

Unfortunately, this also duplicates the word32- and float64-truncation
magic that we have for JSToNumber in "simplified lowering".

Review-Url: https://codereview.chromium.org/2059653002
Cr-Commit-Position: refs/heads/master@{#36881}
2016-06-10 07:45:23 +00:00
bmeurer
d0c7775d7c [builtins] Introduce proper base::ieee754::log.
This switches Math.log to use an fdlibm based version of log, imported
as base::ieee754::log, and use that consistently everywhere, i.e. change
the Float64Log TurboFan operators on Intel to use the C++ implementation
as well (same for Crankshaft).

R=yangguo@chromium.org
BUG=v8:5065,v8:5086

Review-Url: https://codereview.chromium.org/2053893003
Cr-Commit-Position: refs/heads/master@{#36880}
2016-06-10 05:54:12 +00:00
yangguo
e5760c0808 [snapshot] introduce SnapshotCreator API.
And use it to implement existing the existing snapshot API.

R=jochen@chromium.org, vogelheim@chromium.org
BUG=chromium:617892

Review-Url: https://codereview.chromium.org/2046423002
Cr-Commit-Position: refs/heads/master@{#36879}
2016-06-10 05:47:47 +00:00
julien.gilli
2619ccd1a0 Move post-mortem constants from accessors table to constants table
Some post-mortem metadata constants that are not offsets to objects'
properties were incorrectly defined in the accessors table. This change
fixes it by moving them from the accessors table to the constants table.

More background is available at
https://github.com/nodejs/post-mortem/issues/27.

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

Review-Url: https://codereview.chromium.org/2051563003
Cr-Commit-Position: refs/heads/master@{#36878}
2016-06-10 04:09:09 +00:00
v8-autoroll
7dde77ac02 Update V8 DEPS.
Rolling v8/build to 303caaa5b8500304a82fd72c4af43d82b218e218

Rolling v8/tools/clang to 717602f21eca67f87ddd66a0f690148bbe191b79

Rolling v8/tools/mb to 87ae1f0b47b310f37d174571b46e7c33717aba0c

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

Review-Url: https://codereview.chromium.org/2055163003
Cr-Commit-Position: refs/heads/master@{#36877}
2016-06-10 03:24:58 +00:00
adamk
757221e574 Remove more dead code now that legacy const is gone
Neither globals nor lookup slots can be hole-initialized anymore, thus
removing some dead code from the code generators and runtime-scopes.

Review-Url: https://codereview.chromium.org/2051073004
Cr-Commit-Position: refs/heads/master@{#36876}
2016-06-09 19:53:06 +00:00
oth
af10c45ef2 [interpreter] Compilation fix in bytecode source position tester.
TBR=rmcilroy@chromium.org
BUG=chromium:618757
LOG=N

Review-Url: https://codereview.chromium.org/2052993002
Cr-Commit-Position: refs/heads/master@{#36875}
2016-06-09 19:13:20 +00:00
jyan
565a8f94dc S390: [stubs] ToNumberStub --> ToNumber builtin.
port 406146ff5c

Original Commit Message:
  This makes sure we do not compile ToNumber stub on demand. This makes it
  easier to use during concurrent compilation.

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=

Review-Url: https://codereview.chromium.org/2052963003
Cr-Commit-Position: refs/heads/master@{#36874}
2016-06-09 19:04:16 +00:00
lpy
2fd55667a6 Move hashmap into src/base.
We ported hashmap.h into libsampler as a workaround before, so the main focus of
this patch is to reduce code duplication. This patch moves the hashmap into
src/base as well as creates DefaultAllocationPolicy using malloc and free.

BUG=v8:5050
LOG=n

Review-Url: https://codereview.chromium.org/2010243003
Cr-Commit-Position: refs/heads/master@{#36873}
2016-06-09 18:00:31 +00:00
jyan
cb05c2df7c S390: [stubs] StringToNumberStub --> StringToNumber builtin.
port 546dd77ffc

Original Commit Message:
  Since some builtins use StringToNumberStub (so the code is always there),
  it makes more sense to have StringToNumber builtin.

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=

Review-Url: https://codereview.chromium.org/2052833003
Cr-Commit-Position: refs/heads/master@{#36872}
2016-06-09 17:34:10 +00:00
ishell
9dc62d2721 [ic] [stubs] Remove InlineCacheState field from the code flags.
There are no ICs left that store their state in this field: vector based
ICs use feedback vector and the rest three (BinaryOpIC, CompareIC and
ToBooleanIC) reconstruct their state from the ExtraICState field.

This CL also removes unused InlineCacheState::DEBUG_STUB which was used
mostly in Code::is_debug_stub(). The latter now checks if the code is one
of the debug builtins instead.

BUG=chromium:618701
LOG=Y

Review-Url: https://codereview.chromium.org/2052763003
Cr-Commit-Position: refs/heads/master@{#36871}
2016-06-09 16:49:01 +00:00
jarin
406146ff5c [stubs] ToNumberStub --> ToNumber builtin.
This makes sure we do not compile ToNumber stub on demand. This makes it
easier to use during concurrent compilation.

Review-Url: https://codereview.chromium.org/2051113002
Cr-Commit-Position: refs/heads/master@{#36870}
2016-06-09 15:38:21 +00:00
mstarzinger
08b7bc9d65 [runtime] Deprecate RUNTIME_ASSERT from internal ops.
This removes explicit uses of the RUNTIME_ASSERT macro from some runtime
methods. The implicit ones in CONVERT_FOO_ARG_CHECKED will be addressed
in a separate CL for all runtime modules at once.

R=bmeurer@chromium.org
BUG=v8:5066

Review-Url: https://codereview.chromium.org/2057543002
Cr-Commit-Position: refs/heads/master@{#36869}
2016-06-09 15:35:26 +00:00
verwaest
e7de678a2c Speed up adding literal chars when the buffer is known to be one-byte
We have fast-paths in identifier and string scanning that know that so far they have only handled one-byte input. In that case, we can add chars to the literal buffer assuming that it's still in one-byte state, avoiding 2 branches. This seemingly reduces identifier scanning from ~5% to ~4% on octane-codeload.

BUG=

Review-Url: https://codereview.chromium.org/2044233004
Cr-Commit-Position: refs/heads/master@{#36868}
2016-06-09 15:14:55 +00:00
Adam Klein
4fc1ea142d Add vogelheim to src/parsing/OWNERS
R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#36867}
2016-06-09 14:46:34 +00:00
titzer
26afd571c5 [wasm] Fix CFI failures due to Wasm threads.
R=ahaas@chromium.org,machenbach@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2055803002
Cr-Commit-Position: refs/heads/master@{#36866}
2016-06-09 14:23:52 +00:00
jyan
280b838255 S390: [gn] define V8_TARGET_ARCH_S390_LE_SIM for s390 sim build
R=machenbach@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2055703002
Cr-Commit-Position: refs/heads/master@{#36865}
2016-06-09 14:20:59 +00:00