Commit Graph

36296 Commits

Author SHA1 Message Date
ynovikov
f5cb17a825 Reland of [typedarrays] remove invalid optimization in NAMEConstructor() (patchset #1 id:1 of https://codereview.chromium.org/2548583003/ )
Reason for revert:
The bot was not affected by the revert. Speculation was wrong.

Original issue's description:
> Revert of [typedarrays] remove invalid optimization in NAMEConstructor() (patchset #1 id:1 of https://codereview.chromium.org/2544503002/ )
>
> Reason for revert:
> Speculative revert for causing timeouts on Win Debug gpu fyi bot
>
> Nothing else looks even remotely relevant in the list of changes.
> Will reland if this doesn't fix the issues.
>
> BUG=670396
>
> Original issue's description:
> > [typedarrays] remove invalid optimization in NAMEConstructor()
> >
> > Before, we were treating objects with the builtin ArrayValues iterator
> > method as array-like, where the iterator would iterate through to the
> > full length of the object.
> >
> > This optimization was not sound, because it does not ensure that the
> > next method hasn't been modified. Even if it hasn't been modified,
> > it's entirely possible to be modified during iteration. Thus, this
> > optimization has been removed due to its observability.
> >
> > BUG=v8:5699
> > R=littledan@chromium.org, cbruni@chromium.org
> >
> > Committed: https://crrev.com/77df8c67d9609ada3b7d79e8e6d33f198bbad5a1
> > Cr-Commit-Position: refs/heads/master@{#41394}
>
> TBR=cbruni@chromium.org,littledan@chromium.org,caitp@igalia.com
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=v8:5699
>
> Committed: https://crrev.com/0ea4a542202d501c4e550474e89512532571f3a0
> Cr-Commit-Position: refs/heads/master@{#41461}

TBR=cbruni@chromium.org,littledan@chromium.org,caitp@igalia.com,enne@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=670396

Review-Url: https://codereview.chromium.org/2553873002
Cr-Commit-Position: refs/heads/master@{#41504}
2016-12-05 21:47:53 +00:00
gsathya
30b564c76f Object
-- New JSObject for promises: JSPromise

Builtins
-- PromiseThen TFJ
-- PromiseCreateAndSet TFJ for internal use
-- PerformPromiseThen TFJ for internal use
-- PromiseInit for initial promise setup
-- SpeciesConstructor for use in PromiseThen
-- ThrowIfNotJSReceiver for use in SpeciesConstructor
-- AppendPromiseCallback to update FixedArray with new callback
-- InternalPerformPromiseThen

Promises.js
-- Cleanup unused symbols
-- Remove PerformPromiseThen
-- Remove PromiseThen
-- Remove PromiseSet
-- Remove PromiseAttachCallbacks

Runtime
-- PromiseSet to set promise inobject values
-- Refactor functions to use FixedArrays for callbacks instead of
   JSArray
-- Runtime_PromiseStatus to return promise status
-- Runtime_PromiseResult to return promise result
-- Runtime_PromiseDeferred to return deferred attached to promise
-- Runtime_PromiseRejectReactions to return reject reactions attached
   to promise

This CL results in a 13.07% improvement in the promises benchmark
(over 5 runs).

BUG=v8:5343

Review-Url: https://codereview.chromium.org/2536463002
Cr-Commit-Position: refs/heads/master@{#41503}
2016-12-05 21:08:31 +00:00
cbruni
7036eec6f7 Copy dictionary keys and values in enumeration in TransferNamedProperties
During bootstrapping when installing the global object we copy over the
properties from the snapshotted global object to the one created from a
provided template. Originally Genesis::TransferNamedProperties just iterated
over the entries, making the final order hash and thus platform dependent.
This CL fixes this by sorting the keys by enumeration index before copying them
to the destination object and thus making the key enumaration on the global
object platform independent.

Drive-by-fix: avoid crash when printing the global object during bootstrapping.

BUG=chromium:669029

Review-Url: https://codereview.chromium.org/2533223002
Cr-Commit-Position: refs/heads/master@{#41502}
2016-12-05 20:17:43 +00:00
clemensh
e6bd306353 [debug] Remove DebugInterface class
It only contained type definitions and static functions, so we
can also just make it a namespace.

R=kozyatinskiy@chromium.org, yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2549133002
Cr-Commit-Position: refs/heads/master@{#41501}
2016-12-05 19:44:50 +00:00
clemensh
6a8dccb197 [wasm] Implement location from stack trace for asm.js frames
This avoids the crash which ClusterFuzz found, but still does not
report the same position as without validate.asm.
For calls like "foo()|0", we report the position of the call instead of
the position of the "|" if ToNumber throws an error.

After this CL, the correctness-fuzzer for validate-asm will probably
find mismatches there.

R=titzer@chromium.org
BUG=chromium:670808

Review-Url: https://codereview.chromium.org/2548323002
Cr-Commit-Position: refs/heads/master@{#41500}
2016-12-05 19:30:16 +00:00
mvstanton
3e46a3b754 Remove FLAG_flush_optimized_code_cache
It's no longer necessary, and has been off for a year.

BUG=

Review-Url: https://codereview.chromium.org/2553643002
Cr-Commit-Position: refs/heads/master@{#41499}
2016-12-05 18:28:29 +00:00
leszeks
a32a67c7d9 [ignition] Optimize jump checks to range checks
Reorders the jump bytecodes so that the majority of jump checks can be
implemented as range checks (rather than a list of comparisons that get
compiled to a bunch of jumps).

Review-Url: https://codereview.chromium.org/2537123002
Cr-Commit-Position: refs/heads/master@{#41498}
2016-12-05 18:26:26 +00:00
vogelheim
0315bfff6b Remove unused code, AstValueFactory::ConcatStrings.
BUG=

Review-Url: https://codereview.chromium.org/2545773003
Cr-Commit-Position: refs/heads/master@{#41497}
2016-12-05 18:00:39 +00:00
yangguo
cb37af8882 Sort native context fields alphanumerically.
R=franzih@chromium.org

Review-Url: https://codereview.chromium.org/2551883002
Cr-Commit-Position: refs/heads/master@{#41496}
2016-12-05 17:48:39 +00:00
neis
67f1969a07 [parsing] Fix bug in completion value of try-finally.
R=adamk@chromium.org, verwaest@chromium.org
BUG=v8:5698

Review-Url: https://codereview.chromium.org/2537413003
Cr-Commit-Position: refs/heads/master@{#41495}
2016-12-05 17:00:48 +00:00
dgozman
0e43c39200 [inspector] Roll inspector_protocol to c65b17da8a32bc6ab25b4ebbef1008f23c69e7d1.
Roll includes:
- [inspector_protocol] Move imported/exported information to config options.
- [inspector_protocol] Restructure generator code.

BUG=chromium:664683

Review-Url: https://codereview.chromium.org/2553513002
Cr-Commit-Position: refs/heads/master@{#41494}
2016-12-05 16:22:12 +00:00
jgruber
d0eb8f91b3 [regexp] Move helper functions to custom assembler
This moves all helper functions to the RegExpBuiltinsAssembler together
with some follow-up cleanups for:

* consistent function names,
* consistent parameter names and order,
* removal of global CVariable and CLabel typedefs.

BUG=v8:5339

Review-Url: https://codereview.chromium.org/2554453003
Cr-Commit-Position: refs/heads/master@{#41493}
2016-12-05 16:13:25 +00:00
verwaest
ce63eb08f9 [counters] Move waiting for more data from background-parsing into callbacks
BUG=

Review-Url: https://codereview.chromium.org/2549083002
Cr-Commit-Position: refs/heads/master@{#41492}
2016-12-05 15:47:12 +00:00
jgruber
eb6a8adabd [regexp] Convert builtins to TF_BUILTIN macro
BUG=v8:5339

Review-Url: https://codereview.chromium.org/2543243002
Cr-Commit-Position: refs/heads/master@{#41491}
2016-12-05 14:29:44 +00:00
jgruber
28cc20eead [regexp] Migrate constructor and compile to CSA
Microbenchmarks show 25% improvement over C++, 11% improvement over JS
for the constructor. We don't have a microbenchmark covering the compile
method.

Locally, octane/regexp improved by 2%.

BUG=v8:5339

Review-Url: https://codereview.chromium.org/2551443002
Cr-Commit-Position: refs/heads/master@{#41490}
2016-12-05 13:50:52 +00:00
mstarzinger
84ea200ad8 [turbofan] Remove obsolete eval call bailout ids.
Calls that are potential eval calls are funneled through bytecode and
hence no longer use the {AstGraphBuilder} by now. Associated bailout
points can be removed.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2549113002
Cr-Commit-Position: refs/heads/master@{#41489}
2016-12-05 13:48:52 +00:00
clemensh
f5fb2da64c [inspector] Split off interface-types.h
This CL adds a new header src/debug/interface-types.h, moves the
definition of Location from the debug-interface.h to this new header,
and adds a new definition for the WasmDisassembly types.
This allows to use the types in other implementation files or headers
without having to include the entire debug-interface.h, reducing build
dependencies and compile time (especially for incremental builds).

The WasmDisassembly type replaces the old
std::pair<std::string, std::vector<std::tuple<...>>>, which was a bit
hard to unravel.

R=yangguo@chromium.org, kozyatinskiy@chromium.org, titzer@chromium.org

Review-Url: https://codereview.chromium.org/2529383002
Cr-Commit-Position: refs/heads/master@{#41488}
2016-12-05 13:32:24 +00:00
franzih
82061d6ab3 [test] Add performance test for closures.
Short living closures are very common in Node.js. This benchmark tracks progress
as we move the optimizations that are currently only behind
--mark_shared_functions_for_tier_up to the default settings.

BUG=v8:5512

Committed: https://crrev.com/f277da2a00cfd27d44a33a70213a65bd82d0bc95
Review-Url: https://codereview.chromium.org/2525053002
Cr-Original-Commit-Position: refs/heads/master@{#41246}
Cr-Commit-Position: refs/heads/master@{#41487}
2016-12-05 13:10:44 +00:00
tebbi
251c7313a0 [turbofan] removed osr typer
R=bmeurer@chromium.org

BUG=

Review-Url: https://codereview.chromium.org/2549093002
Cr-Commit-Position: refs/heads/master@{#41486}
2016-12-05 13:04:34 +00:00
leszeks
b9d930735a [ignition] Rewrite reverse iterator as random iterator
This allows us to optimise the bytecode liveness analysis to jump
directly to previously seen indices. The analysis is optimised to store
a stack of loop ends (JumpLoop bytecode indices), and iterate through
these indices directly rather than looping through the bytecode array to
find them.

Review-Url: https://codereview.chromium.org/2536653003
Cr-Commit-Position: refs/heads/master@{#41485}
2016-12-05 13:03:43 +00:00
bmeurer
bf5c5bf8a4 [turbofan] Properly check Tagged->Word32 changes.
Don't unconditionally assume that Tagged->Word32 changes are always
truncating independent of the type of the input. Work-around the
remaining issues with for-in by properly renaming the index if it's
not already of appropriate type (happens with generators or OSR).

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2545393002
Cr-Commit-Position: refs/heads/master@{#41484}
2016-12-05 11:57:16 +00:00
ishell
13cb1e54ab [stubs] Cleanup usages of CSA::Select().
1) CSA::Select() receives lambdas for generating true/false values.
   The representation parameter made mandatory.
2) CSA::Select[Type]Constant() methods receive true/false nodes directly.
   These methods are intended to be used for generating "selects" when
   true/false values are already computed.

BUG=

Review-Url: https://codereview.chromium.org/2550683003
Cr-Commit-Position: refs/heads/master@{#41483}
2016-12-05 11:32:06 +00:00
ishell
3d618949e1 [stubs] Cleanup usages of lambdas in CodeStubAssembler and friends.
The changes are:
1) Pass lambdas as const references to avoid unnecessary copying.
2) Remove CodeStubAssembler* parameter from loop bodies and let the lambdas
   capture the right assembler instead. It makes the loop body code look
   uniform with the surrounding code and unblocks splitting of a CSA
   into different classes.

BUG=

Review-Url: https://codereview.chromium.org/2535753012
Cr-Commit-Position: refs/heads/master@{#41482}
2016-12-05 11:29:17 +00:00
leszeks
8590e8d4d5 [turbofan] Access merge environment map more efficiently
Review-Url: https://codereview.chromium.org/2521313002
Cr-Commit-Position: refs/heads/master@{#41481}
2016-12-05 11:10:02 +00:00
leszeks
6f6795b508 [turbofan] Re-add bytecode analysis unit test
Now that the BASE_EMBEDDED macro is gone, this should be safe.

Originally removed in: https://codereview.chromium.org/2532103004/

Review-Url: https://codereview.chromium.org/2545723002
Cr-Commit-Position: refs/heads/master@{#41480}
2016-12-05 10:48:09 +00:00
ulan
a1680631ff Revert "[heap] Use RAIL mode for initial heap sizing"
This reverts commit aea4f1a704.

Reason: performance regression on benchmarks (crbug.com/671118).

BUG=chromium:671118,chromium:613518
TBR=hpayer@chromium.org

Review-Url: https://codereview.chromium.org/2549053002
Cr-Commit-Position: refs/heads/master@{#41479}
2016-12-05 10:15:21 +00:00
mstarzinger
a97258b00c [fullcodegen] Remove super property access support.
This removes support for accessing super properties (load, store & call)
from the {FullCodeGenerator}. Consequently optimized code containing
such constructs must use the {BytecodeGraphBuilder} and can no longer
use the {AstGraphBuilder} for graph building.

R=bmeurer@chromium.org
BUG=v8:5657

Review-Url: https://codereview.chromium.org/2544123004
Cr-Commit-Position: refs/heads/master@{#41478}
2016-12-05 10:11:42 +00:00
titzer
d9cfd7757e [wasm] Move all V8-specific limitations to wasm-limits.h
R=clemensh@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2551463002
Cr-Commit-Position: refs/heads/master@{#41477}
2016-12-05 10:02:47 +00:00
clemensh
8f9bb9b8d6 [wasm] Add disassembly for select instruction
This was somehow missing so far. With this CL, we can disassembly all
functions on AngryBots.

R=titzer@chromium.org, rossberg@chromium.org
BUG=chromium:659715

Review-Url: https://codereview.chromium.org/2552643002
Cr-Commit-Position: refs/heads/master@{#41476}
2016-12-05 09:43:09 +00:00
machenbach
d4208da3b3 [build] Make x87 bot use the snapshot.
The bot will be renamed in a follow up, when the infra side is renamed.

TBR=zhengxing.li@intel.com, vogelheim@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2549033002
Cr-Commit-Position: refs/heads/master@{#41475}
2016-12-05 08:18:28 +00:00
marija.antic
46bf4c16cc MIPS: Port '[x86] Also deal with holey arrays in the Apply builtin.'
Port of d4f01b8a65

BUG=

Review-Url: https://codereview.chromium.org/2550503003
Cr-Commit-Position: refs/heads/master@{#41474}
2016-12-05 07:45:42 +00:00
bmeurer
a639f7df04 [test] Remove useless test code.
That ADD builtin is gone for a long time.

R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2547423002
Cr-Commit-Position: refs/heads/master@{#41473}
2016-12-05 07:01:59 +00:00
bmeurer
28514d210b [compiler] Print bailout reason for disabling FCG+CS.
When enforcing Ignition+TurboFan for a function literal during
AstNumbering, make sure to print the bailout reason with --trace-opt
to make it easier to figure out what caused the bailout.

BUG=chromium:670691
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2550093002
Cr-Commit-Position: refs/heads/master@{#41472}
2016-12-05 06:46:51 +00:00
bmeurer
704d737dc7 [builtins] Don't enforce I+TF for ArraySort helpers.
The current Array.prototype.sort implementation is pretty sensitive to
compiler changes, i.e. switching to I+TF completely, so refactor it a
bit so that it can stay with FCG+CS for now.

Middle-term the Array builtins need to be refactored to TurboFan
builtins anyways.

BUG=chromium:670691,v8:5666
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2553523002
Cr-Commit-Position: refs/heads/master@{#41471}
2016-12-05 06:36:11 +00:00
v8-autoroll
a67126cb64 Update V8 DEPS.
Rolling v8/build: 83f770a..0676437

Rolling v8/tools/clang: d48a09f..7f925e3

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

Review-Url: https://codereview.chromium.org/2551003002
Cr-Commit-Position: refs/heads/master@{#41470}
2016-12-05 06:35:04 +00:00
jarin
09e4a11b25 [turbofan] Improve memory consumption for state values descriptors.
Review-Url: https://codereview.chromium.org/2546113002
Cr-Commit-Position: refs/heads/master@{#41469}
2016-12-05 06:33:55 +00:00
bmeurer
c17ea79e81 [turbofan] Lower %_DebugIsActive intrinsic.
Add support to lower the %_DebugIsActive intrinsic during
JSIntrinsicLowering instead of always going to the runtime
for this.

This addresses part of the Bluebird regression caused by
sending let and const to TurboFan and Ignition.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2550043002
Cr-Commit-Position: refs/heads/master@{#41468}
2016-12-04 18:15:47 +00:00
bmeurer
3b3ede5d5a [promises] Move promise constants to macros.py.
This should recover part of the Bluebird regression caused by
sending let/const to TurboFan+Ignition.

R=gsathya@chromium.org

Review-Url: https://codereview.chromium.org/2552583002
Cr-Commit-Position: refs/heads/master@{#41467}
2016-12-04 15:05:26 +00:00
v8-autoroll
ae90b7f09a Update V8 DEPS.
Rolling v8/third_party/catapult: ca719be..627b0d9

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

Review-Url: https://codereview.chromium.org/2545293002
Cr-Commit-Position: refs/heads/master@{#41466}
2016-12-04 04:19:59 +00:00
v8-autoroll
28cdc1f1ee Update V8 DEPS.
Rolling v8/build: a8dd8be..83f770a

Rolling v8/third_party/catapult: 36566dd..ca719be

Rolling v8/tools/clang: f4b896b..d48a09f

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

Review-Url: https://codereview.chromium.org/2550913002
Cr-Commit-Position: refs/heads/master@{#41465}
2016-12-03 04:26:58 +00:00
gdeepti
6454102c5b [wasm] Fix WasmInstanceWrapper allocation.
In the current implementation, WasmInstanceWrapper is allocated after the imports for the instance are processed, and before the InstanceFinalizer callback is associated with the instance. This raises the possibility of triggering a gc in the middle of the instantiate flow which is incorrect.

BUG=5707

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

Review-Url: https://codereview.chromium.org/2544273002
Cr-Commit-Position: refs/heads/master@{#41464}
2016-12-03 01:29:49 +00:00
adamk
00b9c9e63b Clean up --print-scopes output
Several cleanups to the output of the debug-only --print-scopes flag:
  - Function name variable only printed once
  - Only print headers for sections of variables that are non-empty
  - Assume Variables stored in Scope::variables_ are never null

R=verwaest@chromium.org

Review-Url: https://codereview.chromium.org/2544063004
Cr-Commit-Position: refs/heads/master@{#41463}
2016-12-03 00:31:46 +00:00
alph
50e50db7fd [profiler] Add CodeEvent entries for RCS counters statically on profiler start.
BUG=chromium:665398

Review-Url: https://codereview.chromium.org/2549653002
Cr-Commit-Position: refs/heads/master@{#41462}
2016-12-02 20:03:44 +00:00
enne
0ea4a54220 Revert of [typedarrays] remove invalid optimization in NAMEConstructor() (patchset #1 id:1 of https://codereview.chromium.org/2544503002/ )
Reason for revert:
Speculative revert for causing timeouts on Win Debug gpu fyi bot

Nothing else looks even remotely relevant in the list of changes.
Will reland if this doesn't fix the issues.

BUG=670396

Original issue's description:
> [typedarrays] remove invalid optimization in NAMEConstructor()
>
> Before, we were treating objects with the builtin ArrayValues iterator
> method as array-like, where the iterator would iterate through to the
> full length of the object.
>
> This optimization was not sound, because it does not ensure that the
> next method hasn't been modified. Even if it hasn't been modified,
> it's entirely possible to be modified during iteration. Thus, this
> optimization has been removed due to its observability.
>
> BUG=v8:5699
> R=littledan@chromium.org, cbruni@chromium.org
>
> Committed: https://crrev.com/77df8c67d9609ada3b7d79e8e6d33f198bbad5a1
> Cr-Commit-Position: refs/heads/master@{#41394}

TBR=cbruni@chromium.org,littledan@chromium.org,caitp@igalia.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=v8:5699

Review-Url: https://codereview.chromium.org/2548583003
Cr-Commit-Position: refs/heads/master@{#41461}
2016-12-02 18:48:35 +00:00
thomasanderson
ed48cdbc6a v8: Remove dependency on xdisplaycheck
BUG=670470
R=dpranke@chromium.org

Review-Url: https://codereview.chromium.org/2544053002
Cr-Commit-Position: refs/heads/master@{#41460}
2016-12-02 16:54:59 +00:00
ulan
aea4f1a704 [heap] Use RAIL mode for initial heap sizing
BUG=chromium:613518

Review-Url: https://codereview.chromium.org/2407153002
Cr-Commit-Position: refs/heads/master@{#41459}
2016-12-02 16:34:12 +00:00
ishell
e7a51fff24 [ic] Ensure state of load/store ICs always progresses.
... even when a receiver is not an object.

BUG=v8:5697

Review-Url: https://codereview.chromium.org/2548753003
Cr-Commit-Position: refs/heads/master@{#41458}
2016-12-02 15:07:31 +00:00
bmeurer
6e2bb99738 [test] Skip regress/regress-2185-2 with msan.
TBR=machenbach@chromium.org
BUG=v8:5666

Review-Url: https://codereview.chromium.org/2542843008
Cr-Commit-Position: refs/heads/master@{#41457}
2016-12-02 14:30:38 +00:00
rmcilroy
b4a17d6421 Avoid reading uninitialized data in SharedFunctionInfo DCHECK.
BUG=v8:5708

Review-Url: https://codereview.chromium.org/2548813002
Cr-Commit-Position: refs/heads/master@{#41456}
2016-12-02 14:07:13 +00:00
ivica.bogosavljevic
d542b077ce MIPS64: Optimize load followed by shift
Turbofan uses 64-bit load followed by 32 bit arithmetic shift when
loading higher 32 bits of 64-bit value. We simplify this
by loading higher 32 bits directly.

BUG=

Review-Url: https://codereview.chromium.org/2532333003
Cr-Commit-Position: refs/heads/master@{#41455}
2016-12-02 14:06:10 +00:00