Commit Graph

1058 Commits

Author SHA1 Message Date
Caitlin Potter
bba473db74 [builtins] port Promise.race to CSA
- Implements the Promise.race algorithm using CodeStubAssembler.
- Delete src/js/promise.js, which is no longer needed.
- Migrate Promise constructor from slow to fast object in bootstrapper
  (per v8:5902)

Increases size of snapshot_blob.bin on an x64.release build by 1.27kb.

BUG=v8:5343
R=gsathya@chromium.org, cbruni@chromium.org

Change-Id: I751e7389bd6ba410109640fcd7960b6021540f2f
Reviewed-on: https://chromium-review.googlesource.com/535041
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46489}
2017-07-08 01:33:08 +00:00
Andreas Haas
08688b3953 [arm] Pass float immediates to vmov as uint32_t
This CL changes for floats what https://chromium-review.googlesource.com/c/558964/
changed for doubles.

Original message:
On x86, signalling NaNs get converted to quiet NaNs when they get push
on the stack and popped again. This happens in the code generation for
arm, specifically for the vmov instruction with the immediate parameter.
This CL replaces the vmov function in assembler-arm to take the
immediate as a uint64_t instead of a double, to guarantee that the bit
pattern does not change even if the parameter is a signalling NaN.

New in this CL:
Although src/double.h existed already, src/float.h did not exist yet.
I created the file in this CL, and moved the classes Float32 and
Float64 there, which already existed in src/deoptimizer.h.

R=titzer@chromium.org, martyn.capewell@arm.com, v8-arm-ports@googlegroups.com

BUG=v8:6564

Change-Id: I6a3f1f154af9c8cd4bb8e7e856235d3eee5e9edd
Reviewed-on: https://chromium-review.googlesource.com/561009
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Martyn Capewell <martyn.capewell@arm.com>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46473}
2017-07-07 11:58:10 +00:00
Ross McIlroy
52ea101fdc [TurboFan] Add CheckElimination reducer to InliningPhase
Adds a CheckElimination reducer to eliminate checks which have become
unecessary due to inlining of heap constants.

BUG=v8:6243, chromium:738312

Change-Id: Ie50b274bd07c86466eead08b2f21d2b63dd9e01c
Reviewed-on: https://chromium-review.googlesource.com/559129
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46460}
2017-07-06 22:10:37 +00:00
Benedikt Meurer
b9ee0657c6 [builtins] Unified C++ implementation of Map and Set iterators.
This is the first step in optimizing Map and Set iterators. This ports
all the base functionality including

 - Set.prototype.entries
 - Set.prototype.values
 - %SetPrototypeIterator%.next
 - Map.prototype.entries
 - Map.prototype.keys
 - Map.prototype.values
 - %MapPrototypeIterator%.next

to C++ and removes all the dead code and the previous half JavaScript
implementation. The next step is to port core parts to CodeStubAssembler
and finally inline the fast-paths into TurboFan directly. The relevant
design document is at:

  https://docs.google.com/document/d/13z1fvRVpe_oEroplXEEX0a3WK94fhXorHjcOMsDmR-8

Most of this work is very similar to how the Array iterator works and we
mostly follow the same process for the implementation.

R=jgruber@chromium.org

Bug: v8:6571
Change-Id: Ieb253d6705ba4077c697a5ff0cb6f87f9c4056ff
Reviewed-on: https://chromium-review.googlesource.com/561138
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46441}
2017-07-06 11:55:14 +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
Michael Achenbach
ccb5a1d342 [build] Slim down official archive and support different archive types
This drops v8_hello_world, v8_parser_shell and v8_sample_process from the
official v8 archives.

This also adds a new option to differentiate library and executable
archives.

NOTRY=true
TBR=marja@chromium.org

Bug: v8:5918
Change-Id: I946708f2eeb030296c5ce284541ecf719522186c
Reviewed-on: https://chromium-review.googlesource.com/554753
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46312}
2017-06-29 10:20:35 +00:00
Michael Achenbach
aec2862626 [build] Dump build configuration for all v8 executables
Before this CL, cctest with component build will depend on the static v8
snapshot target and omit to dump the build configuration.

Now we simply write the configuration when building any v8
executable. In pure library builds, we don't need the configuration, as
it's used by the test framework to auto-detect testing options.

Bug: v8:5918
Change-Id: Ie85ba82a2803542f0a0c88d6044167138fdd7d4f
Reviewed-on: https://chromium-review.googlesource.com/554690
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46305}
2017-06-29 08:06:45 +00:00
Michael Achenbach
4234ac9e98 [build] Fix x87 support in GN configs
Explicitly set gcc as it's derived in gyp.

Bug: chromium:645890
Change-Id: Ibe77ab10b9ce705bdb650b14e212c55b0a9154ba
Reviewed-on: https://chromium-review.googlesource.com/552638
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Zhengxing Li <zhengxing.li@intel.com>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46295}
2017-06-28 17:49:26 +00:00
Michael Achenbach
7d232d7d6a [test] Auto-detect gcov-coverage builds
Bug: chromium:645890
Change-Id: I782934939ab04f63bde8e2f3a7bfef2715fa5e93
Reviewed-on: https://chromium-review.googlesource.com/552127
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46282}
2017-06-28 12:01:33 +00:00
Michael Achenbach
095132d67a [build] Switch sanitizer coverage bot to gn
This adds GN configs for using sanitizer coverage and refactors gcov
configs. Now, both coverage kinds are behind the same gn argument
v8_code_coverage.

This also switches the bot to GN.

Bug: chromium:645890,v8:5502
Change-Id: I3af606e0cad109dd790a121d0d92e53cf4e38f9a
Reviewed-on: https://chromium-review.googlesource.com/549360
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46254}
2017-06-27 13:33:56 +00:00
Leszek Swirski
c6414dacdd Revert "[ignition] Merge bytecode array builder and writer"
This reverts commit 87f71769c5.

Reason for revert: Performance regressions https://chromeperf.appspot.com/group_report?rev=46185

Original change's description:
> [ignition] Merge bytecode array builder and writer
> 
> Move bytecode array writing logic into the array builder, allowing us to
> remove the bytecode array writer and bytecode node, and convert runtime
> operand writing to compile-time bytecode operand writing using the
> information statically known at compile time.
> 
> Bug: v8:6474
> Change-Id: I210cd9897fd41293745614e4a253c7c251dfffc9
> Reviewed-on: https://chromium-review.googlesource.com/533055
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46183}

TBR=rmcilroy@chromium.org,leszeks@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: v8:6474
Bug: chromium:736646
Change-Id: I00287b2bbbb8efa5a3141bc9c2906f91a7d33e51
Reviewed-on: https://chromium-review.googlesource.com/549319
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46235}
2017-06-27 09:10:18 +00:00
Michael Starzinger
3c9ee8f3f8 [ast] Remove AstType type system.
R=marja@chromium.org
BUG=v8:6408

Change-Id: Ied0c4d1aba18ec84d5feb02c3522b77759be216e
Reviewed-on: https://chromium-review.googlesource.com/548636
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46226}
2017-06-26 15:43:03 +00:00
Ulan Degenbaev
acf4929379 [heap] Replace concurrent marking deque with work-stealing worklist.
BUG=chromium:694255
TBR=mlippautz@chromium.org

Change-Id: I8eaec556d187453bd0d1cfbd0a12c0e81306862c
Reviewed-on: https://chromium-review.googlesource.com/548597
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46224}
2017-06-26 15:16:33 +00:00
Michael Achenbach
1ec6671f32 [build] Add gcov coverage to GN configs
This prepares switching the gcov coverage bot to GN.

We skip instrumenting test executables explicitly in gn configs.
In gyp, we did the same through an extra compiler wrapper script.

NOTRY=true

Bug: chromium:645890
Change-Id: I663fb479347063ae9228598d356bb654ca2a496c
Reviewed-on: https://chromium-review.googlesource.com/548275
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46217}
2017-06-26 13:50:28 +00:00
Michael Starzinger
c751e79ec3 [crankshaft] Remove Crankshaft.
R=danno@chromium.org
BUG=v8:6408

Change-Id: I6613557e474f415293feb164a30c15485d81ff2c
Reviewed-on: https://chromium-review.googlesource.com/547717
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46212}
2017-06-26 12:33:53 +00:00
Michael Starzinger
9bb8da1ccb [stubs] Remove support for HydrogenCodeStub generation.
R=jarin@chromium.org
BUG=v8:6408

Change-Id: Ic3337c072d1d2bb93f5b65f23e4888f65a55874f
Reviewed-on: https://chromium-review.googlesource.com/541220
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46202}
2017-06-26 08:58:09 +00:00
Leszek Swirski
87f71769c5 [ignition] Merge bytecode array builder and writer
Move bytecode array writing logic into the array builder, allowing us to
remove the bytecode array writer and bytecode node, and convert runtime
operand writing to compile-time bytecode operand writing using the
information statically known at compile time.

Bug: v8:6474
Change-Id: I210cd9897fd41293745614e4a253c7c251dfffc9
Reviewed-on: https://chromium-review.googlesource.com/533055
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46183}
2017-06-23 14:52:20 +00:00
Ulan Degenbaev
b00de2a927 [heap] Rename WorkStealingBag to Worklist.
Change-Id: I5d5df00a38b7196001fb91e2642914271d8e66d0
Reviewed-on: https://chromium-review.googlesource.com/544932
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46164}
2017-06-23 11:12:59 +00:00
Michael Lippautz
14d85ce89c [heap] Switch evacuation to ItemParallelJob
Remove PageParallelJob as it is completely replaced now. It served us
well.

Bug: chromium:651354
Change-Id: I620fa7bb0dcaf7cd3710492913c501bcb162c781
Reviewed-on: https://chromium-review.googlesource.com/544950
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46159}
2017-06-23 08:57:09 +00:00
Michael Achenbach
e3e0b6f46b Reland "[build] Add filter script for official build"
This is a reland of 54b42a55e7
Original change's description:
> [build] Add filter script for official build
> 
> This adds a V8-side script to list the files contained in an official archive.
> 
> This'll accompany the infra-side archive recipe:
> https://chromium-review.googlesource.com/c/544298/
> 
> Keeping this script on the V8-side will make it easy to change the
> archived build product.
> 
> NOTRY=true
> 
> Bug: v8:5918
> Change-Id: I9fcb2eae183a26e7ce11c839d95a583a049cbe75
> Reviewed-on: https://chromium-review.googlesource.com/544877
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46135}

TBR=vogelheim@chromium.org
NOTRY=true

Bug: v8:5918
Change-Id: I87b58c78a2cbd97f4da37ac93fe1e8ee77bf5ca0
Reviewed-on: https://chromium-review.googlesource.com/544979
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46138}
2017-06-22 14:13:53 +00:00
Michael Achenbach
d599de6565 Revert "[build] Add filter script for official build"
This reverts commit 54b42a55e7.

Reason for revert: Fails on native arm builders.

Original change's description:
> [build] Add filter script for official build
> 
> This adds a V8-side script to list the files contained in an official archive.
> 
> This'll accompany the infra-side archive recipe:
> https://chromium-review.googlesource.com/c/544298/
> 
> Keeping this script on the V8-side will make it easy to change the
> archived build product.
> 
> NOTRY=true
> 
> Bug: v8:5918
> Change-Id: I9fcb2eae183a26e7ce11c839d95a583a049cbe75
> Reviewed-on: https://chromium-review.googlesource.com/544877
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46135}

TBR=machenbach@chromium.org,vogelheim@chromium.org,tandrii@chromium.org,jochen@chromium.org

Change-Id: Ic3bb59b5f0864941c8f8b590b0a351c103988f93
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:5918
Reviewed-on: https://chromium-review.googlesource.com/544978
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46137}
2017-06-22 14:07:34 +00:00
Michael Achenbach
54b42a55e7 [build] Add filter script for official build
This adds a V8-side script to list the files contained in an official archive.

This'll accompany the infra-side archive recipe:
https://chromium-review.googlesource.com/c/544298/

Keeping this script on the V8-side will make it easy to change the
archived build product.

NOTRY=true

Bug: v8:5918
Change-Id: I9fcb2eae183a26e7ce11c839d95a583a049cbe75
Reviewed-on: https://chromium-review.googlesource.com/544877
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46135}
2017-06-22 14:00:53 +00:00
Camillo Bruni
79ec067252 [literals] Move DeprecationUpdateContext to runtime-literals.cc
Change-Id: I918bf4752c66537015cc67bd81ec68a57b4dac52
Reviewed-on: https://chromium-review.googlesource.com/544878
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46130}
2017-06-22 12:36:16 +00:00
Michael Lippautz
baf954759b [heap] Implement workstealing bag based on segments
Bug: chromium:651354
Change-Id: I8aa122f48986f494146d4e896b254846de7ce295
Reviewed-on: https://chromium-review.googlesource.com/543500
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46119}
2017-06-22 09:05:30 +00:00
Michael Starzinger
224e8ae324 Remove dead effects system.
R=marja@chromium.org

Change-Id: I34ace4425d091e7104b37079a455176af08c250d
Reviewed-on: https://chromium-review.googlesource.com/543498
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46113}
2017-06-22 08:07:48 +00:00
Andreas Haas
6828887b85 [wasm] Remove the wasm-asmjs fuzzer
The fuzzer has already been removed from chromium. In addition I removed
code which was only used by this fuzzer.

BUG=chromium:734550
R=clemensh@chromium.org
CC=mstarzinger@chromium.org

Change-Id: I2ff4614e4d64131412ead759318e5c38e38f5d3d
Reviewed-on: https://chromium-review.googlesource.com/542816
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46078}
2017-06-21 10:59:35 +00:00
Michael Achenbach
41b02eec5f Revert "Revert "Fix GCC 7 build errors""
This reverts commit da607264dd.

Reason for revert: Looked wrong. The persistent layout test
failures started in the next revision. The failure on the revision
of the reverted CL was just a flake.

Original change's description:
> Revert "Fix GCC 7 build errors"
> 
> This reverts commit c0f1ff2451.
> 
> Reason for revert: Speculative revert for layout test timeout:
> https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/16402
> 
> Original change's description:
> > Fix GCC 7 build errors
> > 
> > BUG=chromium:691681
> > R=​franzih@chromium.org
> > 
> > Change-Id: Id7e5698487f16dc217a804f6d3f24da7213c72b9
> > Reviewed-on: https://chromium-review.googlesource.com/530227
> > Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#46045}
> 
> TBR=adamk@chromium.org,franzih@chromium.org,mic.besace@gmail.com,verwaest@chromium.org
> 
> Change-Id: I2119a87a95ed9eb88b7b32ae436edf28dfc86c16
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:691681
> Reviewed-on: https://chromium-review.googlesource.com/541227
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46065}

TBR=adamk@chromium.org,machenbach@chromium.org,franzih@chromium.org,mic.besace@gmail.com,verwaest@chromium.org

Change-Id: Ieee7f6b3b80d380e720206e7b43c4b580918b1d7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:691681
Reviewed-on: https://chromium-review.googlesource.com/541228
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46067}
2017-06-20 18:22:54 +00:00
Michael Achenbach
da607264dd Revert "Fix GCC 7 build errors"
This reverts commit c0f1ff2451.

Reason for revert: Speculative revert for layout test timeout:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/16402

Original change's description:
> Fix GCC 7 build errors
> 
> BUG=chromium:691681
> R=​franzih@chromium.org
> 
> Change-Id: Id7e5698487f16dc217a804f6d3f24da7213c72b9
> Reviewed-on: https://chromium-review.googlesource.com/530227
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46045}

TBR=adamk@chromium.org,franzih@chromium.org,mic.besace@gmail.com,verwaest@chromium.org

Change-Id: I2119a87a95ed9eb88b7b32ae436edf28dfc86c16
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:691681
Reviewed-on: https://chromium-review.googlesource.com/541227
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46065}
2017-06-20 18:16:34 +00:00
Michaël Zasso
c0f1ff2451 Fix GCC 7 build errors
BUG=chromium:691681
R=franzih@chromium.org

Change-Id: Id7e5698487f16dc217a804f6d3f24da7213c72b9
Reviewed-on: https://chromium-review.googlesource.com/530227
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46045}
2017-06-20 13:18:51 +00:00
jgruber
95882f0edc [coverage] Add continuation counters
Track execution counts of the continuations of block structures (e.g.
IfStatements) to capture cases in which execution does not continue after a
block. For example:

for (;;) {
  return;
}
// Never reached, tracked by continuation counter.

A continuation counter only has a start position; it's range is implicitly
until the next sibling range or the end of the parent range.

Bug: v8:6000
Change-Id: I8e8f1f5b140b64c86754b916e626eb50f0707d70
Reviewed-on: https://chromium-review.googlesource.com/530846
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46006}
2017-06-19 13:44:09 +00:00
Michael Starzinger
5524aca31a [crankshaft] Remove dead {TypeFeedbackOracle}.
R=mvstanton@chromium.org
BUG=v8:6408

Change-Id: I228d276670a3540cdc593442ae79084b84a915d3
Reviewed-on: https://chromium-review.googlesource.com/538617
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45995}
2017-06-19 10:28:00 +00:00
Michael Starzinger
bc717ae84b [ast] Remove BailoutId and TypeFeedbackId from AST.
This removes both {BailoutId} as well as {TypeFeedbackId} numbers from
almost all AST nodes. The only exception are {IterationStatement} nodes
which still require an ID for on-stack replacement support.

R=verwaest@chromium.org
BUG=v8:6409

Change-Id: I5f7b7673ae5797b9cbc9741144d304f0d31d4446
Reviewed-on: https://chromium-review.googlesource.com/538792
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45991}
2017-06-19 09:01:03 +00:00
Michael Starzinger
e48a2ef590 [crankshaft] Remove HOptimizedGraphBuilder and friends.
R=jarin@chromium.org
BUG=v8:6408

Change-Id: I1bc4f8f5ba37cf8a3632939356f56231ccc3226f
Reviewed-on: https://chromium-review.googlesource.com/535458
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45978}
2017-06-16 11:45:34 +00:00
jarin
126451d319 [turbofan] Refactor property access building.
This is in preparation for lowering monomorphic loads during graph building.

This essentially moves the parts that will be shared to a separate class/file
(proparty-access-builder.(cc|h)).

I should say that we will not want to do accessor inlining during graph
building because that would require us to create frame states
(which is the thing we would like to avoid doing).

Review-Url: https://codereview.chromium.org/2936673005
Cr-Commit-Position: refs/heads/master@{#45973}
2017-06-16 09:34:04 +00:00
Adam Klein
431abca0ca Revert "[builtins] Move most WeakMap/WeakSet code from JS to C++ builtins"
This reverts commit 8196e10265.

Reason for revert: Performance regression due to hashcode lookup.

Original change's description:
> [builtins] Move most WeakMap/WeakSet code from JS to C++ builtins
> 
> They were already implemented mostly in C++ (only error/negative
> cases were handled in script), so this is mostly just a cleanup.
> Only the constructors remain in script after this CL.
> 
> Bug: v8:6354
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
> Change-Id: I5b3579337a8e33dc30d49c2da5cfd42baec697bb
> Reviewed-on: https://chromium-review.googlesource.com/531670
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Commit-Queue: Adam Klein <adamk@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#45924}

TBR=adamk@chromium.org,cbruni@chromium.org,gsathya@chromium.org
Bug: v8:6354, chromium:733238
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng

Change-Id: Ia5a741b9587886298f3ca057f6a6adeba556b8e0
Reviewed-on: https://chromium-review.googlesource.com/537207
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45966}
2017-06-15 22:04:38 +00:00
jshin
4aeb94a42d Use ICU for ID_START, ID_CONTINUE and WhiteSpace check
Use ICU to check ID_Start, ID_Continue and WhiteSpace even for BMP
when V8_INTL_SUPPORT is on (which is default).

Change LineTerminator::Is() to check 4 code points from
ES#sec-line-terminators instead of using tables and Lookup function.

Remove Lowercase::Is(). It's not used anywhere.

Update webkit/{ToNumber,parseFloat}.js to have the correct expectation
for U+180E and the corresponding expected files. This is a follow-up to
an earlier change ( https://codereview.chromium.org/2720953003 ).

CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_win_dbg,v8_mac_dbg;master.tryserver.chromium.android:android_arm64_dbg_recipe
CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_linux_noi18n_rel_ng

BUG=v8:5370,v8:5155
TEST=unittests --gtest_filter=CharP*
TEST=webkit: ToNumber, parseFloat
TEST=test262: built-ins/Number/S9.3*, built-ins/parse{Int,Float}/S15*
TEST=test262: language/white-space/mong*
TEST=test262: built-ins/String/prototype/trim/u180e
TEST=mjsunit: whitespaces

Review-Url: https://codereview.chromium.org/2331303002
Cr-Commit-Position: refs/heads/master@{#45957}
2017-06-14 20:32:49 +00:00
Adam Klein
8196e10265 [builtins] Move most WeakMap/WeakSet code from JS to C++ builtins
They were already implemented mostly in C++ (only error/negative
cases were handled in script), so this is mostly just a cleanup.
Only the constructors remain in script after this CL.

Bug: v8:6354
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I5b3579337a8e33dc30d49c2da5cfd42baec697bb
Reviewed-on: https://chromium-review.googlesource.com/531670
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45924}
2017-06-13 19:12:15 +00:00
Michael Achenbach
a0aec7b29e [build] Split v8_base on static-library builds on windows
Bug: v8:6461
Change-Id: Iafabf2d53aa6492b78a9e5ae683f010453bb195d
Reviewed-on: https://chromium-review.googlesource.com/533014
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45922}
2017-06-13 18:26:53 +00:00
Andreas Haas
70c6830795 [wasm] Add a fuzzer for async compilation
The new fuzzer takes the fuzzer input as module bytes and compiles them
with WebAssembly asynchronous compilation.

R=mtrofin@chromium.org

Change-Id: I9740edec68e26c04d011d85c68521e340be13c4c
Reviewed-on: https://chromium-review.googlesource.com/506156
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45912}
2017-06-13 15:13:06 +00:00
Sathya Gunasekaran
2c65b0be97 [Collections] Move size, clear, forEach to C++
Bug: v8:5717
Change-Id: I0e900b46a314a272206798aab8af5ccbb7f91fd3
Reviewed-on: https://chromium-review.googlesource.com/528315
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45907}
2017-06-13 14:10:03 +00:00
Marja Hölttä
b490fd66b8 [objects.h splitting] Move argument-related classes.
This is an unexciting CL (doesn't make the build step situation any better)
but enables moving FixedArray & co next.

BUG=v8:5402,v8:6474

Change-Id: Ia36eb3973e6242f6f68e02b9f583dc552d48422f
Reviewed-on: https://chromium-review.googlesource.com/529168
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45889}
2017-06-13 09:06:00 +00:00
Michael Starzinger
9d23ec9f69 [turbofan] Remove deoptimization support from AstGraphBuilder.
The AST-based graph builder is by now only used for asm.js code. This
change hard-codes this assumption into the compilation pipeline and
hence allows us to remove support pertaining to deoptimization from
optimized code that was not derived from bytecode.

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

Change-Id: I1138f16f663db5b9ee34e3110184067b8fcffc8b
Reviewed-on: https://chromium-review.googlesource.com/531026
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45887}
2017-06-13 08:13:31 +00:00
Ulan Degenbaev
711073a340 [heap] Add memory fence after mark-bit range update operations.
The fence ensures that the concurrent marker observes consistent state
of mark-bits for newly allocated objects.

The patch also moves Bitmap functions to cc file and removes non-atomic
versions of SetRange and ClearRange.

BUG=chromium:694255

Change-Id: I466bef654f3d4a21b7aaebdfd6d5a39ddb5f2a0a
Reviewed-on: https://chromium-review.googlesource.com/530367
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45868}
2017-06-12 16:11:19 +00:00
Andreas Haas
291f8dcfd5 [wasm] Introduce a compilation manager for WebAssembly
This CL is the first step in introducing a compilation manager for
asynchronous compile jobs in WebAssembly.

The compilation manager holds a list of currently active
AsyncCompileJobs. With the compilation manager these compile jobs get
deallocated when the isolate shuts down. Note that this CL is not enough
to provide a graceful isolate shutdown. For this we have to wait for all
compilation tasks to finish before we shut down, and we have to make the
tasks stateless. I plan to do these changes in separate CLs.

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

BUG=v8:6436

Change-Id: I9a6e165dd2ef6d33944ca303fed49f7940eea7a2
Reviewed-on: https://chromium-review.googlesource.com/528079
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45858}
2017-06-12 12:46:42 +00:00
Marja Hölttä
9a71683d9c [objects.h splitting] Move String and related classes.
BUG=v8:5402,v8:6474

Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: Id38249fe9dc88001218aa1faa1b31c9d2f9703d1
Reviewed-on: https://chromium-review.googlesource.com/528102
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45853}
2017-06-12 11:53:18 +00:00
Michael Starzinger
b3da3008a1 [build] Remove ability to disable TurboFan at build time.
This removes support for disabling TurboFan by default via the build
time {v8_disable_turbo} flag. We no longer need to be able to build
binaries with TurboFan disabled.

R=machenbach@chromium.org
BUG=v8:6408

Change-Id: I4062914c2bf823ab42250595ad67d1dc8da3f1d3
Reviewed-on: https://chromium-review.googlesource.com/528138
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45847}
2017-06-12 10:59:58 +00:00
scottmg
dc3de67047 Stubbed out linking on Fuchsia
Follows https://codereview.chromium.org/2931143002/. Sufficient to link
d8 with target_os="fuchsia" in Chrome. No implementations of platform
functions yet, just stubs.

BUG=chromium:731217

Review-Url: https://codereview.chromium.org/2932053004
Cr-Commit-Position: refs/heads/master@{#45832}
2017-06-11 14:34:32 +00:00
Clemens Hammacher
58ca2115ad [base] Introduce base::Optional, cloned from chromium
base::Optional is a replacement for std::optional, until we switch to
C++17 and can use std::optional directly.
The implementation is copied from chromium's base::Optional, but put in
the {v8::base} namespace instead of just {base}. Also, the
specialization of std::hash for base::Optional is omitted, since it's
disallowed in the style guide.

A first use in the AsmJsParser is introduced, if that one sticks, I
will refactor more uses of std::unique_ptr to use base::Optional
instead, avoiding the heap allocation.

R=mstarzinger@chromium.org
BUG=v8:6474

Change-Id: I019599d4bf9ff0105bf592dfb96d6050feba18ae
Reviewed-on: https://chromium-review.googlesource.com/528884
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45810}
2017-06-09 11:11:13 +00:00
bmeurer
af76779aa3 [builtins] Start refactoring the Apply builtin.
This splits the monolithic Apply builtin into several smaller builtins,
namely CallVargargs and ConstructVarargs, which accept a length and a
FixedArray of elements and deal with the actual stack manipulation, and
CallWithArrayLike / ConstructWithArrayLike that deal with getting the
elements from the receiver (for Function.prototype.apply, Reflect.apply
and Reflect.construct), which can now be written using the CSA.

The idea is that these builtins can be reused by TurboFan directly in
the future when we optimize apply better, and that we can also reuse the
core logic in the handling of spread calls/constructs.

R=petermarshall@chromium.org
BUG=v8:4587,v8:5269

Review-Url: https://codereview.chromium.org/2930623002
Cr-Commit-Position: refs/heads/master@{#45794}
2017-06-08 18:31:59 +00:00
Andreas Haas
c7892d3577 [wasm] Extract module compilation code into module-compiler.cc
This CL extracts the classes CompilationHelper, InstantiationHelper,
and AsyncCompileJob from wasm-module.cc and puts them into
module-compiler.{h|cc}. This is necessary to introduce a
WasmCompilationManager which is known to the isolate and manages the
lifetime of all AsyncCompileJobs.

In addition to the mechanical changes of copying the code and splitting
class declaration from instantiation, I did the following changes:

* I renamed the CompilationHelper to ModuleCompiler.
* A finalizer function is passed to the InstantiationHelper as a
  parameter.
* Adjusted UpdateDispatchTable in wasm-module.cc to make it available in
  wasm-module.h, also with the internal signature.
* Duplicate the ResolvePromise/RejectPromise helper functions.

I did not rename InstantiationHelper because I could not come up with a
good name, and it could benefit from a small special refactoring anyways.

BUG=v8:6436
R=clemensh@chromium.org, mtrofin@chromium.org

Change-Id: I4abe854c36dfc995b34c9d7b3e7ec0f4f0aa562e
Reviewed-on: https://chromium-review.googlesource.com/525572
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45773}
2017-06-07 16:38:03 +00:00