AdvanceUntil always starts at the character after c0_. This means that we
needed to handle first, causing some duplication. Instead of doing that, we can
also just not Advance() before AdvanceUntil, making c0_ a character that's
already handled.
Change-Id: I3e23f62a617b5d607579641fc19b12de4f179e8e
Reviewed-on: https://chromium-review.googlesource.com/c/1491512
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59897}
The spec repo version in DEPS now gets updated automatically by the
autoroller, but we still have to update the spec tests manually because
it requires ocaml. Updating the core spec tests is what this CL does.
There is a bug to also do this update automatically. It's on Sergiy's
list but does not have the highest priority.
R=titzer@chromium.org
Change-Id: I65085dcbca93d41d9f12c5ba227130197ebd203f
Reviewed-on: https://chromium-review.googlesource.com/c/1491219
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59891}
We don't allocate executable memory in jitless mode hence there's no
need to flush the icache.
Bug: v8:7777
Change-Id: I70a1884e6c9f11405465f5741f2eccd4f7a273fb
Reviewed-on: https://chromium-review.googlesource.com/c/1488765
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59887}
Moved CoverageMode and TypeProfileMode enums to interface-types.h
to save one include in isolate.h. This reduces the expanded lines of code
count by ~45k.
Bug: v8:8834
R=yangguo@chromium.org
Change-Id: I399fe8cf66b1aec79bcb5831afd46a74e358244d
Reviewed-on: https://chromium-review.googlesource.com/c/1489072
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59886}
We didn't update the arguments count properly when changing the JSCall
node to a direct Call node.
Bug: chromium:936302, v8:8895
Change-Id: I59a39a07e41151d8eaa2e1a1ea7b1835e00fb501
Reviewed-on: https://chromium-review.googlesource.com/c/1491191
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59885}
This is a reland of 734a657522
Original change's description:
> Do not enqueue or run a microtask on detached contexts
>
> This CL disables EnqueueMicrotask and RunMicrotasks on detached
> contexts. That is, if an embedder call DetachGlobal() on a v8::Context,
> EnqueueMicrotask on that context will not take effect, and all Microtask
> that is enqueued before DetachGlobal will be cancelled.
>
> On Blink, this implies that a frame will no longer run a microtask after
> it's navigated away. OTOH, detached frames in Blink are not affected.
>
> Bug: v8:8124
> Change-Id: I5b00ceef5ea2afb87cf067a65eb95c29bf91176d
> Reviewed-on: https://chromium-review.googlesource.com/c/1416071
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59445}
Tbr: adamk@chromium.org, yangguo@chromium.org, verwaest@chromium.org
Bug: v8:8124
Change-Id: I959a18ae214f1385d5f453b3ed94772e60f71e0f
Reviewed-on: https://chromium-review.googlesource.com/c/1469544
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59884}
This adds support for dynamically checking the newly introduced
is_safe_to_skip_adapt_arguments flag on the SharedFunctionInfo inside
the ArgumentsAdaptorTrampoline builtin, so that if there's an arguments
mismatch, but said bit is set, we can just massage the current stack
frame according to the SharedFunctionInfo and don't need to create an
arguments adaptor frame.
This improves the general (baseline) performance of calls with arguments
mismatches by up to 35%, as can be seen with the test case from the tracking
bug, which goes from around
callUnderApplication: 608 ms.
callOverApplication1: 633 ms.
callOverApplication2: 635 ms.
to
callUnderApplication: 390 ms.
callOverApplication1: 439 ms.
callOverApplication2: 443 ms.
when the TurboFan fast-path (that was previously introduced) is forcibly
disabled. That's a pretty solid baseline improvement and there's probably
still some room for further improvement (i.e. avoid loading the SFI multiple
times, etc.).
Drive-by-fix: Refactor and cleanup the ArgumentsAdaptorTrampoline
builtin a bit to make it more efficient and easier to read (it's still
pretty messy, but I don't wanna change too many things at once).
This is only the initial x64 port, since for ia32 we're really short on
registers and it might not even pay off (initial prototype shows a lot
less performance impact). The arm and arm64 port is in progress and will
land once ready.
Bug: v8:8834, v8:8895
Change-Id: I2e1c8e4767a808a43b932487fdedc0e44cdd35c5
Reviewed-on: https://chromium-review.googlesource.com/c/1488751
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59881}
OS::Allocate() previously was calling zx_vmo_replace_as_executable()
when executable access is requested. This breaks the case when the
OS::SetPermission() is called to mark that memory as executable later.
Updated it to call zx_vmo_replace_as_executable() for all VMOs.
This solution is not ideal, but it's consistent with other platforms,
so it's acceptable short-term.
Bug: v8:8899, chromium:934582
Change-Id: Ifeb818c93d8b9c80e73a057f5e6f3ca5a7b1c23f
Reviewed-on: https://chromium-review.googlesource.com/c/1483613
Reviewed-by: Wez <wez@chromium.org>
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59880}
I can't reproduce any of these flakes anymore on windows or linux.
Some are confirmed fixed with the same root cause as crbug.com/v8/8883.
Others are not reproducible anymore and were probably fixed by other
de-flaking and bugfixes in the last 6 months.
Bug: v8:5193, v8:7054
Change-Id: I23ce47a98f11f3637ccf4baf01ffab5c461a0ebd
Reviewed-on: https://chromium-review.googlesource.com/c/1489074
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59873}
We somehow forgot to thread through the VectorSlotPair for the CALL_IC
based speculation feedback to CheckedTaggedToTaggedPointer. This was
showing for example with `String#concat()` where we ended up with an
endless deoptimization loop if the parameter was a Smi.
Bug: v8:8913
Change-Id: I84d90403f6fada9b435d4eb71c689edc3c34dc86
Reviewed-on: https://chromium-review.googlesource.com/c/1488770
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59871}
The logic for removing while iterating is non-standard and
a left over from a previous index based loop. This patch
replaces it with a standard erase based version.
This fixes a runtime crash with MSVC that invalidates the
iterator and then asserts. This also makes the code safe
in case the last move can be redundant.
Change-Id: Ie6990e0d65a3b83a4b7da3e2e89ed4e60a6cd215
Reviewed-on: https://chromium-review.googlesource.com/c/1488762
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59868}
GetSymbol previously always internalized the underlying string, even if the
preparser does not need it. The most common case where this isn't needed is
property name parsing. This seems to speed up preparsing quite a bit.
For future reference: Property names in object literals still are needed due to
various checks (e.g., get 'constructor', duplicate __proto__, ...); as well as
cover grammar parsing (property names can turn into variable references). If we
turn all strings that the preparser needs to identify back into contextual
keywords we may be able to avoid the former.
Change-Id: I549e4600053de3136ca08d4915cc04db36d66a89
Reviewed-on: https://chromium-review.googlesource.com/c/1488764
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59866}
This CL introduces a new expression that can replace "std::string"
fields in other expressions. The main goal is to get SourcePositions
for identifiers to make them available in the language server.
The CL introduces a separate symbol "name", that allows to
incrementellay replace strings with name expression where needed. As
an example, variable delcarations now use a NameExpression for the
variable name.
R=danno@chromium.org, tebbi@chromium.org
Bug: v8:7793
Change-Id: I5b88bbaeac597b8e9760d2e01880e5e599ebf802
Reviewed-on: https://chromium-review.googlesource.com/c/1488752
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59865}
When --concurrent_inlining is on, precompute (during serialization)
the list of receiver maps and the transition matrix of element
accesses.
Bug: v8:7790
Change-Id: I257eaea630f33831ab6600851ccdf297e17e35ca
Reviewed-on: https://chromium-review.googlesource.com/c/1475769
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59863}
... as suggested by the bug's reporter.
Bug: chromium:935358
Change-Id: Iab9d207e4f55a395d0496ef5d5ea0e9b6783ae66
Reviewed-on: https://chromium-review.googlesource.com/c/1488757
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59862}
By making EmptyIdentifierString (used for failure-mode parsing) point to the
empty_string() we can drop nullptr checks in the preparser. This is similar to
what the parser already does.
Change-Id: I4640f7ae6b24afc8d5275818caed0cca185ca72c
Reviewed-on: https://chromium-review.googlesource.com/c/1488759
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59860}
We'll remove the gcc version from the builder name in a follow up.
TBR=sergiyb@chromium.org
NOTRY=true
Bug: chromium:933093
Change-Id: I65359afd7245f155f7d1fd0519033ab8f8f736bb
Reviewed-on: https://chromium-review.googlesource.com/c/1488758
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59859}
That way we can avoid allocating unreusable zone memory.
Change-Id: I0f30cbf5133026c63a9729bc45e728daa4740e9f
Reviewed-on: https://chromium-review.googlesource.com/c/1488756
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59858}
This reverts commit 32fc0acfef.
Reason for revert:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8-Blink%20Linux%2064/30270
layout test breakage:
https://test-results.appspot.com/data/layout_results/V8-Blink_Linux_64/30270/webkit_layout_tests%20%28with%20patch%29/layout-test-results/results.html
There is a dead node arriving in representation selection, which might indicate that the problem is not in this CL, but that this CL stirs up the node soup in such a way that dead code elimination gets confused.
Original change's description:
> Optimize `in` operator
>
> This change implements optimizations for the `in` operator for packed array
> elements and object properties. It adds a new feedback slot kind and an IC
> path similar to KeyedLoadIC for handling the lookups. TurboFan uses the
> feedback to optimize based on the maps and keys.
>
> For more details see:
> https://docs.google.com/document/d/1tIfzywY8AeNVcy_sen-5Xev21MeZwjcU8QhSdzHvXig
>
> This can provide 10x performance improvements of on loops of the form:
>
> for (let i = 0; i < ary.length; ++i) {
> if (i in ary) {
> ...
> }
> }
>
>
> Bug: v8:8733
> Change-Id: I766bf865a547a059e5bce5399bb6112e5d9a85c8
> Reviewed-on: https://chromium-review.googlesource.com/c/1432598
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Matt Gardner <magardn@microsoft.com>
> Cr-Commit-Position: refs/heads/master@{#59843}
TBR=ulan@chromium.org,rmcilroy@chromium.org,jkummerow@chromium.org,jarin@chromium.org,ishell@chromium.org,bmeurer@chromium.org,verwaest@chromium.org,magardn@microsoft.com
Change-Id: Ib2db974e5bed4c4a2b6b450f796bdc4b0b8fd562
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8733
Reviewed-on: https://chromium-review.googlesource.com/c/1488761
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59857}
This directory is created by ccls (language server for C++ and others).
R=sigurds@chromium.org
Change-Id: I2413921ca896ad2003fcfd10fdadb739f1af18c8
Reviewed-on: https://chromium-review.googlesource.com/c/1487151
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59855}
This CL contains a basic Json parser used to read and write the
Json-RPC messages of the language server protocol.
This CL is part of the initial language server implementation but
submitted separately for easier review.
R=tebbi@chromium.org
Bug: v8:8880
Change-Id: Icea040975e1ed1d587954c3342d8d876e01c26b8
Reviewed-on: https://chromium-review.googlesource.com/c/1479956
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59848}