Commit Graph

1682 Commits

Author SHA1 Message Date
Daniel Bratell
db0165adc2 Removed reference to deleted assembler-arch-inl.h
src/assembler-arch-inl.h was deleted in November but it
remained in the build system. This patch also removes it from
the build system.

Change-Id: Ib384943861156d603636dc3069130cd6c5dfd4ef
Reviewed-on: https://chromium-review.googlesource.com/c/1456100
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#59396}
2019-02-06 12:51:01 +00:00
Ujjwal Sharma
44ffcca488 [string] port String.p.startsWith to torque
Port String.prototype.startsWith from a CPP builtin to a Torque builtin.

Spec: https://tc39.github.io/ecma262/#sec-string.prototype.startswith

Bug: v8:8400
Change-Id: I51aff0b3a4126c17ab4f89763019fd7e4ba665d9
Reviewed-on: https://chromium-review.googlesource.com/c/1361340
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59355}
2019-02-05 08:13:37 +00:00
Takuto Ikuta
bddc6aa556 Reland "Reland "Extract JSObject class from objects.cc""
This is a reland of 83908b865b

Fix: check V8_INTL_SUPPORT macro in js-objects.cc

Original change's description:
> Reland "Extract JSObject class from objects.cc"
>
> This is a reland of b8c821f4e2
>
> Fix: include src/string-stream.h for compile failure
> https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20builder/39320
>
> Original change's description:
> > Extract JSObject class from objects.cc
> >
> > I extracted following class member functions to js-objects.cc
> > * JSReceiver
> > * JSObject
> > * JSBoundFunction
> > * JSFunction
> > * JSGlobalObject
> > * JSDate
> > * JSMessageObject
> >
> > Declaration of all above class are in js-objects.h.
> >
> > I also moved AllocationSite::DigestTransitionFeedback used in JSObject::UpdateAllocationSite
> > and ShouldConvertToSlowElements used in JSObject and JSArray
> >
> > This patch makes compile time of objects.cc from 17.6s to 14.1s on Z840 Linux.
> > And js-objects.cc takes 8.69s for compile.
> >
> > Bug: v8:7629
> > Change-Id: I989f22363667445dd28d7f8c06c81ff79d6ed45f
> > Reviewed-on: https://chromium-review.googlesource.com/c/1447916
> > Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> > Reviewed-by: Marja Hölttä <marja@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#59288}
>
> Bug: v8:7629
> Bug: v8:8562
> Change-Id: Iac2227c5f0c5a4072d16814ecae481fb4720e4f5
> Reviewed-on: https://chromium-review.googlesource.com/c/1449951
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59318}

Bug: v8:7629, v8:8562
Change-Id: If8870bd579d8597d08981a83492f60595e081a65
Reviewed-on: https://chromium-review.googlesource.com/c/1452097
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59329}
2019-02-04 10:53:56 +00:00
Takuto Ikuta
9023013f64 Revert "Reland "Extract JSObject class from objects.cc""
This reverts commit 83908b865b.

Reason for revert: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20noi18n%20-%20debug/25074

Original change's description:
> Reland "Extract JSObject class from objects.cc"
> 
> This is a reland of b8c821f4e2
> 
> Fix: include src/string-stream.h for compile failure
> https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20builder/39320
> 
> Original change's description:
> > Extract JSObject class from objects.cc
> >
> > I extracted following class member functions to js-objects.cc
> > * JSReceiver
> > * JSObject
> > * JSBoundFunction
> > * JSFunction
> > * JSGlobalObject
> > * JSDate
> > * JSMessageObject
> >
> > Declaration of all above class are in js-objects.h.
> >
> > I also moved AllocationSite::DigestTransitionFeedback used in JSObject::UpdateAllocationSite
> > and ShouldConvertToSlowElements used in JSObject and JSArray
> >
> > This patch makes compile time of objects.cc from 17.6s to 14.1s on Z840 Linux.
> > And js-objects.cc takes 8.69s for compile.
> >
> > Bug: v8:7629
> > Change-Id: I989f22363667445dd28d7f8c06c81ff79d6ed45f
> > Reviewed-on: https://chromium-review.googlesource.com/c/1447916
> > Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> > Reviewed-by: Marja Hölttä <marja@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#59288}
> 
> Bug: v8:7629
> Bug: v8:8562
> Change-Id: Iac2227c5f0c5a4072d16814ecae481fb4720e4f5
> Reviewed-on: https://chromium-review.googlesource.com/c/1449951
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59318}

TBR=marja@chromium.org,mstarzinger@chromium.org,titzer@chromium.org,tikuta@chromium.org

Change-Id: I3260edecb1434bbf9c25d89c9f9a8af02d106855
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7629, v8:8562
Reviewed-on: https://chromium-review.googlesource.com/c/1452096
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59324}
2019-02-04 10:05:10 +00:00
Daniel Clifford
a177078acd [torque] Support non-tagged fields in classes
In the process add missing base	Torque functionality for 8-bit and
16-bit integers and Cast<> operators to make them easy to use.

As a poster child, port the field declarations of SharedFunctionInfo
to the class definition in base.tq.

As a drive by: Add the missing GN dependency on
class-definitions-from-dsl.h

Bug: v8:7793
Change-Id: I76a41c2e81ffd1cbb90ac7a4ef8d4003ac86e8dc
Reviewed-on: https://chromium-review.googlesource.com/c/1445882
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59321}
2019-02-04 09:32:59 +00:00
Takuto Ikuta
83908b865b Reland "Extract JSObject class from objects.cc"
This is a reland of b8c821f4e2

Fix: include src/string-stream.h for compile failure
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20builder/39320

Original change's description:
> Extract JSObject class from objects.cc
>
> I extracted following class member functions to js-objects.cc
> * JSReceiver
> * JSObject
> * JSBoundFunction
> * JSFunction
> * JSGlobalObject
> * JSDate
> * JSMessageObject
>
> Declaration of all above class are in js-objects.h.
>
> I also moved AllocationSite::DigestTransitionFeedback used in JSObject::UpdateAllocationSite
> and ShouldConvertToSlowElements used in JSObject and JSArray
>
> This patch makes compile time of objects.cc from 17.6s to 14.1s on Z840 Linux.
> And js-objects.cc takes 8.69s for compile.
>
> Bug: v8:7629
> Change-Id: I989f22363667445dd28d7f8c06c81ff79d6ed45f
> Reviewed-on: https://chromium-review.googlesource.com/c/1447916
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59288}

Bug: v8:7629
Bug: v8:8562
Change-Id: Iac2227c5f0c5a4072d16814ecae481fb4720e4f5
Reviewed-on: https://chromium-review.googlesource.com/c/1449951
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59318}
2019-02-04 09:18:58 +00:00
Clemens Hammacher
d0a754e0ea Revert "Extract JSObject class from objects.cc"
This reverts commit b8c821f4e2.

Reason for revert: compile errors, e.g. https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20builder/39320

Original change's description:
> Extract JSObject class from objects.cc
> 
> I extracted following class member functions to js-objects.cc
> * JSReceiver
> * JSObject
> * JSBoundFunction
> * JSFunction
> * JSGlobalObject
> * JSDate
> * JSMessageObject
> 
> Declaration of all above class are in js-objects.h.
> 
> I also moved AllocationSite::DigestTransitionFeedback used in JSObject::UpdateAllocationSite
> and ShouldConvertToSlowElements used in JSObject and JSArray
> 
> This patch makes compile time of objects.cc from 17.6s to 14.1s on Z840 Linux.
> And js-objects.cc takes 8.69s for compile.
> 
> Bug: v8:7629
> Change-Id: I989f22363667445dd28d7f8c06c81ff79d6ed45f
> Reviewed-on: https://chromium-review.googlesource.com/c/1447916
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59288}

TBR=marja@chromium.org,mstarzinger@chromium.org,titzer@chromium.org,tikuta@chromium.org

Change-Id: I18a8af8a7970f96b2ec3e56b2b1871b4f080ab01
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7629
Reviewed-on: https://chromium-review.googlesource.com/c/1449635
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59289}
2019-02-01 13:12:04 +00:00
Takuto Ikuta
b8c821f4e2 Extract JSObject class from objects.cc
I extracted following class member functions to js-objects.cc
* JSReceiver
* JSObject
* JSBoundFunction
* JSFunction
* JSGlobalObject
* JSDate
* JSMessageObject

Declaration of all above class are in js-objects.h.

I also moved AllocationSite::DigestTransitionFeedback used in JSObject::UpdateAllocationSite
and ShouldConvertToSlowElements used in JSObject and JSArray

This patch makes compile time of objects.cc from 17.6s to 14.1s on Z840 Linux.
And js-objects.cc takes 8.69s for compile.

Bug: v8:7629
Change-Id: I989f22363667445dd28d7f8c06c81ff79d6ed45f
Reviewed-on: https://chromium-review.googlesource.com/c/1447916
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59288}
2019-02-01 13:01:20 +00:00
Maya Lekova
5942be932e Revert "Reland "Enable 31bit Smis everywhere""
This reverts commit b43e9d5e75.

Reason for revert: Speculative revert, possibly breaking layout tests - https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8-Blink%20Linux%2064/29678

Original change's description:
> Reland "Enable 31bit Smis everywhere"
> 
> This is a reland of c1bf25bb68
> 
> Node bot will turn green after github.com/v8/node/pull/89/
> has landed.
> 
> Original change's description:
> > Enable 31bit Smis everywhere
> >
> > This is a experiment to see how performance is impacted. If we tank
> > too much, we can revert this change.
> >
> > Change-Id: I01be33f5dd78aee6a5beecdc62adbaa6c3850eb1
> > Bug: v8:8344
> > Reviewed-on: https://chromium-review.googlesource.com/c/1355279
> > Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> > Reviewed-by: Igor Sheludko <ishell@chromium.org>
> > Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#58157}
> 
> Bug: v8:8344
> Change-Id: I85a6e5c479f1090f50df3df042571227279a0692
> Reviewed-on: https://chromium-review.googlesource.com/c/1448314
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59251}

TBR=jarin@chromium.org,sigurds@chromium.org,ishell@chromium.org

Change-Id: Ie388de7e1cc28fcf8bc576f564f3b463002bf1b4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8344
Reviewed-on: https://chromium-review.googlesource.com/c/1449533
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59272}
2019-02-01 09:17:47 +00:00
Takuto Ikuta
238ccdef91 Extract Map class from objects.cc
I extracted following class member functions to map.cc
* Map
* NormalizedMapCache

Declaration of all above class are in map.h.

This patch makes compile time of objects.cc from 18.9s to 17.6s on Z840 Linux.
And map.cc takes 6.14s for compile.

Bug: v8:7629
Change-Id: Id1e45dff243ab3f5449c0a7e2a861fba0bc7abf6
Reviewed-on: https://chromium-review.googlesource.com/c/1447914
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59270}
2019-02-01 08:31:09 +00:00
Sigurd Schneider
b43e9d5e75 Reland "Enable 31bit Smis everywhere"
This is a reland of c1bf25bb68

Node bot will turn green after github.com/v8/node/pull/89/
has landed.

Original change's description:
> Enable 31bit Smis everywhere
>
> This is a experiment to see how performance is impacted. If we tank
> too much, we can revert this change.
>
> Change-Id: I01be33f5dd78aee6a5beecdc62adbaa6c3850eb1
> Bug: v8:8344
> Reviewed-on: https://chromium-review.googlesource.com/c/1355279
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58157}

Bug: v8:8344
Change-Id: I85a6e5c479f1090f50df3df042571227279a0692
Reviewed-on: https://chromium-review.googlesource.com/c/1448314
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59251}
2019-01-31 16:07:33 +00:00
Sigurd Schneider
0194eb5867 Fix pointer-compression related #defines
1) Ensure 31bit Smis are enabled if pointer compression is.
2) Enable some code for 31bit Smis

Bug: v8:8344
Change-Id: Ib1e68ebfcfd49e16d1548879b7670c88dc73449b
Reviewed-on: https://chromium-review.googlesource.com/c/1445979
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59248}
2019-01-31 15:27:16 +00:00
Takuto Ikuta
26321c072c Extract String class from objects.cc
I extracted following class member functions to string.cc
* String
* SeqString
* SeqOneByteString
* SeqTwoByteString
* ConsString
* ThinString
* SlicedString
* ExternalString
* FlatStringReader
* ConsStringIterator

Declaration of all above class are in string.h.

This patch makes compile time of objects.cc from 20.6s to 19.2s on Z840 Linux.

Bug: v8:7629
Change-Id: If74b868b3a3d9a1df2887f82e2557da43ad221f0
Reviewed-on: https://chromium-review.googlesource.com/c/1446342
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59235}
2019-01-31 10:24:51 +00:00
Jakob Kummerow
4007378d86 [ubsan] Turn on full -fsanitize=undefined
The build config inherited from Chromium only enables a subset
of the checks that UBSan supports. We want them all, so this
patch overrides what "is_ubsan" means for V8.

Bug: v8:3770
Change-Id: I1d0a7d994279272f13ff1d4ac9ed235fcbfc0951
Reviewed-on: https://chromium-review.googlesource.com/c/1443502
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59222}
2019-01-31 03:35:56 +00:00
Takuto Ikuta
be8c9e730d Split torque generated files for faster build
By using different namespace, generated code split into different files.

By this CL, build time of torque_generated_initializers is improved from 80 seconds to 40 seconds on Z840 Linux measured by following command:

# Remove generated code to re-compile all generated files.
~/v8/v8$ rm -rf out/x64.release/gen/
# GOMA_STORE_ONLY=true disables goma's backend cache.
~/v8/v8$ time GOMA_STORE_ONLY=true autoninja -C out/x64.release/ torque_generated_initializers

Bug: v8:8732
Change-Id: I64545f9994aea7e4209ac3852aadf4e2e9f4bc93
Reviewed-on: https://chromium-review.googlesource.com/c/1446331
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59215}
2019-01-30 16:10:21 +00:00
Jakob Gruber
10e4601907 Move CodeDesc to dedicated file
Bug: v8:8758
Change-Id: Ifd0c66f27ab5fb33032b243d3a33c0b797b9af17
Reviewed-on: https://chromium-review.googlesource.com/c/1442644
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59205}
2019-01-30 14:08:59 +00:00
Andreas Haas
c3e93c10cb [gn] Make the trap handler API header available on all platforms
We extracted the platform-specific API header into separate, platform-
specific header files to avoid OS-specific includes in include/v8.h.
As the platform-specific headers are only needed on their specific
platform, we did not make them available on other platforms in BUILD.gn.
Unfortunately, this is not possible, because the `include` validation in
`gn gen --check` checks the availability of header files without
considering `#ifdef` in the source files. Therefore the check fails on
Windows when the POSIX-specific header file is not available.

With this CL platform-specific headers will be generally available. This
is no problem because they can only be included on their specific
platform anyways.

R=adamk@chromium.org

Bug: chromium:921971
Change-Id: Iee7cc22063ce31a536f937d73799b7217ac1a94e
Reviewed-on: https://chromium-review.googlesource.com/c/1443057
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59196}
2019-01-30 10:53:09 +00:00
tzik
f5ba52e234 Fix no-inline compiler flag on Windows
-fno-inline is unavailable on clang-cl nor cl.exe, and causes a build
failure on Windows bot.
This CL updates that flag to "/Ob0", which is msvc-equivalent of
-fno-inline.

Change-Id: Id9ffed03a855ac0b773ee28625472de664c3cb30
Reviewed-on: https://chromium-review.googlesource.com/c/1442013
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59185}
2019-01-29 21:13:12 +00:00
Daniel Bratell
c566a40ca2 Always route builds through jumbo.gni for simpler code
jumbo.gni will check whether use_jumbo_build is set or not and
if it's not set it will just check that |jumbo_excluded_sources|
lists do not include non-existing files. That means that there
is little/nothing to lose by always routing v8_source_set that
way, and it adds a bit in build file simplicity and local
checking of |jumbo_excluded_sources|.

Change-Id: I19ed91d304f4a2edbf10661d20e5f5d3180b3a35
Reviewed-on: https://chromium-review.googlesource.com/c/1430832
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59169}
2019-01-29 12:51:50 +00:00
Michael Achenbach
bd6bc70a29 [build][test] Remove configs for interpreted-regexp builder
Also removes some obsolete gn definitions.

Bug: v8:8678
Change-Id: I418051177f059ab413b996a641ecf23f70d6c8bc
Reviewed-on: https://chromium-review.googlesource.com/c/1433789
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59163}
2019-01-29 11:17:32 +00:00
Camillo Bruni
a1efb4134e [parser] Various Scope and Context speedups
- Dehandlify ScopeInfo::ContextSlotIndex
- Dehandlify ScriptContextTable::Lookup
- Introduce function-kind.h with range-based helper methods
- Spread usage of Scope::is_script_scope and friends

Change-Id: I8ed1d82cc5bb9ea3fce856e16e9eafe194fb57ba
Reviewed-on: https://chromium-review.googlesource.com/c/1430100
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59120}
2019-01-28 13:06:03 +00:00
Daniel Clifford
32a92cf594 [torque] Correctly support JSObject allocation with 'new'
This requires honoring the instance size of the object stored in the
map for JSObject. To do this, allocation is now split into two
instrinsics, one that calculates the base size of the allocated object
(%GetAllocationBaseSize) and one that actually allocates (%Allocate).

In the process, remove objects.tq, which only existed to contain a
macro to fetch the default JSObject map, which is functionality that
is now in the JSObject class constructor.

Bug: v8:7793
Change-Id: I426a7943aac67eacad46d4ff39f5c821489a04bc
Reviewed-on: https://chromium-review.googlesource.com/c/1426959
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59052}
2019-01-24 06:27:56 +00:00
Mike Stanton
304e74c8b3 [Torque] Array.prototype.map implemented in Torque
Change-Id: I3a60be25b9c7daadcad6078447348b790b249e1c
Reviewed-on: https://chromium-review.googlesource.com/c/1402774
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59042}
2019-01-23 16:07:36 +00:00
Tobias Tebbi
42b50b7805 Revert "[build][torque] remove workarounds for clang bug"
This reverts commit c5154eeada.

Reason for revert: Broke ASAN bot

Original change's description:
> [build][torque] remove workarounds for clang bug
> 
> Now that https://bugs.llvm.org/show_bug.cgi?id=40118 has been fixed and
> rolled into V8, we can remove the workarounds for this Clang bug.
> 
> This also effectively reverts
> https://chromium-review.googlesource.com/c/v8/v8/+/1280222
> 
> Bug: chromium:893437
> Change-Id: Ia0d6d8ebdafafbc380b1b7a7809ef16effe50d71
> Reviewed-on: https://chromium-review.googlesource.com/c/1425519
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58987}

TBR=jarin@chromium.org,tebbi@chromium.org

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

Bug: chromium:893437 chromium:924534
Change-Id: Idfc266c11e3413334a12694dd573bdecf5427890
Reviewed-on: https://chromium-review.googlesource.com/c/1430067
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59039}
2019-01-23 15:54:50 +00:00
Toon Verwaest
0b69b05a08 [parser] Iterate declarations to set initializer positions
This allows us to remove the PatternRewriter.

Change-Id: I54ec74ed3bd31e76e38c69f9b0b2a78f8620cd89
Reviewed-on: https://chromium-review.googlesource.com/c/1429863
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59028}
2019-01-23 13:28:58 +00:00
Tobias Tebbi
c5154eeada [build][torque] remove workarounds for clang bug
Now that https://bugs.llvm.org/show_bug.cgi?id=40118 has been fixed and
rolled into V8, we can remove the workarounds for this Clang bug.

This also effectively reverts
https://chromium-review.googlesource.com/c/v8/v8/+/1280222

Bug: chromium:893437
Change-Id: Ia0d6d8ebdafafbc380b1b7a7809ef16effe50d71
Reviewed-on: https://chromium-review.googlesource.com/c/1425519
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58987}
2019-01-22 13:38:46 +00:00
peterwmwong
945e2b8f7b [builtins] Port TypedArray ConstructByLength to Torque
This is part of an effort to improve the performance of TA#subarray.

Bug: v8:7161
Change-Id: Iae84d16a037386bebfeaa7e8fb0648da295653b4
Reviewed-on: https://chromium-review.googlesource.com/c/1419225
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58947}
2019-01-21 09:43:43 +00:00
Jakob Gruber
61cb1133f9 [nojit] Convert generated memcpy functions into builtins
On ia32, arm and mips we generate miscellaneous memcpy-related functions
at runtime:

arm: memcpy for uint8-uint8 and uint16-uint8 {dest-source} pairs.
ia32: memmove
mips: memcpy uint8-uint8

In jitless mode, runtime codegen is disallowed, so these must be
converted into builtins.

As far as I can tell, the mips64 files were dead code (#ifdef'd to
V8_HOST_ARCH_MIPS instead of MIPS64).

Note also the slightly changed implementation of ia32's MemMove's
jump tables.

Bug: v8:8675
Change-Id: I5dc2a50fcbad332ce9f78228425b987b0d9acdf3
Reviewed-on: https://chromium-review.googlesource.com/c/1407067
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58839}
2019-01-16 09:01:26 +00:00
Clemens Hammacher
94fbd51b95 [base] Move EnumSet to its own header
EnumSet currently lives in src/utils.h, which is a conglomerate of many
different helper functions and classes. In order to remove unneeded
include, move the EnumSet to its own header.

R=titzer@chromium.org

Bug: v8:7490, v8:8562
Change-Id: I979814167e87b914e9807b03e342d8b34e514331
Reviewed-on: https://chromium-review.googlesource.com/c/1409430
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58818}
2019-01-15 10:57:26 +00:00
Ben L. Titzer
27272ab5fb [wasm] Factor out instantiation code into own file
This refactoring CL moves all instantiation logic in its own file,
separating it from the module compiler.

R=ahaas@chromium.org

Change-Id: I5a721c7357022dd7bf32f776b2ab0153f7dd68fc
Reviewed-on: https://chromium-review.googlesource.com/c/1409429
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58797}
2019-01-14 16:41:09 +00:00
Jakob Gruber
9eb278b829 Revert "[ia32] Remove custom MemMove function"
This reverts commit 4a9f186bde.

Reason for revert: Regresses microbenchmarks. https://crbug.com/v8/8675#c5

Original change's description:
> [ia32] Remove custom MemMove function
> 
> It isn't clear whether our custom generated MemMove function provides
> any benefits over std::memmove. This is an attempt to remove it. If
> bots seem unhappy we can revert.
> 
> Bug: v8:7777,v8:8675
> Change-Id: I7f1a6e3050b6e635618593c04f7d51e448426ee2
> Reviewed-on: https://chromium-review.googlesource.com/c/1405854
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58748}

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

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

Bug: v8:7777, v8:8675
Change-Id: Ia4ad37070f433f76b1158e90835162aefe38abdd
Reviewed-on: https://chromium-review.googlesource.com/c/1407063
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58766}
2019-01-14 09:07:51 +00:00
Andreas Haas
b9854da1ec [fuzzer] Remove the wasm section fuzzers
The fuzzers were already removed on the chrome side and therefore
inactive, see https://crrev.com/c/1194228.

R=machenbach@chromium.org

Bug: v8:8562
Change-Id: I0cf5ec6d07e07452c5168ea952f45028bcea1c85
Reviewed-on: https://chromium-review.googlesource.com/c/1406678
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58750}
2019-01-11 15:18:47 +00:00
Jakob Gruber
4a9f186bde [ia32] Remove custom MemMove function
It isn't clear whether our custom generated MemMove function provides
any benefits over std::memmove. This is an attempt to remove it. If
bots seem unhappy we can revert.

Bug: v8:7777,v8:8675
Change-Id: I7f1a6e3050b6e635618593c04f7d51e448426ee2
Reviewed-on: https://chromium-review.googlesource.com/c/1405854
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58748}
2019-01-11 14:35:33 +00:00
Jakob Gruber
f3a23accad Remove fast_sqrt generated code
As far as I can tell these were unused; their only callers were arm
and ppc simulators, but codegen explicitly returned nullptr if in a
simulator build, falling back to std::sqrt.

There's more potential cleanup to be done here for other functions
defined in codegen-*.cc files.

Tbr: clemensh@chromium.org
Bug: v8:7777, v8:8675
Change-Id: I4b9d6062c6724a810ab094d09e3cd04a0b733d9b
Reviewed-on: https://chromium-review.googlesource.com/c/1405851
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58740}
2019-01-11 12:45:38 +00:00
Jakob Kummerow
af8ff984f6 [ubsan] Fix numerical overflows in the compiler
Mostly signed integer overflows, and a few cases of double
division by zero (which is defined by IEEE-754 to return
Infinity (or NaN for 0/0) but is UB in C++).

Bug: v8:3770
Change-Id: I8007987594ff534ca697c1c3247215a72a001343
Reviewed-on: https://chromium-review.googlesource.com/c/1403132
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58693}
2019-01-10 11:17:37 +00:00
Yang Guo
c736883ed4 Optionally use halfsiphash for integer hashing.
Change-Id: Ibd14f7b3fe78635675c76ae864112e3a3a7bc701
Reviewed-on: https://chromium-review.googlesource.com/c/1382463
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58674}
2019-01-09 15:20:51 +00:00
Mike Stanton
780818726a [Torque] Array.prototype.filter moves to Torque.
Change-Id: Ifc71ae885b2a08b898ace7f75a8df0ca2b9c3a3d
Reviewed-on: https://chromium-review.googlesource.com/c/1275820
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58643}
2019-01-08 16:13:50 +00:00
Yang Guo
052083f1f8 [d8] no longer require js2c for d8
R=jgruber@chromium.org

Bug: v8:7624
Change-Id: I357e0b9d497ebff03e0e41a3495621c5b4c63464
Reviewed-on: https://chromium-review.googlesource.com/c/1400402
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58640}
2019-01-08 15:11:30 +00:00
peterwmwong
7164251aec [js] Remove macros.py and simplify js2c.py
- Remove macros.py
- Inlines macros into d8.js
- Remove dead code (macros and message templates)
  from js2c.py
- Remove empty src/js directory

Bug: v8:7624
Change-Id: I8dfb69f2f8cb3746b67de816ffc8eb305cbcdee6
Reviewed-on: https://chromium-review.googlesource.com/c/1400150
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58631}
2019-01-08 13:26:02 +00:00
Camillo Bruni
53b9e1ed26 [parser] Rename PreParsedScopeData to PreparseData
We plan to store additional information that is not related to scopes.
The new name will reflect this fact better.

Change-Id: I4ddb1017bc255e6ad271e4448848ed630f367d5b
Reviewed-on: https://chromium-review.googlesource.com/c/1388538
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58591}
2019-01-07 14:49:21 +00:00
peterwmwong
400fe0690f [js] Remove Experimental Extras JS Natives
- Removes build step and bootstrapping associated with building/loading `EXPERIMENTAL_EXTRAS` JS natives.
- Removes `--experimental-extras` flag

Bug: v8:7624
Change-Id: I4c45fe70da42847545037d63e9f1da77f5957f8b
Reviewed-on: https://chromium-review.googlesource.com/c/1397906
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Cr-Commit-Position: refs/heads/master@{#58590}
2019-01-07 14:43:41 +00:00
Maya Lekova
2681ec65dc [turbofan] Introduce serializer for background compilation phase
Design doc:
https://docs.google.com/document/d/1vCQYhtFPqXafSMweSnGD8l0TKEIB6cPV5UGMHJtpy8k/edit?ts=5bf7d341

This CL only introduces a skeleton of the new phase that implements a bytecode
walker. The SUPPORTED_BYTECODE_LIST is supposed to be filled in gradually.

Bug:v8:7790

R=jarin@chromium.org, neis@chromium.org

Change-Id: I57fea91c55dca888581f2490bdf7b831fc61eda4
Reviewed-on: https://chromium-review.googlesource.com/c/1386872
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58582}
2019-01-07 12:26:28 +00:00
peterwmwong
263dce9b57 [js] Remove CORE JS Natives (prologue.js), port extra utils to C++/Torque
- Removes the last `CORE` JS native script: `prologue.js`.
- Removes build step and bootstrapping associated with building/loading `CORE` JS natives.
- Removes `natives_utils_object` from context.
- Deprecates `--expose-natives-as` flag.
- Ports extra utils functions to C++ (`uncurryThis`) or Torque
  (`createPrivateSymbol`, `markPromiseAsHandled`, and `promiseState`).
- Move extra utils constants initialization into bootstrapper
  (`kPROMISE_PENDING`, `kPROMISE_FULFILLED`, `kPROMISE_REJECTED`).
- Removes unused extra utils functions `log` and `logStackTrace`.

Drive-by: Added test coverage for Array#includes being an unscopeable.

Bug: v8:7624
Change-Id: I5d983f8d11b76cb4dd3c2c67592ce1dc88364cd9
Reviewed-on: https://chromium-review.googlesource.com/c/1381672
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Cr-Commit-Position: refs/heads/master@{#58577}
2019-01-07 11:57:46 +00:00
Junliang Yan
66910ffd83 PPC/s390: remove code-stubs related build files
R=jgruber@chromium.org, joransiu@ca.ibm.com

Change-Id: If31804509eaca51c0606409873dc180df4fb49f3
Reviewed-on: https://chromium-review.googlesource.com/c/1393301
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#58528}
2019-01-03 16:16:44 +00:00
Fabrice de Gans-Riberi
f225a474bc Add support for different host/target platform in mksnapshot.
This Mac/Fuchsia build was broken as the generated assembly file must
follow Linux-style calling conventions.

Change-Id: I05d946e77690e97f05d57a3d5ba04cd2e63fbb9d
Reviewed-on: https://chromium-review.googlesource.com/c/1377230
Commit-Queue: Fabrice de Gans-Riberi <fdegans@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58507}
2019-01-03 01:41:14 +00:00
Jakob Gruber
9365d0904e [coverage] Rework continuation counter handling
This changes a few bits about how continuation counters are handled.

It introduces a new mechanism that allows removal of a continuation
range after it has been created. If coverage is enabled, we run a first
post-processing pass on the AST immediately after parsing, which
removes problematic continuation ranges in two situations:

1. nested continuation counters - only the outermost stays alive.
2. trailing continuation counters within a block-like structure are
   removed if the containing structure itself has a continuation.

R=bmeurer@chromium.org, jgruber@chromium.org, yangguo@chromium.org

Bug: v8:8381, v8:8539
Change-Id: I6bcaea5060d8c481d7bae099f6db9f993cc30ee3
Reviewed-on: https://chromium-review.googlesource.com/c/1339119
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58443}
2018-12-21 15:29:48 +00:00
Jakob Gruber
84450a2239 [nojit] Define V8_JITLESS_MODE in V8 Lite builds
This defines V8_JITLESS_MODE if the v8_enable_lite_mode build-time
option is enabled. Jitless mode will thus be tested by existing lite
bots.

The build-time option for jitless mode will only be needed temporarily
and is expected to be removed again in the near future.

Bug: v8:7777
Change-Id: I556ba5069dbd0810a6d7376601d8f7d498fef8c9
Reviewed-on: https://chromium-review.googlesource.com/c/1387499
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58433}
2018-12-21 12:55:09 +00:00
Jakob Gruber
93e5db5f61 Remove the js minifier
V8 is almost completely JS-free. There's no need to ship the minifier
any more.

Bug: v8:7624,v8:5505,v8:4240,v8:4235,v8:4188,v8:1557
Change-Id: Iee15bf68c66bac27a67fe70e10b1edd4dcef89d1
Reviewed-on: https://chromium-review.googlesource.com/c/1386146
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58392}
2018-12-20 11:54:27 +00:00
Igor Sheludko
a4993b73c5 [testrunner] Add mode detection for v8_enable_pointer_compression
Tbr: machenbach@chromium.org
Bug: v8:8562
Change-Id: If2242c6271d400e7c4c031e10871b06438c2636d
Reviewed-on: https://chromium-review.googlesource.com/c/1384088
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58373}
2018-12-19 16:59:46 +00:00
Clemens Hammacher
86024575de [cleanup] Remove empty simulators for ia32 and x64
No need for empty header files and empty implementation files (which
will be compiled even though they are empty).

R=ishell@chromium.org

Bug: v8:8562
Change-Id: Icd54b0cab7dba991d11c26262deb2b034f67869e
Reviewed-on: https://chromium-review.googlesource.com/c/1384305
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58366}
2018-12-19 15:17:45 +00:00