Commit Graph

57713 Commits

Author SHA1 Message Date
Sathya Gunasekaran
b464b62f2c [jsperf] Add benchmark for LoadConstantFromPrototype
Bug: v8:9616
Change-Id: Ieca74f8df90b342672c8904beef2c2298f0ba597
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1755991
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63221}
2019-08-16 09:33:06 +00:00
Dan Elphick
dd6af4e693 [builtins] Move builtin constants into read_only_space
Create a new function NewHeapNumberForCodeAssembler used only by
CodeAssembler that allocates in read_only_space whenever it is writable
(e.g. when constructing builtins). This can allocate in old_space for
CSA tests that run after read_only_space is sealed.

This move 512 bytes from old_space to read_only_space.

Bug: v8:7464
Change-Id: I3e29b38a8c062fa74feed63ecf0d07625c04347f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1752855
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63220}
2019-08-16 09:22:56 +00:00
v8-ci-autoroll-builder
ea9eff8435 Update wasm-spec.
Rolling v8/test/wasm-js/data: ace189a..9867945

[interpreter] Tweak  target (Andreas Rossberg)
https://chromium.googlesource.com/external/github.com/WebAssembly/spec/+/9867945

[interpreter] Update BS support (#1058) (Andreas Rossberg)
https://chromium.googlesource.com/external/github.com/WebAssembly/spec/+/ae113ed

[interpreter] Make format roundtrips perfect (#1057) (Andreas Rossberg)
https://chromium.googlesource.com/external/github.com/WebAssembly/spec/+/81c5f27

TBR=ahaas@chromium.org,clemensh@chromium.org

Change-Id: Id626fc54563e5bd1e97403803dae6683c949d6f7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1757684
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#63219}
2019-08-16 04:47:36 +00:00
v8-ci-autoroll-builder
2b64044908 Update V8 DEPS.
Rolling v8/build: 1bf9025..b9f7075

Rolling v8/third_party/android_ndk: https://chromium.googlesource.com/android_ndk/+log/4e2cea4..6258275

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/942e493..2ae52ad

Rolling v8/third_party/depot_tools: 979fa78..9f4b37d

Rolling v8/third_party/googletest/src: 90a443f..e9d5f42

Rolling v8/tools/clang: a05d5ea..4327557

TBR=machenbach@chromium.org,tmrts@chromium.org

Change-Id: If6324de29ba28dda02e9d87df14864eacf640802
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1757683
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#63218}
2019-08-16 03:48:06 +00:00
Adam Klein
4c8ffcbe39 Revert "[builtins] Port RegExpTest to Torque"
This reverts commit f54f92dda1.

Reason for revert: CSA_ASSERTS failing while rolling into Chromium,
see https://crbug.com/994103 for details.

Original change's description:
> [builtins] Port RegExpTest to Torque
> 
> Bug: v8:8976
> Change-Id: Ia4dc120a31eb363599b47b22b749a3146a9c7c73
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1746083
> Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#63211}

TBR=jgruber@chromium.org,tebbi@chromium.org,duongn@microsoft.com,szuend@chromium.org

Change-Id: Id3e1fe4e323826d3a48db667b032f0fddd7cb064
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8976
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1756389
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63217}
2019-08-15 17:09:10 +00:00
Santiago Aboy Solanes
82111e2286 [CSA][cleanup] TNodify some methods related to prototype and property lookup
This is a CL in a string of CLs that aims to TNodify CSA. In particular,
there were some loads that were done in AnyTagged instead of
TaggedPointer. TNode-ifying them brings improvement in pointer
compression since we are able to decompress using the Pointer
decompression.

TNodified:
 * LoadJSFunctionPrototype
 * TryPrototypeChainLookup
 * OrdinaryHasInstance

Also TNodified loads regarding:
 * FeedbackCell::kValueOffset
 * HeapObject::kMapOffset
 * JSFunction::kSharedFunctionInfoOffset
 * JSFunction::kFeedbackCellOffset
 * Map::kInstanceTypeOffset
 * Map::kInstanceDescriptorsOffset
 * Map::kPrototypeOffset

Drive-by cleanup: StoreJSArrayLength and StoreElements were unused.

Bug: v8:6949, v8:9396
Change-Id: I89697b5c02490906be1eee63cf3d9e60a1094d48
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1755844
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63216}
2019-08-15 16:07:16 +00:00
Milad Farazmand
299c8059a2 PPC: Allowing PPC simulator access to dynamic number of parameters
Previously we allowed for only one extra parameter on the stack,
this CL makes it dynamic based on the kArgCount value.

Change-Id: I18cd74d0cc0ecba6fb75dcee991a0e907d423d6a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1755411
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Reviewed-by: Milad Farazmand <miladfar@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#63215}
2019-08-15 14:43:53 +00:00
v8-ci-autoroll-builder
8567ac2bb8 Update wasm-spec.
Rolling v8/test/wasm-js/data: a221f25..ace189a

[spec] Terminology nits (#1053) (Andreas Rossberg)
https://chromium.googlesource.com/external/github.com/WebAssembly/spec/+/ace189a

TBR=ahaas@chromium.org,clemensh@chromium.org

Change-Id: I0d06e838557560d07ca8d9ec2e8323d2d6658b99
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1755223
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#63214}
2019-08-15 04:39:13 +00:00
Ng Zhi An
30f3892a03 [wasm-simd] Implement F64x2 add sub mul div for arm64
Bug: v8:8460
Change-Id: I81e48a99e34d7438c2b652a01d979bf8db4726ea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1749666
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63213}
2019-08-14 22:05:02 +00:00
Ng Zhi An
8736f68a33 Refactor some scratch usages to temp registers
Bug: v8:9528
Change-Id: Ib1e9505686b85fa426f3f66f7d6e1e63efc48014
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1710333
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63212}
2019-08-14 21:21:12 +00:00
Z Nguyen-Huu
f54f92dda1 [builtins] Port RegExpTest to Torque
Bug: v8:8976
Change-Id: Ia4dc120a31eb363599b47b22b749a3146a9c7c73
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1746083
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63211}
2019-08-14 20:52:33 +00:00
Ng Zhi An
3945c61271 [wasm-simd] Implement F64x2 Abs Neg for arm64
Bug: v8:8460
Change-Id: I4bf23d884f5d6b587db741e9d19ac4b6b1ece506
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1749663
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63210}
2019-08-14 17:40:57 +00:00
Dan Elphick
cfe6ceae3f Fix crash Code::DropStackFrameCacheCommon
Fixes DCHECK failure in DropStackFrameCacheCommon by returning early if
the source_position_table is Exception.

Bug: chromium:990582, v8:8510
Change-Id: I671f3e0cdc9f880dedf8ecd2fffb1083229dc6dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1752856
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63209}
2019-08-14 15:03:27 +00:00
Patrick Thier
b01df03f4e Increase maximum arguments for CallCFunction
This CL increases the maximum number of arguments for CallCFunction to
10 (was 9 previously).

All simulators also support up to 10 arguments now for host-calls.

Bug: v8:9621
Change-Id: Ib21cd39e965cdfcb0b04412261dc02e5fe106e47
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1752852
Commit-Queue: Patrick Thier <pthier@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63208}
2019-08-14 13:33:21 +00:00
Michaël Zasso
e3d7f8a588 [build] update gen-postmortem-metadata for Python 3
This change makes the code compatible with both Python 2 and Python 3.

Change-Id: I99d68af9c3163607c3a2fdbafac339a98b7471e4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1751331
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63207}
2019-08-14 12:53:01 +00:00
Ross McIlroy
8c4609fdee [Parser] Don't mark receiver as MaybeAssigned since it can't be assigned.
Otherwise there is a mismatch between eager parsing (where the reciever
is marked as MaybeAssigned) and lazy parsing (where the receiver is
deserialized and not marked MaybeAssigned) for arrow functions that
have an inner scope that calls eval.

BUG=chromium:989914

Change-Id: I8b8b78140858985a75a971b0e0a95bd61463457b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1752851
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63206}
2019-08-14 11:15:11 +00:00
Santiago Aboy Solanes
21b2d53240 [cleanup] Final cleanup of store-store-elimination
Moved code from the .cc file to the .h file, and added comments on important
methods.

There is still room for more cleanup / refactor, but it doesn't seem worth
it right now.

Bug: v8:9396
Change-Id: Id14d3ccaa853e0704732d468df504c379cd114b2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1748735
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63205}
2019-08-14 10:04:21 +00:00
Michael Starzinger
5921f13af6 [wasm] Remove obsolete {WasmCallJavaScript} builtin.
The builtin in question was just tail-calling another existing builtin
anyways. Call sites of the above builtin are rare and only appear in
import wrappers, removing the unnecessary hop is more efficient.

R=thibaudm@chromium.org

Change-Id: I42286346119fc627f8b9ef23fb6e4b2da1da80de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1752847
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63204}
2019-08-14 09:59:31 +00:00
Santiago Aboy Solanes
0d6aadb24d [cleanup] General cleanup of store-store-elimination.cc
Consistent naming, moved methods, etc.

There is a follow-up CL that moves code from this .cc to the private
part of the class in the .h file.

Bug: v8:9396
Change-Id: I9efac09baff7403bce1be9712c090d2ea70b60f6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1748734
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63203}
2019-08-14 09:17:41 +00:00
Santiago Aboy Solanes
1821aff2d0 [x64][ptr-compr][turbofan] Make compressions no-ops
Since we can just use the lower bits, we can make the compressions no-ops.
As a note, they still change the representation so that the machine graph
verifier is happy.

X64's version of: https://chromium-review.googlesource.com/c/v8/v8/+/1751722

Bug: v8:7703
Change-Id: I728eb8b6b3953f053a7042797f3c498d13e3c948
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1751729
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63202}
2019-08-14 09:13:21 +00:00
v8-ci-autoroll-builder
9cf4147464 Update V8 DEPS.
Rolling v8/build: b5e8d0f..1bf9025

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/1c632e3..942e493

Rolling v8/third_party/depot_tools: 3c81495..979fa78

TBR=machenbach@chromium.org,tmrts@chromium.org

Change-Id: I87deff115e8d5070c1b57393afe3bfa4bcd05c7c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1752433
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#63201}
2019-08-14 03:30:16 +00:00
Ng Zhi An
2a12f69cf7 [wasm-simd] Implement F64x2 splat extract replace for arm64
Bug: v8:8460
Change-Id: Ibef60086b49a43a6d027b8904fe905eccbd8b069
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1749662
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63200}
2019-08-13 23:29:45 +00:00
Mike Stanton
b68c995517 [TurboFan] Protect object typing in ObjectRef constructors
We cherish the ability to create a (for example) JSFunctionRef by
passing an object handle in phases of the compiler where we can't
inspect the handle to verify the instance type. A slight change to
constructor definitions of classes derived from ObjectRef allows us to
police this typing effectively.

Bug: v8:7790
Change-Id: I6ac8e4780d578e9c9cad80fdc87f399a92bc988d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1751343
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Auto-Submit: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63199}
2019-08-13 18:11:36 +00:00
Ng Zhi An
238489c623 Implement F64x2Div for x64
This is a reland of
https://chromium-review.googlesource.com/c/v8/v8/+/1749712 with a fix in
test-run-wasm-simd.cc to use base::Divide to work around C++ undefined
behavior when the denominator is 0.

Bug: v8:8460
Change-Id: Ia0a4ff621cccc6d9b7528717bf3fa7c79e42ba1a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1745819
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63198}
2019-08-13 16:50:24 +00:00
Darius Mercadier
f458370255 [heap] Fix perf bug on PagedSpace::Available()
PagedSpace::Available() is mostly used for counters. One may expect
that it'd be constant time or bearly noticeable performance-wise, but
its cost is linear in the number of freelists and number of pages in
the freelists. Overall, d8 --prof showed that it has a important
runtime cost, and prevents freelists from scaling.

This CL makes this counter constant-time, and should improve
performances, even using with our current FreeList strategy
(FreeListLegacy).

Bug: v8:9329
Bug: v8:9093
Change-Id: I7682c5debc78498fe46e8dbce70b2fbd540b0fd0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1746473
Commit-Queue: Darius Mercadier <dmercadier@google.com>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63197}
2019-08-13 16:20:49 +00:00
Joey Gouly
48d562831c [arm64] Remove pointer compression opcodes
After compression, the values should only be used for their lower 32-bits (W registers).
This removes unnecessary 'ubfx' zero-extends.

The size of the embedded builtins is reduced by 0.2%.
This improves the ARES-6 by ~1.0%.

Bug: v8:7703

Change-Id: Ib9bd771b51e85717f415a346b37428f8821bf278
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1751722
Reviewed-by: Martyn Capewell <martyn.capewell@arm.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63196}
2019-08-13 16:16:30 +00:00
Patrick Thier
52c7565de8 [regexp] Fix dirty read in regexp interpreter.
When GC triggered while an exception is pending, a read to
memory that was no longer valid could happen while backtracking in the
regexp interpreter (introduced with commit fb0df2c).
This CL prevents this dirty read, that could have been a security issue.

Bug: chromium:992389, v8:9575
Change-Id: Ie1acd6faa16665e211666c6a8dcf2a9d74e0c886
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1751342
Commit-Queue: Patrick Thier <pthier@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63195}
2019-08-13 16:08:18 +00:00
Milad Farazmand
ec4447dbb9 PPC/s390: [roots] Remove pseudo-smi stack limit roots
Port c4d31fea9e

Original Commit Message:

    Stack limits were additionally maintained in pseudo-smi roots.
    "Pseudo", because we stored the raw limit pointers there, just making
    sure their values looked like smis by masking the least significant
    bits.

    This mechanism is no longer needed now that we can access the stack
    limit external references as efficiently as the smi roots.

R=jgruber@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: Ida5c1fe10a494e9c6d665425bd464228978ecd1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1752142
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#63194}
2019-08-13 16:01:49 +00:00
Milad Farazmand
cf07f9e492 PPC: [compiler] Using cr0 implicitly when executing kArchStackPointerGreaterThan
Change-Id: If917f11f72d08e237fcb4ee43fabfc0c133dace6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1752143
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#63193}
2019-08-13 15:33:18 +00:00
Ross McIlroy
1687c0486b [Compile] Mark SFI as asm_wasm_broken if AsmWasm parsing fails
Previously we only used this flag if asm_wasm instantiation failed, but
we should avoid trying asm_wasm again if we failed during the initial
parse/compile, in case we have to recompile due to bytecode flushing. This
also avoids issues if there is a tranisent reason we fail asm_wasm compilation
(e.g., stack overflow) and later recompilations succeed and cause
inconsistencies like in the linked bug.

BUG=chromium:991133

Change-Id: Id156efa9d8625ce3db2058cb279ea23aeb66052f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1751784
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63192}
2019-08-13 14:46:08 +00:00
Santiago Aboy Solanes
475019f299 [ptr-compr][turbofan] Bitcasting between Word32 and CompressedSigned
We were going for 64 bits to go back to 32 bits. For example,
TruncateInt64ToInt32(BitcastTaggedSignedToWord(ChangeCompressedToTagged(x)))
when that doesn't modify the value at all.

In order to keep the machine graph verifier happy two bitcast operations
were introduced.

As a drive-by nit cleanup, we were having two empty lines between some
functions implementations in machine-operator-reducer.cc.

Bug: v8:7703
Change-Id: Ifaa0d656010fe4f6f6f4581a2bb6633f060245b7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1749383
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63191}
2019-08-13 14:23:47 +00:00
Ross McIlroy
69b1f07229 [Parsing] Fix a bug in UpdateBufferPointers where it incorrectly updated the buffer range.
When a RelocatingCharacterStream is Seeked, it's buffer_pos_ could be set a non-zero value.
However, UpdateBufferPointers was assuming the position was zero to relocate the buffer_start_
and buffer_end_, which would lead to the stream becoming misaligned. Fix this and add a
unittest and the clusterfuzz script which highlighted the issue.

BUG=chromium:991133

Change-Id: I20dd510b3dcc5df6df058b7e06d2c8a838aef855
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1751782
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63190}
2019-08-13 14:20:17 +00:00
cjihrig
39dc0be73f Update postmortem metadata generation script
Update postmortem metadata constants for V8 7.4 in Node.js.

Change-Id: I7d248b345e0326dafb776e144a6a22a381a05fc1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1546049
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63189}
2019-08-13 13:48:18 +00:00
Michael Starzinger
bf83f84aaf [wasm] Make {IsJSCompatibleSignature} flag independent.
This makes sure that the above predicate is independent of any global
process-wide state. The state of enabled features is now passed in
explicitly.

R=thibaudm@chromium.org

Change-Id: I5d44e2b0c0843d2e4f26aaf0d58d23afd5943726
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1751348
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63188}
2019-08-13 13:41:07 +00:00
Jakob Gruber
fb698cec37 [isolate-data] Move hot fields closer to isolate_root
In generated code, we access fields inside IsolateData through the
root-register. On some platforms it is significantly cheaper to access
things that are close to the root-register value than things that are
located far away. The motivation for this CL was a 5% difference in
Octane/Mandreel scores between

// Part of the stack check.
cmpq rsp,[r13+0x9ea8]

and

cmpq rsp,[r13-0x30]  // Mandreel score improved by 5%.

This moves the StackGuard up to fix Mandreel. As a drive-by, also move
two more fields up that are accessed by each CallCFunction.

Tbr: yangguo@chromium.org
Bug: v8:9534,chromium:993264
Change-Id: I5418b63d40274a138e285fa3c99b96e33a814fb1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1751345
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63187}
2019-08-13 12:33:59 +00:00
Jakob Gruber
a1982f0b8c Revert "[deoptimizer] Check whether output frames fit into stack space"
This reverts commit 47e077a28a.

Reason for revert: To avoid hard crashes on this CHECK until a proper
fix has landed.

Original change's description:
> [deoptimizer] Check whether output frames fit into stack space
> 
> Change-Id: I7af0fe843f73b702b03ffa50ecca19aabd7583b8
> Bug: chromium:983850
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1701858
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#62738}

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

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

Bug: chromium:983850,chromium:987930,v8:9534
Change-Id: I1f1fe76c957e1f1cf2a117a5ddc7e62004497aeb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1741665
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63186}
2019-08-13 11:35:59 +00:00
Santiago Aboy Solanes
767fc2ec72 [ptr-compr][turbofan] Use ChangeCompressedSmiToInt32 in effectControlLinearizer
We were doing the SmiCheck in Compressed, but then using the Tagged one to go
to Int32.

Bug: v8:7703
Change-Id: Ib65084590eb611f9abea9383ee307d21959caa21
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1748698
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63185}
2019-08-13 11:11:49 +00:00
Milad Farazmand
728e150e48 PPC/s390: [compiler] Remove LoadStackPointer and related machinery
Port 5b2ab2f6f7

Original Commit Message:

    Now that all uses of LoadStackPointer have been removed, this CL cleans
    up related code:

    - Removed LoadStackPointer.
    - Removed ArchStackPointer.
    - Removed IA32StackCheck.
    - Removed X64StackCheck.
    - Removed StackCheckMatcher.

    All stack checks now follow a simple path without matchers or special
    register constraints: they load the limit and pass it to
    StackPointerGreaterThan, which is finally handled by code generation.

R=jgruber@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: I68a66054dc1422e7fc0598ef4d112a031ba94cc1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1750223
Reviewed-by: Milad Farazmand <miladfar@ca.ibm.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#63184}
2019-08-13 11:01:29 +00:00
Jakob Gruber
c4d31fea9e [roots] Remove pseudo-smi stack limit roots
Stack limits were additionally maintained in pseudo-smi roots.
"Pseudo", because we stored the raw limit pointers there, just making
sure their values looked like smis by masking the least significant
bits.

This mechanism is no longer needed now that we can access the stack
limit external references as efficiently as the smi roots.

Bug: v8:9534
Change-Id: I37e78851c97aebc1012ea0e95075e56366a40a73
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1745339
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63183}
2019-08-13 10:45:49 +00:00
Mathias Bynens
d75392bc7f Roll Test262
Bug: v8:7834
Change-Id: I739ceb9668732e382cedca4d1f61a1ccc0339f35
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1751344
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63182}
2019-08-13 10:23:30 +00:00
Tobias Tebbi
c573bd216a [compiler] fix missing transitions causing deopt-loop
Bug: chromium:982969, chromium:983267
Change-Id: I8700a21020bc63caf537ca9f70f200eebde23dee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1749902
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63181}
2019-08-13 09:16:19 +00:00
Georg Neis
6b7146df6c [turbofan] Teach serializer about new JumpIfUndefinedOrNull bytecodes
R=mvstanton@chromium.org

Bug: chromium:992684, v8:7790
Change-Id: Ia5e77873f4b96d9f6d9a1468a83a64206f1498ee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1748692
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63180}
2019-08-13 07:36:49 +00:00
Jakob Gruber
02961377e3 Consistent names for (real) jslimit external references
Previously these were called (real) stack limit on one end, (real)
jslimit on the other. With this CL we consistently use jslimit
everywhere.

Tbr: tebbi@chromium.org
Bug: v8:9534
Change-Id: I9f86ac113bb9682544c365d54f666c1312a073a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1748738
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63179}
2019-08-13 05:50:49 +00:00
v8-ci-autoroll-builder
beff3941d8 Update V8 DEPS.
Rolling v8/build: f3d0ca5..b5e8d0f

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/30604c6..1c632e3

Rolling v8/third_party/depot_tools: 1b4c7e9..3c81495

Rolling v8/third_party/icu: 682a230..9a5af81

Rolling v8/tools/clang: 3605577..a05d5ea

TBR=machenbach@chromium.org,tmrts@chromium.org

Change-Id: If39dec909344727bd2d2aa0f3ce7dfb64205f460
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1750585
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#63178}
2019-08-13 03:41:09 +00:00
Irina Yatsenko
6d21451b86 Add crash keys via a callback to the embedder that created the isolate.
This allows us to keep v8 free of the dependency on the crash/base components.
Second half of the change: https://chromium-review.googlesource.com/c/chromium/src/+/1690003.


Bug: v8:9323
Change-Id: If35288e3916df951ae6e2ae39e1cb06fab5fbf8c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1699102
Commit-Queue: Irina Yatsenko <irinayat@microsoft.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63177}
2019-08-13 00:35:59 +00:00
Ross McIlroy
e6d8bdfabf [Compile] Ensure CollectSourcePositions is context independent.
Also adds a NullContextScope for code which wants to ensure it is context
independent. Removes a workaround in V8ProfilerAgentImpl::startProfiling
which created a context due to CollectSourcePositions not being context
indpendent.

BUG=chromium:992063

Change-Id: I94c7eea6416dc64bc61fb8ff9cd945449a791a77
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1748693
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63176}
2019-08-12 22:26:19 +00:00
Ross McIlroy
2021b171cd [Parsing] Don't report errors when collecting source positions
This requires a native context which might not be available when
collecting source positions, and errors are cleared in any case.

BUG=chromium:992063

Change-Id: Ie0b81f60debaaf9a7810a42f56de0c005a7fbe18
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1745338
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63175}
2019-08-12 21:49:38 +00:00
Ross McIlroy
3bd4ac9d20 [Parsing] Create canononical ScopeInfos in the read-only space.
Create canonical ScopeInfos for the global this binding and empty function in
the read only space, rather than creating them during bootstrapping for each
native context. This saves some memory, and also means we don't need to access
the native context to get the global this binding in when deserializing a
scope info, which is important since parsing should be native context independent.

BUG=chromium:992063

Change-Id: I800f576e8e9b95d46e043cba0c1a03ae19a683c7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1748690
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63174}
2019-08-12 21:41:48 +00:00
Mike Stanton
8b7c1c24dc [TurboFan] Brokerization of some literal bytecodes
The BytecodeGraphBuilder still looks at the heap. This CL mostly
eliminates heap lookups for:

* CreateArrayLiteral
* CreateObjectLiteral
* CreateRegExpLiteral

What remains is the lookup embedded in the creation of a VectorSlotPair,
which will be addressed in a subsequent change.

Bug: v8:7790
Change-Id: I5e4167f5542b84ed3684ad61f3dd1ef8ad84c96b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1745482
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63173}
2019-08-12 20:14:38 +00:00
Zhi An Ng
10a1ad25d7 Revert "Implement F64x2Div for x64"
This reverts commit 7cefcded8e.

Reason for revert: ubsan failures, see https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20UBSan/7465

Original change's description:
> Implement F64x2Div for x64
> 
> Bug: v8:8460
> Change-Id: I78cb2badab3f28621f91d6ff5f455967fdcbee44
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1731782
> Reviewed-by: Bill Budge <bbudge@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#63171}

TBR=bbudge@chromium.org,mstarzinger@chromium.org,gdeepti@chromium.org,zhin@chromium.org

Change-Id: I17db933763ba966a2d3f8be58e586b6a61f7995e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8460
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1749712
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63172}
2019-08-12 19:57:59 +00:00