Commit Graph

40887 Commits

Author SHA1 Message Date
Mike Stanton
aa5852a294 Add JSPerf tests for more 2nd-order Array builtins
Every, Some, Reduce, ReduceRight. Added a test that should improve
when TurboFan inlines these builtins. Updated Map and Filter tests
to include a TurboFan inline test.

Bug: v8:2229
Change-Id: Ie84d414fdcccea23c734caca55a3344f9442547f
Reviewed-on: https://chromium-review.googlesource.com/558935
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46395}
2017-07-04 09:10:01 +00:00
jarin
3a243d3aef CSA fast path for Map.prototype.(Get|Has) for string keys.
Review-Url: https://codereview.chromium.org/2964633002
Cr-Commit-Position: refs/heads/master@{#46394}
2017-07-04 04:51:54 +00:00
bgirard
93557496a2 Add StartProfiling to filter out v8 warm up
v8.cpu_profiler has a long and variable warm up period. If you look in
tracing that time shows up under V8.Execute which is very misleading. By
adding a tracing category for the time spent in
CpuProfiler::StartProfiling the warm up time can be easily identified or
even filtered out.

With this tracing event the block in StartProfiling correctly described
the time spent prepare v8.cpu_profiler out from V8.Execute

Test by collecting a trace with V8.Execute and look at when a trace
starts generating v8 samples.

BUG=chromium:733853

Review-Url: https://codereview.chromium.org/2950543002
Cr-Commit-Position: refs/heads/master@{#46393}
2017-07-03 22:01:14 +00:00
Camillo Bruni
b7a9c0223f [cleanup] Introduce more const methods
Change-Id: I703c90cfbb91f4afc035fb32a44f33af9fe736f3
Reviewed-on: https://chromium-review.googlesource.com/548459
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46392}
2017-07-03 14:44:42 +00:00
Michael Lippautz
9cb2211cb2 [heap] Remove StaticVisitorBase; Introduce Map::GetVisitorId
Bug: chromium:738368
Change-Id: I749517391f9d5dd0827f3d37f975f6c61542d1ff
Reviewed-on: https://chromium-review.googlesource.com/558914
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46391}
2017-07-03 14:38:22 +00:00
Michael Achenbach
72b5d5c00c Revert "[release] Make gerrit the default for all release tools"
This reverts commit 8840d622aa.

Reason for revert: This requires the infra-side to be adapted to look
for open rolls. There's no such feature in the gerrit recipe_module
or git-cl tooling yet.

Original change's description:
> [release] Make gerrit the default for all release tools
> 
> This switches also the V8->Chromium rolls to Gerrit.
> 
> NOTRY=true
> TBR=hablich@chromium.org
> 
> Bug: chromium:685318
> Change-Id: Idc168f790541f09bd2f2d7c2f72806ac9e966843
> Reviewed-on: https://chromium-review.googlesource.com/558913
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46388}

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

Change-Id: I597538b6165b9952b5df9cde72466b95739cf56b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:685318
Reviewed-on: https://chromium-review.googlesource.com/558225
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46390}
2017-07-03 14:31:35 +00:00
Michael Achenbach
ffbd92d7d2 [release] Drop rietveld-reload feature from release tools
The release tools used to reload CL descriptions from rietveld to consider
late edits. This makes no sense anymore with gerrit, so we drop the feature.

NOTRY=true
TBR=hablich@chromium.org

Bug: chromium:685318
Change-Id: I08231795ba3b25c0939aa2b4428973086548484d
Reviewed-on: https://chromium-review.googlesource.com/558915
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46389}
2017-07-03 13:46:18 +00:00
Michael Achenbach
8840d622aa [release] Make gerrit the default for all release tools
This switches also the V8->Chromium rolls to Gerrit.

NOTRY=true
TBR=hablich@chromium.org

Bug: chromium:685318
Change-Id: Idc168f790541f09bd2f2d7c2f72806ac9e966843
Reviewed-on: https://chromium-review.googlesource.com/558913
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46388}
2017-07-03 13:41:18 +00:00
Ilija Pavlovic
99459edf5f MIPS64: Remove optimizations with MADD and MSUB.
On Loongson 3A, MADD/MSUB instructions are actually fused MADD/MSUB and
they can cause failure in some of the tests. Since this optimization is
rarely used, and not used at all on MIPS64R6, MADD/MSUB instructions
are removed from the source base.

TEST=
BUG=

Change-Id: Ifbb5508a62731bb061f332864ffd1e210e97f963
Reviewed-on: https://chromium-review.googlesource.com/558066
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
Cr-Commit-Position: refs/heads/master@{#46387}
2017-07-03 13:19:28 +00:00
Michael Lippautz
1e9a57bd05 [heap] Remove dead leftovers from visitor migration
Bug: chromium:738368
Change-Id: Iebbfc258be7f1997dc441ccdf12c38635901f732
Reviewed-on: https://chromium-review.googlesource.com/558911
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46386}
2017-07-03 12:43:47 +00:00
Michael Achenbach
5c2f84e0c0 [test] Make auto-detect of test options more robust
The test runner automatically infers certain options from the build
product if it was generated with GN.

This CL makes the code for inferring the options more generic and makes
sure that:
1) boolean options can't be set on builds where they don't make sense
(e.g. can't pass --asan in a non-asan build)
2) string options are equal to the derived option from the build
(e.g. can't test arch x64 when build is x86)

Bug: v8:5533
Change-Id: I4badf3a17a2fc23ddb9d129602aa15f12665821f
Reviewed-on: https://chromium-review.googlesource.com/552542
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46385}
2017-07-03 12:39:29 +00:00
Michael Lippautz
64329a4bfa [heap] Refactor Scavenger
- Avoid static methods.
- Instantiate the actual visitor on the stack.
- Get rid of unnecessary abstractions.

Bug: chromium:738865
Change-Id: I4115d7b88f17a7118aa9ee129eb39a28ec413696
Reviewed-on: https://chromium-review.googlesource.com/558878
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46384}
2017-07-03 12:32:08 +00:00
Ulan Degenbaev
48dfb6077a [base] Simplify ASLR on Windows.
Change-Id: I1cb2eb715646366d516c26b11849955990dcda53
Reviewed-on: https://chromium-review.googlesource.com/558881
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46383}
2017-07-03 12:20:00 +00:00
Michael Achenbach
53d0e1cb59 [release] Fix create-release script for Gerrit
This uploads roll-branch CLs before landing and fixes an
ambiguity bug when pushing tags.

NOTRY=true
TBR=hablich@chromium.org

Bug: chromium:738679
Change-Id: I51e03d714ec97ee2d9bca4ecaf753d66038891c1
Reviewed-on: https://chromium-review.googlesource.com/558415
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46382}
2017-07-03 11:57:35 +00:00
Jochen Eisinger
cc59f8b125 Reland "Switch tracing to use v8::TracingController"
Original change's description:
> Switch tracing to use v8::TracingController
>
> BUG=v8:6511
> R=fmeawad@chromium.org
>
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
> Change-Id: I4961e4b61a9ddc98385ed97c3ffcbcaef2d9cba7
> Reviewed-on: https://chromium-review.googlesource.com/543144
> Commit-Queue: Jochen Eisinger <jochen@chromium.org>
> Reviewed-by: Fadi Meawad <fmeawad@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46307}

BUG=v8:6511
TBR=fmeawad@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng;master.tryserver.v8:v8_linux64_tsan_rel
Change-Id: Ide32b409248dfd466e7c0bae1d8ae61d6a955d98
Reviewed-on: https://chromium-review.googlesource.com/558865
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46381}
2017-07-03 11:49:23 +00:00
Igor Sheludko
c5be0b8509 [runtime] Pass LanguageMode instead of bool to Factory::NewFunctionXXX().
Bug: v8:6459
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I34d6203c7f26c54423789699e4263ce815171d3f
Reviewed-on: https://chromium-review.googlesource.com/558874
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46380}
2017-07-03 10:51:43 +00:00
Clemens Hammacher
07752032e6 [wasm] Decode local names for debugging
When providing scope information (containing the value of local
variables of live stack frames), decode the local variable names of all
functions in a wasm module and store this in the WasmDebugInfo
structure.
Use these names to actually name the reported locals, instead of using
the default names "param#<d>" and "local#<d>". These names are only used
as fallbacks for locals which were not assigned a name.

R=titzer@chromium.org,kozyatinskiy@chromium.org
BUG=v8:6245

Change-Id: Ibf7d30e392248ef5590177cd8b6329239b45e018
Reviewed-on: https://chromium-review.googlesource.com/548495
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46379}
2017-07-03 09:53:03 +00:00
Miran.Karic
eaf850e2e0 MIPS: Fix ins and ext instructions in simulator.
Instructions ins and ext didn't work properly when size = 32 because of
incorrect mask initialization, this CL fixes this. A test for Ins is
also added.

BUG=

Change-Id: I95cc8e13aaa2341b34ae59dae1eefb64c551b8b4
Reviewed-on: https://chromium-review.googlesource.com/558872
Commit-Queue: Miran Karić <Miran.Karic@imgtec.com>
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
Cr-Commit-Position: refs/heads/master@{#46378}
2017-07-03 09:44:23 +00:00
Michael Lippautz
f6817f715b [macro-assembler] Remove Crankshaft specific allocation folding
Removes the ability of allocating dominators and folded allocations
which was tied to Crankshaft's allocation folding.

Bug: v8:6408
Change-Id: Id2e1b5445c8357ac770c88e734b6c50d5f6c5eae
Reviewed-on: https://chromium-review.googlesource.com/558093
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46377}
2017-07-03 09:35:23 +00:00
Mathias Bynens
7915cf939e [elements] Rename Has*Elements and Is*ElementsKind methods
Commit 26c00f4a4c improved the names of
most FAST_* elements kinds in the enum. This patch updates the matching
Has*Elements and Is*ElementsKind method names accordingly.

- HasFastSmiElements => HasSmiElements
- IsFastSmiElementsKind => IsSmiElementsKind
- HasFastObjectElements => HasObjectElements
- IsFastObjectElementsKind => IsObjectElementsKind
- HasFastSmiOrObjectElements => HasSmiOrObjectElements
- IsFastSmiOrObjectElementsKind => IsSmiOrObjectElementsKind
- HasFastDoubleElements => HasDoubleElements
- IsFastDoubleElementsKind => IsDoubleElementsKind
- HasFastHoleyElements => HasHoleyElements
- IsFastHoleyElementsKind => IsHoleyElementsKind

Additionally, FastHoleyElementsUsage is renamed to HoleyElementsUsage.

BUG=v8:6548

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ie8f3d01eb43e909cbc6c372d88c5fbc4dfc2ac04
Reviewed-on: https://chromium-review.googlesource.com/558356
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46376}
2017-07-03 09:25:53 +00:00
Andreas Haas
b19fd0b779 [wasm] Suggest 'gclient sync' when test is failing
The jsapi-harness test runs the JS-API spec tests of WebAssembly, which
get fetched from github when 'gclient sync' is executed. Without
'gclient sync' the harness may executed a version of the tests which is
older than required by the harness. In this CL I add a suggestion to
the test to run 'gclient sync' which is shown when the test is failing.

R=marja@chromium.org

Change-Id: I36d03bebc4d6cc554eefd4eb376c3d309b7ee5b9
Reviewed-on: https://chromium-review.googlesource.com/558419
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46375}
2017-07-03 09:10:26 +00:00
Marja Hölttä
e093ad733b [parser] Skipping inner functions: fix recording eval calls.
(The test that catches the bug was test-bytecode-generator/LookupSlot)

BUG=v8:5516

Change-Id: I00a02c5326b2a132383a9d72b5b894fade53bbf2
Reviewed-on: https://chromium-review.googlesource.com/558864
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46374}
2017-07-03 09:03:16 +00:00
Peter Marshall
d92628de22 [tests] Use mock arraybuffer allocator in test to avoid huge allocation.
This sometimes caused problems with bots (for node too) because the
allocation could fail.

Bug: v8:6452
Change-Id: I346a9117eba8b6ed41566efeceaf7fb190784d76
Reviewed-on: https://chromium-review.googlesource.com/558075
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46373}
2017-07-03 08:11:00 +00:00
bmeurer
9e7b928f0f Revert of [turbofan] Extend escape analysis to reduce certain CheckMaps. (patchset #1 id:1 of https://codereview.chromium.org/2964473002/ )
Reason for revert:
Speculative revert for tiny fire on Canary (crbug.com/738781)

Original issue's description:
> [turbofan] Extend escape analysis to reduce certain CheckMaps.
>
> Enable the experimental support in escape analysis to deal with
> constant-foldable CheckMaps nodes and remove them from the effect
> chain w/o blocking the scalar replacement of the object.
>
> BUG=v8:4586,v8:5267
> R=tebbi@chromium.org
>
> Review-Url: https://codereview.chromium.org/2964473002
> Cr-Commit-Position: refs/heads/master@{#46311}
> Committed: adf7f54e24

TBR=tebbi@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=v8:4586,v8:5267

Review-Url: https://codereview.chromium.org/2970663002
Cr-Commit-Position: refs/heads/master@{#46372}
2017-07-03 07:39:33 +00:00
Michael Achenbach
3269141cbe Update V8 DEPS.
Rolling v8/build: 259d849..e9a4317

Rolling v8/third_party/catapult: 6d102fd..3b0c0e0

Rolling v8/tools/clang: 2023fc2..a89cc89

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

Change-Id: I5782e1de7c54ea4f2e1e5f637a4f166a5acc5bc6
Reviewed-on: https://chromium-review.googlesource.com/558413
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46371}
2017-07-03 07:36:24 +00:00
Caitlin Potter
7cf7a4307b [cctest] add Async Generator bytecode tests
These were originally written as part of
https://chromium-review.googlesource.com/c/550396/. I've separated them
out into a separate CL with the intent of landing it first, so that it's
easier to see the difference these CLs will have on generated bytecode.

BUG=v8:5855
TBR=tebbi@chromium.org, rmcilroy@chromium.org

Change-Id: Ib84e65847d7396e31b0e38d28f59454cf7c58fc1
Reviewed-on: https://chromium-review.googlesource.com/558221
Reviewed-by: Caitlin Potter <caitp@igalia.com>
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Cr-Commit-Position: refs/heads/master@{#46370}
2017-07-02 21:34:50 +00:00
Josh Wolfe
6c1e67f806 [intl] Implement Intl.NumberFormat.prototype.formatToParts
Includes unit tests for the post-processing step
flatten_regions_to_parts().

Bug: v8:5244
TBR: bmeurer@chromium.org, rossberg@chromium.org
Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: I306dd1721cc00c5820b061f14c4b6866f8d938f6
Reviewed-on: https://chromium-review.googlesource.com/529973
Commit-Queue: Josh Wolfe <jwolfe@igalia.com>
Reviewed-by: Daniel Ehrenberg <littledan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46369}
2017-06-30 20:14:18 +00:00
Aaron Gable
c746dcf9ec Make Gerrit the default code review for V8
Bug: chromium:685318
Change-Id: Ia603ad4a0a35bba5c5572cad32364ff3695b3a74
Reviewed-on: https://chromium-review.googlesource.com/558191
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46368}
2017-06-30 17:37:37 +00:00
Mathias Bynens
2bee643d8f [elements] Rename IsHoleyElementsKind to IsHoleyOrDictionaryElementsKind
`IsHoleyElementsKind` doesn’t just check for holeyness — it checks for
dictionary elements as well. Its name should reflect that.

This patch renames `IsHoleyElementsKind` to
`IsHoleyOrDictionaryElementsKind`, which makes it possible to rename
`IsFastHoleyElementsKind` to `IsHoleyElementsKind` in a future patch.

R=jkummerow@chromium.org, cbruni@chromium.org
BUG=v8:6548

Change-Id: Id799fe396442e9810426145359254d60990f8492
Reviewed-on: https://chromium-review.googlesource.com/558344
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46367}
2017-06-30 16:56:24 +00:00
Andreas Haas
951ab5c7b1 [wasm] Update spec tests
This CL updates the wasm spec tests. In addition it adds an
assertNotEquals function to mjsunit.js, and it fixes the test harness
to not call quit() because it causes a dead-lock in combination with
async compilation.

R=rossberg@chromium.org

Change-Id: I50cf737993adb3e2bd27977efe7e20e304b89078
Reviewed-on: https://chromium-review.googlesource.com/558077
Reviewed-by: Andreas Rossberg <rossberg@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46366}
2017-06-30 14:59:27 +00:00
Igor Sheludko
46a5d96bf7 [runtime] Fix broken definition of Array.prototype[@@iterator].
...and cleanup definition of several builtins in %TypedArrayPrototype%.

Bug: v8:6459, chromium:737877
Change-Id: Ic5832847476bf5a544ae0b0df5df0ed4edd3e44c
Reviewed-on: https://chromium-review.googlesource.com/558076
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46365}
2017-06-30 14:28:54 +00:00
Michael Lippautz
ebc98f7f04 [heap] Redo scavenging logic
Replace the second level visitation with a much simpler logic that
just separately dispatches the special cases. All other cases can
use a dispatch that just evacuates an object based on size.

This is similar to the logic used in the mark-compact collector. The
goal is to align behaviors as much as possible, highlighting and 
fixing performance issues in the different behaviors.

This CL is mechanical as possible. A followup will clean
up the naming scheme and dispatching.

Bug: chromium:738368
Change-Id: Ia5a426c5ebb25230000b127580c300c97cff8b1b
Reviewed-on: https://chromium-review.googlesource.com/558060
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46364}
2017-06-30 14:22:04 +00:00
Miran.Karic
498964cdc2 MIPS: Optimize add, sub and shift pair macro instructions.
The CL adds optimizations for AddPair, SubPair, ShlPair, ShrPair and
SarPair macro instructions.

BUG=

Change-Id: I56460624adc0aa8ae135533ef4b99e0ed8360ccb
Reviewed-on: https://chromium-review.googlesource.com/555513
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
Commit-Queue: Miran Karić <Miran.Karic@imgtec.com>
Cr-Commit-Position: refs/heads/master@{#46363}
2017-06-30 14:20:41 +00:00
Michael Lippautz
61d1ad23ce [gm] Detect goma usage from args.gn
- Properly detect whether the args.gn config actually wants goma.
- Read out cpu count dynamically.

NOTRY=true

Bug: 
Change-Id: I7a687e873ef0b009ab6eaada384378d23e1dbb1e
Reviewed-on: https://chromium-review.googlesource.com/558085
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46362}
2017-06-30 14:12:04 +00:00
Mathias Bynens
26c00f4a4c [elements] Rename FAST elements kinds
The `FAST_` prefix doesn’t make much sense — they’re all just different cases
with their own optimizations. Packedness being implicit (e.g. `FAST_ELEMENTS`
vs. `FAST_HOLEY_ELEMENTS`) is not ideal, either.

This patch renames the FAST elements kinds as follows:

- e.g. FAST_ELEMENTS => PACKED_ELEMENTS
- e.g. FAST_HOLEY_ELEMENTS => HOLEY_ELEMENTS

The following exceptions are left intact, for lack of a better name:

- FAST_SLOPPY_ARGUMENTS_ELEMENTS
- SLOW_SLOPPY_ARGUMENTS_ELEMENTS
- FAST_STRING_WRAPPER_ELEMENTS
- SLOW_STRING_WRAPPER_ELEMENTS

This makes it easier to reason about elements kinds, and less confusing to
explain how they’re used.

R=jkummerow@chromium.org, cbruni@chromium.org
BUG=v8:6548

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ie7c6bee85583c3d84b730f7aebbd70c1efa38af9
Reviewed-on: https://chromium-review.googlesource.com/556032
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46361}
2017-06-30 13:31:44 +00:00
Caitlin Potter
b57366f2e1 [async-await] allocate HeapObjects for Await all at once.
Allocates the Await success/failure closures, their context, and
the two required JSPromise objects all at once in a single call,
rather than performing multiple allocations throughout the function.

Saves about 2kb of snapshot space on an x64.release build.

Performance impact of this change has not been measured yet.

BUG=v8:4483
R=ishell@chromium.org, jgruber@chromium.org

Change-Id: I8d911cb91f5d0e00544ad3ba608aa170f6b2f704
Reviewed-on: https://chromium-review.googlesource.com/549999
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Cr-Commit-Position: refs/heads/master@{#46360}
2017-06-30 13:24:49 +00:00
Dusan Simicic
5f0d82881c MIPS[64]: Implement MSA I5 instructions in simulator
Add support for MSA I5 instructions in mips32 and mips64 simulators.

Bug: 
Change-Id: Ie1be499a1b3c686603348d895456b8f39d5c1002
Reviewed-on: https://chromium-review.googlesource.com/552554
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
Cr-Commit-Position: refs/heads/master@{#46359}
2017-06-30 13:23:44 +00:00
jgruber
582f38b38e [debug] Fix catch prediction for optimized frames
Catch prediction for optimized frames had two issues:

Inlined frames were iterated from caller-to-callee (which could
result in incorrect predictions if one frame predicted CAUGHT and
another predicted PROMISE).

When encountering a builtin frame, we'd unconditionally return its
prediction (which is wrong if it predicted UNCAUGHT and another inlined
frame predicted either CAUGHT or PROMISE).

This CL fixes both issues and refactors the function to reduce nesting.

BUG=v8:6536

Change-Id: I764a4ec033e4476bd840134b5eacfe0e08b3c1a4
Reviewed-on: https://chromium-review.googlesource.com/555519
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46358}
2017-06-30 13:21:19 +00:00
jgruber
86f147655c [debug] Default to UNCAUGHT in catch prediction
V8's catch prediction mechanism tries to predict whether a thrown
exception will be caught, just by looking at the current call stack.

At the time when catch prediction was first introduced, only a few
builtins (mostly related to Promise and Generator) could end up being
fed into the catch prediction mechanism. This is no longer the case now
that builtins are used in new ways, e.g. Array.p.forEach's continuation
builtins.

This CL removes the need to explicitly mark all builtins visible to the
StackFrameIterator as CAUGHT/UNCAUGHT/PROMISE, and instead defaults to
treating unmarked builtins as UNCAUGHT.

BUG=v8:6536

Change-Id: Ibdc106a91b2b0ffb93099433077642cad02c71e2
Reviewed-on: https://chromium-review.googlesource.com/555518
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46357}
2017-06-30 13:17:49 +00:00
Igor Sheludko
3cb5526500 [runtime] Remove Runtime::kFunctionSetInstanceClassName.
... and set the instance class name in a bootstrapper instead.

Change-Id: Ie8a9a0e7cdc22ca19616b4a0d09665e059cd4d3e
Reviewed-on: https://chromium-review.googlesource.com/557864
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46356}
2017-06-30 13:01:49 +00:00
Leszek Swirski
0571adf189 [compiler] Remove frame state combine pushing
With FCG no longer able to deoptimize, we can remove the "push" version
of output frame state combine, as deoptimisation to bytecode is always
the PokeAt variant.

Bug: v8:6409
Change-Id: I9b6d38a7441ca834835615c238228fa8a75a027b
Reviewed-on: https://chromium-review.googlesource.com/557866
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46355}
2017-06-30 12:41:24 +00:00
Jaime Bernardo
3bef2af6ef [build] Set MSVS .obj folders in gyp for v8_base
Building on Windows with gyp fails depending on the result from
sharding the src/v8.gyp:v8_base target. If two source files with the
same name are in the same shard, their output object file path would
conflict with one another. One example of this conflict is v8_base's
runtime/runtime.cc and the V8 inspector's protocol/Runtime.cpp that
is generated at build time, for which the files runtime.obj and
Runtime.obj would be created, but MSVS overwrites one of them with
the other.

Dividing the .obj output path by the original source's extension
prevents this overwrite.

Refs: https://github.com/nodejs/node/pull/13959
Bug: 
Change-Id: I158e6178f2511297899ee50ea159f574916f903f
Reviewed-on: https://chromium-review.googlesource.com/556599
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46354}
2017-06-30 12:40:19 +00:00
Andreas Haas
89154bf681 Revert "[wasm] Run foreground compilation tasks as normal tasks"
This reverts commit 1520a8518a.

Reason for revert: This CL does not do what it should. All tasks which access the isolate have to be cancelable to guarantee that the isolate still exists when the task is executed. Foreground compilation tasks access the isolate, so they cannot be just normal tasks.

Original change's description:
> [wasm] Run foreground compilation tasks as normal tasks
> 
> This CL makes foreground compilation tasks normal (i.e. not cancelable)
> again, because otherwise a deadlock can happen. I think the reason why
> the foreground tasks were cancelable was to make sure that all tasks
> either finish correctly or get canceled. However, since the isolate can
> only shut down on the main thread, this means that the foreground task
> should have already finished when the isolate shuts down, or it should
> not have started at all. I reordered the deletion of the AsyncCompileJob
> though to make sure that an AsyncCompileJob is removed from
> CompilationManager before its promise is resolved.
> 
> Here is the deadlock: The JS code which is executed after a promise is
> resolved is executed within the task which resolves the promise. In case
> of async compilation this means that some JS code is executed within a
> CompileTask. In JS, the shutdown of the isolate can be triggered. During
> the shutdown of the isolate, the CancelableTaskManager waits for all
> registered cancelable tasks to complete, including the CompileTask of
> async compilation. This means that the CancelableTaskManager waits for
> itself to finish, which is a deadlock.
> 
> R=​clemensh@chromium.org, mtrofin@chromium.org
> 
> Change-Id: I9f8c7fb2cfc5b9bfc53c761010b1590293bb82c9
> Reviewed-on: https://chromium-review.googlesource.com/554733
> Commit-Queue: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46343}

TBR=mtrofin@chromium.org,ahaas@chromium.org,clemensh@chromium.org

Change-Id: I60fab90b46d70c703d827816503e7e23b8c50251
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/558284
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46353}
2017-06-30 12:34:11 +00:00
Andreas Haas
bfbabce113 Revert "[wasm] Update spec tests"
This CL landed on top of another CL which I want to revert.

This reverts commit 27b0d6a9fc.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> [wasm] Update spec tests
> 
> Update the spec tests in v8 to the most recent version.
> 
> R=​rossberg@chromium.org
> CC=titzer@chromium.org
> 
> Change-Id: Ib4e809c20150502b131a2c0b68fdb2ede1d5f85f
> Reviewed-on: https://chromium-review.googlesource.com/552155
> Commit-Queue: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Andreas Rossberg <rossberg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46346}

TBR=mstarzinger@chromium.org,rossberg@chromium.org,ahaas@chromium.org

Change-Id: I82e4a2887bcb867d3572b78c36a20adc05df0903
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/558040
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46352}
2017-06-30 12:28:22 +00:00
jgruber
547c5d32d7 [coverage] Handle deleted coverage infos
It can happen that coverage infos for a function containing
IncBlockCounter bytecodes can be deleted (e.g. by switching to
best-effort coverage). Handle this case correctly in the IncBlockCounter
runtime function.

BUG=v8:6000

Change-Id: I49b9f52822661150d55410d6b173b3929adf4af2
Reviewed-on: https://chromium-review.googlesource.com/558039
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46351}
2017-06-30 12:14:45 +00:00
Michael Achenbach
fa4314da8b Revert "[wasm] Allow the initialization of a single compilation unit"
This reverts commit ca93156294.

Reason for revert: tsan:
https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/16007

Original change's description:
> [wasm] Allow the initialization of a single compilation unit
> 
> This CL adds a new function {InitializeCompilationUnit} to initialize
> a single compilation unit and not just all compilation units at once.
> This is necessary for streaming compilation eventually. This also
> required some refactoring on how the working queue for compilation units
> works. Previously the synchronization was done with an atomic counter,
> now it is done with a lock. Note that the code to finish compilation
> of a module still only works if the working queue gets only empty when
> all work is done. I plan to change this in a different CL.
> 
> Since the code would not be tested without streaming compilation, I added
> an experimental flag and a test to test the new code.
> 
> R=​clemensh@chromium.org, mtrofin@chromium.org
> 
> Change-Id: I839c04fd78d1ea8e1db202f2cbed41c4c2cf4f28
> Reviewed-on: https://chromium-review.googlesource.com/550096
> Commit-Queue: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46348}

TBR=mtrofin@chromium.org,ahaas@chromium.org,clemensh@chromium.org

Change-Id: Ied6532f05463c0b78c8b8f5307d44640bcca8316
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/558224
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46350}
2017-06-30 12:06:36 +00:00
Ulan Degenbaev
f341bb0f62 Revert "[heap] Allow a minimum semi-space size of 512K."
This reverts commit 0d2ed6c328.

The CL introduced perf regressions: crbug.com/735649.

We are going to reland the CL in an isolated V8 roll to ensure
that perf regressions are attributed correctly.

Original commit message:
> [heap] Allow a minimum semi-space size of 512K.
> This CL also reduces the minimum semi-space size to 512K.
> BUG=chromium:716032

BUG=chromium:735649

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I1f1b08ca6853347c00070f000c309d839ff8a4bb
Reviewed-on: https://chromium-review.googlesource.com/552541
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46349}
2017-06-30 12:03:04 +00:00
Andreas Haas
ca93156294 [wasm] Allow the initialization of a single compilation unit
This CL adds a new function {InitializeCompilationUnit} to initialize
a single compilation unit and not just all compilation units at once.
This is necessary for streaming compilation eventually. This also
required some refactoring on how the working queue for compilation units
works. Previously the synchronization was done with an atomic counter,
now it is done with a lock. Note that the code to finish compilation
of a module still only works if the working queue gets only empty when
all work is done. I plan to change this in a different CL.

Since the code would not be tested without streaming compilation, I added
an experimental flag and a test to test the new code.

R=clemensh@chromium.org, mtrofin@chromium.org

Change-Id: I839c04fd78d1ea8e1db202f2cbed41c4c2cf4f28
Reviewed-on: https://chromium-review.googlesource.com/550096
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46348}
2017-06-30 11:20:12 +00:00
Marja Hölttä
937b5011b8 [parser] Skipping inner funcs: Associate data to SharedFunctionInfo, not Script.
This way, each lazy function needs to handle only the data relevant to
itself. This reduced data handling overheads.

Other changes:

1) Don't deserialize the data; once it's on the heap, it can stay there. Lazy
function compilation is only done in the main thread.

2) Separate ProducedPreParsedScopeData and ConsumedPreParsedScopeData. It's clearer, because:

- The data looks fundamentally different when we're producing it and when we're
  consuming it.

- Cleanly separates the operations we can do in the "producing phase" and in the
  "consuming phase".

Bug: v8:5516
Change-Id: I6985a6621f71b348a55155724765624b5d5f7c33
Reviewed-on: https://chromium-review.googlesource.com/528094
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46347}
2017-06-30 11:12:52 +00:00
Andreas Haas
27b0d6a9fc [wasm] Update spec tests
Update the spec tests in v8 to the most recent version.

R=rossberg@chromium.org
CC=titzer@chromium.org

Change-Id: Ib4e809c20150502b131a2c0b68fdb2ede1d5f85f
Reviewed-on: https://chromium-review.googlesource.com/552155
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Andreas Rossberg <rossberg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46346}
2017-06-30 09:46:48 +00:00