Commit Graph

23814 Commits

Author SHA1 Message Date
oth
af4c4b0427 Reland 'Additional HandleScopes to limit Handle consumption.'
v8 builds with --no-snap were hitting handle limits compiling natives for handle count unit tests that run with --check_handle_count. Patch now has higher handle limits (~4k more than required for failing natives compilation).

Original issue: https://codereview.chromium.org/1185633002/

Original issue's description:
    > Additional HandleScopes to limit Handle consumption.
    >
    > erikcorry@chromium.org suggested digging into v8 handle usage. Found potential scopes in ast.cc and runtime-literals.cc and added tests.
    >
    > The runtime-literals.cc change reduces peak handles in imaging-darkroom.js from 1,282,610 to 428,218. The ast.cc change reduces the peak handles in string-t
agcloud.js from 80,738 to 8,176.
    >
    > No significant handle count issues found with major websites, but substantial savings on some benchmarks and demos:
    >
    > Kraken's imaging-darkroom.js down from 1,282,610 to 428,218 due to runtime-literals.cc scope.
    > SunSpider's string-tagcloud.js down from 80,738 to 8.176 due to ast.cc
    >
    > http://www.flohofwoe.net/demos/dragons_asmjs.html (738,906 -> 478,296)
    > http://www.flohofwoe.net/demos/instancing_asmjs.html (737,884 -> 477,274)
    > https://dl.dropboxusercontent.com/u/16662598/Ports/DOSBox-web/doom.html?engine=dosbox-growth.js (1,724,114 -> 1,087,408)
    > https://kripken.github.io/ammo.js/examples/new/ammo.html (175,784 -> 142,058)
    >
    > BUG=
    >
    > Committed: https://crrev.com/3a4c7538839186aa38910c66c986abb563f4ccd2
    > Cr-Commit-Position: refs/heads/master@{#29155}

BUG=

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

Cr-Commit-Position: refs/heads/master@{#29322}
2015-06-26 10:58:23 +00:00
mstarzinger
572cac67c9 [turbofan] Enable sharing of context-independent code.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29321}
2015-06-26 10:56:28 +00:00
hpayer
83a41d6674 Revert of Re-land new insertion write barrier. (patchset #1 id:1 of https://codereview.chromium.org/1211513002/)
Reason for revert:
Still crashing in the wild.

Original issue's description:
> Re-land new insertion write barrier.
>
> BUG=
>
> Committed: https://crrev.com/6e6af7e7c70050cdd5ce56cdbaee3b6e8a7caa89
> Cr-Commit-Position: refs/heads/master@{#29258}

TBR=ulan@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#29320}
2015-06-26 10:53:02 +00:00
machenbach
e93e4dad63 Revert of Reland [android] Migrate more configs to gyp. (patchset #2 id:20001 of https://codereview.chromium.org/1210393003/)
Reason for revert:
[Sheriff] Fails runhooks.

Original issue's description:
> Reland [android] Migrate more configs to gyp.
>
> This reverts commit 3e8892b589.
>
> BUG=chromium:502176
> LOG=n
> NOTRY=true
> TBR=ulan@chromium.org, jochen@chromium.org
>
> Committed: https://crrev.com/c0d70e43c4cbe2a09c8f1bd55fe2be03cd9ba041
> Cr-Commit-Position: refs/heads/master@{#29317}

TBR=ulan@chromium.org,jochen@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:502176

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

Cr-Commit-Position: refs/heads/master@{#29319}
2015-06-26 10:39:22 +00:00
machenbach
57d1c91cd7 [tools] Add a tool to show potentially missing source deps.
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#29318}
2015-06-26 10:35:26 +00:00
machenbach
c0d70e43c4 Reland [android] Migrate more configs to gyp.
This reverts commit 3e8892b589.

BUG=chromium:502176
LOG=n
NOTRY=true
TBR=ulan@chromium.org, jochen@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29317}
2015-06-26 10:33:34 +00:00
bmeurer
3e8892b589 Revert of [android] Migrate more configs to gyp. (patchset #4 id:60001 of https://codereview.chromium.org/1207693004/)
Reason for revert:
Breaks arm64 bots.

Original issue's description:
> [android] Migrate more configs to gyp.
>
> BUG=chromium:502176
> LOG=n
>
> Committed: https://crrev.com/174869573e42c999da1489c264b9c4602b98ba31
> Cr-Commit-Position: refs/heads/master@{#29314}

TBR=jochen@chromium.org,ulan@chromium.org,dusan.milosavljevic@imgtec.com,machenbach@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:502176

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

Cr-Commit-Position: refs/heads/master@{#29316}
2015-06-26 10:02:28 +00:00
bmeurer
2b9112a578 [turbofan] Canonicalize return sequence for JSFunctions.
This optimization is already implemented in fullcodegen, and
basically makes sure that we do not unecessarily blow up the
code with duplicated return sequences everywhere.

R=danno@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29315}
2015-06-26 09:34:45 +00:00
machenbach
174869573e [android] Migrate more configs to gyp.
BUG=chromium:502176
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29314}
2015-06-26 09:19:27 +00:00
mstarzinger
317cb6538c [turbofan] Implement sharing of context-independent code.
This allows context-independent code generated by TurboFan to be cached
in the optimized code map and reused across native contexts. Note that
currently this cache is still flushed at GC time.

R=bmeurer@chromium.org,mvstanton@chromium.org
TEST=cctest/test-compiler/OptimizedCodeSharing

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

Cr-Commit-Position: refs/heads/master@{#29313}
2015-06-26 09:07:45 +00:00
machenbach
d350ab47f7 Revert of Debugger: use list to find shared function info in a script. (patchset #2 id:20001 of https://codereview.chromium.org/1206573004/)
Reason for revert:
[Sheriff] Breaks layout tests:
http://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/682

Original issue's description:
> Debugger: use list to find shared function info in a script.
>
> Now that we keep tabs on shared function infos from a script, we can speed up finding shared function infos for debugging. However, in case we have to compile a function that cannot be lazily compiled without context, we fall back to the slow heap iteration.
>
> R=mstarzinger@chromium.org
> BUG=v8:4132,v8:4052
> LOG=N
>
> Committed: https://crrev.com/cfe89a71a332ef9ed481c8210bc3ad6d2822034b
> Cr-Commit-Position: refs/heads/master@{#29296}

TBR=mstarzinger@chromium.org,yangguo@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4132,v8:4052

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

Cr-Commit-Position: refs/heads/master@{#29312}
2015-06-26 08:22:09 +00:00
bmeurer
7337021e54 [turbofan] Add support for pushing returns into merges.
This will enable tail call optimization even across inlining. Plus it
might enable some other interesting optimizations as well. In order to
avoid blowing up the generated code, we can still canonicalize the
epilogue in the CodeGenerator, similar to what fullcodegen does.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29311}
2015-06-26 08:21:01 +00:00
mvstanton
8a3cf4ecef VectorICs: Lithium support for vector-based stores.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#29310}
2015-06-26 07:53:38 +00:00
bmeurer
9ad117657b [turbofan] Use proper eager deopts for %_ThrowNotDateError().
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29309}
2015-06-26 05:56:13 +00:00
yangguo
cf21d22fd8 Serializer: commit new internalized strings after deserialization.
Reserving space for deserialization can cause GC, which
can evict entries from the string table. Having more deleted
entries now, StringTable::EnsureCapacity could cause a GC
later during deserialization even when we actually still
have enough capacity.

Instead, we now keep new internalized strings in a separate list
and commit them to the string table at the end.

R=ulan@chromium.org
BUG=chromium:502085
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29308}
2015-06-25 19:04:34 +00:00
mbrandy
e4f546c5a9 PPC64: Fix "[ic] Record call counts for monomorphic calls made with an IC."
StoreP to a tagged object pointer requires a scratch register.

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

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

Cr-Commit-Position: refs/heads/master@{#29307}
2015-06-25 19:03:27 +00:00
binji
28b0129b03 Fix cluster-fuzz regression when getting message from Worker
The issue is that Worker.prototype.terminate was deleting the C++ Worker
object, and then Worker.prototype.getMessage was trying to read messages from
the queue.

The simplest solution is to keep workers in a zombie state when they have been
terminated. They won't be reaped until Shell::CleanupWorkers is called.

I've also fixed some threading issues with Workers:

* Workers can be created by another Worker, so the Shell::workers_ variable
must be protected by a mutex.

* An individual Worker can typically only be accessed by the isolate that
created it, but the main thread can always terminate it, so the Worker::state_
must be accessed in a thread-safe way.

BUG=chromium:504136
R=jochen@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29306}
2015-06-25 18:01:22 +00:00
balazs.kilvady
803b0c7487 MIPS: [turbofan] Fix implementation of Float64Min.
Port d783b76362

Original commit message:
ARM64's `fmin` and `fmax` instructions don't have the same behaviour as
TurboFan's Float(32|64)(Min|Max) functions.

BUG=4206
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29305}
2015-06-25 17:59:52 +00:00
mbrandy
81c7e24793 PPC: [turbofan] Add basic support for calling to (a subset of) C functions.
Port a58ba8d801

Original commit message:
This introduces some initial building blocks for calling out to
C/C++ functions directly from TurboFan generated code objects.

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

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

Cr-Commit-Position: refs/heads/master@{#29304}
2015-06-25 17:35:23 +00:00
mbrandy
e9f1f4d306 PPC: [ic] Record call counts for monomorphic calls made with an IC.
Port c1a4f7477f

Original commit message:
The idea is that TurboFan can use this information for more intelligent
inlining.

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

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

Cr-Commit-Position: refs/heads/master@{#29303}
2015-06-25 17:32:54 +00:00
mbrandy
afb3119915 PPC: Vector ICs: Like megamorphic keyed koads, use a dummy vector for stores
Port 9e7af9efc5

Original commit message:
It's useful for the megamorphic keyed store case to not require a
vector and slot as input. Analogous to the load case, we have a dummy
one-ic-slot vector to aid. Since the only kind of MISS is for
megamorphic cache stub failures, we don't need the real vector.
The reason is that megamorphic cache stub failures don't result in any
change to the type feedback vector state.

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

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

Cr-Commit-Position: refs/heads/master@{#29302}
2015-06-25 17:31:46 +00:00
mbrandy
3efc54de15 PPC: Fix "Unify the stack layout for construct frames"
R=dstence@us.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#29301}
2015-06-25 17:03:09 +00:00
mbrandy
01009640b7 PPC: Fix "Fix receiver when calling eval() bound by with scope"
R=wingo@igalia.com, dstence@us.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#29300}
2015-06-25 16:44:33 +00:00
wingo
87fd436670 Better error message for eval=>42 in strict mode
BUG=v8:4213
R=arv@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29299}
2015-06-25 16:17:21 +00:00
verwaest
efbb4c6cdc Back off normalizing on set length in sync with adding a property
BUG=

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

Cr-Commit-Position: refs/heads/master@{#29298}
2015-06-25 15:04:59 +00:00
verwaest
3f336d4144 Only try to delete dictionary elements if the length is actually reduced
BUG=v8:4137
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29297}
2015-06-25 14:46:04 +00:00
yangguo
cfe89a71a3 Debugger: use list to find shared function info in a script.
Now that we keep tabs on shared function infos from a script, we can speed up finding shared function infos for debugging. However, in case we have to compile a function that cannot be lazily compiled without context, we fall back to the slow heap iteration.

R=mstarzinger@chromium.org
BUG=v8:4132,v8:4052
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29296}
2015-06-25 14:27:43 +00:00
verwaest
4eed4970fd Move Add to the elements accessor for everything but dictionary-arguments
BUG=v8:4137
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29295}
2015-06-25 14:17:19 +00:00
vogelheim
1d73a81ae0 Remove obsolete options in ScriptCompiler::CompileOptions.
This is a follow-on to https://code.google.com/p/v8/source/detail?r=22431
This will remove the compatibility logic, so that the API as described
in r22431 is the only API.

I'll let this CL will sit around for a while to give embedders a chance
to update their code.

R=yangguo@chromium.org, ulan@chromium.org
BUG=chromium:399580
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#29294}
2015-06-25 14:03:56 +00:00
wingo
40b7d874b2 Reapply "Fix receiver when calling eval() bound by with scope"
Originally applied in https://codereview.chromium.org/1202963005

BUG=v8:4214
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel
LOG=N
R=arv@chromium.org, mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29293}
2015-06-25 13:46:46 +00:00
arv
876ae42598 Unify the stack layout for construct frames
The stack layout was different for different ports.

BUG=v8:3887
LOG=N
R=dslomov@chromium.org, adamk@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29292}
2015-06-25 12:52:36 +00:00
yangguo
6434ec3087 Reland 2 "Keep a canonical list of shared function infos."
BUG=v8:4132
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29291}
2015-06-25 12:20:06 +00:00
erikcorry
daef0ec5f4 Reland Extend big-disjunction optimization to case-independent regexps
Previous code review https://codereview.chromium.org/1182783009/
R=yangguo@chromium.org
BUG=chromium:482998
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29290}
2015-06-25 11:42:20 +00:00
verwaest
f461c7a67a Move reconfiguration into the elements accessor
BUG=v8:4137
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29289}
2015-06-25 11:26:06 +00:00
bmeurer
35eb3a0260 [turbofan] Optimize BooleanNot conditions to Branch nodes.
Also remove the weird work-around for this missing optimization in
CHECK_DATE in macros.py.

R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29288}
2015-06-25 11:07:09 +00:00
verwaest
210be5215d Let AddDictionaryElement / AddFastElement purely add, move transition heuristics to AddDataElement
BUG=v8:4137
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29287}
2015-06-25 10:49:02 +00:00
yangguo
f283021f2d Debugger: remove bogus assertion in BreakLocation constructor.
Currently DebugInfo objects can be created independently from whether
the debugger is active. When tearing down the isolate, we would go
through DebugInfo objects and iterate through break locations,
causing this assertion to fail.

R=ulan@chromium.org
BUG=v8:4241
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29286}
2015-06-25 10:43:46 +00:00
yangguo
f7ef0c9921 Revert of Reland "Keep a canonical list of shared function infos." (patchset #3 id:40001 of https://codereview.chromium.org/1211453002/)
Reason for revert:
proxies test failing https://chromegw.corp.google.com/i/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/builds/903/steps/Mjsunit/logs/proxies

Original issue's description:
> Reland "Keep a canonical list of shared function infos."
>
> This reverts commit 3164aa7483.
>
> Committed: https://crrev.com/cacb646d80daa429f6915824a741f595db7d5044
> Cr-Commit-Position: refs/heads/master@{#29282}

TBR=adamk@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#29285}
2015-06-25 10:35:12 +00:00
mstarzinger
8f6bca542f Remove overzealous checking of --cache-optimized-code flag.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29284}
2015-06-25 09:45:11 +00:00
Benedikt Meurer
e21f122865 [turbofan] Properly type %_IsDate intrinsic.
R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29283}
2015-06-25 09:22:30 +00:00
yangguo
cacb646d80 Reland "Keep a canonical list of shared function infos."
This reverts commit 3164aa7483.

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

Cr-Commit-Position: refs/heads/master@{#29282}
2015-06-25 09:09:44 +00:00
Michael Stanton
c1a4f7477f [ic] Record call counts for monomorphic calls made with an IC.
The idea is that TurboFan can use this information for more intelligent
inlining.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29281}
2015-06-25 08:43:53 +00:00
Michael Stanton
9e7af9efc5 Vector ICs: Like megamorphic keyed koads, use a dummy vector for stores
It's useful for the megamorphic keyed store case to not require a
vector and slot as input. Analogous to the load case, we have a dummy
one-ic-slot vector to aid. Since the only kind of MISS is for
megamorphic cache stub failures, we don't need the real vector.
The reason is that megamorphic cache stub failures don't result in any
change to the type feedback vector state.

BUG=
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29280}
2015-06-25 08:36:27 +00:00
Benedikt Meurer
a58ba8d801 [turbofan] Add basic support for calling to (a subset of) C functions.
This introduces some initial building blocks for calling out to
C/C++ functions directly from TurboFan generated code objects.

R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29279}
2015-06-25 08:32:32 +00:00
Michael Starzinger
112f197341 Simplify interface to optimized code map lookup.
This is one step torwards extracting an OptimizedCodeMap out from the
SharedFunctionInfo in order to have a more flexible implementation.

R=bmeurer@chromium.org, jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29278}
2015-06-25 08:28:45 +00:00
bmeurer
5056c8219a [turbofan] Revive the useful parts of the SimplifiedOperatorReducer.
This partially reverts https://codereview.chromium.org/1162563002
because we might actually be able to optimize certain combinations
now due to dead code elimination.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29277}
2015-06-25 04:47:16 +00:00
bbudge
9b36c6e37a Make helper functions compatible with larger ToBooleanStub types.
I missed some functions that need to change.

LOG=N
BUG=v8:4124

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

Cr-Commit-Position: refs/heads/master@{#29276}
2015-06-25 04:32:19 +00:00
mstarzinger
defa7459b6 Make sure bound functions never make it into optimized code map.
This is one step torwards extracting an OptimizedCodeMap out from the
SharedFunctionInfo in order to have a more flexible implementation.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29275}
2015-06-25 04:12:03 +00:00
v8-autoroll
2161d3972d Update V8 DEPS.
Rolling v8/third_party/icu to c3f79166089e5360c09e3053fce50e6e296c3204

TBR=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29274}
2015-06-25 03:28:37 +00:00
arv
206cd93b5a JSON.stringify should handle the replacer before the space
BUG=v8:4227
LOG=N
R=adamk
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#29273}
2015-06-25 00:04:35 +00:00