Commit Graph

36552 Commits

Author SHA1 Message Date
yangguo
546152e754 Fix DoubleToRadixCString wrt Number.MIN_VALUE.
R=bmeurer@chromium.org
BUG=v8:5767

Review-Url: https://codereview.chromium.org/2599693002
Cr-Commit-Position: refs/heads/master@{#41910}
2016-12-22 06:57:01 +00:00
bmeurer
05f5ebce2f [turbofan] Introduce a dedicated StringCharAt operator.
Previously String element access and String.prototype.charAt were
lowered to a subgraph StringFromCharCode(StringCharCodeAt(s, k)),
however that can be fairly expensive both runtime and compile time
wise. The dedicated StringCharAt operator is implemented via a call
to a builtin that does exactly this.

R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2599683002
Cr-Commit-Position: refs/heads/master@{#41909}
2016-12-22 06:49:07 +00:00
v8-autoroll
7430881471 Update V8 DEPS.
Rolling v8/build: 564d650..5c10e06

Rolling v8/third_party/catapult: f3dc14e..489a5bc

Rolling v8/tools/clang: 780832e..f6f94f4

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

Review-Url: https://codereview.chromium.org/2597893002
Cr-Commit-Position: refs/heads/master@{#41908}
2016-12-22 04:20:48 +00:00
eholk
5fa423d7c2 [wasm] sundry trap handler fixes
This CL includes several small bug fixes for trap handlers. Among the changes:

* Use the correct representation for ProtectedLoads, enabling protected loads of
  floating point types.

* Including the protected instruction list in what gets serialized for Code
  objects. This is needed to allow deserialization for Wasm modules to work.

* Get the context needed to through and exception from the Isolate rather than
  getting it as a parameter to the Protected instructions. Passing it in as an
  argument is problematic when code is compiled ahead of time, as the context
  may not be known yet. The new approach is similar to how it works for TrapIf
  and TrapUnless.

BUG= https://bugs.chromium.org/p/v8/issues/detail?id=5277

Review-Url: https://codereview.chromium.org/2591903002
Cr-Commit-Position: refs/heads/master@{#41907}
2016-12-22 00:31:59 +00:00
sampsong
c46f98bced S390 [Crankshaft]: Use LoadPositive for MathAbs
R=joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, bjaideep@ca.ibm.com

BUG=

Review-Url: https://codereview.chromium.org/2591643005
Cr-Commit-Position: refs/heads/master@{#41906}
2016-12-22 00:29:30 +00:00
gsathya
c8ce0cf99e [promises] Set correct method on Promise.reject TypeError
R=adamk@chromium.org

Review-Url: https://codereview.chromium.org/2593243002
Cr-Commit-Position: refs/heads/master@{#41905}
2016-12-21 23:52:42 +00:00
gsathya
6f08e9af9e [CSA] Fix typo
TBR=ishell@chromium.org

Review-Url: https://codereview.chromium.org/2599523002
Cr-Commit-Position: refs/heads/master@{#41904}
2016-12-21 20:18:17 +00:00
danno
bad367fd9d [ic] Remove deprecated LoadConstantStub and other related dead code
Review-Url: https://codereview.chromium.org/2597693002
Cr-Commit-Position: refs/heads/master@{#41903}
2016-12-21 20:13:59 +00:00
gsathya
2041c50402 [promises] Move Promise.prototype.catch to TF
This patch also refactors most of PromiseThen into InternalPromiseThen to
be reused with PromiseCatch and also changes InternalResolvePromise to
return and not branch.

BUG=v8:5343

Review-Url: https://codereview.chromium.org/2596553002
Cr-Commit-Position: refs/heads/master@{#41902}
2016-12-21 18:12:09 +00:00
Adam Klein
91a7a91678 Add gsathya to top-level OWNERS
R=bmeurer@chromium.org, gsathya@chromium.org, yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2591613003 .
Cr-Commit-Position: refs/heads/master@{#41901}
2016-12-21 17:49:41 +00:00
caitp
3d6a477bd0 [cctest] print name instead of context index for CallJSRuntime
Change bytecode-expectations-printer.cc in the cctest application so
that intrinsic function names are printed rather than their native
context index.

This minimizes the amount of unnecessary changes to the bytecode
expectations that need to happen whenever the context fields are
changed.

BUG=v8:5769
R=neis@chromium.org, rmcilroy@chromium.org, adamk@chromium.org

Review-Url: https://codereview.chromium.org/2593823002
Cr-Commit-Position: refs/heads/master@{#41900}
2016-12-21 16:41:11 +00:00
ishell
7cd573f439 [runtime] Remove specific Descriptor subclasses and add respective factory methods instead.
This is a preliminary step for constant tracking.

BUG=v8:5495

Review-Url: https://codereview.chromium.org/2595893002
Cr-Commit-Position: refs/heads/master@{#41899}
2016-12-21 16:40:00 +00:00
bjaideep
19aa7a20b0 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}
2016-12-21 16:37:20 +00:00
danno
455c244cbd [ics]: Remove deprecated support for patching LoadICs and StoreICs
Review-Url: https://codereview.chromium.org/2593033002
Cr-Commit-Position: refs/heads/master@{#41897}
2016-12-21 16:02:12 +00:00
leszeks
7c18f1976a Revert of abstract_code: return compiled code for compiled shared funcs (patchset #2 id:20001 of https://codereview.chromium.org/2592703002/ )
Reason for revert:
Breaks tree:

http://build.chromium.org/p/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/builds/9970

Original issue's description:
> abstract_code: return compiled code for compiled shared funcs
>
> SharedFunctionInfo's abstract_code was returning the bytecode array
> whenever SharedFunctionInfo had a bytecode array, even if the function
> was compiled (e.g. tiered up to FCG). This meant that abstract_code
> could return code that is not actually the code that will run, which was
> causing problems in profiling as the sampled PC did not match the known
> code offset.
>
> This patch changes both SharedFunctionInfo and JSFunction to return the
> bytecode if-and-only-if they are not compiled and have a bytecode array
> to return, or they already point to the interpreter trampoline.
>
> BUG=v8:5758
>
> Review-Url: https://codereview.chromium.org/2592703002
> Cr-Commit-Position: refs/heads/master@{#41894}
> Committed: 679b31c214

TBR=bmeurer@chromium.org,mstarzinger@chromium.org,mvstanton@chromium.org,mythria@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:5758

Review-Url: https://codereview.chromium.org/2591223002
Cr-Commit-Position: refs/heads/master@{#41896}
2016-12-21 15:42:07 +00:00
bbudge
7a6138ae11 [WASM] Skip SIMD test values that may result in denormalized numbers.
On ARM Neon at least, denormals flush to zero, which may not match
regular FP behavior.

LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2598583002
Cr-Commit-Position: refs/heads/master@{#41895}
2016-12-21 15:31:42 +00:00
leszeks
679b31c214 abstract_code: return compiled code for compiled shared funcs
SharedFunctionInfo's abstract_code was returning the bytecode array
whenever SharedFunctionInfo had a bytecode array, even if the function
was compiled (e.g. tiered up to FCG). This meant that abstract_code
could return code that is not actually the code that will run, which was
causing problems in profiling as the sampled PC did not match the known
code offset.

This patch changes both SharedFunctionInfo and JSFunction to return the
bytecode if-and-only-if they are not compiled and have a bytecode array
to return, or they already point to the interpreter trampoline.

BUG=v8:5758

Review-Url: https://codereview.chromium.org/2592703002
Cr-Commit-Position: refs/heads/master@{#41894}
2016-12-21 15:14:16 +00:00
mvstanton
93df094081 [TypeFeedbackVector] Root literal arrays in function literals slots
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.

BUG=v8:5456

Review-Url: https://codereview.chromium.org/2504153002
Cr-Commit-Position: refs/heads/master@{#41893}
2016-12-21 14:06:29 +00:00
jgruber
c9cb94a06f [regexp] Remove IsRegExp intrinsic
The two remaining uses of this intrinsic in debug.js and mirrors.js now
simply rely on the runtime function.

BUG=v8:5339

Review-Url: https://codereview.chromium.org/2591923003
Cr-Commit-Position: refs/heads/master@{#41892}
2016-12-21 13:55:27 +00:00
titzer
55fc5c0c32 [wasm] Rename wasm::LocalType to wasm::ValueType and kAst* to kWasm*
This is more renaming work to comply with the naming in the public
design repository. E.g. types are called "value types" and we no longer
refer to ASTs.

R=clemensh@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2594993002
Cr-Commit-Position: refs/heads/master@{#41891}
2016-12-21 13:43:00 +00:00
jgruber
bc981e61de [promises] Simplify PromiseSetHasHandler
No need to untag/tag flags, and we can also omit the write barrier.

BUG=v8:5343

Review-Url: https://codereview.chromium.org/2591193002
Cr-Commit-Position: refs/heads/master@{#41890}
2016-12-21 13:34:44 +00:00
titzer
ceb29f7c62 [wasm] Rename ast-decoder.* to function-body-decoder.*
Since WASM is no longer an AST :-(

R=clemensh@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2594973003
Cr-Commit-Position: refs/heads/master@{#41889}
2016-12-21 12:42:06 +00:00
clemensh
0ba82511da [wasm] Use Param and Return methods consistently
Also, provide a variadic template Return function for easier use, and
refactor the underlying Return function to not use the Buffer, since
that might still be needed later (for example if trap code is generated
during CallIndirect, and the arguments to the call are stored in the
buffer).

R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2591903003
Cr-Commit-Position: refs/heads/master@{#41888}
2016-12-21 11:56:18 +00:00
littledan
f69f826e51 [intl] Remove dead code to support v8Parse method
The methods Intl.NumberFormat.prototype.v8Parse and
Intl.DateTimeFormat.prototype.v8Parse were removed several months
ago due to low usage and lack of standardization potential. This
patch removes some runtime functions used to implement them, which
were accidentally left in when they were taken out.

BUG=v8:3785

Review-Url: https://codereview.chromium.org/2591103003
Cr-Commit-Position: refs/heads/master@{#41887}
2016-12-21 11:46:08 +00:00
epertoso
f4b336a577 [turbofan] Workaround for the GCC behaviour described in http://crbug.com/675648
R=jarin@chromium.org
BUG=675648

Review-Url: https://codereview.chromium.org/2598463003
Cr-Commit-Position: refs/heads/master@{#41886}
2016-12-21 10:25:26 +00:00
titzer
01c464a5af [wasm] Set JS API names and function lengths appropriately.
R=clemensh@chromium.org
BUG=chromium:575167

Review-Url: https://codereview.chromium.org/2590243003
Cr-Commit-Position: refs/heads/master@{#41885}
2016-12-21 09:03:35 +00:00
alph
0f39ef5fdf [profiler] Do not report native function names as script names.
BUG=chromium:664286

Review-Url: https://codereview.chromium.org/2595673002
Cr-Commit-Position: refs/heads/master@{#41884}
2016-12-21 07:52:05 +00:00
jshin
a42c8c67de Turn on icu_case_mapping by default
Update string-capitalize expected result because now it
passes all the tests in the file.
Mark fast/js/string-capitalization as failing with no_i18n.

Relanding after revert because the failure was taken care of
by Adam's CL at https://codereview.chromium.org/2597543002 .

BUG=v8:4477, v8:4476
TEST=test262/{built-ins,intl402}/Strings/*, webkit/fast/js/*,
     mjsunit/string-case, intl/general/case*

Cr-Original-Commit-Position: refs/heads/master@{#41834}
Committed: 7c79e23c34
Review-Url: https://codereview.chromium.org/2588963002
Cr-Commit-Position: refs/heads/master@{#41883}
2016-12-21 06:48:47 +00:00
v8-autoroll
6f66961d41 Update V8 DEPS.
Rolling v8/build: 53a8a4b..564d650

Rolling v8/third_party/catapult: 70f42a7..f3dc14e

Rolling v8/tools/clang: fcefe9f..780832e

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

Review-Url: https://codereview.chromium.org/2593913002
Cr-Commit-Position: refs/heads/master@{#41882}
2016-12-21 04:19:35 +00:00
jyan
d0e71c57e9 s390: exploit high-word facility for Smi Ops
R=joransiu@ca.ibm.com, bjaideep@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/2593803003
Cr-Commit-Position: refs/heads/master@{#41881}
2016-12-21 01:23:54 +00:00
gsathya
3952394a93 [promises] Remove unused symbols
BUG=v8:5343

Review-Url: https://codereview.chromium.org/2591033002
Cr-Commit-Position: refs/heads/master@{#41880}
2016-12-21 00:54:32 +00:00
gsathya
90291792e6 [builtins] Add ReturnReceiver builtin
This removes RegExpPrototypeSpeciesGetter and IteratorPrototypeIterator and
uses ReturnReceiver builtin instead.

This patch also ports the PromiseSpecies to TF by reusing this
builtin.

BUG=v8:5343

Review-Url: https://codereview.chromium.org/2590373002
Cr-Commit-Position: refs/heads/master@{#41879}
2016-12-21 00:51:11 +00:00
adamk
b0c05f4ab3 [test] Avoid stack space exhaustion in test by passing --no-lazy
The test depends on tricky stack space requirements, so it stopped
working in some configurations win FLAG_min_preparse_length was removed
in commit 4a5b7e32c4.

As a workaround, pass --no-lazy until the test can be refined to work
on all configurations.

BUG=v8:5729
TBR=marja@chromium.org

Review-Url: https://codereview.chromium.org/2596673002
Cr-Commit-Position: refs/heads/master@{#41878}
2016-12-21 00:08:46 +00:00
adamk
ba357cadf2 Ship String.prototype.pad{Start,End}
BUG=v8:4954
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2591853002
Cr-Original-Commit-Position: refs/heads/master@{#41873}
Committed: 07277202cf
Review-Url: https://codereview.chromium.org/2591853002
Cr-Commit-Position: refs/heads/master@{#41877}
2016-12-20 23:12:26 +00:00
Adam Klein
75586d3d9b Skip regress-trap-allocation-memento in gc_stress
This test requires its objects to live in new space, so running it
through gc stress runs just makes it susceptible to flakiness, as
was recently seen when turning on the --harmony-string-padding
flag (which just adds an extra JS file to the bootstrapper sequence).

TBR=ishell@chromium.org, jkummerow@chromium.org

Review-Url: https://codereview.chromium.org/2597543002 .
Cr-Commit-Position: refs/heads/master@{#41876}
2016-12-20 23:09:16 +00:00
gsathya
902a2f42e3 [build] Fix formatting in BUILD.gn
git cl format flagged this while merging

Review-Url: https://codereview.chromium.org/2594693003
Cr-Commit-Position: refs/heads/master@{#41875}
2016-12-20 22:55:51 +00:00
adamk
6543cddc43 Revert of Ship String.prototype.pad{Start,End} (patchset #2 id:20001 of https://codereview.chromium.org/2591853002/ )
Reason for revert:
Fails on gcstress bot (mjsunit/regress/regress-trap-allocation-memento.js)

Original issue's description:
> Ship String.prototype.pad{Start,End}
>
> BUG=v8:4954
> CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel
>
> Review-Url: https://codereview.chromium.org/2591853002
> Cr-Commit-Position: refs/heads/master@{#41873}
> Committed: 07277202cf

TBR=caitp@igalia.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4954

Review-Url: https://codereview.chromium.org/2588423003
Cr-Commit-Position: refs/heads/master@{#41874}
2016-12-20 21:34:58 +00:00
adamk
07277202cf Ship String.prototype.pad{Start,End}
BUG=v8:4954
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2591853002
Cr-Commit-Position: refs/heads/master@{#41873}
2016-12-20 20:56:49 +00:00
bjaideep
cc48d2b1d8 PPC: Use a different map to distinguish eval contexts
Port 53fdf9d192

Original Commit Message:

    eval() may introduce a scope which needs to be represented as a context at
    runtime, e.g.,

      eval('var x; let y; ()=>y')

    introduces a variable y which needs to have a context allocated for it. However,
    when traversing upwards to find the declaration context for a variable which leaks,
    as the declaration of x does above, this context has to be understood to not be
    a declaration context in sloppy mode.

    This patch makes that distinction by introducing a different map for eval-introduced
    contexts. A dynamic search for the appropriate context will continue past an eval
    context to find the appropriate context. Marking contexts as eval contexts rather
    than function contexts required updates in each compiler backend.

R=littledan@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:5295, chromium:648719
LOG=N

Review-Url: https://codereview.chromium.org/2590343002
Cr-Commit-Position: refs/heads/master@{#41872}
2016-12-20 19:12:21 +00:00
jshin
a6749915d3 Ship Intl.DateTimeFormat.formatToParts()
Move Intl.DateTimeFormat.formatToParts() to HARMONY_SHIPPING bucket.

Spec discussion:  https://github.com/tc39/ecma402/issues/30
It's in stage 4 and Firefox shipped it in Firefox 51.0.
(
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts#Browser_compatibility  )

BUG=v8:5244
TEST=intl/date-format/date-format-to-parts.js
TEST=test262/intl402/DateTimeFormat/prototype/formatToParts/*

Review-Url: https://codereview.chromium.org/2585903002
Cr-Commit-Position: refs/heads/master@{#41871}
2016-12-20 18:53:09 +00:00
bbudge
5354e28c8d [Turbofan] Add native ARM support for Simd Float32x4 operations.
- Adds Float32x4 Abs, Neg, Equal, NotEqual.

LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2594683002
Cr-Commit-Position: refs/heads/master@{#41870}
2016-12-20 16:49:53 +00:00
littledan
53fdf9d192 Use a different map to distinguish eval contexts
eval() may introduce a scope which needs to be represented as a context at
runtime, e.g.,

  eval('var x; let y; ()=>y')

introduces a variable y which needs to have a context allocated for it. However,
when traversing upwards to find the declaration context for a variable which leaks,
as the declaration of x does above, this context has to be understood to not be
a declaration context in sloppy mode.

This patch makes that distinction by introducing a different map for eval-introduced
contexts. A dynamic search for the appropriate context will continue past an eval
context to find the appropriate context. Marking contexts as eval contexts rather
than function contexts required updates in each compiler backend.

BUG=v8:5295, chromium:648719

Review-Url: https://codereview.chromium.org/2435023002
Cr-Commit-Position: refs/heads/master@{#41869}
2016-12-20 16:23:19 +00:00
bmeurer
3d9c77d812 [es6] Fix the %TypedArray% constructor.
The %TypedArray% constructor must not ever try to construct an instance,
but rather throw a TypeError instead.

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

Review-Url: https://codereview.chromium.org/2587413002
Cr-Commit-Position: refs/heads/master@{#41868}
2016-12-20 16:14:08 +00:00
littledan
b88d96c73a [intl] Remove new.target check in Intl functions and method
The Intl implementation included manual checks to see if they were
being called as a constructor. However, these checks are redundant,
as %FunctionRemovePrototype has already marked the functions as
un-constructable. This path removes the unnecessary checks.

R=yangguo

Review-Url: https://codereview.chromium.org/2587713002
Cr-Commit-Position: refs/heads/master@{#41867}
2016-12-20 16:06:19 +00:00
titzer
6e8338865a [wasm] Implement correct 2-level namespace for imports.
R=clemensh@chromium.org
CC=rossberg@chromium.org
BUG=chromium:575167

Review-Url: https://codereview.chromium.org/2591753002
Cr-Commit-Position: refs/heads/master@{#41866}
2016-12-20 15:32:56 +00:00
jochen
a1c917ca58 Update heap constants
R=ishell@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2590923002
Cr-Commit-Position: refs/heads/master@{#41865}
2016-12-20 15:26:08 +00:00
jyan
2d7f1c2c55 s390: clean up RR/RRE/RRD/RIL format in Assembler
R=joransiu@ca.ibm.com, bjaideep@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/2589063002
Cr-Commit-Position: refs/heads/master@{#41864}
2016-12-20 15:03:49 +00:00
titzer
058f188715 [wasm] Only SNPrintF the function index if a name was not supplied.
R=clemensh@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2590833002
Cr-Commit-Position: refs/heads/master@{#41863}
2016-12-20 14:36:05 +00:00
clemensh
081ac37048 [wasm] Introduce WasmSharedModuleData and refactor other objects
The new object will hold information which is shared by all clones of a
WasmCompiledModule, e.g. the decoded asm.js offset table, and in the
future also breakpoints. From there, we can set them on each new
instantiation of any clone.

While already changing lots of the code base, I also renamed all
getters from "get_foo" to "foo", to conform to the style guide.

R=titzer@chromium.org, yangguo@chromium.org
BUG=v8:5732

Review-Url: https://codereview.chromium.org/2591653002
Cr-Commit-Position: refs/heads/master@{#41862}
2016-12-20 14:34:07 +00:00
marja
a48e5ab880 objects.h splitting: Split out ScopeInfo + add necessary structures.
See tracking bug for more information.

BUG=v8:5402

Review-Url: https://codereview.chromium.org/2594663002
Cr-Commit-Position: refs/heads/master@{#41861}
2016-12-20 14:08:21 +00:00