Commit Graph

242 Commits

Author SHA1 Message Date
Robert O'Callahan
f0441fb990 Make v8dbg_ symbols V8_EXPORT so they can be exposed from Chrome builds
Extend gen-postmortem-metadata.py with selected register values.

This information is not present in DWARF debuginfo. Exposing it
enables detailed analysis of V8 JS execution by observing binary-level
execution:
https://robert.ocallahan.org/2020/05/omniscient-js-debugging-in-pernosco.html

Bug: v8:11106
Change-Id: I3bde7dd07ac5ba6ff00d4a5fa9b635871507a866
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2518957
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71035}
2020-11-09 09:16:55 +00:00
Charles Kerr
2e2dc986e9 perf: make GetPositionInfoSlow() faster
Halve the number of lookups in ExtractLocationForJSFunction() by calling
GetPositionInfo() directly instead of making separate calls for column
and line number.

Improve the efficiency of position lookups in slow mode. The current
code does a linear walk through the source by calling String::Get() for
each character. This PR also does a linear walk, but avoids the overhead
of multiple Get() calls by pulling the String's flat content into a
local vector and walking through that.

Downstream Electron discussion of this can be found at
https://github.com/electron/electron/issues/24509

Apologies in advance if I've missed anything; this is my first V8 CL...

Change-Id: I22b034dc1bfe967164d2f8515a9a0c1d7f043c83
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2496065
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70783}
2020-10-27 07:15:01 +00:00
Javad Amiri
7015a0d17d [heap] Add TPH-related flag-implication rules
This disables the following features for --enable-third-party-heap:
- inline allocation: all allocation are directed to runtime for now
  until we have support for TPH inline allocation.
- allocation site pretenuring: this feature relies on ephemeral
  memento objects placed after ordinary objects and is tightly coupled
  with V8's GC.
- allocation folding in TurboFan: this feature assumes that objects
  of different size and type can be allocated on the same page using
  bump-pointer allocation.

Bug: v8:9533
Change-Id: Idbdf1dac566f37db379e5d4b43e0741886f4e69b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2463004
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70468}
2020-10-13 08:15:54 +00:00
mathetake
8deb0fd3ed wasm/c-api: fix the index of StackTraceFrame
CreateFrameFromInternal always creates StackFrame from the frame at the index zero,
which is fine for the usage in Trap::origin, but is a bug for Trap::trace

Change-Id: Ia9471f600c5165ffc1c165b2f114b40acbe5b1e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2465353
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70465}
2020-10-13 07:34:26 +00:00
Milad Fa
38cc9f7a3d Adding Red Hat to the list of Authorized contributors.
Change-Id: I564e60a04616f98cf0ad5258c994e53b6ab8f4eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2410010
Reviewed-by: Michael Dawson <midawson@redhat.com>
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Reviewed-by: Michael Hablich <hablich@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#69945}
2020-09-16 12:34:39 +00:00
Marcel Laverdet
7e8e76e784 Check interrupts in runtime BigInt parser
The BigInt constructor has quadratic complexity while parsing strings,
and the input is unbounded. Interrupts should be checked during this
operation to ensure the embedder has control over runaway execution.

since the implicit cast from string may now throw.

BigInt: :CompareToString and BigInt::EqualToString now return Maybe<..>
Change-Id: Iccb85fafac4df69075a34d1de647cb4f0184cb12
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2392629
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69720}
2020-09-07 15:21:33 +00:00
Jakob Kummerow
ec49e377b1 Revert "Check interrupts in runtime BigInt parser"
This reverts commit 825c61d8b4.

Reason for revert: Processing interrupts triggers a DisallowHeapAllocation scope failure.

Original change's description:
> Check interrupts in runtime BigInt parser
> 
> The BigInt constructor has quadratic complexity while parsing strings,
> and the input is unbounded. Interrupts should be checked during this
> operation to ensure the host has control over runaway execution.
> 
> Change-Id: I15db9adeeafadc7b866a395dd8263aa8c2109ce8
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2384166
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#69679}

TBR=jkummerow@chromium.org,leszeks@chromium.org,marcel@laverdet.com

Bug: chromium:1124477
# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I1ba8c1de1f809f71a1c4fae9b56a8bd40f9f7e7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2392815
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69703}
2020-09-03 17:43:26 +00:00
Marcel Laverdet
825c61d8b4 Check interrupts in runtime BigInt parser
The BigInt constructor has quadratic complexity while parsing strings,
and the input is unbounded. Interrupts should be checked during this
operation to ensure the host has control over runaway execution.

Change-Id: I15db9adeeafadc7b866a395dd8263aa8c2109ce8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2384166
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69679}
2020-09-02 16:04:28 +00:00
HyeockJinKim
02a42939e7 Fixed bytecode generation of spread operation
During spread operation, after VisitForAccumulatorValue,
set the position of the current expression again

Bug: chromium:929844
Change-Id: I6e9ca87587789f9cb21e939d4405414c8170b232
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2379531
Commit-Queue: HyeockJin Kim <kherootz@gmail.com>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69677}
2020-09-02 14:30:48 +00:00
Cong Zuo
67206a6ce9 [runtime] Fix PrintRegisters should not output to default stdout
PrintRegisters() should print output to `os` argument for unification,
and in case of the function would be used by other files.

Bug: v8:10821
Change-Id: Ia825c4deaf89ec454b7c293367cfa362acd4cccc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2371543
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69664}
2020-09-02 10:05:22 +00:00
Brendan Shanks
c40c8f7d15 Use NtCurrentTeb() in GetStackStart() to fix 64-bit Wine on macOS
When running 64-bit Windows binaries on macOS using Wine, there is a
conflict between macOS's use of GS to point to pthread thread-specific
data, and Windows' use of GS to point to the TEB.

Apple has reserved some TSD slots for use by Wine to store commonly-used
TEB members (such as 0x30, the 'Self' pointer to the TEB).
But, other direct GS accesses by Windows programs (such as to
'StackBase') will return macOS pthread data rather than the TEB member.
This was causing a V8 unit test to crash on macOS under Wine.

Using NtCurrentTeb() gets the 'Self' pointer first, then dereferences
it to access the correct 'StackBase', fixing the crash.
This turns GetStackStart() from one instruction into two.

Chrome (http://crrev.com/c/2380425) and Crashpad also use
NtCurrentTeb().

The 32-bit change isn't needed, but is just for consistency.

Bug: chromium:1121842
Change-Id: I824f893aa451d8570142226be91840c964426f38
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2381941
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69627}
2020-08-31 18:22:05 +00:00
Tianping Yang
a96715b0dc [test] Add a test case to the snaphot with all function code
By eager compile all functions in the startup snapshot, the startup
snapshot can contain all function codes without warm-up.

BUG=v8:4836
R=yangguo@chromium.org

Change-Id: I07e86b6940c2fe75816df8ae429d110272216d0a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2379535
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69624}
2020-08-31 15:31:53 +00:00
Martin Bidlingmaier
55891c3c3a [regexp] Add experimental regexp engine flags
R=jgruber@chromium.org

Bug: v8:10765
Change-Id: Iae389bd129784c08287dec7c4cb8ebeaa6a6120c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2336794
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69237}
2020-08-05 07:05:47 +00:00
Aaron O'Mullan
0300dd8ba2 Fix crash on inspector setScriptSource calls when source is unchanged
Bug: chromium:1059746
Change-Id: I309c15a33a7185c9397b7893a9eefcb90981dc64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2280085
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68713}
2020-07-07 13:25:51 +00:00
zeynepCankara
af5f156d40 [tools] Map search bar feature added, map id changed from int to string
Change-Id: Icc37fc091086a3239a1b080ca2829efcda97f328
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2245601
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68406}
2020-06-18 11:09:21 +00:00
Junha Park
c3112fc2ff Added API to verify version match on snapshot blob
This patch added an IsValid method to StartupData which returns a
boolean upon verifying a given snapshot matches the v8 version.
Embedders can use this API now to check snapshots' versions.

This was originally done by Snapshot::CheckVersion, which now simply
runs Startup::IsValid.

Bug: v8:8104
Change-Id: If555bcc55de4a05adf61798cd58d9ea8c8a71302
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2178091
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Junha Park <jpark3@scu.edu>
Cr-Commit-Position: refs/heads/master@{#67951}
2020-05-25 08:52:48 +00:00
Varun Varada
a25dce8a05 Fix console time format error
There should be a space between the quantity and the unit symbol
as per the SI, so this commit fixes this issue.

Change-Id: I3356942391d96906f3e3840c7bb802e10f29eb4a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2190230
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67789}
2020-05-14 07:36:54 +00:00
Gilang Mentari Hamidy
a40f30ab94 Fix undefined behavior due to memcpy-ing bool var
- Add template specialization for DataRange::get<bool> to avoid undefined behavior of the template DataRange::get<T> which uses memcpy to assign the result variable

Change-Id: I129773251c063ea6863c4b2318dbc18574588d99
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2165728
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67387}
2020-04-27 09:47:43 +00:00
Jiaxun Yang
72a6e594ce [builtins][MIPS]: Workaround gas auto-align issue
GAS have a auto-align function which will align all the directive
data into it's nature boundary. And we're using .octa to present
data in embedded.S, which will be auto-aligned into 128-bit boundary.
It can break relatve offset in generated binary.
So we workaround it by forcing generate .long DataDirective on MIPS.

Also I rewoked WriteByteChunk so it can accept any kind of directive
now. Further more, implementation of HexLiteral is indentical on
generic, aix and mac so I merged them into base.

Bug: v8:10420
Change-Id: I0ff791412360769510735659f909524c5f96d3e0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2153187
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67198}
2020-04-17 09:36:25 +00:00
Adam Kallai
4c414a2265 fix: failing ThreadTicks DCHECK on Windows on Arm
The same issue has been fixed in Chromium [1] by Richard Townsend.
It seems that cl needs to be applied in V8 as well.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1593363

Also add self to authors file.

Bug: v8:10365
Change-Id: Ic38b18392263c2a89f207013ec61718418d5f132
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2130126
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66940}
2020-04-01 10:15:24 +00:00
Eric Rannaud
668aafb56c [cpu-profile] Timestamps in tracing events args stay in monotonic time
On Linux, Perfetto translates the builtin "ts" timestamp in trace event
from CLOCK_MONOTONIC to CLOCK_BOOTTIME, before passing them to devtools.
Devtools therefore implicitly operates on timestamps that are in
CLOCK_BOOTTIME.

However, additional timestamps sent in trace event payload arguments
will not be converted to CLOCK_BOOTTIME by Perfetto, raising the
possibility of devtools using timestamps from multiple clock domains
incorrectly.

Since trace events sent by CpuProfile also include the builtin "ts"
trace timestamp (sampled from CLOCK_MONOTONIC nearly at the same time by
the tracing framework), sending "data.startTime" and "data.endTime" is
essentially redundant. devtools-frontend:2113957 stops the use of the
value of these timestamps in the payload of Profile and ProfileChunk
events. Devtools continue to use the presence of these arguments to
indentify start and end profile events.

ProfileChunk events also include "timeDeltas" which are relative
timestamps. They are also in CLOCK_MONOTONIC and are not translated by
Perfetto. devtools-frontend:2113957 computes absolute CLOCK_BOOTTIME
timestamps from timeDeltas by adding them to "ts" in the "Profile" event
(previously, "data.startTime" was used). This is only valid if the
system is not suspended/resumed during profiling. Providing support for
suspend/resume in the middle of profiling will likely involve having
Perfetto convert "timeDeltas" directly to CLOCK_BOOTTIME.

This CL introduces no code changes and only adds comments to explain
the above.

BUG=chromium:1055871

Change-Id: I649dfcce8ea1a100c0ecfe03f843c7cb1fdd6f33
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2114001
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66820}
2020-03-23 09:18:35 +00:00
David Manouchehri
765053dc1a [Intl] Correct RelativeTimeFormat behaviour on ICU error.
Bug: chromium:1062763
Change-Id: I70d44f2db06b5ec1d84ab6678582dfc559d47e7e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2108729
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: David Manouchehri <david@davidmanouchehri.com>
Cr-Commit-Position: refs/heads/master@{#66794}
2020-03-19 15:58:53 +00:00
Janusz Majnert
5a04c5cea2 Make torque emit structs in classes in order
Torque compiler emits a C++ class definition header
class-definitions-tq.h. Unfortunately it does so in a manner that
introduces randomness into the ordering of some structs. This means that
every full build of V8 may yield a different header.
Since this header is included in a lot of files in V8, it causes a lot
of ccache misses (over a 1000).

This commit makes sure that the structs are emitted in lexical order.

Bug: v8:10310
Change-Id: Ie39066d36e41583ff990bc639f7f241462351585
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2093500
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66645}
2020-03-10 12:52:38 +00:00
Iain Ireland
3fab9d05cf [regexp] Fix and unify non-unicode case-folding algorithms
Non-unicode, case-insensitive regexps (e.g. /foo/i, not foo/iu) use a
case-folding algorithm that doesn't quite match the Unicode
definition. There are two places in irregexp that need to do
case-folding. Prior to this patch, neither of them quite matched the
spec (https://tc39.es/ecma262/#sec-runtime-semantics-canonicalize-ch).

This patch implements the "Canonicalize" algorithm in
src/regexp/special-case.h, and uses it in the relevant places. It
replaces special-case logic around upper-casing / ASCII characters
with the following approach:

1. For most characters, calling UnicodeSet::closeOver on a set
   containing that character will produce the correct set of
   case-insensitive matches.

2. For a small handful of characters (like the sharp S that prompted
   this change), UnicodeSet::closeOver will include some characters
   that should be omitted. For example, although closeOver('ß') =
   "ßẞ", uppercase('ß') is "SS", so step 3.e means that 'ß'
   canonicalizes to itself, and should not match 'ẞ'. In these cases,
   we can skip the closeOver entirely, because it will never add an
   equivalent character. These characters are in the IgnoreSet.

3. For an even smaller handful of characters, UnicodeSet::closeOver
   will produce some characters that should be omitted, but also some
   characters that should be included. For example, closeOver('k') =
   "kKK" (lowercase k, uppercase K, U+212A KELVIN SIGN), but KELVIN
   SIGN should not match either of the other two (step 3.g). To handle
   this, we put such characters in the SpecialAddSet. In these cases,
   we closeOver the original character, but filter out the results
   that do not have the same canonical value.

The computation of IgnoreSet and SpecialAddSet happens at build time,
using the pre-existing gen-regexp-special-case.cc step.

R=jgruber@chromium.org

Bug: v8:10248
Change-Id: I00d48b180c83bb8e645cc59eda57b01eab134f0b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2072858
Reviewed-by: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66641}
2020-03-10 11:09:28 +00:00
Wouter Vermeiren
8199a7ac23 [ppc64][ppc] Split up ARCH_PPC and ARCH_PPC64
After support for ARCH_PPC was dropped, it became a subset of
ARCH_PPC64. If you compile for ppc64, then you set the ARCH_PPC64
define which also sets the ARCH_PPC define.
To be able to again support ppc (32 bit) those defines should be
split up again.

This commit only splits up the defines but does not introduce a
working ARCH_PPC variant.

Bug: v8:10102
Change-Id: I64e0749f8e5a7dc078ee7890d92e57b82706a849
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1989826
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Milad Farazmand <miladfar@ca.ibm.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66390}
2020-02-21 15:42:20 +00:00
Pengyu Chen
fe6bd3019d [build] Add new build argument v8_symbol_level
May override the global symbol_level config. Useful for debugging V8
within a release Chromium, like v8_enable_debugging_features.

Change-Id: Ie081b5110dc93914cbe53fdde3cdec77822b9819
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2051959
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66262}
2020-02-13 17:48:48 +00:00
legendecas
52f88e1b93 [parser] add support for BigInt literal as property names
Fixed: v8:10083
Change-Id: I50e01022b1d1219ad8b31dd71f58f5bc9c9d10bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1987845
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65719}
2020-01-13 10:51:45 +00:00
Huáng Jùnliàng
14a79f6335 [parser]: reset expression scope stack to nullptr when parsing class member initializer
When "await" is referenced in a part of an async arrow function head, we will walk up the active ambiguous expression stack and mark the ambiguous arrow head scope. However the class member initializer is always non-ambiguous so we should reset the stack and stop walking up.

Bug: v8:10094
Change-Id: Iac35889158ef46c851888993b6081f8ff8610c43
Fixed: v8:10094
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1987620
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65600}
2020-01-07 12:39:10 +00:00
ajihyf
5b1ba2ab55 [builtins] Port Number.prototype.toString to Torque
Bug: v8:7864
Change-Id: Iaeca4ab9d098edc73b2191dc260dd37a6114f3bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1893732
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64760}
2019-11-05 11:00:26 +00:00
Zhao Jiazhong
3358bb0445 [mips] [codegen] Better load of receiver in CheckDebugHook
Port 1e4bb08 https://crrev.com/c/1826728

Change-Id: If977914ef55eb65228f92fecd1c9e9d0f625fa2b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1886716
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64628}
2019-10-30 02:25:33 +00:00
lybvinci
578d4a8ff7 Fix compile cctest error
When is_component_build is true, cctest will compile error, because
the dependencies is not exported.these files will failed:test-utils
-arm64.cc,test-strings.cc.

Change-Id: I4bcdde08199f21454ec6d7e230d9d096c0315eac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1873447
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64448}
2019-10-22 08:32:59 +00:00
Matheus Marchini
ee21e39044 [log] report code relocation through CodeEventHandler
Also report code relocation events through the public CodeEventHandler
API, so that embedders can expose this information to external
profilers, allowing those profilers to correctly translate function
names even after they were relocated.

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

Change-Id: I8795186f5f5c58ede9054e4b83e2d290d92b6e00
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1802657
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63943}
2019-09-24 10:50:05 +00:00
huangjunming
8d7c581a2a [heap] Remove unnecessary function call for GetRandomMmapAddr on Mac
Change-Id: I140b530fcb6332c08d45ef10445619e24987e3ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1817997
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63919}
2019-09-23 08:39:12 +00:00
Keno Fischer
6ebc808a9b [wasm][anyref] fix decoding of table index immediates
Before dd6f4d4f4c, this function was reading a single u8 and verifying
that it was 0x00. The referenced commit dropped this check as part of
implementing decoding for table.get, but neglected to change the read type
to u32v, which is the specified type of this immediate. Fix that.

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

Change-Id: Ic2ce795023ec57be2c95aa79e62d3ccd1aa9c43c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1747178
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63281}
2019-08-20 14:54:59 +00:00
David Carlier
c09aff1721 random number generator seeding update for macOS
using file descriptor's free approach instead.

Change-Id: I9baa3d471b4ed6f624985a5b6325648ef7875596
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1710665
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62933}
2019-07-26 11:55:01 +00:00
Rong Wang
b2140c59d0 Add a flag for enabling the single generation mode in V8
This flag ensures that all allocations are performed in the old generation. This only works when inline allocation and allocation folding are both disabled.

Bug: v8:9533

Change-Id: I9ad5e8bf492c43603ab2a4a1292198e1b9882dfe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1710335
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62893}
2019-07-24 11:25:03 +00:00
Shawn Presser
23d485508b Update v8 to run on iPhone
iOS uses 16kb memory pages. This change modifies OS::GetRandomMmapAddr()
to return a 16kb-aligned address on apple ARM64.

The mrs instruction is invalid on iOS. This change modifies
CacheLineSizes::CacheLineSizes() so that mrs is not executed.

Change-Id: I13fcc8498e715c03432c7a652ee723660f746069
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1701127
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62730}
2019-07-16 07:31:39 +00:00
Mu Tao
64419b074a [mips64][codegen] Remove dead argument to Assember::stop
This CL removes Assember::stop invoking's dead argument accordingly
(https://chromium-review.googlesource.com/c/v8/v8/+/1692925).

R=clemensh@chromium.org, xwafish@gmail.com

Change-Id: I9f4d91f15e3bc9e56815a328326997a273e42fee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1699841
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62675}
2019-07-12 12:06:27 +00:00
Ross Kirsling
7fc00d8aa6 Reland "Reland "Let all early errors be SyntaxErrors.""
This is a reland of 89d93e3851

Original change's description:
> Reland "Let all early errors be SyntaxErrors."
> 
> This is a reland of 99fd5b9b9d which includes a missed update to
> test/test262/test262.status.
> 
> Implement the spec change from the following TC39 PR:
> https://github.com/tc39/ecma262/pull/1527
> 
> Bug: v8:9326
> Change-Id: Ie3aac60db550e90fb648fc30886a05419fa41afe
> TBR: adamk@chromium.org
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1682989
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#62500}

Bug: v8:9326
Change-Id: Ic30280400dfa5b83a4a397888e563eee479446c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1688271
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62553}
2019-07-08 10:15:46 +00:00
Clemens Hammacher
356b4602da Revert "Reland "Let all early errors be SyntaxErrors.""
This reverts commit 89d93e3851.

Reason for revert: Breaks layout tests: https://ci.chromium.org/p/v8/builders/ci/V8-Blink%20Linux%2064/32929

Original change's description:
> Reland "Let all early errors be SyntaxErrors."
> 
> This is a reland of 99fd5b9b9d which includes a missed update to
> test/test262/test262.status.
> 
> Implement the spec change from the following TC39 PR:
> https://github.com/tc39/ecma262/pull/1527
> 
> Bug: v8:9326
> Change-Id: Ie3aac60db550e90fb648fc30886a05419fa41afe
> TBR: adamk@chromium.org
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1682989
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#62500}

TBR=adamk@chromium.org,gsathya@chromium.org,verwaest@chromium.org,rkirsling@gmail.com

Change-Id: Ia56dcda6780a2b1249749e1e7978b35b5e33fbcf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9326
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1687678
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62509}
2019-07-03 12:47:41 +00:00
Ross Kirsling
89d93e3851 Reland "Let all early errors be SyntaxErrors."
This is a reland of 99fd5b9b9d which includes a missed update to
test/test262/test262.status.

Implement the spec change from the following TC39 PR:
https://github.com/tc39/ecma262/pull/1527

Bug: v8:9326
Change-Id: Ie3aac60db550e90fb648fc30886a05419fa41afe
TBR: adamk@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1682989
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62500}
2019-07-03 09:54:07 +00:00
Francis McCabe
06f8463004 Revert "Let all early errors be SyntaxErrors."
This reverts commit 99fd5b9b9d.

Reason for revert: fails presubmit test:
https://ci.chromium.org/p/v8/builders/ci/V8%20Presubmit/5238
and a nosnap test
https://ci.chromium.org/p/v8/builders/ci/V8%20Win32%20-%20nosnap%20-%20shared/34143

Original change's description:
> Let all early errors be SyntaxErrors.
> 
> Implement the spec change from the following TC39 PR:
> https://github.com/tc39/ecma262/pull/1527
> 
> Bug: v8:9326
> Change-Id: I9639903b12e7621e323990e2335f00e0313a59c3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1643171
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Adam Klein <adamk@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#62451}

TBR=adamk@chromium.org,verwaest@chromium.org,rkirsling@gmail.com

Change-Id: If63b97725e9737ad5a98800e1194caf8e9c1c43d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9326
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1682393
Reviewed-by: Francis McCabe <fgm@chromium.org>
Commit-Queue: Francis McCabe <fgm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62452}
2019-06-28 23:36:59 +00:00
Ross Kirsling
99fd5b9b9d Let all early errors be SyntaxErrors.
Implement the spec change from the following TC39 PR:
https://github.com/tc39/ecma262/pull/1527

Bug: v8:9326
Change-Id: I9639903b12e7621e323990e2335f00e0313a59c3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1643171
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62451}
2019-06-28 22:38:43 +00:00
Jose Dapena Paz
3b8c624bda GCC: explicitely instantiate JSObject::ApplyAttributesToDictionary for NumberDictionary
elements.cc invokes ApplyAttributesToDictionary using NumberDictionary as its template
parameter. But the declaration of the template method is in js-object.cc, so nobody
can actually compile the version for number dictionary. This is fixed requesting
explicit instantiation for NumberDictionary.

This was breaking GCC build.

Bug: chromium:819294
Change-Id: I685ddc5b97e129d1a534dbdb04025c0932bc5ecd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1649565
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: José Dapena Paz <jose.dapena@lge.com>
Cr-Commit-Position: refs/heads/master@{#62097}
2019-06-11 14:36:05 +00:00
Oliver Dunk
563290194f Add quotes around unexpected token SyntaxError
Quotes have been added around the token to make the message clearer.

Bug: chromium:943636
Change-Id: Ic38f3e6d307157af2c0146e69fb611a2cfb46564
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1593307
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62074}
2019-06-11 06:11:58 +00:00
Michael Mclaughlin
348cc6f152 Improve toString(radix) for doubles near zero
Currently, Number.prototype.toString(radix) often fails to produce the
least significant bit for doubles near zero. For example, for the
minimum double, 5e-324, toString(2) produces "0". This means that a
user cannot reliably get the exact binary or hexdecimal value of a
double from JavaScript using toString.

This patch makes a slight amendment to the DoubleToRadixCString
function, so that doubles where the gap to the next double is 5e-324
(i.e. doubles less than 2**-1021), are represented exactly in binary and
other power-of-two bases, and close to exactly otherwise. It results
in Number.prototype.toString producing the correct binary value for all
doubles.

R=jkummerow@chromium.org, mathias@chromium.org, yangguo@chromium.org

Bug: v8:9294
Change-Id: I71506149b7c4c0eac8c38675a1ee15fb4f36f9ef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1631601
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61925}
2019-05-29 20:45:02 +00:00
gengjiawen
5554781f74 make deleted functions public in include
Effective Modern C++ Items 11:
Prefer deleted functions to private undefined ones


Change-Id: I35c6277fcc77c60fc0a3d904763039c916d62b78
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1608325
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61433}
2019-05-13 07:58:31 +00:00
Balaram Makam
529ed9e992 [arm64][turbofan] FP simplification
FNMUL is efficient arm64 instruction, which can save 1 cycle
by optimizing FNEG(FMUL x y)) to FNMUL x y and
FMUL((FNEG x) y) to FNMUL x y

Change-Id: If25d9de1253098b17033a9d8736ff6a1c06601f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1572681
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Martyn Capewell <martyn.capewell@arm.com>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61230}
2019-05-06 08:25:22 +00:00
Sigurd Schneider
7404b44a04 [cctest] Move cctest.cc from cctest_sources to cctest target
Both MSVC and Clang require a mainCRTStartup symbol for the cctest
executable to compile. All objects from the cctest_sources source
set are bundled into a library which does not contain this symbol.

Bug: v8:7854
Change-Id: I88cd26209114daa84574e3b20046613b1560fa98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1357039
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61206}
2019-05-03 14:24:01 +00:00
Raul Tambre
9ebd7612da Support Python 3 in //tools/js2c.py
The script still works with Python 2.
There are no intended behaviour changes.

Bug: chromium:941669
Change-Id: I5ec63564fdb29a326c64d6ac7465f86b30ef16c1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1585857
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Raul Tambre <raul@tambre.ee>
Cr-Commit-Position: refs/heads/master@{#61191}
2019-05-03 07:00:28 +00:00