Commit Graph

36972 Commits

Author SHA1 Message Date
gsathya
54b5c4b853 [ESnext] Implement Object Rest
This rewrites the rest property into a runtime call which sets up the
correct properties in the newly created object.

- Changes flag to --harmony-object-rest-spread
- Changes pattern rewriter to desugar rest property
- Adds new runtime function CopyDataPropertiesWithExcludedProperties

BUG=v8:5549

Review-Url: https://codereview.chromium.org/2620943002
Cr-Commit-Position: refs/heads/master@{#42430}
2017-01-18 01:05:17 +00:00
tandrii
c236fe1459 Whitespace test of CQ.
TBR=machenbach@chromium.org
NOPRESUBMIT=True
NOTRY=True
BUG=664915

Review-Url: https://codereview.chromium.org/2643563002
Cr-Commit-Position: refs/heads/master@{#42429}
2017-01-17 23:00:38 +00:00
tandrii
0dc9afefbc Infra CQ config: remove deprecated target_ref.
BUG=644915
R=sergiyb@chromium.org,machenbach@chromium.org
NOTRY=True

Review-Url: https://codereview.chromium.org/2641523003
Cr-Commit-Position: refs/heads/master@{#42428}
2017-01-17 21:42:28 +00:00
kozyatinskiy
5d95b0a9b3 [inspector] console.timeEnd formats ms in the same way as JS formats double
BUG=chromium:680801
R=dgozman@chromium.org,pfeldman@chromium.org,alph@chromium.org

Review-Url: https://codereview.chromium.org/2631553003
Cr-Commit-Position: refs/heads/master@{#42427}
2017-01-17 20:21:38 +00:00
titzer
8d76f0e346 [wasm] Enforce memory and table limits during instantiation.
R=rossberg@chromium.org
BUG=chromium:575167

Review-Url: https://codereview.chromium.org/2636173002
Cr-Commit-Position: refs/heads/master@{#42426}
2017-01-17 19:15:59 +00:00
ahaas
cfa6ce3232 [turbofan] Do not reduce Return nodes with multiple value inputs.
The existing implementation assumes that return nodes have exactly one
real value input. This assumption does not hold for WebAssembly. To
avoid incorrect behavior, this CL turns of the reduction of returns
with a value input count != 1.

R=titzer@chromium.org, mstarzinger@chromium.org

Review-Url: https://codereview.chromium.org/2638053002
Cr-Commit-Position: refs/heads/master@{#42425}
2017-01-17 19:01:32 +00:00
petermarshall
5e31df230c [MIPS] Fix Apply builtin always taking the slow path.
There were multiple bugs in the apply builtins on mips and mips64 which
caused them to always take the slow path by calling into the runtime to
create the array. The other bugs went undiscovered because those paths
were never taken.

Review-Url: https://codereview.chromium.org/2634393002
Cr-Commit-Position: refs/heads/master@{#42424}
2017-01-17 19:00:24 +00:00
gsathya
875165ea17 [promises] Clean up promise utils and remove dead code
BUG=v8:5343

Review-Url: https://codereview.chromium.org/2637523002
Cr-Commit-Position: refs/heads/master@{#42423}
2017-01-17 17:09:51 +00:00
bjaideep
bb89869a51 PPC/s390: [builtins] CompileLazy bailed out to the runtime entirely too often.
Port 743fdb25b3

Original Commit Message:

    This is just a bug. CompileLazy knows how to look in the
    SharedFunctionInfo for code (or bytecode, essentially) if it
    finds nothing in the OptimizedCodeMap. Ensure that behavior.

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

Review-Url: https://codereview.chromium.org/2641473002
Cr-Commit-Position: refs/heads/master@{#42422}
2017-01-17 17:08:42 +00:00
bjaideep
6555a3c1c2 PPC/s390: [TypeFeedbackVector] DeclareGlobals needs a literals array
Port b83c3d29a9

Original Commit Message:

    When a function is declared in global scope, the closure is created
    by the DeclareGlobals runtime service. It needs a pointer to the
    literals array, already allocated in the feedback vector. This
    fixes a bug where it's behavior wasn't in sync with CreateClosure,
    which accepts the literals from the vector.

    This enables a follow-on performance improvement in the CompileLazy
    builtin.

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

Review-Url: https://codereview.chromium.org/2634423002
Cr-Commit-Position: refs/heads/master@{#42421}
2017-01-17 17:04:07 +00:00
leszeks
5dbc1ba0f9 [conversions] Make "DoubleToUint32IfEqualToSelf" use bit magic
Uses the structure of an IEEE float to speed up
DoubleToUint32IfEqualToSelf, similar to FastD2UI. Micro-benchmarks show
a ~1.2x-2x speed-up, depending on the input.

Review-Url: https://codereview.chromium.org/2636453003
Cr-Commit-Position: refs/heads/master@{#42420}
2017-01-17 16:38:49 +00:00
ishell
23fb6cf07d [runtime] Remove redundant StoreMode enum.
BUG=v8:5495

Review-Url: https://codereview.chromium.org/2639583002
Cr-Commit-Position: refs/heads/master@{#42419}
2017-01-17 15:41:45 +00:00
ishell
322a37856a [runtime] Add DescriptorArray::GeneralizeAllFields().
... and rename [Copy]GeneralizeAllRepresentations() -> [Copy]GeneralizeAllFields().

BUG=v8:5495

Review-Url: https://codereview.chromium.org/2632373002
Cr-Commit-Position: refs/heads/master@{#42418}
2017-01-17 15:39:06 +00:00
gsathya
2fd434160a [promises] Remove runtime call from PromiseReject
Also moves some functions to prologue.js

BUG=v8:5343

Review-Url: https://codereview.chromium.org/2630593004
Cr-Commit-Position: refs/heads/master@{#42417}
2017-01-17 15:31:50 +00:00
machenbach
6715439932 Revert of [complier] Enable parallel eager inner function compilation with compiler dispatcher. (patchset #11 id:260001 of https://codereview.chromium.org/2611313002/ )
Reason for revert:
Some crashes on mac:
https://build.chromium.org/p/client.v8/builders/V8%20Mac%20-%20debug/builds/11982/steps/Ignition%20-%20turbofan/logs/regress-crbug-429159
https://build.chromium.org/p/client.v8/builders/V8%20Mac%20GC%20Stress/builds/10966

Original issue's description:
> [complier] Enable parallel eager inner function compilation with compiler dispatcher.
>
> Enable enqueueing of eager inner function compilation onto the compiler
> dispatcher. This enables these tasks to be performed in parallel to
> compilation of the outer functio (only for Ignition functions).
> We currently synchronize to ensure all inner function compilations
>  are complete before executing the outer function - future work will
> allow outer function execution to happenin parallel to inner function
> compilation.
>
> BUG=v8:5203,v8:5215
>
> Review-Url: https://codereview.chromium.org/2611313002
> Cr-Commit-Position: refs/heads/master@{#42413}
> Committed: f12661a1ec

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

Review-Url: https://codereview.chromium.org/2637123002
Cr-Commit-Position: refs/heads/master@{#42416}
2017-01-17 15:28:42 +00:00
jochen
29aaefa16a Annotate template and factory methods as not executing script
BUG=v8:5830
R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2637873002
Cr-Commit-Position: refs/heads/master@{#42415}
2017-01-17 15:22:34 +00:00
sreten.kovacevic
6c389cef5a MIPS64: Port [turbofan] ARM64: Faster checked ops for PoT arrays
Port 95f210d562

Original commit message:
Improve CheckedLoad and Store bounds checking for arrays with power of two
length.

BUG=

Review-Url: https://codereview.chromium.org/2632213002
Cr-Commit-Position: refs/heads/master@{#42414}
2017-01-17 15:03:25 +00:00
rmcilroy
f12661a1ec [complier] Enable parallel eager inner function compilation with compiler dispatcher.
Enable enqueueing of eager inner function compilation onto the compiler
dispatcher. This enables these tasks to be performed in parallel to
compilation of the outer functio (only for Ignition functions).
We currently synchronize to ensure all inner function compilations
 are complete before executing the outer function - future work will
allow outer function execution to happenin parallel to inner function
compilation.

BUG=v8:5203,v8:5215

Review-Url: https://codereview.chromium.org/2611313002
Cr-Commit-Position: refs/heads/master@{#42413}
2017-01-17 14:56:47 +00:00
marja
9e6691fb2f Preparsing inner funcs: simplify test-parsing/NoPessimisticContextAllocation.
Reduce duplication of the inner function declaration + now we get the
test for inner arrow functions for free (if we later implement lazy
inner arrow functions).

BUG=v8:5501, v8:5516

Review-Url: https://codereview.chromium.org/2637003005
Cr-Commit-Position: refs/heads/master@{#42412}
2017-01-17 14:25:38 +00:00
jgruber
47684fe852 [heap] Don't allocate immovable code in LO space during serialization
Background: the first page of each space is implicitly immovable.
Recently, our builtin code objects have reached a size at which we
fill up the first page of code space during initialization. Once
that occurs, newly requested allocations of immovable code are
allocated in a large object space page of 512K.

This CL mitigates these effects by simply marking pages as immovable
during snapshot creation instead of going into LO space.

On snapshot builds, this should just work: deserialized pages are
trimmed and marked immovable when deserialization finishes.

However, non-snapshot builds and allocations of immovable CEntryStub
code at runtime are still affected.

BUG=v8:5831

Review-Url: https://codereview.chromium.org/2635973002
Cr-Commit-Position: refs/heads/master@{#42411}
2017-01-17 14:19:58 +00:00
machenbach
c2e8cb195a [foozzie] Suppress crbug.com/681806
BUG=chromium:681806
NOTRY=true
TBR=titzer@chromium.org,bradnelson@chromium.org

Review-Url: https://codereview.chromium.org/2638913002
Cr-Commit-Position: refs/heads/master@{#42410}
2017-01-17 14:18:20 +00:00
mvstanton
743fdb25b3 [builtins] CompileLazy bailed out to the runtime entirely too often.
This is just a bug. CompileLazy knows how to look in the
SharedFunctionInfo for code (or bytecode, essentially) if it
finds nothing in the OptimizedCodeMap. Ensure that behavior.

BUG=681543
R=leszeks@chromium.org

Review-Url: https://codereview.chromium.org/2636143002
Cr-Commit-Position: refs/heads/master@{#42409}
2017-01-17 13:54:49 +00:00
mvstanton
b83c3d29a9 [TypeFeedbackVector] DeclareGlobals needs a literals array
When a function is declared in global scope, the closure is created
by the DeclareGlobals runtime service. It needs a pointer to the
literals array, already allocated in the feedback vector. This
fixes a bug where it's behavior wasn't in sync with CreateClosure,
which accepts the literals from the vector.

This enables a follow-on performance improvement in the CompileLazy
builtin.

BUG=680637

Review-Url: https://codereview.chromium.org/2634283003
Cr-Commit-Position: refs/heads/master@{#42408}
2017-01-17 13:47:00 +00:00
neis
c5948b9897 [generators] Always call function with closure context when resuming.
The resume trampolin used to call the generator function with the context of the
last suspension rather than the closure's context.  While that was fine for
Ignition, Turbofan got utterly confused.  With this CL, the resume trampolin
always passes in the closure's context (like in the very first call of the
generator function).  The generator function itself then restores its previously
current context by reading it from the generator object and doing a
PushContext.

BUG=chromium:681171

Review-Url: https://codereview.chromium.org/2639533002
Cr-Commit-Position: refs/heads/master@{#42407}
2017-01-17 13:44:10 +00:00
rossberg
8863f9f258 [wasm] Check for malformed mutability
Fixes failure on spec test globals.wast.

Review-Url: https://codereview.chromium.org/2638003002
Cr-Commit-Position: refs/heads/master@{#42406}
2017-01-17 13:35:20 +00:00
marja
bc35251f5e objects.h splitting: Move ModuleInfoEntry
BUG=v8:5402

Review-Url: https://codereview.chromium.org/2638893002
Cr-Commit-Position: refs/heads/master@{#42405}
2017-01-17 13:28:54 +00:00
jochen
0389df514d Assert that context creation doesn't throw
Instead, it is supposed to just return an empty context if it failed.
Also don't invoke interceptors (we don't for the parts that deserialize
from the snapshot anyways).

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

Review-Url: https://codereview.chromium.org/2636903002
Cr-Commit-Position: refs/heads/master@{#42404}
2017-01-17 13:01:03 +00:00
leszeks
bb71555e2e [ast] Remove internalization before AST rewriting
This internalization was not necessary, since the rewriting does not use
the .result name string.

The subsequent internalization is still needed, so to simplify later
refactoring, this CL also adds "releasing" of the disallow scopes and
uses them here immediately before the second internalize. Notably, this
means that the rewriting is now also in the disallow scopes.

Driveby: Remove isolate from the rewriter's processor constructor.

BUG=v8:5832

Review-Url: https://codereview.chromium.org/2635913002
Cr-Commit-Position: refs/heads/master@{#42403}
2017-01-17 12:46:02 +00:00
machenbach
e9981e076a [foozzie] Add test suppressions
BUG=chromium:681088,chromium:681236
NOTRY=true
TBR=bradnelson@chromium.org, titzer@chromium.org

Review-Url: https://codereview.chromium.org/2632223002
Cr-Commit-Position: refs/heads/master@{#42402}
2017-01-17 12:25:15 +00:00
ishell
19c3c667a6 [ic] Decode offset from the handler word later in store IC dispatcher.
BUG=v8:5495

Review-Url: https://codereview.chromium.org/2637073002
Cr-Commit-Position: refs/heads/master@{#42401}
2017-01-17 12:16:31 +00:00
danno
c8795be146 [csa] Improve code generation for JSArrays
Review-Url: https://codereview.chromium.org/2633273003
Cr-Commit-Position: refs/heads/master@{#42400}
2017-01-17 12:07:05 +00:00
mstarzinger
28776d0125 [compiler] Unify EnsureFeedbackMetadata call sites.
This makes sure all call sites allocating and installing the feedback
vector metadata are within the compilation pipeline and avoids spreading
them accross components.

R=leszeks@chromium.org

Review-Url: https://codereview.chromium.org/2631253002
Cr-Commit-Position: refs/heads/master@{#42399}
2017-01-17 11:22:17 +00:00
neis
248d1b3de9 [parser] Pessimistically assume top-level variables will be assigned.
We have to pessimistically assume that top-level variables will be assigned.
This is because there may be lazily parsed top-level functions, which, for
efficiency, we preparse without variable tracking.

R=adamk@chromium.org, marja@chromium.org
CC=jarin@chromium.org
BUG=v8:5636

Review-Url: https://codereview.chromium.org/2634123002
Cr-Commit-Position: refs/heads/master@{#42398}
2017-01-17 10:40:00 +00:00
mlippautz
68c994795e [heap] Remove markbits getter from raw address
BUG=651354

Review-Url: https://codereview.chromium.org/2638803002
Cr-Commit-Position: refs/heads/master@{#42397}
2017-01-17 10:35:16 +00:00
machenbach
98a1962933 [foozzie] Suppress stack-trace difference
BUG=chromium:681326
NOTRY=true
TBR=rmcilroy@chromium.org,mstarzinger@chromium.org

Review-Url: https://codereview.chromium.org/2637003004
Cr-Commit-Position: refs/heads/master@{#42396}
2017-01-17 10:32:17 +00:00
marja
31beac34a2 Scope cleanup: add default params for variable declaring functions.
This makes it clearer which places are creating variables which are
something else than NORMAL_VARIABLE + kCreatedInitialized.

BUG=

Review-Url: https://codereview.chromium.org/2631173002
Cr-Commit-Position: refs/heads/master@{#42395}
2017-01-17 10:31:52 +00:00
rmcilroy
5883bf2125 [Parser] Introduce AstStringConstants to share constants across AstValueFactory
Creates an AstStringConstants container which pre-initializes the
string constants used by AstValueFactory. This ensures that all
AstValueFactories will produce the same AstValue objects for constants,
and so they can be used by the BytecodeGenerator without having to pass
the AstValueFactory to it, enabling construction off-thread.

BUG=v8:5203

Review-Url: https://codereview.chromium.org/2630343002
Cr-Original-Commit-Position: refs/heads/master@{#42381}
Committed: d611496b8e
Review-Url: https://codereview.chromium.org/2630343002
Cr-Commit-Position: refs/heads/master@{#42394}
2017-01-17 10:20:47 +00:00
rmcilroy
01b684cf68 [modules] Fix NewJSModuleNamespace to avoid GC being able to see incomplete JSModuleNamespace.
A GC could happen when creating the Module string, which would cause the
JSModuleNamespace to be seen in an incomplete state. Instead make this
string a root object so that we don't need to allocate it during
NewJSModuleNamespace construction.

BUG=v8:1569

Review-Url: https://codereview.chromium.org/2631223002
Cr-Commit-Position: refs/heads/master@{#42393}
2017-01-17 10:14:02 +00:00
machenbach
dd9cf43ef2 [foozzie] Suppress native function string representation
BUG=chromium:667678
NOTRY=true
TBR=titzer@chromium.org,bradnelson@chromium.org

Review-Url: https://codereview.chromium.org/2633313002
Cr-Commit-Position: refs/heads/master@{#42392}
2017-01-17 10:10:03 +00:00
titzer
b5409ea2e0 Remove some dead fields from isolate.h
R=jochen@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2637923002
Cr-Commit-Position: refs/heads/master@{#42391}
2017-01-17 09:31:10 +00:00
clemensh
2956301707 [clang-format] Don't derive pointer alignment
In V8, we always want the pointer alignment to be left, i.e. "Foo* foo"
instead of "Foo *foo".

R=jochen@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2631183002
Cr-Commit-Position: refs/heads/master@{#42390}
2017-01-17 09:28:19 +00:00
v8-autoroll
078dddd450 Update V8 DEPS.
Rolling v8/build: 9a3fba5..f55127d

Rolling v8/third_party/catapult: 95b3e83..143ba4d

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

Review-Url: https://codereview.chromium.org/2634223002
Cr-Commit-Position: refs/heads/master@{#42389}
2017-01-17 04:22:56 +00:00
pan.deng
3df428bb92 [turbofan] A bug fix of loadElimination.
KillFields of an object should remove its cache from all the fields.
Currently, the cache in the front field is kept which is not expected.
This patch fixes it.

Review-Url: https://codereview.chromium.org/2618273002
Cr-Commit-Position: refs/heads/master@{#42388}
2017-01-17 03:12:08 +00:00
jyan
738cb6a759 s390: remove RotLeftAndMask32 on s390
RotleftAndMask32 is not efficient on s390

R=bjaideep@ca.ibm.com, joransiu@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/2638813002
Cr-Commit-Position: refs/heads/master@{#42387}
2017-01-16 20:02:23 +00:00
machenbach
310a899773 [foozzie] Refactoring - move source hashing to main script
BUG=chromium:673246
NOTRY=true

Review-Url: https://codereview.chromium.org/2635923002
Cr-Commit-Position: refs/heads/master@{#42386}
2017-01-16 19:53:35 +00:00
bbudge
a7e67924d1 [ARM] Add vmin, vmax NEON instructions.
- Adds vmin, vmax for FP and integer vectors, both signed and unsigned.
- Regularizes switching logic in disasm and simulator for special codes
4 and 6.
- Factors vrecpe, vrsqrte, vrecps, vrsqrts into helper fns.

LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2623993006
Cr-Commit-Position: refs/heads/master@{#42385}
2017-01-16 19:36:25 +00:00
rossberg
39e455db0d [wasm] Catch attempt to export non-existent memory
R=titzer@chromium.org
BUG=v8:5840

Review-Url: https://codereview.chromium.org/2633153002
Cr-Commit-Position: refs/heads/master@{#42384}
2017-01-16 17:44:47 +00:00
hpayer
38088853de [heap] Fix live object iterator to skip grey filler objects.
BUG=v8:5829

patch from issue 2634493004 at patchset 20001 (http://crrev.com/2634493004#ps20001)

Review-Url: https://codereview.chromium.org/2634033003
Cr-Commit-Position: refs/heads/master@{#42383}
2017-01-16 17:21:20 +00:00
rmcilroy
c8ac1a0ca5 Revert of [Parser] Introduce AstStringConstants to share constants across AstValueFactory (patchset #4 id:80001 of https://codereview.chromium.org/2630343002/ )
Reason for revert:
Seems to break modules-namespace2 on gcstress.

Original issue's description:
> [Parser] Introduce AstStringConstants to share constants across AstValueFactory
>
> Creates an AstStringConstants container which pre-initializes the
> string constants used by AstValueFactory. This ensures that all
> AstValueFactories will produce the same AstValue objects for constants,
> and so they can be used by the BytecodeGenerator without having to pass
> the AstValueFactory to it, enabling construction off-thread.
>
> BUG=v8:5203
>
> Review-Url: https://codereview.chromium.org/2630343002
> Cr-Commit-Position: refs/heads/master@{#42381}
> Committed: d611496b8e

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

Review-Url: https://codereview.chromium.org/2638783002
Cr-Commit-Position: refs/heads/master@{#42382}
2017-01-16 16:35:15 +00:00
rmcilroy
d611496b8e [Parser] Introduce AstStringConstants to share constants across AstValueFactory
Creates an AstStringConstants container which pre-initializes the
string constants used by AstValueFactory. This ensures that all
AstValueFactories will produce the same AstValue objects for constants,
and so they can be used by the BytecodeGenerator without having to pass
the AstValueFactory to it, enabling construction off-thread.

BUG=v8:5203

Review-Url: https://codereview.chromium.org/2630343002
Cr-Commit-Position: refs/heads/master@{#42381}
2017-01-16 16:06:47 +00:00