Commit Graph

52547 Commits

Author SHA1 Message Date
Clemens Hammacher
16afa0a226 [api][wasm] Rename WasmCompiledModule to WasmModuleObject
A WasmModuleObject represents an instance of WebAssembly.Module. It is
called WasmModuleObject internally, so also use that name externally.

We still have a typedef for WasmCompiledModule which will be deprecated
once chromium has been updated to use WasmModuleObject.

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

Bug: v8:8238, chromium:912031
Change-Id: I2d7708d4dc183cb4f4714f741b1ea0c153014430
Reviewed-on: https://chromium-review.googlesource.com/c/1362048
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58055}
2018-12-05 21:22:12 +00:00
Junliang Yan
f8eb3dba1f PPC/s390: [nojit] Migrate CallApi stubs to builtins
Port cfdf6ff847

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

Change-Id: I8821b82f181a44b70272d770703136983d821d1c
Reviewed-on: https://chromium-review.googlesource.com/c/1363449
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#58054}
2018-12-05 20:20:31 +00:00
Sven Sauleau
0e8f20d2ab [wasm] fix js-api interface
Make sure WebAssembly's js-api exposes the correct attributes: writable,
enumerable and configurable.

Bug: v8:8319
Change-Id: I427533159d7975a42c0c5cb1babdc8a61f8198b5
Reviewed-on: https://chromium-review.googlesource.com/c/1351002
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58053}
2018-12-05 20:05:00 +00:00
Tobias Tebbi
82cf1cf2e4 [torque] make C++ includes explicit
Bug: v8:7793
Change-Id: I12aae5d61a21f3e6e010e07622fe0d01a5ba03eb
Reviewed-on: https://chromium-review.googlesource.com/c/1344118
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58052}
2018-12-05 19:48:50 +00:00
Caitlin Potter
7de6d2c196 [esnext] stage Object.fromEntries()
A fancy new stdlib addition for creating JSObjects from a collection of
key/value pairs, coming soon to a javascript runtime near you.

BUG=v8:8021
R=gsathya@chromium.org, adamk@chromium.org

Change-Id: I5eb1dea75bfef009281eef9864c8c0226af4f1fc
Reviewed-on: https://chromium-review.googlesource.com/c/1363293
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Cr-Commit-Position: refs/heads/master@{#58051}
2018-12-05 19:44:21 +00:00
Ulan Degenbaev
92e228534a Do not pretenure descriptor arrays.
Even though descriptor arrays are references by maps in the old
generation, they seems to be short living in benchmarks.

This fixes perf regressions introduced in 1ad0cd5.

Bug:chromium:911073,chromium:910567,chromium:910443,

Change-Id: Iaf933d409e72c6c26df48f6435f9543224ea7d67
Reviewed-on: https://chromium-review.googlesource.com/c/1363146
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58050}
2018-12-05 19:32:09 +00:00
Daniel Clifford
79605b4508 [torque] Add new and refine existing Torque intrinsic support
Intrinsic changes:

- Rename %RawCast to %RawObjectCast and add error checking so that it
  only applies to subtypes of Objects.

- Add %RawPointerCast, which is similar to %RawObjectCast but must be
  used for all subtypes of RawPtr.

- Add %RawConstexprCast, which allows one constexpr to be be cast to
  another at compile time. It translate to an appropriate static_cast
  in the generated code

- Add %FromConstexpr, which handles most of the standard cases of
  generating XXXConstant CSA nodes from constexpr constants. It uses
  either SmiConstant, NumberConstant, StringConstant, IntPtrConstant
  or Int32Constant, depending on the cast-to type generic <To> type.

- Add support for intrinsics that return constexpr results.

Cleanup:

- Turn FromConstexpr into a generic with two generic types, a <To> and
  a <From> type. Most FromConstexpr can use the new %FromConstexpr
  intrinsic rather than provide an explicit implementation.

Bug: v8:7793
Change-Id: Icab5db16d203034ec157fa3ad5157d10c7dc8464
Reviewed-on: https://chromium-review.googlesource.com/c/1357049
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58049}
2018-12-05 19:06:56 +00:00
Predrag Rudic
ee8bb5f016 MIPS64: Correct implementation of LLD/SCD instructions in simulator.
This implementation uses mutex to implement those instructions.
I will add 32-bit version LL/SC after review.

Change-Id: I7b0e2b42527bc21060a84eb5e27099e129f2858f
Reviewed-on: https://chromium-review.googlesource.com/c/1354462
Reviewed-by: Sreten Kovacevic <skovacevic@wavecomp.com>
Commit-Queue: Predrag Rudic <prudic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#58048}
2018-12-05 17:43:17 +00:00
Peter Marshall
feb6576177 [unwinder] Add a test for large code objects
Large code objects are allocated in CODE_LO_SPACE on the heap instead of
CODE_SPACE. Add a test that checks that these objects are still
considered 'InV8' according to the unwinder API.

Bug: v8:8116
Change-Id: I65968913cd92858fac2b1a689df2904d0574641f
Reviewed-on: https://chromium-review.googlesource.com/c/1363134
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58047}
2018-12-05 16:55:40 +00:00
Peter Marshall
2f852e5e54 [factory] Make sure large code objects actually go to large code space
If the size of a large code object is larger than
kMaxRegularHeapObjectSize, then it should be allocated in the large code
space. Currently if the size is > kMaxRegularHeapObjectSize but <
512000, then it can still be allocated in the normal code space.

Change-Id: I72dbd38803c3d5d414bae85e9e0b15482e50e1c2
Reviewed-on: https://chromium-review.googlesource.com/c/1363137
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58046}
2018-12-05 16:54:30 +00:00
Clemens Hammacher
964d175944 Make SerializedData::kMagicNumber isolate-independent
We currently compute this value from the size of the external table,
which we get from the Isolate. This size is isolate-independent though,
so it can just be a constant.

R=mstarzinger@chromium.org

Bug: chromium:912043
Change-Id: If1c09a56b1a985b855f5b65818322979c194d772
Reviewed-on: https://chromium-review.googlesource.com/c/1362954
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58045}
2018-12-05 15:17:01 +00:00
Andreas Haas
148ef606a7 [wasm] Load thread-in-wasm flag from the isolate
The existing implementation embedded an isolate-specific pointer to the
thread-in-wasm flag in the wrapper code. However, when the module code
is shared among multiple workers, this can mean that the workers
share the same thread-in-wasm flag.

With this change we load the pointer to the flag at runtime from the
current isolate. Thereby the correct flag is used even when the same
code is executed on different workers.

Note that we could access the right flag address by going through the
root register. However, changing the code generation to use the root
register requires some inconvenient steps:
* Pass the isolate to the pipeline again, which we don't want.
* Change the WasmCallDescriptor to allow the use of the root register
  for wrappers but not for other code.
To avoid these issues, and allow the CL to be easy to merge back, we
got for the changes proposed here.

R=mstarzinger@chromium.org, ishell@chromium.org

Bug: v8:8533
Change-Id: If15565a7ad7cba835cfc1628e7a4d3fdef90a5c0
Reviewed-on: https://chromium-review.googlesource.com/c/1358518
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58044}
2018-12-05 15:10:11 +00:00
Ben L. Titzer
b3ee0acdb2 [wasm] Omit alignment check for static index
If the input memory index into an atomic operation is a constant, we can
statically check if the {index+offset} is aligned.

R=herhut@chromium.org

Change-Id: Ia830d7c7df10d50ed4ee3382acfef776306f249c
Reviewed-on: https://chromium-review.googlesource.com/c/1362872
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58043}
2018-12-05 15:08:31 +00:00
Michael Achenbach
49c4c3e6b0 [test] Bump test262 shards on mac
NOTRY=true
TBR=sergiyb@chromium.org

Bug: v8:8552
Change-Id: I096146072915f2d5baf5d4469421696cf31d72c2
Reviewed-on: https://chromium-review.googlesource.com/c/1363136
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58042}
2018-12-05 15:06:41 +00:00
Sergiy Belozorov
e20eba3bcd [tools] Whitespace CL
TBR=sergiyb@chromium.org

Bug: chromium:907752
Change-Id: I06ef5a7e2cb96ebd0912c535e0ad7d8360831bbb
Reviewed-on: https://chromium-review.googlesource.com/c/1362040
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58041}
2018-12-05 12:33:19 +00:00
Yang Guo
cccaa27eca Gracefully fail in ValueDeserializer.
Bug: chromium:905940, chromium:907343

R=verwaest@chromium.org

Change-Id: Ibe8f06782f8a0bf9a09832d443e1c66c3bda8399
Reviewed-on: https://chromium-review.googlesource.com/c/1362046
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58040}
2018-12-05 11:20:23 +00:00
Sergiy Belozorov
f3552af7fc [tools] Fix sorting order in cq.cfg
R=machenbach@chromium.org

No-Try: true
No-Tree-Checks: true
Bug: v8:8532
Change-Id: I2149c795a2d50ed794c0925d632e946b22c3e5d5
Reviewed-on: https://chromium-review.googlesource.com/c/1362042
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58039}
2018-12-05 10:57:00 +00:00
Marja Hölttä
4204289210 [Map::TransitionToDataProperty speed] Remove a branch in TransitionsAccessor::SearchTransition
We checked against kNotFound twice; once in
TransitionsAccessor::SearchTransitions and once in TransitionArray::Search. It's
unnecessary to check twice.

In local tests, this speeds up searching for a non-existent transition in a
2-element TransitionArray by ~20%.

BUG=v8:8547

Change-Id: Ic220c4c0bfeeacd9b81953efad212ed15168437e
Reviewed-on: https://chromium-review.googlesource.com/c/1361167
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58038}
2018-12-05 10:52:00 +00:00
Jakob Gruber
bec0234f4b [nojit] Migrate DirectCEntryStub to a builtin
Drive-by: Replace uses in CallApi* with a direct call now that they've
been converted to builtins themselves and are thus immovable.

Bug: v8:7777
Change-Id: I660b5788bdac4f5e45cc5c5677b86be17474cd83
Reviewed-on: https://chromium-review.googlesource.com/c/1361161
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58037}
2018-12-05 10:36:10 +00:00
Jakob Gruber
cfdf6ff847 [nojit] Migrate CallApi stubs to builtins
Bug: v8:7777
Change-Id: Iee3e03b0a3fea245408de4d675caa634a74aa188
Reviewed-on: https://chromium-review.googlesource.com/c/1357053
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58036}
2018-12-05 08:38:24 +00:00
Jaroslav Sevcik
8abde08a7c Revert "[constant-tracking] Track constants by default."
This reverts commit a6669bdce7.

Reason for revert: Regresses Speedometer 2 (EmberJS-Debug-TodoMVC)

Original change's description:
> [constant-tracking] Track constants by default.
> 
> It is possible this CL results in various regressions, the idea
> is to get some data on where constant tracking helps and where
> it regresses.
> 
> Bug: v8:8361
> Change-Id: I2f291788a8bea03e6eaac9f51564c1da02734d1a
> Reviewed-on: https://chromium-review.googlesource.com/c/1347474
> Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58008}

TBR=jarin@chromium.org,ishell@chromium.org

Change-Id: I1e2b18c34829e1f53ea287aae0ef7fcf88980341
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8361
Reviewed-on: https://chromium-review.googlesource.com/c/1362047
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58035}
2018-12-05 08:22:53 +00:00
v8-ci-autoroll-builder
c2ae5e7744 Update V8 DEPS.
Rolling v8/build: f686dfc..9c85c83

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/4feee58..58f2981

Rolling v8/third_party/depot_tools: d87b096..f28ef98

Rolling v8/tools/clang: 558f684..0dea619

Rolling v8/tools/luci-go:infra/tools/luci/isolate/${platform}: https://chrome-infra-packages.appspot.com/infra/tools/luci/isolate/${platform}/+log/git_rev..git_rev

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

Change-Id: I7dc2bba96c14a275fd728e0567890eb0b21ea795
Reviewed-on: https://chromium-review.googlesource.com/c/1362171
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@{#58034}
2018-12-05 03:31:21 +00:00
Junliang Yan
815c3758b7 s390x: add LoadPC to fix compilation error
R=joransiu@ca.ibm.com

Change-Id: Ia8cb93f4d01e252ec6b3b538f795550768db5726
Reviewed-on: https://chromium-review.googlesource.com/c/1362083
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#58033}
2018-12-05 03:30:16 +00:00
Frank Tang
7866cb2687 [Intl] Add regression test for -u-tz- of Intl.DateTimeFormat
The fix need to be cherrypick from ICU.
Fix in https://github.com/unicode-org/icu/pull/286
Adds regression test for 8469.

Bug: v8:8469
Change-Id: If173058dd1113782fcf2ff5a55f962721f46aba5
Reviewed-on: https://chromium-review.googlesource.com/c/1340733
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58032}
2018-12-05 03:02:24 +00:00
Ben Smith
216fb64816 [wasm] Validate memory.init and memory.drop
The memory.init and memory.drop instructions have a data segment index
that can only be validated by knowing the number of data segments. This
information is provided by the new DataCount section.

Bug: v8:7747
Change-Id: Ie04d57584fe028637f6e931ab53d00abc5b998a4
Reviewed-on: https://chromium-review.googlesource.com/c/1355624
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58031}
2018-12-04 22:47:59 +00:00
Junliang Yan
a31338aa08 PPC/s390: [nojit] Refactor CallApiCallback calling convention
Port c6b0e12e4e

Original Commit Message:

    This is the first (and major) step towards converting CallApiCallback
    and CallApiGetter stubs into builtins.

    The CallApiCallbackStub was parameterized with the number of arguments
    passed on the stack. This CL converts the compile-time parameter into
    an explicit runtime parameter, and removes all uses of the stub
    parameter.

    (kCallData and kHolder are now passed on the stack).

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

Change-Id: I171fbb7d37525c2087e5dd9d7ff8fb5f959f2a7a
Reviewed-on: https://chromium-review.googlesource.com/c/1362163
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#58030}
2018-12-04 22:25:35 +00:00
Sigurd Schneider
871e3dea50 Revert "Reland "[code-comments] Put code comments into the code object""
This reverts commit ed3d647284.

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

Original change's description:
> Reland "[code-comments] Put code comments into the code object"
> 
> This is a reland of e774cffe2b
> 
> This reland disables a test as v8:8548 is blocking it, which was
> broken by a recent CL. CQ did not catch this because the merge-base
> CQ used did not yet contain the CL that caused v8:8548.
> 
> Original change's description:
> > [code-comments] Put code comments into the code object
> >
> > Code comments in the snapshot can now be enabled with gn
> > arg 'v8_enable_snapshot_code_comments'
> >
> > Bug: v8:7989
> > Change-Id: I8bd00cafa63132d00d849394c311ba15e6b6daf3
> > Reviewed-on: https://chromium-review.googlesource.com/c/1329173
> > Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> > Reviewed-by: Michael Stanton <mvstanton@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#58020}
> 
> TBR=mvstanton@chromium.org,mstarzinger@chromium.org,jgruber@chromium.org,tebbi@chromium.org
> 
> Bug: v8:7989, v8:8548
> Change-Id: I464fc897205fefdf2dfc2eadc54d699c4e08a0e9
> Reviewed-on: https://chromium-review.googlesource.com/c/1361166
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58028}

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

Change-Id: I1075bb09de7cb8dad71e31ff51a4e7bb6a200a8b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7989, v8:8548
Reviewed-on: https://chromium-review.googlesource.com/c/1362043
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58029}
2018-12-04 21:21:37 +00:00
Sigurd Schneider
ed3d647284 Reland "[code-comments] Put code comments into the code object"
This is a reland of e774cffe2b

This reland disables a test as v8:8548 is blocking it, which was
broken by a recent CL. CQ did not catch this because the merge-base
CQ used did not yet contain the CL that caused v8:8548.

Original change's description:
> [code-comments] Put code comments into the code object
>
> Code comments in the snapshot can now be enabled with gn
> arg 'v8_enable_snapshot_code_comments'
>
> Bug: v8:7989
> Change-Id: I8bd00cafa63132d00d849394c311ba15e6b6daf3
> Reviewed-on: https://chromium-review.googlesource.com/c/1329173
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Michael Stanton <mvstanton@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58020}

TBR=mvstanton@chromium.org,mstarzinger@chromium.org,jgruber@chromium.org,tebbi@chromium.org

Bug: v8:7989, v8:8548
Change-Id: I464fc897205fefdf2dfc2eadc54d699c4e08a0e9
Reviewed-on: https://chromium-review.googlesource.com/c/1361166
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58028}
2018-12-04 20:16:14 +00:00
Sergiy Belozorov
737182a08d [tools] Add v8_linux64_shared_compile_rel to CQ
R=machenbach@chromium.org

No-Try: true
No-Tree-Checks: true
Bug: v8:8532
Change-Id: I42ec138c542f6fd48e52422a7064073d71d65216
Reviewed-on: https://chromium-review.googlesource.com/c/1361062
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58027}
2018-12-04 19:26:43 +00:00
tzik
184e8fb80d Avoid nested RunMicrotasks on d8
%RunMicrotasks() call used to cause a nested RunMicrotasks if it's
called from a microtask, and that breaks its invariants.
This CL fixes it by disabling the nested loop.

Change-Id: I2f4a81be0dbf0554abf6eb41b62c25465338f29a
Reviewed-on: https://chromium-review.googlesource.com/c/1358036
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58026}
2018-12-04 19:14:43 +00:00
Junliang Yan
9583858e9e PPC/s390: Reland "[cpu-profiler] Fix stack iterability for fast C calls with no exit frame"
Port 6c8b410261

Original Commit Message:

    This is a reland of d5f4a33eb8
    Landing with test disabled for now.

    Original change's description:
    > [cpu-profiler] Fix stack iterability for fast C calls with no exit frame
    >
    > Before fast C calls, store the current FP and PC on the isolate. When
    > iterating frames in SafeStackFrameIterator, check if these fields are
    > set and start iterating at the calling frame's FP instead of the current
    > FP, which will be in C++ code. We need to do this because c_entry_fp is
    > not set on the Isolate for Fast-C-Calls because we don't build an exit
    > frame.
    >
    > This change makes stack samples that occur within 'Fast-C-Calls'
    > iterable, meaning we can properly attribute ticks within the JS caller.
    >
    > Fast-C-Calls can't call back into JS code, so we can only ever have one
    > such call on the stack at a time, allowing us to store the FP on the
    > isolate rather than the stack.
    >
    > TBR=v8-mips-ports@googlegroups.com
    >
    > Bug: v8:8464, v8:7202
    > Change-Id: I7bf39eba779dad34754d5759d741c421b362a406
    > Reviewed-on: https://chromium-review.googlesource.com/c/1340241
    > Commit-Queue: Peter Marshall <petermarshall@chromium.org>
    > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
    > Reviewed-by: Martyn Capewell <martyn.capewell@arm.com>
    > Reviewed-by: Alexei Filippov <alph@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#57896}

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

Change-Id: Ie82eaa08ba6ceeb0c0a5bb4de251540becf1f05e
Reviewed-on: https://chromium-review.googlesource.com/c/1361422
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#58025}
2018-12-04 18:18:02 +00:00
Clemens Hammacher
7768b245d9 Reland "[wasm][liftoff] Optimize one-armed ifs"
This is a reland of c2aaf0a6fa

Original change's description:
> [wasm][liftoff] Optimize one-armed ifs
> 
> Do not implement one-armed ifs by emulating an empty else branch. In
> Liftoff, we can generate better code and save compile time by handling
> this specially. If the merge point at the end of the if is not reached
> by the if-branch, we do not need to generate any merge code.
> 
> R=titzer@chromium.org
> 
> Bug: v8:6600, v8:8423
> Change-Id: Ie8ea69dd7491f225605a8e1b986d275d869aa90b
> Reviewed-on: https://chromium-review.googlesource.com/c/1356508
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Ben Titzer <titzer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57968}

Bug: v8:6600, v8:8423
Change-Id: I6d5eea9f860486768779a33bf6bd7b87cbfc2af0
Reviewed-on: https://chromium-review.googlesource.com/c/1361040
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58024}
2018-12-04 16:44:38 +00:00
Clemens Hammacher
1fba4b7cff [wasm] Simplify type checking for merges
Improve readability by avoiding a helper method. Just read from the
stack directly.

R=titzer@chromium.org

Change-Id: I38c944fac45c721f328a2b7bec3a3f4602f05c05
Reviewed-on: https://chromium-review.googlesource.com/c/1360572
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58023}
2018-12-04 16:39:28 +00:00
Mike Stanton
4ab8c906e1 [Cleanup] String::GetChars() should take a DisallowHeapAllocation ref.
Building on https://chromium-review.googlesource.com/c/v8/v8/+/1349243,
which asserted on calls to GetChars() that weren't in a
DisallowHeapAllocation scope, this CL takes a reference to the scope
in order to provide static protection in all builds.


Bug: v8:8238
Change-Id: I481a1dbbd3ae57eb35c5f828c5e242691635be27
Reviewed-on: https://chromium-review.googlesource.com/c/1354038
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58022}
2018-12-04 16:07:46 +00:00
Leszek Swirski
25d8187023 Revert "[code-comments] Put code comments into the code object"
This reverts commit e774cffe2b.

Reason for revert: Breaks OptimizeForSize tests https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8928056438104852432/+/steps/OptimizeForSize/0/logs/TestCodeAssemblerCode../0

Original change's description:
> [code-comments] Put code comments into the code object
> 
> Code comments in the snapshot can now be enabled with gn
> arg 'v8_enable_snapshot_code_comments'
> 
> Bug: v8:7989
> Change-Id: I8bd00cafa63132d00d849394c311ba15e6b6daf3
> Reviewed-on: https://chromium-review.googlesource.com/c/1329173
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Michael Stanton <mvstanton@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58020}

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

Change-Id: Ie336a99218db4def848bd5c8c58dfb66f0e372b2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7989
Reviewed-on: https://chromium-review.googlesource.com/c/1361165
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58021}
2018-12-04 16:04:47 +00:00
Sigurd Schneider
e774cffe2b [code-comments] Put code comments into the code object
Code comments in the snapshot can now be enabled with gn
arg 'v8_enable_snapshot_code_comments'

Bug: v8:7989
Change-Id: I8bd00cafa63132d00d849394c311ba15e6b6daf3
Reviewed-on: https://chromium-review.googlesource.com/c/1329173
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58020}
2018-12-04 15:49:26 +00:00
Peter Marshall
23b7d95665 [cpu-profiler] Enable TickEvents test
The flakiness of this test was fixed by
https://chromium-review.googlesource.com/c/v8/v8/+/1280436 which removed
calls to StartTickSample() and FinishTickSample() from tests as this
causes a race.

Bug: v8:6133, v8:5193
Change-Id: Ia6bcfa75cce64547b00a185343ada803d082a12e
Reviewed-on: https://chromium-review.googlesource.com/c/1361163
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58019}
2018-12-04 15:37:59 +00:00
Peter Marshall
54ded121ce [unwinder] Add bounds checking to the unwinder API
It's possible that we encounter incorrect SP or FP values while
unwinding the stack. One reason is that third-party code like virus
protection may change the stack. If we encounter values for SP or FP
that don't make sense, we should bail out of unwinding and return false.

Bug: v8:8116, chromium:909957
Change-Id: I630fef3f619382c7035be50b86072be349ed185c
Reviewed-on: https://chromium-review.googlesource.com/c/1358514
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58018}
2018-12-04 15:04:51 +00:00
Tobias Tebbi
9c875d3ea4 Revert "[csa] disable CSA re-scheduling"
This reverts commit 270437fd7a.

Reason for revert: Performance regressions look ok, and we need the change going forward.

Original change's description:
> [csa] disable CSA re-scheduling
> 
> Disable CSA re-scheduling for the branch point, to address performance
> regressions.
> 
> Bug: chromium:907011
> Change-Id: I608ae23c20d8e1dd9a233dcb2d3f4ab4d8a5241e
> Reviewed-on: https://chromium-review.googlesource.com/c/1351009
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57930}

TBR=mstarzinger@chromium.org,jarin@chromium.org,tebbi@chromium.org

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

Bug: chromium:907011
Change-Id: I322f6f3bdd6e833a2a546025995ecdc823961804
Reviewed-on: https://chromium-review.googlesource.com/c/1358513
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58017}
2018-12-04 15:03:46 +00:00
Yang Guo
3d80831d02 [api] deprecate old v8::String::NewFromUtf8
R=delphick@chromium.org

Bug: v8:7281
Change-Id: I4af641218d4646d3cdf3a2776e9bc24141164638
Reviewed-on: https://chromium-review.googlesource.com/c/1357054
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58016}
2018-12-04 14:49:09 +00:00
Yang Guo
e84b92d765 [api] Remove deprecations from before version 7.2
R=delphick@chromium.org

Change-Id: Iad128dc76a8d399bbf18053fc1f32e34fa36c198
Reviewed-on: https://chromium-review.googlesource.com/c/1357056
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58015}
2018-12-04 14:41:12 +00:00
Sergiy Belozorov
bcf79f1cb8 [tools] Add Linux64 - shared bot configs
R=machenbach@chromium.org

Bug: v8:8532
Change-Id: Icbbb7a9de260c8bf29fb13f3f182652b1cb0259a
Reviewed-on: https://chromium-review.googlesource.com/c/1358511
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58014}
2018-12-04 13:59:27 +00:00
Sven Sauleau
9cea188e59 Replace some assertions with their more verbose equivalent
Replaces some DCHECK with their verbose equivalent because it's more
convenient while debugging.

Change-Id: I83c199c389341a68dfccd949e7353ef68ff3b9c2
Reviewed-on: https://chromium-review.googlesource.com/c/1352289
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58013}
2018-12-04 12:19:19 +00:00
Clemens Hammacher
0536ee43db Revert "[wasm][liftoff] Optimize one-armed ifs"
This reverts commit c2aaf0a6fa.

Reason for revert: Benchmarks fail, and ClusterFuzz is not happy (issue 911406, issue 911271)

Original change's description:
> [wasm][liftoff] Optimize one-armed ifs
> 
> Do not implement one-armed ifs by emulating an empty else branch. In
> Liftoff, we can generate better code and save compile time by handling
> this specially. If the merge point at the end of the if is not reached
> by the if-branch, we do not need to generate any merge code.
> 
> R=​titzer@chromium.org
> 
> Bug: v8:6600, v8:8423
> Change-Id: Ie8ea69dd7491f225605a8e1b986d275d869aa90b
> Reviewed-on: https://chromium-review.googlesource.com/c/1356508
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Ben Titzer <titzer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57968}

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

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

Bug: v8:6600, v8:8423
Change-Id: I5cb3b069f40e34f34da4013e666f6ff293752567
Reviewed-on: https://chromium-review.googlesource.com/c/1360633
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58012}
2018-12-04 11:25:27 +00:00
Clemens Hammacher
541894826b [wasm] Remove dead method and field
R=ahaas@chromium.org

Change-Id: Id8b1dbaf363e7c0b8b0011f5ceb1e77badd622e6
Reviewed-on: https://chromium-review.googlesource.com/c/1360571
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58011}
2018-12-04 10:51:47 +00:00
Camillo Bruni
0d64b2c2ec [parser] Avoid reversing inner PreparseScopeData order
Drive-by-fixes:
- Rename RestoreData to RestoreDataForScope
- Move Scope's private variable declaration to after functions

Change-Id: I349b2fc05cd94d6d7a0745b28b4e66b898b5e147
Reviewed-on: https://chromium-review.googlesource.com/c/1358517
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58010}
2018-12-04 10:39:17 +00:00
Sigurd Schneider
026d47e9d7 [turbofan] Improve TypedOptimization more
This CL improves typed optimization more:
ChangePlainPrimitiveToNumber is only omitted if it is not required.

Change-Id: I5d81537a046c5a5a0c730fcd1e17bbdfda887687
Bug: v8:910562
Reviewed-on: https://chromium-review.googlesource.com/c/1357058
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58009}
2018-12-04 10:16:44 +00:00
Jaroslav Sevcik
a6669bdce7 [constant-tracking] Track constants by default.
It is possible this CL results in various regressions, the idea
is to get some data on where constant tracking helps and where
it regresses.

Bug: v8:8361
Change-Id: I2f291788a8bea03e6eaac9f51564c1da02734d1a
Reviewed-on: https://chromium-review.googlesource.com/c/1347474
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58008}
2018-12-04 10:02:30 +00:00
Michael Achenbach
f3398adf55 [test] Bump shards on slow bot
TBR=sergiyb@chromium.org
NOTRY=true

Change-Id: Ia49bf1d4a096e72c6584297ef5db0eaf85938178
Reviewed-on: https://chromium-review.googlesource.com/c/1360573
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58007}
2018-12-04 08:49:22 +00:00
v8-ci-autoroll-builder
ce76187afc Update V8 DEPS.
Rolling v8/build: 42a08f0..f686dfc

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/6f862e5..4feee58

Rolling v8/third_party/depot_tools: 61ea307..d87b096

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

Change-Id: I35746d4d32d6456ce7bf9320b64efbc2e3f3933a
Reviewed-on: https://chromium-review.googlesource.com/c/1360074
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58006}
2018-12-04 08:41:42 +00:00