Commit Graph

30638 Commits

Author SHA1 Message Date
bbudge
8c8600db2e [turbofan] Rename floating point register / slot methods.
Renames IsDouble* predicates to IsFP*.
Adds specific IsFloat*, IsDouble*, and IsSimd128* predicates.
Adds specific GetFloatRegister, GetDoubleRegister, and
GetSimd128Register methods.

This is mostly a mechanical renaming of IsDouble* to IsFP* methods.

This shouldn't change code generation at all. All fp registers are still
treated as double registers.

LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/1959763002
Cr-Commit-Position: refs/heads/master@{#36146}
2016-05-10 15:20:28 +00:00
rmcilroy
24709a62ce [Interpreter] Add a bytecode annotate tool.
Adds a tool which enables annotation of the disassembly of bytecode handlers
based on perf output.

BUG=4899
LOG=N

Review-Url: https://codereview.chromium.org/1945673002
Cr-Commit-Position: refs/heads/master@{#36145}
2016-05-10 15:04:32 +00:00
cbruni
da16609c14 [keys] fixing nested JSProxy for-in enumeration
BUG=chromium:610210
LOG=N

Review-Url: https://codereview.chromium.org/1963633002
Cr-Commit-Position: refs/heads/master@{#36144}
2016-05-10 14:26:50 +00:00
mlippautz
c0fe26d253 Revert of [heap] Fine-grained JSArrayBuffer tracking (patchset #7 id:200001 of https://codereview.chromium.org/1936233002/ )
Reason for revert:
Breaks readonly test
  https://uberchromegw.corp.google.com/i/client.v8/builders/V8%20Linux/builds/10121

Original issue's description:
> [heap] Fine-grained JSArrayBuffer tracking
>
> Track based on JSArrayBuffer addresses instead of the attached backing store.
> This way we can later on iterate buffers on a single page.
>
> BUG=chromium:581412
> LOG=N
> R=jochen@chromium.org, hpayer@chromium.org
>
> Committed: https://crrev.com/4cdf71e2d07c038d7af84e41c6e6d0093af0f0de
> Cr-Commit-Position: refs/heads/master@{#36140}

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

Review-Url: https://codereview.chromium.org/1961403002
Cr-Commit-Position: refs/heads/master@{#36143}
2016-05-10 13:30:44 +00:00
ulan
f2d649a04b Refactor CancelableTaskManager to use std::map.
BUG=

Review-Url: https://codereview.chromium.org/1963853004
Cr-Commit-Position: refs/heads/master@{#36142}
2016-05-10 12:59:23 +00:00
bjaideep
8e48641cf1 AIX: use intptr_t to cast a pointer
On AIX64 pthread_t is of type unsigned int (4bytes),
using intptr_t instead when casting a pointer.

R=lpy@chromium.org, jochen@chromium.org, mbrandy@us.ibm.com

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/1938833002
Cr-Commit-Position: refs/heads/master@{#36141}
2016-05-10 12:54:53 +00:00
mlippautz
4cdf71e2d0 [heap] Fine-grained JSArrayBuffer tracking
Track based on JSArrayBuffer addresses instead of the attached backing store.
This way we can later on iterate buffers on a single page.

BUG=chromium:581412
LOG=N
R=jochen@chromium.org, hpayer@chromium.org

Review-Url: https://codereview.chromium.org/1936233002
Cr-Commit-Position: refs/heads/master@{#36140}
2016-05-10 12:48:03 +00:00
caitpotter88
7d38a161a2 [runtime] relax DCHECK in Factory::NewFunction
Adds `strict_function_without_prototype_map` to DCHECK whitelist

BUG=
LOG=N
R=littledan@chromium.org, jochen@chromium.org, jkummerow@chromium.org

Review-Url: https://codereview.chromium.org/1964593004
Cr-Commit-Position: refs/heads/master@{#36139}
2016-05-10 12:32:26 +00:00
jochen
35e49f251f Rename shell to v8_shell
BUG=chromium:609107
R=machenbach@chromium.org
LOG=n

Review-Url: https://codereview.chromium.org/1962253002
Cr-Commit-Position: refs/heads/master@{#36138}
2016-05-10 12:32:25 +00:00
rmcilroy
d9fd822aa2 [Interpreter] Fix bytecode offset for stack overflows.
Rather than pushing zero for the initial bytecode offset, we should push the
offset of the first bytecode handler, Smi tagged. This fixes the line number
for the top stack frame on overflow errors.

BUG=v8:4981
LOG=N

Review-Url: https://codereview.chromium.org/1950913004
Cr-Commit-Position: refs/heads/master@{#36137}
2016-05-10 12:30:08 +00:00
epertoso
2da70f853d [turbofan] Take the immediate size in account when narrowing ia32/x64 word comparison operators.
Trying to re-land http://crrev.com/1948453002 after fixing assembler-x64.cc in http://crrev.com/1962563003.

Before this patch, we would emit a cmp or test with a memory operand only if both of the operands in the IR were loads. Now if either of them is a load and the other one is an immediate, we can use a memory operand if the load representation machine size is wide enough to represent the latter.

Review-Url: https://codereview.chromium.org/1968453002
Cr-Commit-Position: refs/heads/master@{#36136}
2016-05-10 12:09:52 +00:00
machenbach
413d9e2f41 Revert of [build] Use -O2 on linux by default (patchset #1 id:1 of https://codereview.chromium.org/1963693004/ )
Reason for revert:
Causes regressions.

Original issue's description:
> [build] Use -O2 on linux by default
>
> This switches O2 -> O3 to match chromium's configuration.
>
> This makes the difference between gn and gyp a bit smaller
> before switching.
>
> BUG=chromium:474921
> LOG=n
>
> Committed: https://crrev.com/a37ab71e343b8cc24df05868b941a49e0c271376
> Cr-Commit-Position: refs/heads/master@{#36124}

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

Review-Url: https://codereview.chromium.org/1958253004
Cr-Commit-Position: refs/heads/master@{#36135}
2016-05-10 12:09:51 +00:00
neis
3cc7315eda Allow Turbofan optimization of Ignition generators, first version.
In the bytecode graphbuilder, translate the two generator-specific
bytecodes as a couple of runtime calls for now.

BUG=v8:4907
LOG=n

Review-Url: https://codereview.chromium.org/1957393004
Cr-Commit-Position: refs/heads/master@{#36134}
2016-05-10 12:07:33 +00:00
hpayer
61f5fbbb19 [crankshaft] Fragmentation-free allocation folding.
The new allocation folding implementation avoids fragmentation between folded allocation. As a consequence, our heap will always be iterable i.e. we do not have to perform a garbage collection before iterating the heap.

BUG=chromium:580959
LOG=n

Review-Url: https://codereview.chromium.org/1899813003
Cr-Commit-Position: refs/heads/master@{#36133}
2016-05-10 11:29:08 +00:00
franzih
2fe1ee4e04 Remove unused import statements
Review-Url: https://codereview.chromium.org/1962133003
Cr-Commit-Position: refs/heads/master@{#36132}
2016-05-10 11:06:54 +00:00
ishell
6186508c53 [es8] Stage syntactic tail calls.
BUG=v8:4915
LOG=N

Review-Url: https://codereview.chromium.org/1964643002
Cr-Commit-Position: refs/heads/master@{#36131}
2016-05-10 11:00:16 +00:00
hlopko
c0b2cdf804 V8_EXPORT EmbedderHeapTracer
LOG=no
BUG=468240

Review-Url: https://codereview.chromium.org/1961083005
Cr-Commit-Position: refs/heads/master@{#36130}
2016-05-10 10:46:06 +00:00
ishell
aa006f644b [es8] Prepare explicit tail calls (STC) for staging with implicit tail calls (PTC).
BUG=v8:4915
LOG=N

Review-Url: https://codereview.chromium.org/1962853002
Cr-Commit-Position: refs/heads/master@{#36129}
2016-05-10 10:19:28 +00:00
bmeurer
b8229ec446 [turbofan] Initial version of allocation folding and write barrier elimination.
This adds a new pass MemoryOptimizer that walks over the effect chain
from Start and lowers all Allocate, LoadField, StoreField, LoadElement,
and StoreElement nodes, trying to fold allocations into allocation
groups and eliminate write barriers on StoreField and StoreElement if
possible (i.e. if the object belongs to the current allocation group and
that group allocates in new space).

R=hpayer@chromium.org, jarin@chromium.org
BUG=v8:4931, chromium:580959
LOG=n

Review-Url: https://codereview.chromium.org/1963583004
Cr-Commit-Position: refs/heads/master@{#36128}
2016-05-10 10:12:25 +00:00
mstarzinger
7e8f248b9b [compiler] Simplify handling of OSR source frame.
R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/1961843002
Cr-Commit-Position: refs/heads/master@{#36127}
2016-05-10 09:50:07 +00:00
ishell
11efb976fa [es8] Throw SyntaxError when trying to tail call a direct eval.
BUG=v8:4999, v8:4915
LOG=N

Review-Url: https://codereview.chromium.org/1964603002
Cr-Commit-Position: refs/heads/master@{#36126}
2016-05-10 09:33:33 +00:00
mstarzinger
7b37243358 [turbofan] Implement top-level lookup slot declaration.
This implements declaration of lookup slots for variables and functions
within optimized code. Such a declaration only appears with top-level
eval code, which we only recently started handling in TurboFan.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/1962723002
Cr-Commit-Position: refs/heads/master@{#36125}
2016-05-10 08:19:22 +00:00
machenbach
a37ab71e34 [build] Use -O2 on linux by default
This switches O2 -> O3 to match chromium's configuration.

This makes the difference between gn and gyp a bit smaller
before switching.

BUG=chromium:474921
LOG=n

Review-Url: https://codereview.chromium.org/1963693004
Cr-Commit-Position: refs/heads/master@{#36124}
2016-05-10 08:12:33 +00:00
bmeurer
82de25f008 [turbofan] Also disable concurrent recompilation when tracing TurboFan.
Treat --trace-turbo and --trace-turbo-graph similar to --trace-hydrogen
and --trace-hydrogen-stubs, in that we disable concurrent recompilation
in that case (otherwise we cannot print heap objects and stuff).

R=ishell@chromium.org
BUG=v8:4969
LOG=n

Review-Url: https://codereview.chromium.org/1965653003
Cr-Commit-Position: refs/heads/master@{#36123}
2016-05-10 07:56:49 +00:00
mlippautz
997682fa22 [heap] Properly deal with OOM during committing of pooled pages
BUG=chromium:610603
LOG=N
R=hpayer@chromium.org

Review-Url: https://codereview.chromium.org/1958403003
Cr-Commit-Position: refs/heads/master@{#36122}
2016-05-10 07:47:58 +00:00
littledan
f98caf44b8 Various species micro-optimizations
- Inline reads to the species protector
- Put V8_LIKELY/V8_UNLIKELY to guide Array.prototype.{slice,splice,concat}
  to the fast paths
- Put the Array species good path checks directly in
  Array.prototype.concat to avoid a couple reads of the array constructor
  from the native context

These changes together bring a ~4-6% win on
kraken-orig/stanford-crypto-pbkdf2-orig which more than makes up from
the performance degradation from a recent other species-related change.

BUG=chromium:609739
R=cbruni@chromium.org
LOG=Y

Review-Url: https://codereview.chromium.org/1958713003
Cr-Commit-Position: refs/heads/master@{#36121}
2016-05-10 06:54:35 +00:00
v8-autoroll
7536f83721 Update V8 DEPS.
Rolling v8/build to 143dcc2b1b07c16858f16f25fefe04311f663279

Rolling v8/tools/clang to 18b63c680a59a7125514b1e05ca42cdfb89a19c7

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

Review-Url: https://codereview.chromium.org/1959293002
Cr-Commit-Position: refs/heads/master@{#36120}
2016-05-10 03:27:48 +00:00
machenbach
a0f91c6ad0 Revert of [test] Skip failing test after clang roll. (patchset #1 id:1 of https://codereview.chromium.org/1955013002/ )
Reason for revert:
Clang roll with fix is in.

Original issue's description:
> [test] Skip failing test after clang roll.
>
> BUG=v8:4995
> LOG=n
> NOTRY=true
> TBR=thakis@chromium.org, titzer@chromium.org
>
> Committed: https://crrev.com/6e6a7ea3a425bee65d856814bd361ddbf14811f5
> Cr-Commit-Position: refs/heads/master@{#36064}

TBR=thakis@chromium.org,titzer@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=v8:4995
NOTRY=true
LOG=n

Review-Url: https://codereview.chromium.org/1960053002
Cr-Commit-Position: refs/heads/master@{#36119}
2016-05-09 20:12:34 +00:00
bjaideep
b35aefd338 PPC: Added macro functions for stfd[u],stfs[u],lfd[u],lfs[u]
Added macro functions to handle large offsets(>16bits) in StoreDoubleU/
LoadDoubleU/StoreSingle/StoreSingleU/LoadSingle/LoadSingleU.

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/1962773002
Cr-Commit-Position: refs/heads/master@{#36118}
2016-05-09 20:01:16 +00:00
bbudge
779fce3782 Add the concept of FloatRegister for all platforms.
Changes some platform specific class names and uses typedefs
to define FloatRegister, DoubleRegister, etc.

This will be needed to do register allocation on ARM/MIPS where
registers combine to form larger registers.

LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/1954953002
Cr-Commit-Position: refs/heads/master@{#36117}
2016-05-09 19:14:25 +00:00
gsathya
41d571dfe8 Fix TypedArray Property optimizations
This patch installs %TypedArray% and its prototype on the native
context, and wires them up to each TypedArray subclass. This is later
used to check the holder of length, byteLength and byteOffset is
%Typedarray% and apply the appropriate optimizations.

BUG=chromium:593634
LOG=Y

Review-Url: https://codereview.chromium.org/1949863002
Cr-Commit-Position: refs/heads/master@{#36116}
2016-05-09 19:07:27 +00:00
bbudge
b466adfe47 V8: Fix OS X build of ARM 64 test.
Fixes 4 compile errors on Mac due to specifiers not matching type casts.

LOG=N
BUG=

Review-Url: https://codereview.chromium.org/1960113002
Cr-Commit-Position: refs/heads/master@{#36115}
2016-05-09 17:30:56 +00:00
lpy
57a73e81c6 Move atomic-utils.h into base/
atomic-utils.h only uses functionality from base/, and also by moving it into
base/, code outside of v8_base can benefit from it.

BUG=v8:4991
LOG=n

Review-Url: https://codereview.chromium.org/1954603002
Cr-Commit-Position: refs/heads/master@{#36114}
2016-05-09 16:23:57 +00:00
kozyatinskiy
6f419dfe67 [V8] Add v8::Value::TypeOf to API
There is TypeOf static method on object inside V8. In this CL I've extracted it via API.

LOG=Y
R=yangguo@chromium.org
BUG=chromium:595206

Review-Url: https://codereview.chromium.org/1829833002
Cr-Commit-Position: refs/heads/master@{#36113}
2016-05-09 16:21:35 +00:00
titzer
86d4a45586 [wasm] Add some tests for control flow corner cases.
R=ahaas@chromium.org,rossberg@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/1960143002
Cr-Commit-Position: refs/heads/master@{#36112}
2016-05-09 14:46:40 +00:00
mstarzinger
d0e84c8ebd [fullcodegen] Factor out VisitProperty from architectures.
This makes the aforementioned visitation function independent of the
target architecture by leveraging existing abstractions.

R=mvstanton@chromium.org

Review-Url: https://codereview.chromium.org/1962663002
Cr-Commit-Position: refs/heads/master@{#36111}
2016-05-09 14:33:22 +00:00
epertoso
99230f8d0e [x64] Fix testw with immediates.
Assembler::testw(Register, Immediate) and Assembler::testw(const Operand&, Immediate) were emitting only the first 8 bits of a 16-bit immediate, causing unexpected crashes.

This went unnoticed because before http://crrev.com/1948453002 no compiler was using them.

Review-Url: https://codereview.chromium.org/1962563003
Cr-Commit-Position: refs/heads/master@{#36110}
2016-05-09 13:55:44 +00:00
mstarzinger
afb69f7438 [fullcodegen] Add missing bailout points for super calls.
The bailout points for named and keyed property loads when doing super
property calls are not being prepared by full-codegen, even though we
are using them in TurboFan for deopts and stack traces.

R=jarin@chromium.org
TEST=mjsunit/regress/regress-4971
BUG=v8:4971
LOG=n

Review-Url: https://codereview.chromium.org/1960083002
Cr-Commit-Position: refs/heads/master@{#36109}
2016-05-09 13:44:40 +00:00
yangguo
41deb5a2cf [debugger] refactor debug-scopes.
R=jgruber@chromium.org

Review-Url: https://codereview.chromium.org/1961833002
Cr-Commit-Position: refs/heads/master@{#36108}
2016-05-09 13:28:52 +00:00
jochen
acbbd59f29 Expose IsConstructor to the C++ API
BUG=v8:4993
R=verwaest@chromium.org
LOG=y

Review-Url: https://codereview.chromium.org/1964433002
Cr-Commit-Position: refs/heads/master@{#36107}
2016-05-09 13:24:21 +00:00
ulan
5d9f6da654 Instrument callers of Semaphore::Signal to help with investigation of
flaky crashes.

BUG=chromium:609249
LOG=NO

Review-Url: https://codereview.chromium.org/1961893002
Cr-Commit-Position: refs/heads/master@{#36106}
2016-05-09 11:55:42 +00:00
ishell
bcb1b8732a [es8] Throw SyntaxError when tail call expressions occur in non-strict mode.
BUG=v8:4915
LOG=N

Review-Url: https://codereview.chromium.org/1955393002
Cr-Commit-Position: refs/heads/master@{#36105}
2016-05-09 11:42:31 +00:00
verwaest
4cad4c054e Clean up this/holder usage in accessors.cc
BUG=

Review-Url: https://codereview.chromium.org/1958063002
Cr-Commit-Position: refs/heads/master@{#36104}
2016-05-09 11:39:58 +00:00
titzer
73a988a0d5 [wasm] Verify expressions do not cross control boundaries in WASM.
This catches malformed code like the following example:

<expr>
<block begin>
<expr>
<binop>
<end>

Which is illegal because the inputs to the binop cross the block boundary.

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

Review-Url: https://codereview.chromium.org/1961853002
Cr-Commit-Position: refs/heads/master@{#36103}
2016-05-09 10:36:19 +00:00
mstarzinger
434ef2ccfd [turbofan] Remove deprecated --turbo-osr flag.
The flag in question used to fall-back to Crankshaft whenever an OSR
request couldn't be handled by TurboFan. By now OSR in TurboFan is
sufficiently stabilized that one single --use-osr flag should do it.

R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/1960043002
Cr-Commit-Position: refs/heads/master@{#36102}
2016-05-09 09:12:01 +00:00
ishell
8758245a62 Don't crash when load eval origin of a call site.
BUG=chromium:610207
LOG=N

Review-Url: https://codereview.chromium.org/1958043002
Cr-Commit-Position: refs/heads/master@{#36101}
2016-05-09 09:00:52 +00:00
titzer
aee1824adb [wasm] Fold bounds checks during graph building.
R=ahaas@chromium.org,clemensh@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/1962553002
Cr-Commit-Position: refs/heads/master@{#36100}
2016-05-09 08:53:48 +00:00
zhengxing.li
38ec29b4a3 [X87] [Ignition] Fix V8 x87 code generation bugs when Ingition was enabled.
The CL #35926 (https://codereview.chromium.org/1804003002) exposed two hidden bugs in x87 code generation when Ignition was enabled.

  This CL fixed those bugs.

BUG=

Review-Url: https://codereview.chromium.org/1960993002
Cr-Commit-Position: refs/heads/master@{#36099}
2016-05-09 08:47:11 +00:00
mythria
a64b1d8767 [Interpreter] Updates mjsunit/es6/mirror-collections to work with ignition
mjsunit/es6/mirror-collections fails with ignition because dead registers
may hold references to objects. This prevents GC from collecting
otherwise dead objects. Dead registers are not cleared because the cost
of clearing them outweighs its benefits. Hence, modifying this test to
work around this problem.

BUG=v8:4280,v8:4853
LOG=N

Review-Url: https://codereview.chromium.org/1945223002
Cr-Commit-Position: refs/heads/master@{#36098}
2016-05-09 08:40:05 +00:00
nikolaos
a156a05101 Fix bug with runtime-call-stats timers
RuntimeCallTimers were not properly stopped and this made a DCHECK
in the Debug version fail.

R=cbruni@chromium.org
BUG=
LOG=N

Review-Url: https://codereview.chromium.org/1955943002
Cr-Commit-Position: refs/heads/master@{#36097}
2016-05-09 08:04:47 +00:00