Commit Graph

36483 Commits

Author SHA1 Message Date
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
bakkot
bf9e013bbc [counters] Add UseCounters for 'f() = 0' syntax
This syntax was formerly legal per ECMAScript, but has been a
SyntaxError for some time now. V8 deviates from spec in that it
is instead a runtime error; we'd like to know if we can get
away with removing it (at least in sloppy mode) or if the spec
should be changed.

c.f. https://github.com/tc39/ecma262/issues/257#issuecomment-195106880

Also add self to authors file

BUG=v8:4480

Review-Url: https://codereview.chromium.org/2599253002
Cr-Commit-Position: refs/heads/master@{#41960}
2016-12-27 17:48:40 +00:00
littledan
e0359c3629 [intl] Create the Intl constructors to C++
This patch moves the creation of the Intl constructors from JavaScript
to C++ in bootstrapper.cc, to match all of the other builtins exposed
to the web.

BUG=v8:5751

Review-Url: https://codereview.chromium.org/2586763002
Cr-Commit-Position: refs/heads/master@{#41959}
2016-12-27 17:10:00 +00:00
littledan
d20c23cd13 Revert of [intl] Remove redundant type checking system (patchset #3 id:40001 of https://codereview.chromium.org/2591203002/ )
Reason for revert:
Issue https://bugs.chromium.org/p/chromium/issues/detail?id=677055 . I'll send out a follow-on reland, as it should still be possible to eliminate the redundant type system.

Original issue's description:
> [intl] Remove redundant type checking system
>
> Previously, the Intl implementation tracked types two ways:
>  - In the intl_initialized_marker_symbol
>  - In various named properties of the intl_impl_object_symbol value
>
> As far as I can tell, these will never disagree with each other,
> modulo bugs in Intl itself. This patch removes the second type
> checking system.
>
> BUG=v8:5751
>
> Review-Url: https://codereview.chromium.org/2591203002
> Cr-Commit-Position: refs/heads/master@{#41941}
> Committed: 0d5561b64d

TBR=yangguo@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=v8:5751

Review-Url: https://codereview.chromium.org/2601783002
Cr-Commit-Position: refs/heads/master@{#41958}
2016-12-27 15:31:07 +00:00
ulan
d6c66dbce6 [heap] New API for increasing the heap limit for debugging.
BUG=chromium:675911

Review-Url: https://codereview.chromium.org/2593043002
Cr-Commit-Position: refs/heads/master@{#41957}
2016-12-27 13:29:58 +00:00
danno
47e1cc4685 [stubs] Remove dead string copying code
Review-Url: https://codereview.chromium.org/2600763002
Cr-Commit-Position: refs/heads/master@{#41956}
2016-12-27 10:14:12 +00:00
machenbach
4cdee4fd85 [foozzie] Ignore some wasm console output
BUG=chromium:677032
NOTRY=true
TBR=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2607473002
Cr-Commit-Position: refs/heads/master@{#41955}
2016-12-26 17:14:36 +00:00
machenbach
905d72befe [foozzie] Fix paths and resources
BUG=chromium:673246
NOTRY=true
TBR=tandrii@chromium.org

Review-Url: https://codereview.chromium.org/2598323002
Cr-Commit-Position: refs/heads/master@{#41954}
2016-12-26 16:55:24 +00:00
v8-autoroll
80c507589f Update V8 DEPS.
Rolling v8/build: d14a3a7..bdc04ca

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

Review-Url: https://codereview.chromium.org/2604693002
Cr-Commit-Position: refs/heads/master@{#41953}
2016-12-25 04:27:00 +00:00
Michael Achenbach
22fc0e852d Whitespace change to trigger bots
Cr-Commit-Position: refs/heads/master@{#41952}
2016-12-24 13:47:09 +00:00
machenbach
061a3a152c Revert of [heap] Report wrappers after processing the marking deque incrementally (patchset #5 id:80001 of https://codereview.chromium.org/2604583002/ )
Reason for revert:
Speculative revert. Might block the roll:
https://codereview.chromium.org/2606503002/

The gpu bots crash with this stack top:v88internal18IncrementalMarking25AdvanceIncrementalMarkingEdNS1_16CompletionActionENS1_21ForceCompletionActionENS0_10StepOrigin

Original issue's description:
> [heap] Report wrappers after processing the marking deque incrementally
>
> BUG=chromium:676700, chromium:468240
>
> Review-Url: https://codereview.chromium.org/2604583002
> Cr-Commit-Position: refs/heads/master@{#41946}
> Committed: 1344e3a9ca

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

Review-Url: https://codereview.chromium.org/2604673002
Cr-Commit-Position: refs/heads/master@{#41951}
2016-12-24 12:07:32 +00:00
v8-autoroll
52c1cba019 Update V8 DEPS.
Rolling v8/build: 69a30f6..d14a3a7

Rolling v8/test/test262/harness: cbd968f..0f2acdd

Rolling v8/third_party/catapult: 810f05a..1e8a2ca

Rolling v8/tools/clang: 68d808f..7018464

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

Review-Url: https://codereview.chromium.org/2599293004
Cr-Commit-Position: refs/heads/master@{#41950}
2016-12-24 04:31:01 +00:00
gsathya
a8bb874288 [isolate] remove redundant return
TBR=adamk@chromium.org

Review-Url: https://codereview.chromium.org/2604483005
Cr-Commit-Position: refs/heads/master@{#41949}
2016-12-23 19:52:43 +00:00
machenbach
26325f0c8d Revert of Disable the CompilerDispatcher if we don't have idle time (patchset #1 id:1 of https://codereview.chromium.org/2600743002/ )
Reason for revert:
[Sheriff] Speculative revert since we got persistent timeouts on win32 debug:
https://build.chromium.org/p/client.v8/builders/V8%20Win32%20-%20debug/builds/6417

Please reland if it doesn't help.

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: a0d9eb346b

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

Review-Url: https://codereview.chromium.org/2600773002
Cr-Commit-Position: refs/heads/master@{#41948}
2016-12-23 19:03:48 +00:00
gsathya
0f5c69c5ed [promises] Move PromiseHasUserDefinedRejectHandler to c++
BUG=v8:5343

Review-Url: https://codereview.chromium.org/2604483002
Cr-Commit-Position: refs/heads/master@{#41947}
2016-12-23 18:03:33 +00:00
mlippautz
1344e3a9ca [heap] Report wrappers after processing the marking deque incrementally
BUG=chromium:676700, chromium:468240

Review-Url: https://codereview.chromium.org/2604583002
Cr-Commit-Position: refs/heads/master@{#41946}
2016-12-23 17:11:42 +00:00
littledan
8c1397e4a0 [intl] Fix build for noi18n mode
Fix issue created by patch https://codereview.chromium.org/2582993002/

CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_linux_noi18n_rel_ng
TBR=yangguo@chromium.org
BUG=v8:4360

Review-Url: https://codereview.chromium.org/2599973002
Cr-Commit-Position: refs/heads/master@{#41945}
2016-12-23 17:10:30 +00:00
jochen
a0d9eb346b 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}
2016-12-23 15:11:15 +00:00
littledan
b0a09d7809 [intl] Add new semantics + compat fallback to Intl constructor
ECMA 402 v2 made Intl constructors more strict in terms of how they would
initialize objects, refusing to initialize objects which have already
been constructed. However, when Chrome tried to ship these semantics,
we ran into web compatibility issues.

This patch tries to square the circle and implement the simpler v2 object
semantics while including a compatibility workaround to allow objects to
sort of be initialized later, storing the real underlying Intl object
in a symbol-named property.

The new semantics are described in this PR against the ECMA 402 spec:
https://github.com/tc39/ecma402/pull/84

BUG=v8:4360, v8:4870
LOG=Y

Review-Url: https://codereview.chromium.org/2582993002
Cr-Commit-Position: refs/heads/master@{#41943}
2016-12-23 14:32:16 +00:00
jarin
e92118bbc2 [turbofan] Optimize store to typed arrays only if the value is plain primitive.
BUG=v8:5756

Review-Url: https://codereview.chromium.org/2596843002
Cr-Commit-Position: refs/heads/master@{#41942}
2016-12-23 14:29:00 +00:00