Commit Graph

51172 Commits

Author SHA1 Message Date
Hai Dang
fac6f63eb8 Use CopyElements (which uses memcpy) to copy FixedDoubleArray.
This improves the performance of ExtractFixedArray and
CloneFastJSArray for double arrays, which in turn improve the
performance of cloning double arrays with slice() or spreading.

This, however, does not improve performance of spreading holey
double arrays, because spreading needs extra work to convert
holes to undefined.

Bug: v8:7980
Change-Id: Ib8aed74abbb0b06982a3b754e134fa415cb7de2d
Reviewed-on: https://chromium-review.googlesource.com/c/1280308
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Hai Dang <dhai@google.com>
Cr-Commit-Position: refs/heads/master@{#56680}
2018-10-16 10:12:15 +00:00
Sigurd Schneider
a4e820df48 [tools] Add verify_csa statusfile param
Change-Id: Ibacdc7b41a96fc7c7d4ff44552fe6d86ec2ef1aa
Bug: v8:8312
Reviewed-on: https://chromium-review.googlesource.com/c/1282605
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56679}
2018-10-16 09:48:05 +00:00
Sigurd Schneider
18c135b1a4 [root] Reinitialize root register in deoptimizer
Bug: v8:6666, v8:7777
Change-Id: I0d1306bb96e12c81e876888b0ca69cae5855fbc3
Reviewed-on: https://chromium-review.googlesource.com/c/1273100
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56678}
2018-10-16 09:46:56 +00:00
Benedikt Meurer
1e586c3c70 [turbofan][x64] Match memory operand comparisons with zero.
The InstructionSelector on x64 was missing the ability to properly match
comparisons of memory operands with zero, i.e. it used to turn something
like

  Word32Equal(Load[Uint8](o, i), Int32Constant(0))

into

  movzbl reg, [o,i]
  cmp 0, reg

even requiring a temporary register. Now with this change it generates
the proper

  cmpb [o,i], 0

sequence.

R=sigurds@chromium.org

Bug: v8:8238
Change-Id: I52a71bbf95c85e11cb275f0f4a5726a6873cde95
Reviewed-on: https://chromium-review.googlesource.com/c/1281342
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56677}
2018-10-16 09:29:25 +00:00
Tobias Tebbi
b76c27bfe9 [torque] fix bug in Stack::DeleteRange
This bug does not affect the Torque run on tip-of-tree, but surfaced
in https://crrev.com/c/1196693.
The logic in Stack::DeleteRange was completely wrong and does not work
if the number of moved elements is bigger than the number of deleted
elements.

Change-Id: I5433b3b06e2e54646104493e9bc5e77b9763a521
Reviewed-on: https://chromium-review.googlesource.com/c/1282103
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56676}
2018-10-16 09:24:45 +00:00
Sigurd Schneider
66afdda69d [ia32,root] Make stack comparisons ready for root support
Change-Id: I673c4bddca876dd506be4979bbf2208e6f0af329
Bug: v8:6666
Also-By: jgruber@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/1280326
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56675}
2018-10-16 09:23:16 +00:00
Michael Achenbach
c45bc57d21 [test] Temporary debug output for hanging tests
TBR=sigurds@chromium.org,sergiyb@chromium.org

Bug: v8:8292
Change-Id: Ic03e2884ef645231807762f6b0210e69c5f9ac74
Reviewed-on: https://chromium-review.googlesource.com/c/1282604
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56674}
2018-10-16 09:00:33 +00:00
Jakob Gruber
1df203a2c7 [ia32,root] Extend support for root-relative accesses
This adds root-relative access in a couple of spots (e.g.: LoadRoot,
CompareRoot, PushRoot, Push, Move, etc.). Some methods now dispatch
based on whether the given Immediate is an embedded object.

ShouldGenerateIsolateIndependentCode() was added as a porting crutch:
it forces isolate-independent code for builtins even though the
builtin is not in the Builtins::IsIsolateIndependent() whitelist. This
allows us to easily figure out which builtins can be white-listed with
--print-embedded-builtin-candidates.

Newly isolate-independent builtins are now whitelisted.

Drive-by: Remove dead CompareRoot and JumpIfRoot helpers.

Bug: v8:6666
Change-Id: I6b5f6f71b90ac22e7e15482af0617b0ca1c319da
Reviewed-on: https://chromium-review.googlesource.com/c/1280665
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56673}
2018-10-16 08:59:30 +00:00
Dan Elphick
08b8e0ff5a Clarify roots iteration
Change Heap::IterateStrongRoots to never iterate the read-only roots. In
doing so remove VISIT_ALL_BUT_READ_ONLY and
VISIT_ONLY_STRONG_FOR_SERIALIZATION. All such uses should now use
VISIT_ALL and VISIT_ONLY_STRONG. Where ReadOnlyRoots iteration is
required, this adds ReadOnlyRoots(isolate)->Iterate() at the call site.

Add new begin, end, strong_mutable_roots_begin and
strong_mutable_roots_end methods to RootsTable and try and make the
existing uses a little more consistent.

Bug: v8:8191
Change-Id: Ie9d0f9e5186db418428e2fafd38432b0bd879daa
Reviewed-on: https://chromium-review.googlesource.com/c/1278500
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56672}
2018-10-16 08:42:30 +00:00
Florian Sattler
6b0bdcdb33 [gc] Remove empty no track gc members for release builds.
Change-Id: Ic8fe43e65fddec16b3c5c029acebda5ba1805e08
Reviewed-on: https://chromium-review.googlesource.com/c/1275812
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#56671}
2018-10-16 08:41:24 +00:00
Georg Neis
16f1d16c5c [turbofan] Brokerize DependOnStablePrototypeChains.
As well as a few other things in JSNativeContextSpecialization.

Bug: v8:7790
Change-Id: Ic13abec45797bb4c6cc66a140180122529c7288d
Reviewed-on: https://chromium-review.googlesource.com/c/1280327
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56670}
2018-10-16 08:23:47 +00:00
Jakob Gruber
34ec9ec7ca [regexp] Fix invalid access into empty string
If `out` is empty accessing `out.back()` is invalid.

TBR=yangguo@chromium.org

Bug: chromium:894934
Change-Id: I7286c5b6a9857f1cdb2bcaf383094bee65bac393
Reviewed-on: https://chromium-review.googlesource.com/c/1282565
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56669}
2018-10-16 08:17:24 +00:00
Frank Tang
f523befab5 [Intl] Remove extra set_intl_date_time_format_function()
Bug: v8:5751
Change-Id: I51c76880059ab5ce62032777d01d7e44849e874a
Reviewed-on: https://chromium-review.googlesource.com/c/1275808
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56668}
2018-10-16 07:49:28 +00:00
Sigurd Schneider
c2b1e63538 [ia32,root] Cleanup code generator
Change-Id: If4b0725000a7a6bb7da6399b107a965d8cb4c86f
Bug: v8:6666
Reviewed-on: https://chromium-review.googlesource.com/c/1271075
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56667}
2018-10-16 07:48:23 +00:00
Jakob Gruber
6aec5e7ad1 Reland "[ia32,root] Disable root indirections in irregexp code"
This is a reland of fefd923048

Original change's description:
> [ia32,root] Disable root indirections in irregexp code
> 
> Irregexp code spills and restores ebx at boundaries, and clobbers it
> inbetween. Root-relative loads are disabled in this region.
> 
> Bug: v8:6666
> Change-Id: I9c68bc8ef88d324da609996a8457ac9e30a9b6fc
> Reviewed-on: https://chromium-review.googlesource.com/c/1280762
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56639}

Bug: v8:6666
Change-Id: I92fe74e790ab9b2937a3b15db85bad45e6443083
Reviewed-on: https://chromium-review.googlesource.com/c/1280226
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56666}
2018-10-16 07:30:13 +00:00
Benedikt Meurer
4f02387570 [async] Improve wrapper promise initialization code.
The code for the initialization of the wrapper promise was using the
generic InitializeJSObjectFromMap() helper, which generates a loop to
initialization all fields of some generic object. In this particular
case we're constructing a JSPromise, so we only need to initialize the
elements and properties pointers, since all the other fields are taken
care of by the PromiseInit() call on the next line anyways.

Bug: v8:7253, v8:8238
Change-Id: If11963d1f94607ed9e48788f597c81c7344aafbe
Reviewed-on: https://chromium-review.googlesource.com/c/1281602
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56665}
2018-10-16 06:53:24 +00:00
Michael Achenbach
599ee8345f [release] Remove deprecated arguments from auto roller
TBR=sigurds@chromium.org
NOTRY=true

Bug: v8:8310
Change-Id: I83b250ffa89deb59fc10434806db25893ffed375
Reviewed-on: https://chromium-review.googlesource.com/c/1282564
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56664}
2018-10-16 06:37:34 +00:00
Mathias Bynens
f69bc879a4 Revert "Ship well-formed JSON.stringify 🎉"
This reverts commit 0d91db0b32.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Ship well-formed JSON.stringify 🎉
> 
> Proposal repository:
> https://github.com/tc39/proposal-global
> 
> Intent to ship:
> https://groups.google.com/d/msg/v8-users/IRu3bAC_pLM/pFwz2ti1AgAJ
> 
> Bug: v8:7782
> Change-Id: Iaf790f134917796deac0e84cc931828934a6e589
> Reviewed-on: https://chromium-review.googlesource.com/c/1260122
> Commit-Queue: Mathias Bynens <mathias@chromium.org>
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56650}

TBR=gsathya@chromium.org,mathias@chromium.org

Change-Id: Ie214a72a01fa81f754fd411808eb0bb748f89dbb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7782
Reviewed-on: https://chromium-review.googlesource.com/c/1282563
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56663}
2018-10-16 06:00:03 +00:00
Benedikt Meurer
8201da2913 [async] Reduce generated size of await builtins.
There's a AsyncBuiltinsAssembler::InitializeNativeClosure() helper which
is used by the `await` builtins to initialize the native closures, which
are registered as fulfill/reject handlers. This helper initializes a
JSFunction based on the builtin SharedFunctionInfo. Since we are dealing
with builtins here, there's no point in using the fully generic helper
CodeStubAssembler::GetSharedFunctionInfoCode(), but we can immediately
assume that the SharedFunctionInfo::function_data() field contains a Smi
builtin index (guarded by TNode CASTs).

This almost cuts the generated code size for the `await` builtins in a
half, and might also yield some performance improvements due to reduced
register and instruction cache pressure.

Bug: v8:7253, v8:8238
Change-Id: I3415c2f9e0f04a7154c4bf4c3fe8156854dbfe13
Reviewed-on: https://chromium-review.googlesource.com/c/1281604
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56662}
2018-10-16 05:40:53 +00:00
v8-ci-autoroll-builder
c36b21d63d Update V8 DEPS.
Rolling v8/build: 9578c43..e583af8

Rolling v8/buildtools: 2dff9c9..13a00f1

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/5aac72d..2be20fd

Rolling v8/third_party/depot_tools: dd78844..7d7bbc3

TBR=machenbach@chromium.org,hablich@chromium.org,sergiyb@chromium.org

Change-Id: I262810f51342a3323fc8ce9fa9fcd972e362e2fe
Reviewed-on: https://chromium-review.googlesource.com/c/1281839
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#56661}
2018-10-16 04:26:02 +00:00
Sathya Gunasekaran
9e984162da [Intl] Port ResolveLocale
- Add a new Intl::ResolveLocale method and uses it in all the intl objects.
- Fix CanonicalizeLocaleList to call out to HasProperty as per spec.
- Add calls to CanonicalizeLocaleList where it was previously missing.
- Change CanonicalizeLocaleListJS calls to CanonicalizeLocaleList now
  that we have migrated ResolveLocale.

Bug: v8:5751
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I4249d2045c1556f18d570b00f7c92cbc3fa52077
Reviewed-on: https://chromium-review.googlesource.com/c/1270255
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Frank Tang <ftang@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56660}
2018-10-16 02:34:54 +00:00
Bangfu Tao
92d6222f89 [gm.py] Support android_arm{,64} builds
This patch adds support for "gm.py android_arm.release.check"
and similar invocations.

Change-Id: I6e2204cb00f574d759b9e142ecabd2582153f707
Reviewed-on: https://chromium-review.googlesource.com/c/1278629
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56659}
2018-10-15 18:46:17 +00:00
Johannes Henkel
3ef5743aac Add protocol::Binary type to string-util.h.
This is in preparation of referencing this type from the code
generated by third_party/inspector_protocol/code_generator.py.
v8 will not use protocol::Binary, that is, the .pdl file for
v8 won't have binary fields. Therefore, we need not provide
an implementation for this type.

My overall WIP change is in here, and happy to explain more:
https://chromium-review.googlesource.com/c/chromium/src/+/1244719

Bug: chromium:891377
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I7336be5f6a60e6ad143290eca09dea59ff4b56a8
Reviewed-on: https://chromium-review.googlesource.com/c/1277714
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56658}
2018-10-15 18:29:44 +00:00
Hai Dang
d34cbcd789 [js-perf-tests] Fix micro-benchmark of spreading double arrays.
Array.prototype.map is currently not preserving PACKEDness. Use a
for-loop instead.

Bug: v8:7980
Change-Id: I08aff1cbcd84b9de260a5a1e2c68b9cfb5c3d888
Reviewed-on: https://chromium-review.googlesource.com/c/1280329
Commit-Queue: Hai Dang <dhai@google.com>
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56657}
2018-10-15 17:41:16 +00:00
Toon Verwaest
1556cdeac6 [parser] Inline CheckAndRewriteReferenceExpression wrapper
Change-Id: Ic8beb18bf37343405e8f4443a9f0991bd365e8df
Reviewed-on: https://chromium-review.googlesource.com/c/1280227
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56656}
2018-10-15 17:05:34 +00:00
Michael Lippautz
e11053a96f [api] Remove deprecated EmbedderHeapTracer APIs
Also fully deprecate AbortTracing.

Bug: chromium:843903
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I852d28d8ce0f02b3a048b1061de29c9fce71ce62
Reviewed-on: https://chromium-review.googlesource.com/c/1278811
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56655}
2018-10-15 16:37:49 +00:00
Michael Starzinger
c113f71a32 [wasm] Switch exception section encoding to new proposal.
This switches the encoding of the exceptions (in the exceptions as well
as the import section) to use a signature index instead of a flat type
vector encoding. Note that only signatures that have a void return type
can be used for declaring exceptions.

R=clemensh@chromium.org
BUG=v8:8153

Change-Id: I481ccbce9ddf29becdf4ed7ceffe80d6145446e1
Reviewed-on: https://chromium-review.googlesource.com/c/1280323
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56654}
2018-10-15 16:05:21 +00:00
Ross McIlroy
c73fa4fce4 [Build] Add support for V8 Lite mode.
Adds a build-time flag to control enabling of V8 Lite mode. Currently
this mode enables optimize-for-size and makes that flag read-only so that
it can't be changed at runtime.

This mode also replaces the --minimal flag which was previously used
to make porting easier.

BUG=v8:8293

Change-Id: I8360b4d55dd15a2a7c18429c94329dc5264dea86
Reviewed-on: https://chromium-review.googlesource.com/c/1276467
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56653}
2018-10-15 16:04:17 +00:00
Ulan Degenbaev
2dd15af700 [heap] Fix data race in sweeper.
The race happens when the sweeper is looking up the size of an object
that had its map replaced concurrently.

The fix is to load the object map using an acquire load so that the
sweeper observes the initializing stores of the new map.

Bug: v8:8303
Change-Id: Ifaaef06cb815be7d07b6a574085ee61a466bc1d6
Reviewed-on: https://chromium-review.googlesource.com/c/1280310
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56652}
2018-10-15 16:00:07 +00:00
Toon Verwaest
f763a5e76c [parser] Use fewer branches to accumulate errors, especially in the preparser
Change-Id: I8ab8e4f312d315a2f9d7b54ac894af87596fc51f
Reviewed-on: https://chromium-review.googlesource.com/c/1280303
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56651}
2018-10-15 15:50:54 +00:00
Mathias Bynens
0d91db0b32 Ship well-formed JSON.stringify 🎉
Proposal repository:
https://github.com/tc39/proposal-global

Intent to ship:
https://groups.google.com/d/msg/v8-users/IRu3bAC_pLM/pFwz2ti1AgAJ

Bug: v8:7782
Change-Id: Iaf790f134917796deac0e84cc931828934a6e589
Reviewed-on: https://chromium-review.googlesource.com/c/1260122
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56650}
2018-10-15 15:29:33 +00:00
Tobias Tebbi
185eaec097 [torque] declare local value and label bindings in the ImplementationVisitor
While this is mostly a mechanical change to enable re-visiting macros for
inlining, it has a few user-facing effects:

- Labels and (variables, parameters, local constants) are handled separately,
  so they do not shadow each other.
- A local variable or constant is not bound in its initializer.
  This allows code like:

  const x = 5;
  {
    const x = x + 1;
  }


Bug: v8:7793
Change-Id: I968e1f93d92689737362c803342a797d312e95cd
Reviewed-on: https://chromium-review.googlesource.com/c/1276628
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56649}
2018-10-15 15:26:34 +00:00
Toon Verwaest
fa3b5d7e0b [parser] Restructure ParsePrimaryExpression
Use token ranges for parsing identifiers and literals.

Change-Id: Ic6af2c4012033d7f7c69181f90aa6b1b9c2b2a60
Reviewed-on: https://chromium-review.googlesource.com/c/1280224
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56648}
2018-10-15 15:13:42 +00:00
Hai Dang
05b7308aec [js-perf-tests] Add micro-benchmarks for copying double arrays.
Bug: v8:7980
Change-Id: I6e7f1c064830c0055f8708472b62221ab5ca3288
Reviewed-on: https://chromium-review.googlesource.com/c/1280325
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Hai Dang <dhai@google.com>
Cr-Commit-Position: refs/heads/master@{#56647}
2018-10-15 15:05:21 +00:00
Hai Dang
546b549d6e Cleanup unnecessary use of CopyFixedArrayElements.
This removes the check for holeyness when using CopyFixedArrayElements,
because the function does not use that information.

Change-Id: I6033495bf00947ded083ebc24695f6c8bf4569d0
Reviewed-on: https://chromium-review.googlesource.com/c/1280763
Commit-Queue: Hai Dang <dhai@google.com>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56646}
2018-10-15 15:01:41 +00:00
Adam Klein
cc8c92a9ae Reduce wasm OWNERS to current team members
Change-Id: I982f3615136c7a4ba18e4a6d2cc06a3e24e22f54
Reviewed-on: https://chromium-review.googlesource.com/c/1277722
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56645}
2018-10-15 14:47:49 +00:00
Clemens Hammacher
f717e7f5b2 [wasm] Don't put interpreter entries in the code table
For serialization we are using the code table to find the code of all
functions. We want to serialize compiled code though, not interpreter
entries (we currently fail a DCHECK there).
This CL changes the logic to not update the code table with interpreter
entries but instead keeps a separate bit set of interpreted functions.

R=mstarzinger@chromium.org

Bug: v8:8177, chromium:735509
Change-Id: I69c59f92712135ddef667b54114614fad94cc6fc
Reviewed-on: https://chromium-review.googlesource.com/c/1278794
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56644}
2018-10-15 14:46:09 +00:00
Sigurd Schneider
dda3f136b6 Revert "[ia32,root] Disable root indirections in irregexp code"
This reverts commit fefd923048.

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

Original change's description:
> [ia32,root] Disable root indirections in irregexp code
> 
> Irregexp code spills and restores ebx at boundaries, and clobbers it
> inbetween. Root-relative loads are disabled in this region.
> 
> Bug: v8:6666
> Change-Id: I9c68bc8ef88d324da609996a8457ac9e30a9b6fc
> Reviewed-on: https://chromium-review.googlesource.com/c/1280762
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56639}

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

Change-Id: I1a349874c28218442ebed4f127d23d69dff094cd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6666
Reviewed-on: https://chromium-review.googlesource.com/c/1280225
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56643}
2018-10-15 14:42:25 +00:00
Maya Lekova
860ddfc06b [async-await] Fix INIT hook with --harmony-await-optimization
Split the runtime function for initializing a promise into AwaitPromisesInit
and AwaitPromisesInitOld, the former not firing the INIT hook and being used
by the AwaitOptimized builtin. In addition to this the AsyncHooks now caches
all the previously inited promises and checks that the init hook is not fired
twice for the same promise.

Modified test expectations for the new async ids in the async hooks tests.

Bug: v8:8300
Change-Id: If4a17e501b2a233578fa70b6442f219473f001d9
Reviewed-on: https://chromium-review.googlesource.com/c/1280442
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56642}
2018-10-15 14:36:56 +00:00
Igor Sheludko
1898944bd9 Revert "Reland "Create a fast path to get migration target when updating map""
This reverts commit 6ec90ecee2.

Reason for revert: causes a lot of Canary crashes (chromium:895208).
GC relies on an the fact that the transition array stays alive while it's owner map
is alive (this is needed in order to properly transfer descriptor array ownership
to the parent map when the map owning a shared descriptor array dies). We need to
rethink a way of caching the migration target shortcut.

Original change's description:
> Reland "Create a fast path to get migration target when updating map"
>
> This is a reland of c285380ca8
>
> Original change's description:
> > Create a fast path to get migration target when updating map
> >
> > During map updating, store the pointer to new map in the
> > raw_transitions slot of the old map that is deprecated from map
> > transition tree. Thus, we can get the migration target directly
> > instead of TryReplayPropertyTransitions when updating map.
> >
> > This can improve Speedometer2.0 Elm-TodoMVC case by ~5% on ATOM
> > Chromebook and ~9% on big-core Ubuntu.
> >
> > Change-Id: I56f9ce5183bbdd567b964890f623ef0ceed9b7db
> > Reviewed-on: https://chromium-review.googlesource.com/1233433
> > Commit-Queue: Shiyu Zhang <shiyu.zhang@intel.com>
> > Reviewed-by: Igor Sheludko <ishell@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#56303}
>
> Change-Id: Idf0b7716b92a6a15bfe58721c2c34dbd02b31137
> Reviewed-on: https://chromium-review.googlesource.com/c/1270261
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Commit-Queue: Shiyu Zhang <shiyu.zhang@intel.com>
> Cr-Commit-Position: refs/heads/master@{#56588}

TBR=ishell@chromium.org,shiyu.zhang@intel.com

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

Change-Id: Ie7e9b98395b041a1095da549d1cd71d7180a4888
Bug: chromium:895208
Reviewed-on: https://chromium-review.googlesource.com/c/1280223
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56641}
2018-10-15 14:35:37 +00:00
Predrag Rudic
a1974d491b MIPS: Port [turbofan] Use relative calls/jumps on arm for builtins
Port commit 23dbb81d8f.

Original CL message:

>This CL uses pc-relative jumps and calls (B/BL) for calls from embedded
>builtins to embedded builtins. To make this work, the code range size is
>limited to 32MB on arm during mksnapshot, which ensures that all builtin
>to builtin offsets for jumps/calls fit into the B/BL immediate. At code
>generation time, we put a placeholder into the instruction offset which
>we resolve to the right code object when the code is copied to the heap.
>We use a new relocation mode RELATIVE_CODE_TARGET for these relative jumps.
>The relocation mode RELATIVE_CODE_TARGET should never appear after
>generating the snapshot.
>
>We modify the target_address/set_target_address methods of RelocInfo
>such that they return the absolute target addresses for pc-relative B/BL
>instructions. This ensures that the GC can treat RELATIVE_CODE_TARGET in
>the same way as code targets. This, however, only matters during
>snapshot creation time, and production code never contains
>RELATIVE_CODE_TARGET relocations.
>
>Bug: v8:6666
>Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
>Change-Id: If7eab83ad588859ca87c654a5ddc3e37caea884c
>Reviewed-on: https://chromium-review.googlesource.com/1117181
>Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
>Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
>Reviewed-by: Jakob Gruber <jgruber@chromium.org>
>Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
>Cr-Commit-Position: refs/heads/master@{#54320}

This CL is completed Miran's draft without MIPS64 port.
(https://chromium-review.googlesource.com/c/v8/v8/+/1136640/3).

Change-Id: I979378ac445548641755968d890f7f4a82dc7986
Reviewed-on: https://chromium-review.googlesource.com/c/1221313
Commit-Queue: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56640}
2018-10-15 14:24:29 +00:00
Jakob Gruber
fefd923048 [ia32,root] Disable root indirections in irregexp code
Irregexp code spills and restores ebx at boundaries, and clobbers it
inbetween. Root-relative loads are disabled in this region.

Bug: v8:6666
Change-Id: I9c68bc8ef88d324da609996a8457ac9e30a9b6fc
Reviewed-on: https://chromium-review.googlesource.com/c/1280762
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56639}
2018-10-15 13:53:30 +00:00
Michael Lippautz
56d576d4d4 [heap] Untangle parallel and concurrent marking flag
Callers of the ConcurrentMarking API should check the flags, which they were
already mostly doing.

Change-Id: Ie273bb740fe6d2b36dfb924ce813670ebd47bf3f
Reviewed-on: https://chromium-review.googlesource.com/c/1280307
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56638}
2018-10-15 13:50:27 +00:00
Ross McIlroy
27e5c0b33f [CompilerDispatcher] Add support for aborting a job.
Some jobs might need to be aborted, e.g., if a function is a default parameter in an
arrow function it will be re-scoped and won't have a SFI to register. Adds support to
abort jobs without having to block if the job is currently running on the background
thread.

BUG=v8:8041

Change-Id: I9149740401cbaaa31c21be9d79d4e3f5c450bfcf
Reviewed-on: https://chromium-review.googlesource.com/c/1278497
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56637}
2018-10-15 13:31:26 +00:00
Sigurd Schneider
f30960afc1 [ia32,root] Fix counter loads to use ExternalOperand
Change-Id: I5804585565acfabc110b019c5fcecdcabbaf022e
Bug: v8:6666
Reviewed-on: https://chromium-review.googlesource.com/c/1276428
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56636}
2018-10-15 13:21:28 +00:00
Sigurd Schneider
d205a6a76c [ia32,root] Add ExternalOperand and some uncontroversial usages
This is the first CL in a series that removes the StaticVariable operand.

Change-Id: I2acdbf4a7481af43321b8af10dbe38f8f481bea8
Bug: v8:6666
Reviewed-on: https://chromium-review.googlesource.com/c/1276365
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56635}
2018-10-15 13:17:28 +00:00
Sigurd Schneider
e312281b58 [ia32,root] Remove usage of StaticVariable from regexp assembler
Change-Id: Ic2c9f22517153dc5bf41f3d6c78fa06dd7cc4f84
Bug: v8:6666
Reviewed-on: https://chromium-review.googlesource.com/c/1280306
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56634}
2018-10-15 12:37:45 +00:00
Toon Verwaest
ee9ac86ad9 [parser] Restructure ParseLeftHandSide
- use a token-range to quickly identify LHS continuation
- queue binding pattern errors only once
- outline LHS continuation to reduce memory overhead from aggressive inlining (30kb)

Change-Id: Ic0f3cfc3ea0bd6cedb6cea991a69f55f2bada14a
Reviewed-on: https://chromium-review.googlesource.com/c/1280207
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56633}
2018-10-15 12:36:43 +00:00
Clemens Hammacher
518d91e93d Remove redundant IsAligned function
{IsAligned} is defined twice with exactly the same signature and
implementation: once in base/macros.h, once in utils.h.

This CL removes the definition from utils.h.
Note that utils.h includes macros.h, so no further changes are needed.

R=mlippautz@chromium.org

Bug: v8:8238
Change-Id: I589b00c01619d054ff39c717f728a2351b6c32ea
Reviewed-on: https://chromium-review.googlesource.com/c/1280206
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56632}
2018-10-15 12:34:41 +00:00
Clemens Hammacher
40be7df641 Remove redundant IsAddressAligned function
Since {Address} is just {uintptr_t}, we can just use the standard
{IsAligned} function.

R=mlippautz@chromium.org

Bug: v8:8238
Change-Id: I260591e88b50855cf327096a07b2c18f0c1e4508
Reviewed-on: https://chromium-review.googlesource.com/c/1280204
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56631}
2018-10-15 12:16:44 +00:00