Otherwise preparsed variables will cause unnecessary dynamic variable
allocation, which is especially bad when we're preparsing top-level functions
with references to other global variables.
Change-Id: I2fa17dae8c1cc5264a26ddc8b8868de1d791b0ac
Reviewed-on: https://chromium-review.googlesource.com/c/1456040
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59420}
the DCHECK in set_constant_pool_offset fails due to the
InstructionSize() needs builtin_index()
Change-Id: Ia86b57ebc4901672dee3012ba931e0222933ec1d
Reviewed-on: https://chromium-review.googlesource.com/c/1454265
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#59418}
We often use raw assertPromiseResult with {success ==
assertUnreachable} for that. Having a separate helper increases
readability and allows us to generate consistent (and better) error
messages.
R=titzer@chromium.org
Bug: chromium:926311
Change-Id: I507941eacaafe6c576098d7829a76b27384a4fb6
Reviewed-on: https://chromium-review.googlesource.com/c/1456039
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59417}
This would enable us to move the computation to the serialization pass,
while keeping the merging in the reducers.
Bug: v8:7790
Change-Id: Ic1a4da7085e1c0ebe787a5c7ad79f0f09e7c3c76
Reviewed-on: https://chromium-review.googlesource.com/c/1452796
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59414}
This drops Read() and Slot() methods from UnalignedSlot and simplifies
Deserializer::ReadDataCase() method.
Bug: v8:8794, v8:8562
Change-Id: I8a1f62e7b36fb91e379e38d91bcbf5728d1c5471
Reviewed-on: https://chromium-review.googlesource.com/c/1456099
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59413}
This is a reland of I968a08cef6a6d49350aa79185b2c6fb856d15f23
Original change's description:
> [builtins] [turbofan] Refactor Float64Pow to use single implementation
>
> Remove platform-specific Float64Pow implementations and utils Pow in
> favor of a base::ieee754::pow implementation.
>
> This unifies the implementation of pow for the compiler, wasm, and
> runtime.
>
> Bug: v8:5848, v8:5086
> Change-Id: I968a08cef6a6d49350aa79185b2c6fb856d15f23
> Reviewed-on: https://chromium-review.googlesource.com/c/1403018
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59229}
Bug: v8:5848, v8:5086
Change-Id: I92f22ae03adafd9ad042e8d4bb406cbd5b5fb51e
Cq-Include-Trybots: luci.chromium.try:linux_chromium_ubsan_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/1447854
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59411}
This adds constant field tracking for arrays. To prevent changing the
field in some other elements-kind-branch of transition tree, we only
use the const information in the optimizing compiler if the map is not
an array map or if the map is stable (since stable maps cannot
transition to a different elements-kind-branch without deopt).
Some more details:
https://docs.google.com/document/d/1r2GAvdi_wudDS6iRUfdPw0gxWMfV-IX1PqKgwW47FyE
Bug: chromium:912162, v8:8361
Change-Id: Iea1b2f03ddee16205c2141ac5e813a973dd23cf4
Reviewed-on: https://chromium-review.googlesource.com/c/1454606
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59409}
V8 test suites return tests by loading them into memory up-front. Up-front
loading has memory and loading-time overhead for the testrunner.
This CL converts the test-suites to load tests during the test run in parallel.
After CL, most test suites start running immediately and all test suites start
running after 3 seconds on a modern SSD.
This CL eliminates the 200 MiB memory spikes that causes memory problems in mac
minis.
Overhead of running test262 before CL:
Line # Mem usage Increment Line Contents
=================================================
264 225.760 MiB 195.8.000 MiB tests = self._load_testsuite_generators(args, options)
-------------------------------------------------
Overhead of running test262 after CL:
Line # Mem usage Increment Line Contents
================================================
264 28.840 MiB 0.000 MiB tests = self._load_testsuite_generators(args, options)
-------------------------------------------------
R=machenbach@chromium.org
CC=yangguo@chromium.org,sergiyb@chromium.org
Bug: v8:8174, v8:8552, v8:8728
Change-Id: Iab540b9410239b05dc80b4a5228db25d8b8fb3b9
Reviewed-on: https://chromium-review.googlesource.com/c/1454478
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59408}
This CL adds a method to the factory which converts a stack trace
frame represented by a FrameArray plus index, into a StackFrameInfo
object. This factory method will later be used to lazily populate
stack trace frames when they are retrieved via inspector API.
Drive-by: Expose the script id in StackFrameBase.
R=jgruber@chromium.org
Bug: v8:8742
Change-Id: I79965e466370706593903f3d1a336ac29736f8ac
Reviewed-on: https://chromium-review.googlesource.com/c/1454928
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59405}
... rather than as a suffix.
This avoids reading previous values which in turn will make things
simpler from the pointer compression point of view in a sense that
this is a step towards replacing UnalignedSlot with MaybeObjectSlot.
Bug: v8:8794, v8:8562
Change-Id: I9a9b4a01f73b8058074d337b7e9e9f75fa1c9de0
Reviewed-on: https://chromium-review.googlesource.com/c/1456037
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59402}
Creating the LogCodesTask and adding the code objects to it adds 10-20%
to Liftoff compilation time. Thus cache whether code logging is needed
per isolate, and avoid the overhead if that flag is false.
R=mstarzinger@chromium.org
Bug: v8:8783, chromium:928722
Change-Id: I059266da3309a4b1ed316016d0a55fa34f139057
Reviewed-on: https://chromium-review.googlesource.com/c/1454484
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59400}
This turns the previous compile time constant IC::kMaxPolymorphicMapCount
into a runtime flag --max-polymorphic-map-count (defaults to 4 still),
which makes it easier to play with different number of maps in POLYMORPHIC
state.
Bug: v8:8765
Change-Id: I86c04d9b2d8be21a3bc6b31f70b0bbc359067467
Reviewed-on: https://chromium-review.googlesource.com/c/1456097
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59398}
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}
This CL allows the check for same security context to be disabled
when deciding what frames to include in a stack trace. This flag
will be needed to collect detailed stack traces in the same manner
as simple ones.
R=jgruber@chromium.org
Bug: v8:8742
Change-Id: I99651ad11e11546d7bdba88367a0849e7b308dcb
Reviewed-on: https://chromium-review.googlesource.com/c/1454719
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59395}
"this" is a very common expression. By using a single ThisExpression object
we can both avoid allocating many unnecessary VariableProxies and specialize
the resolution of this since we know where it's declared up-front. This also
avoids having to special-case "this" reference handling in the paths that would
behave differently for "this" than for regular references; e.g., with-scopes.
The tricky pieces are due to DebugEvaluate and this/super() used as default
parameters of arrow functions. In the former case we replace the WITH_SCOPE
with FUNCTION_SCOPE so that we make sure that "this" is intercepted, and still
rely on regular dynamic variable lookup. Arrow functions are dealt with by
marking "this" use in ArrowHeadParsingScopes. If the parenthesized expression
ends up being an arrow function, we force context allocate on the outer scope
(and mark "has_this_reference" on the FUNCTION_SCOPE so DebugEvaluate in the
arrow function can expose "this").
The CL also removes the now unused ThisFunction AST node.
Change-Id: I0ca38ab92ff58c2f731e07db2fbe91df901681ef
Reviewed-on: https://chromium-review.googlesource.com/c/1448313
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59393}
http://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20arm%20-%20sim%20-%20debug
V8 Linux ARM SIM Debug bot runs into timeouts consistently in "Check - extra"
suite shard#1 after 45 minutes (shard#1 and shard#2 run for 40~ minutes) due to
unbalanced sharding.
This CL increases the shard size for the bot
R=yangguo@chromium.org
CC=machenbach@chromium.org,sergiyb@chromium.org
Bug: v8:8174
No-Try: true
Change-Id: I47fdc2568ff93fb88eda5121d45b6f9d86e596a5
Reviewed-on: https://chromium-review.googlesource.com/c/1456096
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59392}
Whether backing stores are on V8's heap or not is opaque to JavaScript.
This is not true for other external memory such as DOM which is why only
backingstores are considered as on heap.
Bug: chromium:914304
Change-Id: Idfeb9815daeee239a6a5b95077421e555bfe5fda
Reviewed-on: https://chromium-review.googlesource.com/c/1454726
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59389}
This is a reland of 81eec150f6
Original change's description:
> Reland "[test] refactor testsuite configuration"
>
> This is a reland of 7f92ad0ab6
>
> Original change's description:
> > [test] refactor testsuite configuration
> >
> > Every testsuite configuration consist of at least 30% code duplication.
> >
> > The code age ranges from 10 years old to 5 years old. Implementing anything that
> > touches the testsuite code becomes a technical fight to the death.
> >
> > This CL removes all the duplication by refactoring the common functionality.
> >
> > This CL contains structural changes without any logical changes % small bug
> > fixes.
> >
> > R=machenbach@chromium.org
> > CC=yangguo@chromium.org,sergiyb@chromium.org
> >
> > Bug: v8:8174, v8:8769
> > Change-Id: Iee299569caa7abdc0307ecf606136669034a28a2
> > Reviewed-on: https://chromium-review.googlesource.com/c/1445881
> > Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
> > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#59361}
>
> Bug: v8:8174, v8:8769
> Change-Id: I8e7078cfb875ceb3777e57084e6f8dfac09693e7
> Reviewed-on: https://chromium-review.googlesource.com/c/1454485
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Tamer Tas <tmrts@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59369}
Bug: v8:8174, v8:8790
Change-Id: I38ab9d37bca76057441a970f26e2102e4387a857
Reviewed-on: https://chromium-review.googlesource.com/c/1454724
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59387}
When using this flag to diagnose code caching, it would be awesome
to not invalidate the cache due to having this flag enabled.
R=jgruber@chromium.org
Change-Id: I7ca9869e9ea9b3a4ad7da555536aa41742ff2735
Reviewed-on: https://chromium-review.googlesource.com/c/1451817
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59385}
1. Change the function to align with UTS35 instead of (old) RFC.
2. Restrict tag as Unicode Locale Identifier by code that on top of ICU.
Because icu::Locale in ICU63 is not tight enough to restrict that.
Added comments to show what to do (to use icu::LocaleBuilder) after
the landing of ICU64
3. Fix to pass two tests in test262.
Bug: v8:8262,v8:8670,v8:7684
Change-Id: If244647e6a50daae305b9ae1a569100859be8a0c
Reviewed-on: https://chromium-review.googlesource.com/c/1435737
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59382}
Introduce a way to set a custom finalization callback that can be used
to signal and set up destruction of embedder memory.
Bug: chromium:923361
Change-Id: Ifc62ebd534aba3b02511c74b59161ec3edc0ee0d
Reviewed-on: https://chromium-review.googlesource.com/c/1452447
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59381}
This also fixes external string table update after scavenge and
the fast promotion mode.
Bug: chromium:852420
Change-Id: I5d2e1b585b8c74970047867aa587f928e116ed73
Reviewed-on: https://chromium-review.googlesource.com/c/1454604
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59379}
This reverts commit 73dd9b5527.
Reason for revert: Broke telemetry layout tests - https://ci.chromium.org/p/chromium/builders/luci.chromium.try/win7-rel/9936 as can be seen in this roll - https://chromium-review.googlesource.com/c/chromium/src/+/1454259
Original change's description:
> [utf8] Rewrite NewStringFromUtf8 using Utf8::ValueOfIncremental
>
> This is 3-4x faster than using the Utf8Decoder. This matters for proper
> parse-time measurements using d8.
>
> Change-Id: I9870e9fbe400ec022a6eeb20491c80a2a32f8519
> Reviewed-on: https://chromium-review.googlesource.com/c/1451827
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59347}
TBR=ulan@chromium.org,leszeks@chromium.org,verwaest@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I3f8faebb61c19a41ee496a571228f53c0d5fc8dd
Reviewed-on: https://chromium-review.googlesource.com/c/1454495
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59378}
The last allocated large object in the young generation is not
guaranteed to be initialized when the concurrent marker visits it.
This patch adds a mechanism for the concurrent marker to put such
objects on the on-hold worklist similar to how new space objects are
handled.
Bug: chromium:852420
Change-Id: I749e9a7f3dcee6f177f4d95980a4f693c0fd4b04
Reviewed-on: https://chromium-review.googlesource.com/c/1454916
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59377}
Preserve coverage for unused functions by force marking them used when
code coverage is enabled.
Bug: chromium:927464
Change-Id: Ia973467d06f7268f4e98cc76d0bb98cc591e979c
Reviewed-on: https://chromium-review.googlesource.com/c/1454717
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59373}
In chromium, the platform might delete the task before executing it
and before fully deregistering the Isolate.
In that case we need to deregister it from the WasmEngine to avoid a
data race or use-after-free.
R=mstarzinger@chromium.org
CC=herhut@chromium.org
Bug: v8:8783, chromium:928458
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Change-Id: Ie94e037f07fbe220505a5d8314b413f24c0990e1
Reviewed-on: https://chromium-review.googlesource.com/c/1454598
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59372}
When a failing compilation occur, constant pool may not be emitted but
linked (at the starting of code sequence). When CodeGenerator
destructor is called, Assembler, ConstantPoolBuilder destructor are
also called, which lead to calling the destructor of the emitted_label_,
and then DCHECK fails because it's linked.
Bug: v8:8785
Change-Id: I8926baa2fd7c16c462eef0c146d92ac7bf355396
Reviewed-on: https://chromium-review.googlesource.com/c/1452350
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#59371}