Commit Graph

23147 Commits

Author SHA1 Message Date
conradw
092acb2b96 [strong] fix strong array, object prototypes
Strong Object/Array literals are currently being created with incorrect
internal prototypes. This CL fixes this and extends the test suite to check.

BUG=
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28655}
2015-05-27 13:55:14 +00:00
machenbach
4d6f1abbdb [test] Remove default for zero test cases.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28654}
2015-05-27 13:50:48 +00:00
vegorov
e85f979ed3 gdb-v8-support.py: add FindAnywhere helper.
R=jkummerow@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28653}
2015-05-27 13:49:10 +00:00
hpayer
d8a82ed74c Scale old generation growing strategy based on allocation rate.
Before we used to scale the growing factor based on freed global handles (which may have caused jank when many global handles got freed on site navigation).

BUG=

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

Cr-Commit-Position: refs/heads/master@{#28652}
2015-05-27 13:09:20 +00:00
ulan
5e87a0997b New algorithm for selecting evacuation candidates
This lifts the sqrt(n) limit on number of evacuation candidates,
replaces O(n * sqrt(n)) algorithm with O(n*log(n)) algorithm, and
removes hard-coded constants.

Evacuation candidates are selected as follows:

1) Sort pages from the most free to the least free.

2) Select the first m pages as evacuation candidates such that m is as
large as possible under the two conditions:

- The total size of live objects in the first m pages does not exceed
the given limit. This is based on the assumption that the evacuation cost is
proportional to the total size of moved objects.

- The fragmentation of the (m+1)-th page does not exceed the given
limit.

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

Cr-Commit-Position: refs/heads/master@{#28651}
2015-05-27 13:07:52 +00:00
jkummerow
1fb83a2f02 [turbofan] Fix type feedback for JSStoreNamed
And delete remnants of non-vectorized LoadICs from the type feedback oracle

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

Cr-Commit-Position: refs/heads/master@{#28650}
2015-05-27 12:30:47 +00:00
bmeurer
7483dbd5fc [turbofan] Use Start as sentinel for frame states.
This simplifies inlining, in that we only need to update uses of Start
and inputs of End instead of walking the whole inlinee to update all
outer frame states.

R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28649}
2015-05-27 11:02:01 +00:00
bmeurer
cc2d376f11 [turbofan] Optimize && and || in test context.
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28648}
2015-05-27 08:35:36 +00:00
vogelheim
dea59184cc Mark class as exported to fix win build.
TBR=machenbach@chromium.org
BUG=chromium:470930
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28647}
2015-05-27 07:10:45 +00:00
bmeurer
b66226a9d9 [turbofan] Optimize strict equality of unique values.
If both inputs to JSStrictEqual/JSStrictNotEqual are unique values (i.e.
values with a canonical representation), we can lower the comparison to
ReferenceEqual instead of StringEqual or CompareIC.

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

Cr-Commit-Position: refs/heads/master@{#28646}
2015-05-27 04:23:41 +00:00
v8-autoroll
496d3827ad Update V8 DEPS.
Rolling v8/third_party/icu to f1ad7f9ba957571dc692ea3e187612c685615e19

Rolling v8/tools/clang to dbc958e1b51949ca815ca31a8f9bf4a760ca1d35

TBR=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28645}
2015-05-27 03:27:25 +00:00
arv
44e9810345 [es6] Support super.property in eval and arrow functions
When we enter a method that needs access to the [[HomeObject]]
we allocate a local variable `.home_object` and assign it the
value from the [[HomeObject]] private symbol. Something along
the lines of:

  method() {
    var .home_object = %ThisFunction()[home_object_symbol];
    ...
  }

BUG=v8:3867, v8:4031
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28644}
2015-05-26 20:29:54 +00:00
machenbach
2dda8c3d4e [test] Verbose test runner output on windows.
TBR=jkummerow@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28643}
2015-05-26 19:50:54 +00:00
adamk
cb07b8ef1a Add {Map,Set}::FromArray to the API
These are similar to the Map/Set constructors when called with an array,
except that they are guaranteed to be side-effect free if called with
a packed array.

This will be useful in implementing structured clone which, as
specified in HTML, speaks in terms of the internal [[MapData]]
and [[SetData]] slots without going through the exposed iteration
ES semantics.

BUG=v8:3340
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#28642}
2015-05-26 18:50:23 +00:00
mike
f7b5912276 [es6] Define generator prototype as writable prop
The April 14 2015 final draft of the ES6 specification states that the
`prototype` property of generator function instances should be writable.

BUG=v8:4140, v8:4140
LOG=N
R=arv@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28641}
2015-05-26 18:31:49 +00:00
adamk
a8d9c58b1f Add {Map,Set}::AsArray to the API
These return arrays representing the current contents of the given
Map/Set. They are similar to what would be returned by the JS code:

  Array.from(collection)

except that they are guaranteed side-effect free.

This will be useful in implementing structured clone which, as
specified in HTML, speaks in terms of the internal [[MapData]]
and [[SetData]] slots without going through the exposed iteration
ES semantics.

BUG=v8:3340
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#28640}
2015-05-26 18:13:32 +00:00
ben
28cea2b749 Use CLOCK_REALTIME_COARSE when available.
On systems that have CLOCK_REALTIME_COARSE with good enough resolution,
we can avoid making a system call to get the current time; it's serviced
from the vDSO.

This is v2 of the patch.  v1 can be found at [0] but was reverted in [1]
because of Chromium sandbox restrictions.  The necessary changes have
been applied upstream in [2].

[0] https://codereview.chromium.org/1125003002
[1] https://codereview.chromium.org/1130083003
[2] https://codereview.chromium.org/1133653002

BUG=
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28639}
2015-05-26 18:10:43 +00:00
hpayer
3e9c664b8c Fix overflow in allocation throughput calculation.
BUG=chromium:492021
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#28638}
2015-05-26 17:46:57 +00:00
adamk
395fa8ba24 Add basic API support for Map & Set
Only supports constructing new objects and returning size.
Followup patch will need to add ability to retrieve and
set contents in order to support structured clone.

Also removes a bunch of outdated "experimental" markers from v8.h.

BUG=v8:3340
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#28637}
2015-05-26 17:37:01 +00:00
mbrandy
a6676cfebd PPC: Vector ICs: Introduce Store and KeyedStore IC code stubs.
Port a86384f192

Original commit message:
Also introduce new interface descriptors for the trampoline and full
versions of those stubs.

Currently, the stubs aren't functional.

R=mvstanton@chromium.org, dstence@us.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28636}
2015-05-26 15:51:07 +00:00
ulan
1999221f76 Fix windows builder after fe9a16b6.
TBR=hpayer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28635}
2015-05-26 15:48:32 +00:00
mbrandy
e75bc71513 PPC: Move hash code from hidden string to a private symbol
Port eca5b5d7ab

Original commit message:
* Hash code is now just done with a private own symbol instead of the hidden string, which predates symbols.
* In the long run we should do all hidden properties this way and get rid of the
hidden magic 0-length string with the zero hash code.  The advantages include
less complexity and being able to do things from JS in a natural way.
* Initially, the performance of weak set regressed, because it's a little harder
to do the lookup in C++.  Instead of heroics in C++ to make things faster I
moved some functionality into JS and got the performance back. JS is supposed to be good at looking up named properties on objects.
* This also changes hash codes of Smis so that they are always Smis.

Performance figures are in the comments to the code review.  Summary: Most of js-perf-test/Collections is neutral.  Set and Map with object keys are 40-50% better.  WeakMap is -5% and WeakSet is +9%.  After the measurements, I fixed global proxies, which cost 1% on most tests and 5% on the weak ones :-(.

In the code review comments is a patch with an example of the heroics we could do in C++ to make lookup faster (I hope we don't have to do this.  Instead of checking for the property, then doing a new lookup to insert it, we could do one lookup and handle the addition immediately).  With the current benchmarks above this buys us nothing, but if we go back to doing more lookups in C++ instead of in stubs and JS then it's a win.

In a similar vein we could give the magic zero hash code to the hash code
symbol.  Then when we look up the hash code we would sometimes see the table
with all the hidden properties.  This dual use of the field for either the hash
code or the table with all hidden properties and the hash code is rather ugly,
and this CL gets rid of it.  I'd be loath to bring it back.  On the benchmarks quoted above it's slightly slower than moving the hash code lookup to JS like in this CL.

One worry is that the benchmark results above are more monomorphic than real
world code, so may be overstating the performance benefits of moving to JS.  I
think this is part of a general issue we have with handling polymorphic code in
JS and any solutions there will benefit this solution, which boils down to
regular property access. Any improvement there will lift all boats.

R=erikcorry@chromium.org, dstence@us.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28634}
2015-05-26 15:44:54 +00:00
mbrandy
4d892dc8cf PPC: Move work to omit unnecessary ObjectLiteral stores to the numbering pass.
Port 32de677805

Original commit message:
The reason is that this information will be needed to compute the number of
vector ic slots done at numbering time.

R=mvstanton@chromium.org, dstence@us.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28633}
2015-05-26 15:43:39 +00:00
ulan
fe9a16b69a Fix test-heap/OldSpaceAllocationCounter.
TBR=hpayer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28632}
2015-05-26 15:42:28 +00:00
machenbach
543bcf4d5a [test] Sync in *san configurations from chromium.
This configures *san in v8 just like in chromium's
common.gypi. I also addresses compilation problems with ICU
and usage of instrumented libc++.

TBR=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28631}
2015-05-26 14:51:46 +00:00
ulan
82be7d070f Temporary fix for test-heap/OldSpaceAllocationCounter.
TBR=hpayer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28630}
2015-05-26 13:51:58 +00:00
machenbach
a2b6dfb2d1 [test] Correctly merge expected test outcomes.
Without this change, wildcards always overwrite the outcomes
of more specific rules. Now we always merge.

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

Cr-Commit-Position: refs/heads/master@{#28629}
2015-05-26 13:22:23 +00:00
yangguo
0837b43720 Correctly hook up materialized receiver into the evaluation context chain.
R=ulan@chromium.org
BUG=chromium:491943
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#28628}
2015-05-26 13:06:41 +00:00
hablich
daaedddf7b Temporary auto-CC'ing hablich to x87 changes
BUG=
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28627}
2015-05-26 13:05:32 +00:00
Michael Achenbach
4ccf4d4ffa White space change after infra breakage.
Cr-Commit-Position: refs/heads/master@{#28626}
2015-05-26 12:41:27 +00:00
bmeurer
f6fb5eb197 [turbofan] Connect loops to end via Terminate during graph building.
This way we don't need to connect (potentially) non-terminating loops
later during control reduction, which saves one forward pass over the
control graph.  Long term we will move the trimming functionality of
the control reducer to the GraphReducer, and get rid of the Finish
method again.

As a bonus, this change also properly rewires Terminate, Throw and
Deoptimize during inlining.

R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28625}
2015-05-26 12:18:07 +00:00
mstarzinger
3c13e81721 [turbofan] Verify uses of Deoptimize and Return in graph.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28624}
2015-05-26 11:52:56 +00:00
ulan
9a99b8766a Add old generation allocation throughput computation.
BUG=chromium:492021
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#28623}
2015-05-26 11:51:28 +00:00
erikcorry
eca5b5d7ab Move hash code from hidden string to a private symbol
* Hash code is now just done with a private own symbol instead of the hidden string, which predates symbols.
* In the long run we should do all hidden properties this way and get rid of the
hidden magic 0-length string with the zero hash code.  The advantages include
less complexity and being able to do things from JS in a natural way.
* Initially, the performance of weak set regressed, because it's a little harder
to do the lookup in C++.  Instead of heroics in C++ to make things faster I
moved some functionality into JS and got the performance back. JS is supposed to be good at looking up named properties on objects.
* This also changes hash codes of Smis so that they are always Smis.

Performance figures are in the comments to the code review.  Summary: Most of js-perf-test/Collections is neutral.  Set and Map with object keys are 40-50% better.  WeakMap is -5% and WeakSet is +9%.  After the measurements, I fixed global proxies, which cost 1% on most tests and 5% on the weak ones :-(.

In the code review comments is a patch with an example of the heroics we could do in C++ to make lookup faster (I hope we don't have to do this.  Instead of checking for the property, then doing a new lookup to insert it, we could do one lookup and handle the addition immediately).  With the current benchmarks above this buys us nothing, but if we go back to doing more lookups in C++ instead of in stubs and JS then it's a win.

In a similar vein we could give the magic zero hash code to the hash code
symbol.  Then when we look up the hash code we would sometimes see the table
with all the hidden properties.  This dual use of the field for either the hash
code or the table with all hidden properties and the hash code is rather ugly,
and this CL gets rid of it.  I'd be loath to bring it back.  On the benchmarks quoted above it's slightly slower than moving the hash code lookup to JS like in this CL.

One worry is that the benchmark results above are more monomorphic than real
world code, so may be overstating the performance benefits of moving to JS.  I
think this is part of a general issue we have with handling polymorphic code in
JS and any solutions there will benefit this solution, which boils down to
regular property access. Any improvement there will lift all boats.

R=adamk@chromium.org, verwaest@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28622}
2015-05-26 11:26:36 +00:00
bmeurer
b53c35a797 [turbofan] Properly kill Terminate nodes when removing loops.
BUG=chromium:491578
LOG=n
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28621}
2015-05-26 10:48:07 +00:00
bmeurer
2b93b8aa41 [turbofan] Change End to take a variable number of inputs.
This simplifies the handling of the End node. Based on this CL we will
finally fix terminating every loop from the beginning (via Terminate
nodes) and fix inlining of Throw, Deoptimize and Terminate.

R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28620}
2015-05-26 10:32:10 +00:00
ishell
d2334e901c Revert of Fixed a couple of failing DCHECK(has_pending_exception()). (patchset #1 id:1 of https://codereview.chromium.org/1151373002/)
Reason for revert:
Broke V8 Linux - nosnap.

Original issue's description:
> Fixed a couple of failing DCHECK(has_pending_exception()).
>
> BUG=chromium:491062
> LOG=N
>
> Committed: https://crrev.com/62b56507cce3c57a2e1aebce6d34f29b3b64e762
> Cr-Commit-Position: refs/heads/master@{#28617}

TBR=yangguo@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:491062

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

Cr-Commit-Position: refs/heads/master@{#28619}
2015-05-26 10:28:35 +00:00
hpayer
629e9e4117 Don't shrink new space based on allocation rate in predictable mode.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28618}
2015-05-26 10:14:24 +00:00
ishell
62b56507cc Fixed a couple of failing DCHECK(has_pending_exception()).
BUG=chromium:491062
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28617}
2015-05-26 10:06:54 +00:00
jochen
7b24219346 Fix lookup iterator checks in GetRealNamedProperty* methods
BUG=v8:4143
R=verwaest@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#28616}
2015-05-26 09:23:53 +00:00
mvstanton
32de677805 Move work to omit unnecessary ObjectLiteral stores to the numbering pass.
The reason is that this information will be needed to compute the number of
vector ic slots done at numbering time.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#28615}
2015-05-26 09:06:06 +00:00
jarin
a893a5e59a Exclude non-optimizable functions from OptimizeFunctionOnNextCall.
BUG=chromium:491481
R=mstarzinger@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#28614}
2015-05-26 08:47:04 +00:00
mstarzinger
ce551f91fd [turbofan] Fix known issue about computed property names.
This fixes a corner-case where deoptimization while evaluating the
value to a __proto__ property after computed property names appeared
in an object literal, lead to environments not being in sync with
unoptimized code.

R=arv@chromium.org
TEST=mjsunit/harmony/computed-property-names-deopt

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

Cr-Commit-Position: refs/heads/master@{#28613}
2015-05-26 08:45:16 +00:00
yangguo
14eba9b275 Do not leak message object beyond try-catch.
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28612}
2015-05-26 08:00:17 +00:00
machenbach
9c5b23756f [test] Mark slow tests on msan.
TBR=svenpanne@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28611}
2015-05-26 07:55:27 +00:00
vogelheim
85a0542df5 Implement bookmarks for ExternalStreamingStream.
(Requires the embedder's ExternalSourceStream implementation to cooperate.
 See crrev.com/1154883003 for Blink.)

R=jochen@chromium.org
BUG=chromium:470930
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#28610}
2015-05-26 07:54:20 +00:00
yangguo
a5f61fca9a Fix harmony-sharedarraybuffer implementation.
NOTREECHECKS=true
NOTRY=true
TBR=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28609}
2015-05-26 07:40:03 +00:00
yangguo
5cb925e448 Revert of Revert of Hook up more import/exports in natives. (patchset #1 id:1 of https://codereview.chromium.org/1154743003/)
Reason for revert:
Unrelated failure that was uncovered by this CL has been fixed (https://codereview.chromium.org/1152243002/)

Original issue's description:
> Revert of Hook up more import/exports in natives. (patchset #3 id:40001 of https://codereview.chromium.org/1154483002/)
>
> Reason for revert:
> [Sheriff] Speculative revert for gc stress failures:
> http://build.chromium.org/p/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/builds/481
>
> Original issue's description:
> > Hook up more import/exports in natives.
> >
> > R=jkummerow@chromium.org
> >
> > Committed: https://crrev.com/7a918ac9658d11778f39593bfcc19d7c506defd9
> > Cr-Commit-Position: refs/heads/master@{#28573}
> >
> > Committed: https://crrev.com/e13a39dd7f4062898709d7c68900677df0513995
> > Cr-Commit-Position: refs/heads/master@{#28578}
>
> TBR=jkummerow@chromium.org,erik.corry@gmail.com,yangguo@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://crrev.com/eb0024d1dbdda5f51b006dd54887404ee6c5cbfc
> Cr-Commit-Position: refs/heads/master@{#28584}

TBR=jkummerow@chromium.org,erik.corry@gmail.com,machenbach@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28608}
2015-05-26 07:24:21 +00:00
yangguo
61a5962bd3 Do not patch IC in deoptimized code.
R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28607}
2015-05-26 06:56:21 +00:00
chunyang.dai
83321b09ed X87: [es6] Spread in array literals
port 9502e91adb (r28534)

original commit message:

    This allows you to put iterables into your array literals
    and the will get spread into the array.

      let x = [0, ...range(1, 3)];  // [0, 1, 2]

    This is done by treating the array literal up to the first
    spread element as usual, including using a boiler plate
    array, and then appending the remaining expressions and rest
    expressions.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#28606}
2015-05-25 13:15:26 +00:00