Commit Graph

30984 Commits

Author SHA1 Message Date
titzer
f93066b3af [wasm] Remove renumbering of local variables from asm->wasm.
R=ahaas@chromium.org,bradnelson@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/1980543002
Cr-Commit-Position: refs/heads/master@{#36292}
2016-05-17 17:57:34 +00:00
mstarzinger
328d6037dd [wasm] Allow validator to inspect entire module.
This changes the parser to keep around bodies for asm.js functions when
then asm.js validator is turned on. Eventually the validator will work
on one function at a time, but for now we validate the entire module at
once.

R=rossberg@chromium.org

Review-Url: https://codereview.chromium.org/1981333003
Cr-Commit-Position: refs/heads/master@{#36291}
2016-05-17 17:45:21 +00:00
jyan
e9aad72f39 PPC/S390: [es6] Reintroduce the instanceof operator in the backends.
port 551e0aa11b

Original Commit Messag:
  This adds back the instanceof operator support in the backends and
  introduces a @@hasInstance protector cell on the isolate that guards the
  fast path for the InstanceOfStub. This way we recover the ~10%
  regression on Octane EarleyBoyer in Crankshaft and greatly improve
  TurboFan and Ignition performance of instanceof.

R=bmeurer@chromium.org, ishell@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com
TBR=hpayer@chromium.org,rossberg@chromium.org
BUG=chromium:597249, v8:4447
LOG=n

Review-Url: https://codereview.chromium.org/1989523002
Cr-Commit-Position: refs/heads/master@{#36290}
2016-05-17 17:38:13 +00:00
balazs.kilvady
bbb8ff1907 MIPS64: Fix 'Remove usages of Heap::NewSpaceStart and its external reference'.
Port f2a585935f

Original commit message:
Replace the uses with proper page flag lookups.

BUG=chromium:581412
LOG=N
TEST=mjsunit/allocation-site-info

Review-Url: https://codereview.chromium.org/1989483002
Cr-Commit-Position: refs/heads/master@{#36289}
2016-05-17 17:07:54 +00:00
rmcilroy
34c9626e2e [Interpreter] Remove InterpreterExitTrampoline and replace with returning to the entry trampoline.
In order to support compiling to baseline on return we need to be able to
return to the actual return address. With this change this is what the
Return bytecode now does, removing the need for the
InterpreterExitTrampoline.

This change also removes the InterpreterNotifyDeoptXXX builtins and
unifies FCG and Igntion to both use NotifyDeoptXXX. As part of this
change, FullCodegenerator::State is moved to Deoptimize::BailoutState.

BUG=v8:4280
LOG=N

Review-Url: https://codereview.chromium.org/1969423002
Cr-Commit-Position: refs/heads/master@{#36288}
2016-05-17 16:46:33 +00:00
neis
2123afff52 Remove more unused bailout reasons.
There's a script for finding them (tools/check-unused-bailouts.sh), but make
sure you don't have an old .bailout-reason.h.swp or such around when using it...

R=mstarzinger@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/1986173004
Cr-Commit-Position: refs/heads/master@{#36287}
2016-05-17 16:13:33 +00:00
mstarzinger
7cef5593e4 [turbofan] Escape analysis treats guard nodes as escaping.
This makes escape analysis treat all guard nodes in the graph as an
escaping use. We eventually want to properly handle guard nodes, this
just serves as a temporary workaround to get things going.

R=bmeurer@chromium.org
BUG=v8:602595
LOG=n

Review-Url: https://codereview.chromium.org/1972323004
Cr-Commit-Position: refs/heads/master@{#36286}
2016-05-17 15:47:35 +00:00
mstarzinger
639ce6027b [turbofan] Simplify escape analysis VerifyReplacement.
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/1984203002
Cr-Commit-Position: refs/heads/master@{#36285}
2016-05-17 14:46:47 +00:00
ssanfilippo
101e076b34 [Interpreter] List top dispatch sources and destinations for a given Ignition bytecode.
This commit introduces a new mode for bytecode_dispatches_report.py
which reports the top sources of dispatches to a given bytecode and
the top destinations of dispatches from the same bytecode.

The bytecode name is passed with --top-dispatches-for-bytecode
(short form: -f), while the number of sources and destinations to
show is controlled with -n.

BUG=v8:4899
LOG=N

Review-Url: https://codereview.chromium.org/1979233002
Cr-Commit-Position: refs/heads/master@{#36284}
2016-05-17 14:44:04 +00:00
jgruber
62b397a3a7 [compiler] Add a traversing AST visitor
Contrary to AstVisitor, which does not implement any traversal logic,
AstTraversalVisitor provides default implementations for each Visit*
function which walk through the AST. It is intended to be used as a base
class for visitors which are only interested in a small portion of the
AST.

R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/1963243003
Cr-Commit-Position: refs/heads/master@{#36283}
2016-05-17 14:11:29 +00:00
aseemgarg
6e170c9fe1 [wasm] remove extra nops in asm-wasm
R=bradnelson@chromium.org,titzer@chromium.org
BUG=v8:4203
LOG=Y

Review-Url: https://codereview.chromium.org/1982293002
Cr-Commit-Position: refs/heads/master@{#36282}
2016-05-17 14:06:37 +00:00
neis
b9bfbcb558 Remove now-unused kIllegalBytecode bailout reason.
R=mstarzinger@chromium.org, oth@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/1988573003
Cr-Commit-Position: refs/heads/master@{#36281}
2016-05-17 13:36:18 +00:00
jacob.bramley
b5413f7e94 [arm] Fix platform requirements for ldrd and strd.
These instructions were available before V8's baseline (ARMv6). V8 can
always assume that they're present.

BUG=

Review-Url: https://codereview.chromium.org/1985013002
Cr-Commit-Position: refs/heads/master@{#36280}
2016-05-17 13:26:34 +00:00
epertoso
f43ed04f50 [ignition] Inline the binary op TurboFan code stubs in the bytecode handlers.
Trying to reland http://crrev.com/1974293002.

This time some blocks have been shuffled around in the AddStub so that the frame still doesn't get built for the fast path.

Also disables the DCHECK(!is_default_snapshot) in snapshot-common.cc if --debug-code is specified. This was causing cctest to fail on arm64 debug builds.

Review-Url: https://codereview.chromium.org/1980333002
Cr-Commit-Position: refs/heads/master@{#36279}
2016-05-17 13:14:45 +00:00
yangguo
aef828dc74 [ignition] update layout test expectations.
Remove live-edit entries. They have been fixed.
Alphasort.
Group known failures.

TBR=machenbach@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/1985043002
Cr-Commit-Position: refs/heads/master@{#36278}
2016-05-17 12:02:18 +00:00
ishell
2318facdc9 [js-perf-test] Fix JSTests/PropertyQueries microbenchmark.
1) Create fast objects so that they stay fast after creation.
2) Run combination "test_function vs {test_objects}" as a benchmark during 1 second.

This CL changes benchmark's base score.

Review-Url: https://codereview.chromium.org/1988673002
Cr-Commit-Position: refs/heads/master@{#36277}
2016-05-17 11:28:31 +00:00
yangguo
8e303dd0b3 Fix %FunctionGetName and %_ClassOf for bound functions.
R=bmeurer@chromium.org
BUG=v8:5010

Review-Url: https://codereview.chromium.org/1980463002
Cr-Commit-Position: refs/heads/master@{#36276}
2016-05-17 11:26:00 +00:00
bmeurer
551e0aa11b [es6] Reintroduce the instanceof operator in the backends.
This adds back the instanceof operator support in the backends and
introduces a @@hasInstance protector cell on the isolate that guards the
fast path for the InstanceOfStub. This way we recover the ~10%
regression on Octane EarleyBoyer in Crankshaft and greatly improve
TurboFan and Ignition performance of instanceof.

R=ishell@chromium.org
TBR=hpayer@chromium.org,rossberg@chromium.org
BUG=chromium:597249, v8:4447
LOG=n

Review-Url: https://codereview.chromium.org/1980483003
Cr-Commit-Position: refs/heads/master@{#36275}
2016-05-17 11:25:59 +00:00
mstarzinger
565730666e [turbofan] Remove SetExistsVirtualAllocate side-channel.
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/1973323002
Cr-Commit-Position: refs/heads/master@{#36274}
2016-05-17 11:11:07 +00:00
franzih
c60cb90c4f [builtins] Move EncodeURI from runtime to builtins.
Repackage encodeURI and encodeURIComponent as builtin functions
and install them in the bootstrapper.

Crude benchmark on 351 encodeURI and encodeURIComponent tests averaged
over five runs:

* builtin functions
real	0m8.01s
user	0m18.00s
sys	0m7.37s

* JS functions calling into the runtime e.g., for %NewString
real	0m8.44s
user	0m19.52s
sys	0m7.49s

By running:
$ time tools/run-tests.py   --arch=x64 --mode=Release --buildbot
mjsunit/uri test262/built-ins/encodeURI*
>>> Running tests for x64.Release

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

Review-Url: https://codereview.chromium.org/1983593002
Cr-Commit-Position: refs/heads/master@{#36273}
2016-05-17 10:56:33 +00:00
yangguo
f248a83d29 [liveedit] fix stepping after replacing bytecode.
R=mstarzinger@chromium.org
BUG=v8:4765

Review-Url: https://codereview.chromium.org/1973213003
Cr-Commit-Position: refs/heads/master@{#36272}
2016-05-17 09:22:17 +00:00
machenbach
ef3304ba1d [GN] Watchlist upadate to track gyp changes.
BUG=chromium:474921
LOG=n
NOTRY=true
TBR=vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/1980313002
Cr-Commit-Position: refs/heads/master@{#36271}
2016-05-17 08:14:26 +00:00
ishell
301da46750 Fix improper usage of SmiUntag operation in CodeStubAssembler.
Review-Url: https://codereview.chromium.org/1986043002
Cr-Commit-Position: refs/heads/master@{#36270}
2016-05-17 07:31:48 +00:00
yangguo
4306fc4e30 [liveedit] skip crashing Layout test.
TBR=machenbach@chromium.org
BUG=v8:4765
LOG=N
NOTRY=true

Review-Url: https://codereview.chromium.org/1986703002
Cr-Commit-Position: refs/heads/master@{#36269}
2016-05-17 06:40:45 +00:00
littledan
972e852248 Fix RegExp.prototype.compile error case
If the RegExp doesn't parse, then ES2015 specifies that
RegExp.prototype.compile does not mutate it. This patch changes
our RegExp implementation to follow that logic.

R=yangguo

Review-Url: https://codereview.chromium.org/1972093003
Cr-Commit-Position: refs/heads/master@{#36268}
2016-05-17 06:19:36 +00:00
lpy
96aba388a1 Split TickSample and Sampler.
Since we are going to move Sampler as library, we creates tick-sample.[h|cc] for
TickSample, in order to maintain legacy code.

BUG=v8:4994
LOG=n

Review-Url: https://codereview.chromium.org/1952393002
Cr-Commit-Position: refs/heads/master@{#36267}
2016-05-17 06:12:28 +00:00
v8-autoroll
39c7d3083e Update V8 DEPS.
Rolling v8/build to 472c097e59b38126cd620b252c8f290f8bacaff7

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

Review-Url: https://codereview.chromium.org/1986663002
Cr-Commit-Position: refs/heads/master@{#36266}
2016-05-17 03:31:36 +00:00
littledan
4afe89a7da [esnext] Async function toString support
BUG=v8:4483

Review-Url: https://codereview.chromium.org/1973193002
Cr-Commit-Position: refs/heads/master@{#36265}
2016-05-17 01:28:53 +00:00
littledan
690922c959 [esnext] Fix super in async arrow functions
Ordinary arrow functions have 'undefined' in their frame's receiver.
Generators restore the receiver to the frame based on one passed in
when they are constructed in CreateJSGeneratorObject.

This patch makes async arrow functions pass in 'undefined' for their
receiver so that they have the same behavior as ordinary arrow
functions, which avoids the issue of encountering TDZ when calling
an async arrow function in a subclass constructor before a super
call has returned.

BUG=v8:4483

Review-Url: https://codereview.chromium.org/1976813002
Cr-Commit-Position: refs/heads/master@{#36264}
2016-05-17 01:16:51 +00:00
caitpotter88
d08c0304c5 [esnext] prototype runtime implementation for async functions
BUG=v8:4483
LOG=N
R=littledan@chromium.org, adamk@chromium.org

Review-Url: https://codereview.chromium.org/1895603002
Cr-Commit-Position: refs/heads/master@{#36263}
2016-05-17 00:27:51 +00:00
jwolfe
5582e158e5 Add UseCounter for decimal with leading zero.
Re-landing https://codereview.chromium.org/1948403002/

New changes:

move variable initialization to make compiler happy

BUG=v8:4973
LOG=y

Review-Url: https://codereview.chromium.org/1969203004
Cr-Commit-Position: refs/heads/master@{#36262}
2016-05-16 23:22:26 +00:00
caitpotter88
0d43421a22 [esnext] implement frontend changes for async/await proposal
BUG=v8:4483
LOG=Y
R=littledan@chromium.org, adamk@chromium.org

Review-Url: https://codereview.chromium.org/1841543003
Cr-Commit-Position: refs/heads/master@{#36261}
2016-05-16 23:19:02 +00:00
rmcilroy
9c6ff18355 [Interpreter] Clean up runtime-profiler logic for three tier pipeline.
Remove checks for IC hotness from Ignition tiering up decision since this is
not relevent for full-codegen compilation. Also make the decision about what
tier we are moving to more explicit and visible in --trace-opt.

BUG=v8:4280
LOG=N

Review-Url: https://codereview.chromium.org/1969773002
Cr-Commit-Position: refs/heads/master@{#36260}
2016-05-16 15:39:50 +00:00
v8-autoroll
ba76726209 Update V8 DEPS.
Rolling v8/build to 7854acf73fc05ab8b2cd340737eba14e3c442826

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

Review-Url: https://codereview.chromium.org/1981783002
Cr-Commit-Position: refs/heads/master@{#36259}
2016-05-16 03:26:24 +00:00
v8-autoroll
862406e76b Update V8 DEPS.
Rolling v8/build to d4fdf55ba8b19ee50d864162c343fd1939d00fe7

Rolling v8/buildtools to 06e80a0e17319868d4a9b13f9bb6a248dc8d8b20

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

Review-Url: https://codereview.chromium.org/1977243002
Cr-Commit-Position: refs/heads/master@{#36258}
2016-05-15 03:24:45 +00:00
franzih
6502a1bfb3 [runtime] Implement encodeURI as single runtime function.
Rewrite encodeURI as runtime function. We well probably
repackage runtime_URIEncode as a C++ builtin.

BUG=v8:4912

R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/1968953002
Cr-Commit-Position: refs/heads/master@{#36257}
2016-05-14 07:17:03 +00:00
v8-autoroll
29611a952b Update V8 DEPS.
Rolling v8/base/trace_event/common to 54b8455be9505c2cb0cf5c26bb86739c236471aa

Rolling v8/build to 93c1eb80b485df02249b83452a42b7a13b3bde28

Rolling v8/buildtools to e9fb74175ea7c3f251baad24d9ebe03c01ed5aba

Rolling v8/tools/gyp to bce1c7793010574d88d7915e2d55395213ac63d1

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

Review-Url: https://codereview.chromium.org/1980813002
Cr-Commit-Position: refs/heads/master@{#36256}
2016-05-14 03:39:44 +00:00
adamk
2a50c7526d Revert of [ignition] Inline the binary op TurboFan code stubs in the bytecode handlers. (patchset #1 id:1 of https://codereview.chromium.org/1974293002/ )
Reason for revert:
Causes cctest/test-serialize/SnapshotDataBlobWithWarmup failure on arm64:
https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20debug/builds/534

Original issue's description:
> [ignition] Inline the binary op TurboFan code stubs in the bytecode handlers.
>
> Trying to reland http://crrev.com/1902823002.
>
> This time some blocks have been shuffled around in the AddStub so that the frame still doesn't get built for the fast path.
>
> Committed: https://crrev.com/567160122de0bdb78aea79a9faa0dc15a564484c
> Cr-Commit-Position: refs/heads/master@{#36251}

TBR=bmeurer@chromium.org,rmcilroy@chromium.org,epertoso@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/1978993003
Cr-Commit-Position: refs/heads/master@{#36255}
2016-05-13 23:49:36 +00:00
gsathya
d33aedb7b9 Revert "Fix TypedArray Property optimizations", add regression test and eliminate dead code
This reverts commit 41d571dfe8.

Reason for revert: This patch breaks the correctness of the typedarray
properties such as length, byteOffset, byteLength.

The accessor check optimization code is dead code eliminated. A follow
up patch will fix this optimization correctly.

BUG=chromium:593634

Review-Url: https://codereview.chromium.org/1977983002
Cr-Commit-Position: refs/heads/master@{#36254}
2016-05-13 22:31:07 +00:00
alph
a02076429d Sampling heap profiler: use map instead of vector for children.
Review-Url: https://codereview.chromium.org/1967673002
Cr-Commit-Position: refs/heads/master@{#36253}
2016-05-13 19:10:56 +00:00
jyan
e7a234253e S390: [Interpreter] Fix incorrect frame walking in arguments create stubs
Port 40f345416f

Original commit message:

    The previous approach taken by FastNew[Sloppy,Strict,Rest]ArgumentsStub
    looked at the function slot in order to skip stub frames
    and find the JS frame. However, stub frames do not have a
    function slot (in fact their fixed frame ends one slot
    before the JS frame's function slot). Therefore, if this
    location in the stub frame happens to have the function
    object the create arguments stubs won't skip this frame
    correctly.

    Replace this approach with one where the stub is
    specialized to either skip a frame if required (since
    there will only ever be one extra frame on Ignition
    the loop approach isn't necessary).

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

Review-Url: https://codereview.chromium.org/1978823002
Cr-Commit-Position: refs/heads/master@{#36252}
2016-05-13 18:10:22 +00:00
epertoso
567160122d [ignition] Inline the binary op TurboFan code stubs in the bytecode handlers.
Trying to reland http://crrev.com/1902823002.

This time some blocks have been shuffled around in the AddStub so that the frame still doesn't get built for the fast path.

Review-Url: https://codereview.chromium.org/1974293002
Cr-Commit-Position: refs/heads/master@{#36251}
2016-05-13 16:52:10 +00:00
jochen
baf1204df1 Reland of move v8_toolset_for_d8 flag (patchset #2 id:80001 of https://codereview.chromium.org/1974773002/ )
Reason for revert:
Addressed link failure

Original issue's description:
> Revert of Remove v8_toolset_for_d8 flag (patchset #1 id:1 of https://codereview.chromium.org/1969793002/ )
>
> Reason for revert:
> blocks roll: https://codereview.chromium.org/1975753002/
>
> Original issue's description:
> > Remove v8_toolset_for_d8 flag
> >
> > R=machenbach@chromium.org
> > BUG=chromium:609107
> >
> > Committed: https://crrev.com/6cb38427984f3c31ff6c8813535cfd6ebf6058c4
> > Cr-Commit-Position: refs/heads/master@{#36198}
>
> TBR=machenbach@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:609107
>
> Committed: https://crrev.com/b33f9a6f24edef8447adcfb028b7f1d6e291c34e
> Cr-Commit-Position: refs/heads/master@{#36209}

TBR=machenbach@chromium.org,hablich@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=chromium:609107

Review-Url: https://codereview.chromium.org/1973363002
Cr-Commit-Position: refs/heads/master@{#36250}
2016-05-13 16:13:12 +00:00
oth
1818a2f278 [interpreter] Remove BytecodeArrayBuilder::Illegal().
BUG=v8:4280
LOG=N

Review-Url: https://codereview.chromium.org/1979523002
Cr-Commit-Position: refs/heads/master@{#36249}
2016-05-13 16:01:49 +00:00
cbruni
407d9fcec7 [counters] Annotate v8 with more runtime call counters.
By fully annotating the API with runtime counters we can properly measure
how much time we spend in total in v8. When --runtime-call-stats is specified
we now disable the fast-paths for callbacks to properly measure them.
As a drive-by-fix this CL unifies the LOG messages in api.cc.
Additionally we added missing timers to gain better resolution in the parser
and callbacks.

BUG=

Review-Url: https://codereview.chromium.org/1923893002
Cr-Commit-Position: refs/heads/master@{#36248}
2016-05-13 15:54:49 +00:00
jkummerow
8313d2f0cb [IC] Only cache handlers on a map that were compiled for that map
Globally cached handler stubs shouldn't be put into the on-map caches.
This should speed up IC misses and save a bit of memory.

Drive-by fix: transitioning StoreIC handlers were erroneously never cached.

Review-Url: https://codereview.chromium.org/1974793002
Cr-Commit-Position: refs/heads/master@{#36247}
2016-05-13 15:02:32 +00:00
marija.antic
ced0f49763 MIPS64: Fix allocation folding test failures.
Allocation folding tests are failing in debug mode, since the change
https://codereview.chromium.org/1972553002 (6e15433db4) introduced a debug check in
lithium-codegen-mips64.cc, line 5287.

Reason for failure is to be found in https://codereview.chromium.org/1899813003 (61f5fbbb19),
which is missing changes calling LFastAllocate in lithium-mips64.cc.

BUG=

Review-Url: https://codereview.chromium.org/1977833002
Cr-Commit-Position: refs/heads/master@{#36246}
2016-05-13 14:53:19 +00:00
rmcilroy
48a1c5667a Reland Add V8.Execute histogram to measure time spent executing JS code.
Adds a V8.Execute histogram to measure the amount of time spent executing
JS code.

BUG=v8:4865
LOG=N

Review-Url: https://codereview.chromium.org/1976963002
Cr-Commit-Position: refs/heads/master@{#36245}
2016-05-13 14:46:08 +00:00
jochen
df4b916e00 Move the dependency on "log" to v8's public config
BUG=chromium:609107
R=machenbach@chromium.org

Review-Url: https://codereview.chromium.org/1973903004
Cr-Commit-Position: refs/heads/master@{#36244}
2016-05-13 14:03:04 +00:00
jyan
41dbaefb4a S390: [crankshaft] Fragmentation-free allocation folding.
Port 61f5fbbb19
Port 6e15433db4

Original commit message:

      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.

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

Review-Url: https://codereview.chromium.org/1973883003
Cr-Commit-Position: refs/heads/master@{#36243}
2016-05-13 13:44:54 +00:00