Commit Graph

36552 Commits

Author SHA1 Message Date
bmeurer
45aa13514b [turbofan] Track multiple maps for LoadElimination.
Store maps on the CheckMaps operator instead of burning inputs for
the individual maps. Use the same data structure (the ZoneHandleSet)
in the LoadElimination to track multiple maps per object.

BUG=v8:5267
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2431563002
Cr-Commit-Position: refs/heads/master@{#42010}
2017-01-02 13:03:02 +00:00
jochen
09cb6efd58 Reland "Disable the CompilerDispatcher if we don't have idle time"
Original issue's description:
> Disable the CompilerDispatcher if we don't have idle time
>
> Since we can't do all steps on background threads, we need idle time to
> work
>
> BUG=v8:5215
> R=danno@chromium.org
>
> Review-Url: https://codereview.chromium.org/2600743002
> Cr-Commit-Position: refs/heads/master@{#41944}
> Committed: https://chromium.googlesource.com/v8/v8/+/a0d9eb346bba90aa0b32a
2d3184cbbfd6adb243e

BUG=v8:5215

Review-Url: https://codereview.chromium.org/2606233002
Cr-Commit-Position: refs/heads/master@{#42009}
2017-01-02 12:59:07 +00:00
bmeurer
b617335623 [turbofan] Use InternalizedString feedback abstract/strict equality comparisons.
Add machinery to Ignition and TurboFan to collect and consume
InternalizedString feedback for abstract and strict equality
comparisons. Here we can turn the comparison into a simple
pointer equality check.

R=jarin@chromium.org
BUG=v8:5786

Review-Url: https://codereview.chromium.org/2609013002
Cr-Commit-Position: refs/heads/master@{#42008}
2017-01-02 11:58:01 +00:00
jochen
4246200c4c Remove old debug code from compiler-dispatcher-job-unittest
R=marja@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2606223002
Cr-Commit-Position: refs/heads/master@{#42007}
2017-01-02 11:56:50 +00:00
neis
c5d75a381f [test] Add more maybe-assigned tests for parameters.
R=marja@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2580833005
Cr-Commit-Position: refs/heads/master@{#42006}
2017-01-02 11:25:26 +00:00
bmeurer
380a0207db [crankshaft] Don't bailout on uninitialized access to arguments object.
When Crankshaft compiles a keyed load to arguments, it disabled
optimization unless the KEYED_LOAD_IC for the access was monomorphic.
But that's too restrictive, since it will also disable optimization
for this function when the access is on a path that was never executed
so far.

This was spotted in the Node.js core function EventEmitter.prototype.emit,
which was no longer optimizable with Crankshaft using latest V8.

R=jarin@chromium.org
BUG=v8:5790

Review-Url: https://codereview.chromium.org/2607303002
Cr-Commit-Position: refs/heads/master@{#42005}
2017-01-02 06:52:04 +00:00
ulan
b00fc8be8a Use std::deque for storing edges and children in heap snapshot.
This patch fixes OOM crash that happens for large heap where
the total size of edges exceeds 2GB, which is the hard limit
for v8::internal::List allocated using tcmalloc.

BUG=chromium:675911

Review-Url: https://codereview.chromium.org/2595003002
Cr-Commit-Position: refs/heads/master@{#42004}
2016-12-30 16:27:15 +00:00
mvstanton
a93aab375a [Turbofan] Make GenericLowering operate concurrently.
R=epertoso@chromium.org
BUG=5428

Review-Url: https://codereview.chromium.org/2607243002
Cr-Commit-Position: refs/heads/master@{#42003}
2016-12-30 14:03:54 +00:00
mvstanton
b211993740 [builtins] Move LoadGlobalICStub to builtins
Following in the footsteps of the other load/store ICs.

R=epertoso@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2608893002
Cr-Commit-Position: refs/heads/master@{#42002}
2016-12-30 13:37:08 +00:00
mvstanton
92d8d95575 [builtins] Move several CodeStub-based ICs to builtins
This CL is from danno@chromium.org. Moves code stubs

LoadIC
KeyedLoadICTF
StoreIC
KeyedStoreICTF
LoadICTrampoline
KeyedLoadICTrampolineTF
StoreICTrampoline
KeyedStoreICTrampolineTF

into builtins.

TBR Yang for serializer changes.

R=epertoso@chromium.org
TBR=yangguo@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2608883002
Cr-Commit-Position: refs/heads/master@{#42001}
2016-12-30 10:31:01 +00:00
gsathya
2077b314d5 [builtins] Add EmitFastNewObject
This refactors the logic from within the FastNewObject TF_BUILTIN to a
helper method which can be reused in other assemblers. This saves the
overhead of setting up the stub and calling into it.

A wrapper method is created for functions that don't need to tail call
into the runtime.

PromiseBuiltinsAssembler and RegexpBuiltinsAssembler are refactored to
use EmitFastNewObject.

Review-Url: https://codereview.chromium.org/2607233002
Cr-Commit-Position: refs/heads/master@{#42000}
2016-12-30 10:29:39 +00:00
adamk
1542a47f59 [builtins] Merge two adjacent if-statements in JSConstructStub
R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2602903005
Cr-Commit-Position: refs/heads/master@{#41999}
2016-12-30 07:41:22 +00:00
v8-autoroll
77b0795f05 Update V8 DEPS.
Rolling v8/third_party/catapult: 1e8a2ca..9ddf248

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

Review-Url: https://codereview.chromium.org/2601373002
Cr-Commit-Position: refs/heads/master@{#41998}
2016-12-30 04:20:27 +00:00
gsathya
2d46f50771 [promsies] Verify status field is a smi
R=adamk@chromium.org
BUG=v8:5343

Review-Url: https://codereview.chromium.org/2608843002
Cr-Commit-Position: refs/heads/master@{#41997}
2016-12-30 01:50:47 +00:00
bjaideep
16e4bbd602 PPC/s390: [builtins] More stubs to the builtin-o-sphere.
Port 05873add85
Port f2e8c9786f

Original commit message:

    The following ported to builtins:
    FastCloneRegExp
    FastCloneShallowArray
    FastCloneShallowObject

R=mvstanton@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2603003002
Cr-Commit-Position: refs/heads/master@{#41996}
2016-12-29 22:25:21 +00:00
gsathya
9d22fa3179 [promises] Remove extra PromiseInit in InternalPromiseThen
R=adamk@chromium.org, caitp@igalia.com
BUG=v8:5343

Review-Url: https://codereview.chromium.org/2603033002
Cr-Commit-Position: refs/heads/master@{#41995}
2016-12-29 22:14:01 +00:00
adamk
e752c31e29 Remove unnecessary language_mode arg from Parser::DefaultConstructor
This looks like it was leftover from strong mode; default class
constructors are always in strict mode.

R=littledan@chromium.org

Review-Url: https://codereview.chromium.org/2601123002
Cr-Commit-Position: refs/heads/master@{#41994}
2016-12-29 22:12:51 +00:00
Michael Achenbach
cd79924dab Whitespace change to test trusty switch
Cr-Commit-Position: refs/heads/master@{#41993}
2016-12-29 21:10:56 +00:00
bjaideep
7ad54344c1 PPC/s390: [stubs] Port FastNewObjectStub to TF
Port 5b02a98bfa

Original Commit Message:

    In the process, convert from a code stub into a builtin.

R=danno@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2601243003
Cr-Commit-Position: refs/heads/master@{#41992}
2016-12-29 20:53:44 +00:00
gsathya
5668ce3987 [promises] Remove deferred object
This patch stores the promise, resolve, reject properties of the
deferred object created by CreateInternalPromiseCapability and
NewPromiseCapability directly on the promise (if the promise hasn't
been fulfilled), otherwise they are stored on the
PromiseReactionJobInfo.

This patch removes the currently unused
CreateInternalPromiseCapability and inlines the call to create the
deferred promise object.

NewPromiseCapability is the only function that works with a deferred.

This patch results in a 8.5% improvement in benchmarks over 5 runs.

BUG=v8:5343

Review-Url: https://codereview.chromium.org/2590563003
Cr-Commit-Position: refs/heads/master@{#41991}
2016-12-29 20:30:28 +00:00
Michael Achenbach
26c293a93b Whitespace change to trigger bots
Cr-Commit-Position: refs/heads/master@{#41990}
2016-12-29 17:33:21 +00:00
mvstanton
05873add85 [builtins] More stubs to the builtin-o-sphere.
The following ported to builtins:
FastCloneRegExp
FastCloneShallowArray
FastCloneShallowObject

BUG=
TBR=rmcilroy@chromium.org, rossberg@chromium.org

Review-Url: https://codereview.chromium.org/2605893002
Cr-Commit-Position: refs/heads/master@{#41989}
2016-12-29 13:02:08 +00:00
mvstanton
f2e8c9786f [builtins] FastNewFunctionContextStub becomes a builtin
BUG=
TBR=rmcilroy@chromium.org

Review-Url: https://codereview.chromium.org/2604833004
Cr-Commit-Position: refs/heads/master@{#41988}
2016-12-29 11:52:40 +00:00
mvstanton
350d8e345e [TurboFan] Update owners file to include Danno.
BUG=
R=epertoso@chromium.org

Review-Url: https://codereview.chromium.org/2602903004
Cr-Commit-Position: refs/heads/master@{#41987}
2016-12-29 11:51:25 +00:00
danno
5b02a98bfa [stubs] Port FastNewObjectStub to TF
In the process, convert from a code stub into a builtin.

Review-Url: https://codereview.chromium.org/2606733002
Cr-Commit-Position: refs/heads/master@{#41986}
2016-12-29 11:11:14 +00:00
danno
21ebbd3ec2 [stubs] Remove dead IncStub and DecStub
R=mvstanton@chromium.org
TBR=rmcilroy@chromium.org

Review-Url: https://codereview.chromium.org/2608683002
Cr-Commit-Position: refs/heads/master@{#41985}
2016-12-29 09:04:59 +00:00
v8-autoroll
71f8c819d9 Update V8 DEPS.
Rolling v8/tools/clang: d79b0df..432074b

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

Review-Url: https://codereview.chromium.org/2601243002
Cr-Commit-Position: refs/heads/master@{#41984}
2016-12-29 04:18:42 +00:00
machenbach
ccd4dd4ae2 [test] Suppress new lint check
TBR=mstarzinger@chromium.org,bmeurer@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2605113002
Cr-Commit-Position: refs/heads/master@{#41983}
2016-12-28 20:38:25 +00:00
gsathya
df179704ff [promisehook] Fire init hook for promise subclass
Add test as well.
Add regression test for passing uninitialized promises to init hook

BUG=v8:4643

Review-Url: https://codereview.chromium.org/2578173004
Cr-Commit-Position: refs/heads/master@{#41982}
2016-12-28 19:31:24 +00:00
jbarboza
224d3764e5 abort in delete operators that shouldn't be called
Section 3.2 of the C++ standard states that destructor definitions
implicitly "use" operator delete functions. Therefore, these operator
delete functions must be defined even if they are never called by
user code explicitly.
http://www.open-std.org/JTC1/SC22/WG21/docs/cwg_defects.html#261

gcc allows them to remain as empty definitions. However, not all
compilers allow this. (e.g. xlc on zOS)

This pull request creates definitions which if ever called, result
in an abort.

R=danno@chromium.org,jochen@chromium.org
BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2588433002
Cr-Commit-Position: refs/heads/master@{#41981}
2016-12-28 18:48:28 +00:00
Michael Achenbach
734a761567 Whitespace change to trigger bots
Cr-Commit-Position: refs/heads/master@{#41980}
2016-12-28 18:08:09 +00:00
epertoso
6f62fd3d83 [turbofan] Do not generate unnecessary moves when casting a tagged value to a word.
We currently use BitcastTaggedToWord only in from the code assemblers to verify the correctness of the operation.

BUG=

Review-Url: https://codereview.chromium.org/2605073002
Cr-Commit-Position: refs/heads/master@{#41979}
2016-12-28 17:26:42 +00:00
joransiu
e0f97ebb32 S390: Fix fast-allocate to handle alignment
In fast-allocate, the path that leverages Add Mem-Imm fails to take
into account that the allocation size may be adjusted by kDoubleSize/2
for alignment.  Limit this instruction to 64-bit only.

Also guard PFDs with the proper facility check.
R=jyan@ca.ibm.com, michael_dawson@ca.ibm.com, bjaideep@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/2605063002
Cr-Commit-Position: refs/heads/master@{#41978}
2016-12-28 17:11:24 +00:00
danno
743b89768c [csa] Re-introduce automatic constant folding for IntPtrAdd and IntPtrSub
R=ishell@chromium.org
LOG=N

Review-Url: https://codereview.chromium.org/2608433003
Cr-Commit-Position: refs/heads/master@{#41977}
2016-12-28 16:59:03 +00:00
danno
81df56ae5f [csa] Improve propagation of deferred block mark
Before this patch, loops in deferred code would defeat the propagation of the
deferred flag, since back edges would usually not come from deferred blocks,
thus stoping the forward propagation of the deferred flag at loop headers. This
patch ensures that back edges are ignored in the deferred propations, properly
placing loops dominated by deferred labels and the code that follows them into
deferred code.

R=epertoso@chromium.org
LOG=N

Review-Url: https://codereview.chromium.org/2606923002
Cr-Commit-Position: refs/heads/master@{#41976}
2016-12-28 16:47:35 +00:00
danno
133b8dfa19 [csa] micro-optimization of Allocation
Instead of loading the address both the limit and top pointers, rely on the
property that the limit pointer is always directly after the top pointer so that
it can be loaded with the limit pointer's address plus a fixed offset.

This generates smaller code and reduces the number of registers required by the
allocation sequence by one.

LOG=N
R=epertoso@chromium.org

Review-Url: https://codereview.chromium.org/2605043002
Cr-Commit-Position: refs/heads/master@{#41975}
2016-12-28 16:24:07 +00:00
danno
1d96354714 [turbofan] Elide no-op adds in x64 index addressing modes
Before this patch, Loads generated in the CSA on x64 that have a zero offset
displacement will add a zero to the effective address rather than using an
addressing mode that folds away the zero.

This functionality already exists on ia32, but the port wasn't purely mechanical
so it hadn't been done on x64.

R=epertoso@chromium.org
LOG=N

Review-Url: https://codereview.chromium.org/2602893002
Cr-Commit-Position: refs/heads/master@{#41974}
2016-12-28 16:13:32 +00:00
ishell
d083833499 [turbofan] Remove virtual methods from CodeAssembler.
... and add explicit CallPrologue/CallEpilogue callbacks to CodeAssemblerState instead.
This will allow IntepreterAssembler to use any other helper assembler.

TBR=rmcilroy@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2600183004
Cr-Commit-Position: refs/heads/master@{#41973}
2016-12-28 15:47:34 +00:00
danno
505cfdd84d [csa] More conservative propagation of flag marking blocks needing frames
Specifically, don't propage "needs_frame" up through non-deferred -> deferred
block transitions where there are multiple edges from the non-deferred to
deferred code.

LOG=N
R=epertoso@chromium.org

Review-Url: https://codereview.chromium.org/2606893002
Cr-Commit-Position: refs/heads/master@{#41972}
2016-12-28 14:17:37 +00:00
danno
be11812c53 [turbofan] Improve codegen for 8- and 16-bit memory comparisons on Intel platforms
Recognize and emit in-memory comparisons of 8-bit and 16-bit values with
immediate values that fit.

LOG=N
R=epertoso@chromium.org

Review-Url: https://codereview.chromium.org/2605863002
Cr-Commit-Position: refs/heads/master@{#41971}
2016-12-28 11:51:51 +00:00
mvstanton
b063b34373 [builtins] FastNewClosureStub becomes a builtin.
This aids in TurboFan concurrent compilation, a general good.

TBR for Ross, on vacation...

TBR=rmcilroy@chromium.org

BUG=

Review-Url: https://codereview.chromium.org/2607563002
Cr-Commit-Position: refs/heads/master@{#41970}
2016-12-28 11:43:16 +00:00
epertoso
ee1b69a480 Re-enables the readability/fn_size presubmit.
BUG=

Review-Url: https://codereview.chromium.org/2601043002
Cr-Commit-Position: refs/heads/master@{#41969}
2016-12-28 11:42:05 +00:00
v8-autoroll
db03a3319a Update V8 DEPS.
Rolling v8/tools/clang: 7018464..d79b0df

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

Review-Url: https://codereview.chromium.org/2607693002
Cr-Commit-Position: refs/heads/master@{#41968}
2016-12-28 04:20:18 +00:00
adamk
121bf38bc0 [runtime] Remove a few more "HANDLE"s from CONVERT_ARG_HANDLEs
The rest of the cases I found are places where the runtime function
calls some API that takes handles but itself uses HandleScopes
internally where needed.

R=gsathya@chromium.org
BUG=v8:5783

Review-Url: https://codereview.chromium.org/2600993002
Cr-Commit-Position: refs/heads/master@{#41967}
2016-12-27 21:51:43 +00:00
bjaideep
d2146f745c Revert of "PPC/s390: [TypeFeedbackVector] Root literal arrays in function literals slots"
Reason for revert:
Original CL was reverted, https://codereview.chromium.org/2597163002

Original issue's description:
> PPC/s390: [TypeFeedbackVector] Root literal arrays in function literals slots
>
> Port 93df094081
>
> Original Commit Message:
>
>     Literal arrays and feedback vectors for a function can be garbage
>     collected if we don't have a rooted closure for the function, which
>     happens often. It's expensive to come back from this (recreating
>     boilerplates and gathering feedback again), and the cost is
>     disproportionate if the function was inlined into optimized code.
>
>     To guard against losing these arrays when we need them, we'll now
>     create literal arrays when creating the feedback vector for the outer
>     closure, and root them strongly in that vector.
>
> R=mvstanton@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
> BUG=v8:5456
> LOG=N
>
> Review-Url: https://codereview.chromium.org/2592043003
> Cr-Commit-Position: refs/heads/master@{#41898}
> Committed: 19aa7a20b0

R=mvstanton@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:5456
LOG=N

Review-Url: https://codereview.chromium.org/2601793002
Cr-Commit-Position: refs/heads/master@{#41966}
2016-12-27 21:25:10 +00:00
littledan
2c3fda910d test262 roll
Review-Url: https://codereview.chromium.org/2595403002
Cr-Commit-Position: refs/heads/master@{#41965}
2016-12-27 20:32:27 +00:00
gsathya
9c9f1870df Fix SealHandleScope usage in runtime calls
R=adamk@chromium.org
BUG=v8:5783

Review-Url: https://codereview.chromium.org/2608433002
Cr-Commit-Position: refs/heads/master@{#41964}
2016-12-27 19:08:03 +00:00
adamk
24547376a9 Fix SealHandleScope usage in runtime-classes.cc
R=gsathya@chromium.org
BUG=v8:5783

Review-Url: https://codereview.chromium.org/2603783003
Cr-Commit-Position: refs/heads/master@{#41963}
2016-12-27 18:55:16 +00:00
adamk
c5dd44c331 Remove duplicate C++ implementation of Object.prototype.toString
The only caller was the API, and it can just as easily use the
TurboFan version.

R=franzih@chromium.org

Review-Url: https://codereview.chromium.org/2603493002
Cr-Commit-Position: refs/heads/master@{#41962}
2016-12-27 18:28:47 +00:00
adamk
23019c4ec0 Object.prototype.toString must reflect mutated @@toStringTag values for primitives
The TF version of this operation was missing a ToObject coercion, so failed to do
@@toStringTag lookups when passed primitive values.

R=franzih@chromium.org
BUG=v8:5780

Review-Url: https://codereview.chromium.org/2597323002
Cr-Commit-Position: refs/heads/master@{#41961}
2016-12-27 17:57:38 +00:00