Commit Graph

46281 Commits

Author SHA1 Message Date
Marja Hölttä
34a2d29f19 [in-place weak refs] Rename WeakFixedArray to FixedArrayOfWeakCells.
The next CL will add an actual WeakFixedArray which contains in-place weak
references.

Also removes FLAG_trace_weak_arrays which is not super useful.

BUG=v8:7308

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I016880ecc66b03b406f7184b7f72ab514cb65428
Reviewed-on: https://chromium-review.googlesource.com/951730
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51789}
2018-03-07 16:21:42 +00:00
Caitlin Potter
470db43c7b [cctest] add bytecode generator tests for template literals
Just copies the StringConcat tests and refactors them to exercise
template literals rather than simple string addition.

BUG=v8:7415
R=rmcilroy@chromium.org

Change-Id: I79cf24ee33e64b1d57221eb0291d9958634130ec
Reviewed-on: https://chromium-review.googlesource.com/951968
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Cr-Commit-Position: refs/heads/master@{#51788}
2018-03-07 15:17:32 +00:00
Ivica Bogosavljevic
15df13ea16 MIPS: Cleanup ByteSwap macro
Shrink number of instruction in ByteSwap macro for some cases.
Allow that input and output registers can be the same.
Extend test to cover all test cases.

Change-Id: I7e0b86988fb73eed604751ffd89657cdff4abc3c
Reviewed-on: https://chromium-review.googlesource.com/951726
Reviewed-by: Sreten Kovacevic <sreten.kovacevic@mips.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#51787}
2018-03-07 15:05:53 +00:00
Leszek Swirski
daa224d4d0 [builtins] Remove CheckOptimizationMarker builtin
This was a shim for the non-I+TF codepath, which is now the only
codepath (that still uses this tier-up mechanism anyway). There were a
couple of places we were accidentally using it due to CompileLazy or
deopts, so this also fixes those.

Change-Id: I00a7fdf9fb5cf74844138dac62d01ceaaf192e17
Reviewed-on: https://chromium-review.googlesource.com/951490
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51786}
2018-03-07 14:47:33 +00:00
Ilija Pavlovic
c4dabe1774 [test][mips64]: Skip dfg-int-overflow-in-loop on simulator.
If test webkit/dfg-int-overflow-in-loop is executed with option --noopt,
execution will be too slow on simulator. Therefore, this test will be
skipped on MIPS64 simulators.

TEST=webkit/dfg-int-overflow-in-loop
BUG=

Change-Id: I3d116fe579a5690c817a9a9d4e8a4bf8188298cc
Reviewed-on: https://chromium-review.googlesource.com/951610
Commit-Queue: Ilija Pavlović <ilija.pavlovic@mips.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51785}
2018-03-07 14:37:23 +00:00
Benedikt Meurer
17c1806a4c [turbofan] Fix inconsistent initialization of JSGeneratorObject.
The register file of the JSGeneratorObject is normally filled with
undefined in the beginning, except in TurboFan where we put the_hole
there. In addition TurboFan used StoreElement to initialize the fields
but then StoreField/LoadField to access them later, which can lead to
aliasing bugs (currently not possible because our alias analysis is
not smart enough).

Bug: v8:7253
Change-Id: Idbff29d138946f110336b9bef0e1889e596d834c
Reviewed-on: https://chromium-review.googlesource.com/952968
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51784}
2018-03-07 13:54:52 +00:00
Yang Guo
7b1138d25e [debug] deal with empty handles when checking callback info.
We may get an empty handle passed to the side-effect check in places
where we have not implemented the flag check yet.

R=luoe@chromium.org

Bug: v8:7515
Change-Id: I088b223c4e8cc3aa262bebe34458c2e95b30e347
Reviewed-on: https://chromium-review.googlesource.com/951768
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51783}
2018-03-07 13:40:12 +00:00
Ivica Bogosavljevic
a9fcdd4a70 MIPS[64]: Skip LiftOff tests on big endian
MIPS[64] big endian doesn't have LiftOff implementation yet.
This CL skips offending tests.

Change-Id: I75797f2f234bbcafc535f3ff97670acabc32e216
Reviewed-on: https://chromium-review.googlesource.com/951486
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#51782}
2018-03-07 13:00:42 +00:00
Michael Achenbach
523c9511cd Whitespace change to test CQ
Change-Id: I2108cdb952c0bb9439da9ab4911b2b7045397595
Reviewed-on: https://chromium-review.googlesource.com/952447
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51781}
2018-03-07 12:57:58 +00:00
Marja Hölttä
c5ab9ce7a7 [in-place weak refs] Fix: MarkCompactCollector::AbortWeakObjects must clear weak references.
BUG=v8:7308

Change-Id: I0e029bcc157a0e62bf7aa2d222118003a29b4436
Reviewed-on: https://chromium-review.googlesource.com/952443
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51780}
2018-03-07 12:18:20 +00:00
Yang Guo
308d4e28f3 [cpu-profiler] Move SetIdle() to v8::Isolate
The VM state is a property of the isolate, not the CPU profiler.
Having to create a v8::CpuProfiler instance in order to change
the property is somewhat inefficient.

See https://github.com/nodejs/node/issues/18039 and
https://github.com/nodejs/node/pull/18534 for context.

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I70e31deca6529bccc05a0f4ed500ee268fb63cb8
Reviewed-on: https://chromium-review.googlesource.com/900622
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51779}
2018-03-07 06:16:08 +00:00
Junliang Yan
e885f8aea1 [wasm] Use GetWasmCalleeTag for RUNTIME_ENTRY relocation
R=mstarzinger@chromium.org

Change-Id: I77356a84a89ff94dc5516e3507e11d0b5c429107
Reviewed-on: https://chromium-review.googlesource.com/951927
Reviewed-by: Eric Holk <eholk@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#51778}
2018-03-06 22:28:54 +00:00
Junliang Yan
05b93ea0e2 PPC/s390: make target reg correct and remove unnecessary instr
R=joransiu@ca.ibm.com

Change-Id: I441427d7b769c448b1355956b16a4e7f105b149d
Reviewed-on: https://chromium-review.googlesource.com/952022
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#51777}
2018-03-06 22:03:24 +00:00
Jakob Kummerow
66f21389a7 [bigint] Fix Exponentiate for 1 ** multi_digit
Bug: chromium:819026
Change-Id: I2c58d5e2892f683747966e00aa047153085ac121
Reviewed-on: https://chromium-review.googlesource.com/950472
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51776}
2018-03-06 18:58:32 +00:00
Eric Holk
a7a7f2991a [wasm] enable kRetpoline on call_indirect
Change-Id: If97eda2cc2da4501da7f4a753107f58c2797f237
Reviewed-on: https://chromium-review.googlesource.com/885181
Commit-Queue: Eric Holk <eholk@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51775}
2018-03-06 18:42:41 +00:00
Fadi Meawad
1ccbfb0019 Fix ThreadTicks.ThreadNow test on windows
The test is flaky because the OS does not sleep for the full requested
time. Adding a check for the OS sleep time.

Bug: v8:7492
Change-Id: I495ecc6595238bc1771adc434e766543513a0256
Reviewed-on: https://chromium-review.googlesource.com/937818
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Fadi Meawad <fmeawad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51774}
2018-03-06 17:02:48 +00:00
Ivica Bogosavljevic
8ca7bd39a5 MIPS: Fix byteswap operation on mipsr1
We are not allowed to use t0 and t1 as temporary registers in
macro assembler as they are allocatable. This CL fixes the
issue.

Change-Id: I328532e669b081e5215887b725b0b645a86d98b1
Reviewed-on: https://chromium-review.googlesource.com/951488
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Reviewed-by: Sreten Kovacevic <sreten.kovacevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#51773}
2018-03-06 17:01:43 +00:00
Ross McIlroy
c75ff73925 Revert "Reland "[builtins] Embed builtins into the binary""
This reverts commit 75d19b5b51.

Reason for revert: Breaking Mac: https://build.chromium.org/p/client.v8.fyi/builders/Mac%20V8%20FYI%20Release%20%28Intel%29/builds/290

Original change's description:
> Reland "[builtins] Embed builtins into the binary"
> 
> This is a reland of 491d5a81dd
> 
> Original change's description:
> > [builtins] Embed builtins into the binary
> >
> > This embeds code for off-heap-safe builtins into the binary. Actual
> > execution of embedded code is not implemented yet.
> >
> > The embedded file has the following format:
> >
> > namespace v8 {
> > namespace internal {
> >
> > namespace {
> >
> > V8_EMBEDDED_TEXT_HEADER(v8_embedded_blob_)
> > __asm__( /* builtin offsets and lengths */ );
> > __asm__(V8_ASM_LABEL("Builtins_RecordWrite"));
> > __asm__( /* binary instruction stream */ );
> > /* Repeat for other builtins. */
> >
> > extern "C" const uint8_t v8_embedded_blob_[];
> > static const uint32_t v8_embedded_blob_size_ = /* size in bytes */;
> >
> > }  // namespace
> >
> > const uint8_t* DefaultEmbeddedBlob() { return v8_embedded_blob_; }
> > uint32_t DefaultEmbeddedBlobSize() { return v8_embedded_blob_size_; }
> >
> > }  // namespace internal
> > }  // namespace v8
> >
> > Bug: v8:6666
> > Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;luci.v8.try:v8_linux64_fyi_rel_ng
> > Change-Id: Ic989f01da69ebe2863f31d934bfbe2c5d6e80864
> > Reviewed-on: https://chromium-review.googlesource.com/946011
> > Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> > Reviewed-by: Yang Guo <yangguo@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#51759}
> 
> TBR=yangguo@chromium.org
> 
> Bug: v8:6666
> Change-Id: Iba245976ce46c62474dcba94a99ab4a217b2e20e
> Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;luci.v8.try:v8_linux64_fyi_rel_ng
> Reviewed-on: https://chromium-review.googlesource.com/950983
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#51769}

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

Change-Id: If2560e5ea57585421ba5c3da35717abb9b31766f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6666
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;luci.v8.try:v8_linux64_fyi_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/951562
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51772}
2018-03-06 15:25:42 +00:00
jgruber
bbc1a46e5b [builtins] Update isolate-independent list
RecordWrite is not isolate-independent on arm/arm64.

TBR=yangguo@chromium.org
NOTRY=true

Bug: v8:6666
Change-Id: Ie1160434dc9fcb0da91ce53ea06addf9f87434dd
Reviewed-on: https://chromium-review.googlesource.com/951247
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51771}
2018-03-06 14:22:10 +00:00
Clemens Hammacher
12361e723c [Liftoff] Remove Get{Unary,Binary}OpTargetRegister
The idea of GetUnaryOpTargetRegister and GetBinaryOpTargetRegister is
to reuse the register of one of the operands instead of using an
separate third one, because we can often generate better code if the
destination register matches the src or lhs.
This was implemented by looking at the top or the first two stack
entries, and using one of their registers if there is only one use.
Instead of doing that we can also just pop them and then later check
whether this was the only use. This makes the code smaller, more
readable and probably faster.

R=titzer@chromium.org

Bug: v8:6600
Change-Id: Ia5d9e320bdb3add5032400455a64a0c7fee77cbd
Reviewed-on: https://chromium-review.googlesource.com/950947
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51770}
2018-03-06 14:05:40 +00:00
jgruber
75d19b5b51 Reland "[builtins] Embed builtins into the binary"
This is a reland of 491d5a81dd

Original change's description:
> [builtins] Embed builtins into the binary
>
> This embeds code for off-heap-safe builtins into the binary. Actual
> execution of embedded code is not implemented yet.
>
> The embedded file has the following format:
>
> namespace v8 {
> namespace internal {
>
> namespace {
>
> V8_EMBEDDED_TEXT_HEADER(v8_embedded_blob_)
> __asm__( /* builtin offsets and lengths */ );
> __asm__(V8_ASM_LABEL("Builtins_RecordWrite"));
> __asm__( /* binary instruction stream */ );
> /* Repeat for other builtins. */
>
> extern "C" const uint8_t v8_embedded_blob_[];
> static const uint32_t v8_embedded_blob_size_ = /* size in bytes */;
>
> }  // namespace
>
> const uint8_t* DefaultEmbeddedBlob() { return v8_embedded_blob_; }
> uint32_t DefaultEmbeddedBlobSize() { return v8_embedded_blob_size_; }
>
> }  // namespace internal
> }  // namespace v8
>
> Bug: v8:6666
> Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;luci.v8.try:v8_linux64_fyi_rel_ng
> Change-Id: Ic989f01da69ebe2863f31d934bfbe2c5d6e80864
> Reviewed-on: https://chromium-review.googlesource.com/946011
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#51759}

TBR=yangguo@chromium.org

Bug: v8:6666
Change-Id: Iba245976ce46c62474dcba94a99ab4a217b2e20e
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;luci.v8.try:v8_linux64_fyi_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/950983
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51769}
2018-03-06 13:20:34 +00:00
Predrag Rudic
3960892afd Flush instruction cache in NativeModule::Link
Tests are failing on MIPS with bus error because instruction cache is not flushed.

Change-Id: I1725a87ea2dc36ffde767d10a0c4deea0e069c09
Reviewed-on: https://chromium-review.googlesource.com/950722
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#51768}
2018-03-06 13:18:39 +00:00
Ulan Degenbaev
514054d907 [heap-profiler] Report finished progress only once.
This fixes HeapSnapshotGenerator::SetProgressTotal so that
ProgressReport is called with finished flag only once.

The DevTools front-end assumes that progress with finished flag is
reported only once.

Change-Id: Iad958478aa8ad27a520cb491419e521027967754
Reviewed-on: https://chromium-review.googlesource.com/949224
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51767}
2018-03-06 13:17:24 +00:00
Hannes Payer
e816d2bad0 [heap] Turn on --write-protect-code-memory.
Bug: chromium:774108
Change-Id: Ifcf9939f29c9a3dc14ed686dc14608860ff32678
Reviewed-on: https://chromium-review.googlesource.com/950902
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Michael Hablich <hablich@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51766}
2018-03-06 13:10:44 +00:00
Hannes Payer
8bef26522c [heap] Add a CodePageCollectionMemoryModificationScope to collect unprotected code pages on the fly.
Bug: chromium:774108
Change-Id: I95bfe672df13a6b8f40ba258c9ea42c6b18f6138
Reviewed-on: https://chromium-review.googlesource.com/949482
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51765}
2018-03-06 12:39:04 +00:00
Michael Starzinger
903c631f38 [wasm] Deprecate {WCM_PROPERTY_TABLE} macro.
R=clemensh@chromium.org
BUG=v8:7509

Change-Id: Ifa86cbc9d7bb915d5da9c56808d1425f2bc49c44
Reviewed-on: https://chromium-review.googlesource.com/950943
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51764}
2018-03-06 12:24:44 +00:00
Dan Elphick
58e15ee246 Remove ObjectSpace and AllocationAction enums
ObjectSpace was only referred to in static_asserts and was otherwise
removed in http://codereview.chromium.org/7945009.

AllocationActions's last usage was removed in
https://codereview.chromium.org/1991293002.

Bug: v8:7310
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I2ccbf3b674517bc698b4c92754cd0b251229d342
Reviewed-on: https://chromium-review.googlesource.com/931887
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51763}
2018-03-06 12:07:45 +00:00
Stephan Herhut
cee2946f44 Lazily generate disassembly for WASM functions
Instead of computing the disassmebly and offset tables eagerly on
registering a WASM function with a debugger agent, only generate
it when the source or offset tables are actually required. This is
implemented using a lazy, memoizing supplier that is shared
between the debugger agent and wasm translator.

Bug: chromium:794941
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I1a2f7dd71ab65c80f91ddee4f7babbdf33d2e74b
Reviewed-on: https://chromium-review.googlesource.com/918641
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51762}
2018-03-06 11:54:41 +00:00
Dan Elphick
db5affec9b [builtins] Add typing to o() and len() in array builtins
Make BuiltinsArrayAssembler::o() and len() into TNode<JSReceiver> and
TNode<Number> respectively.

Also adds typing to CodeStubAssembler::ToLength_Inline.

Fixes a type error in ArraySpeciesCreate which needs to take a Number rather
than a Smi.

Bug: v8:7310
Change-Id: Ie01d58ba195bddfe58ac7e4a31272c8f1a14c6ce
Reviewed-on: https://chromium-review.googlesource.com/934821
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51761}
2018-03-06 11:52:02 +00:00
Jakob Gruber
4f18484b8b Revert "[builtins] Embed builtins into the binary"
This reverts commit 491d5a81dd.

Reason for revert: https://build.chromium.org/p/client.v8/builders/V8%20Mac64/builds/20696

Original change's description:
> [builtins] Embed builtins into the binary
> 
> This embeds code for off-heap-safe builtins into the binary. Actual
> execution of embedded code is not implemented yet.
> 
> The embedded file has the following format:
> 
> namespace v8 {
> namespace internal {
> 
> namespace {
> 
> V8_EMBEDDED_TEXT_HEADER(v8_embedded_blob_)
> __asm__( /* builtin offsets and lengths */ );
> __asm__(V8_ASM_LABEL("Builtins_RecordWrite"));
> __asm__( /* binary instruction stream */ );
> /* Repeat for other builtins. */
> 
> extern "C" const uint8_t v8_embedded_blob_[];
> static const uint32_t v8_embedded_blob_size_ = /* size in bytes */;
> 
> }  // namespace
> 
> const uint8_t* DefaultEmbeddedBlob() { return v8_embedded_blob_; }
> uint32_t DefaultEmbeddedBlobSize() { return v8_embedded_blob_size_; }
> 
> }  // namespace internal
> }  // namespace v8
> 
> Bug: v8:6666
> Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;luci.v8.try:v8_linux64_fyi_rel_ng
> Change-Id: Ic989f01da69ebe2863f31d934bfbe2c5d6e80864
> Reviewed-on: https://chromium-review.googlesource.com/946011
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#51759}

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

Change-Id: I36f5ee173fca565327b7f3e0ea20503ceef451fe
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6666
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;luci.v8.try:v8_linux64_fyi_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/950982
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51760}
2018-03-06 11:43:44 +00:00
jgruber
491d5a81dd [builtins] Embed builtins into the binary
This embeds code for off-heap-safe builtins into the binary. Actual
execution of embedded code is not implemented yet.

The embedded file has the following format:

namespace v8 {
namespace internal {

namespace {

V8_EMBEDDED_TEXT_HEADER(v8_embedded_blob_)
__asm__( /* builtin offsets and lengths */ );
__asm__(V8_ASM_LABEL("Builtins_RecordWrite"));
__asm__( /* binary instruction stream */ );
/* Repeat for other builtins. */

extern "C" const uint8_t v8_embedded_blob_[];
static const uint32_t v8_embedded_blob_size_ = /* size in bytes */;

}  // namespace

const uint8_t* DefaultEmbeddedBlob() { return v8_embedded_blob_; }
uint32_t DefaultEmbeddedBlobSize() { return v8_embedded_blob_size_; }

}  // namespace internal
}  // namespace v8

Bug: v8:6666
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;luci.v8.try:v8_linux64_fyi_rel_ng
Change-Id: Ic989f01da69ebe2863f31d934bfbe2c5d6e80864
Reviewed-on: https://chromium-review.googlesource.com/946011
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51759}
2018-03-06 11:16:11 +00:00
Ross McIlroy
323ad6a732 [Compiler] Remove unused background_compile flag.
We now unconditionally both parse and compile StreamedSource on the background
thread.

BUG=v8:5203

Change-Id: I42d6fe9059bc1745da3a415d270f46cf1c08b306
Reviewed-on: https://chromium-review.googlesource.com/948854
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51758}
2018-03-06 10:42:21 +00:00
Michael Starzinger
76fa300626 [wasm] Remove dangerous {WasmCompiledModule} accessors.
Note that {nullptr} is a dangerous sentinel value in V8's object model
because it can be interpreted as Smi(0) and hence will turn into a
completely different type than the declared return type at runtime.

R=ahaas@chromium.org
BUG=v8:7509

Change-Id: I89cffa1160a3bf6853f91c04fb90c74ad08888a3
Reviewed-on: https://chromium-review.googlesource.com/948907
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51757}
2018-03-06 10:15:11 +00:00
Yang Guo
33be2fb1d2 [debug] use flag to decide whether accessor has side effect.
Instead of a hard-coded list of function addresses, we now use a flag
on the AccessorInfo object to annotate whether the getter can cause any
side effect.

Future changes will extend this to InterceptorInfo, CallHandlerInfo, and
expose this through the API.

R=jgruber@chromium.org, luoe@chromium.org

Bug: v8:7515
Change-Id: Id0fedf03493c3bd81913557a5681f8f63660f6a4
Reviewed-on: https://chromium-review.googlesource.com/945909
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51756}
2018-03-06 09:25:42 +00:00
Yang Guo
43e2fb1c3d [profiler] fix sleeping on windows for long intervals.
R=franzih@chromium.org

Change-Id: I5717db794fc797e7c3b0b8f122ddb6dc0702a99e
Reviewed-on: https://chromium-review.googlesource.com/941126
Reviewed-by: Franziska Hinkelmann <franzih@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51755}
2018-03-06 09:22:11 +00:00
Ilija Pavlovic
d2c2b39831 [mips][mips64]: Skip tests for MIPS release 6.
For MIPS architecture release 6, following tests will be skipped:
cctest/test-run-machops/RunFloat64MulAndFloat64Add1
cctest/test-run-machops/RunFloat64MulAndFloat64Add2
cctest/test-run-machops/RunFloat64MulAndFloat64Sub1
cctest/test-run-machops/RunFloat64MulAndFloat64Sub2

TEST=
BUG=

Change-Id: Id359580b809d1387d504d98b6d25d6c112cfda78
Reviewed-on: https://chromium-review.googlesource.com/945689
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#51754}
2018-03-06 09:19:11 +00:00
Benedikt Meurer
6196dd051f [turbofan] Only store after all checks are done.
The optimized code for %ArrayIteratorPrototype%.next for holey arrays
was wrong, since it would first store the [[NextIndex]] and then check
whether it hit a hole. However in that case TurboFan doesn't have any
point to deoptimize to, so we need to perform the side-effecting stores
only after all checks are done.

Bug: v8:7510, v8:7514, chromium:819086
Change-Id: I0214c7124833286113e4dc7403ddc20a82fa8da3
Reviewed-on: https://chromium-review.googlesource.com/950723
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51753}
2018-03-06 09:09:11 +00:00
Adam Klein
21b984be72 [api] Add yangguo@ to include/OWNERS
Change-Id: I9854c151c9de636ba1d9ac3733c34485831e6cc4
Reviewed-on: https://chromium-review.googlesource.com/946858
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51752}
2018-03-06 07:37:11 +00:00
v8-autoroll
34129bab24 Update V8 DEPS.
Rolling v8/build: 0fc17e2..06a6e63

Rolling v8/third_party/android_ndk: https://chromium.googlesource.com/android_ndk/+log/e951c37..635bc38

Rolling v8/third_party/android_tools: https://chromium.googlesource.com/android_tools/+log/9a70d48..c22a664

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

Change-Id: Iadd11a087dd9348b2296d5df8adcd3584a6e6221
Reviewed-on: https://chromium-review.googlesource.com/950563
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51751}
2018-03-06 07:02:16 +00:00
Junliang Yan
7f90312582 PPC: use pc-relative address to init constpool reg
R=joransiu@ca.ibm.com

Change-Id: I67364f29d494b09786a14b13743f73bef4b64582
Reviewed-on: https://chromium-review.googlesource.com/950242
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#51750}
2018-03-06 07:01:11 +00:00
Taketoshi Aono
f0946c1b71 Reland proposal-numeric-separator.
Revert "Revert "[parser] Implements proposal-numeric-separator.""

This reverts commit 782f6401ee.

Original CL is https://chromium-review.googlesource.com/c/v8/v8/+/923441

Bug: v8:7317
Change-Id: I6f541c038bad0cff625094ba84aebe582bdeb12f
Reviewed-on: https://chromium-review.googlesource.com/945034
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51749}
2018-03-06 01:25:06 +00:00
Junliang Yan
5d72f1ae6f s390: load zero on r0 instead of xgr
xgr kills condition code on the branch

R=joransiu@ca.ibm.com

Change-Id: I90a75760c96319d8f27512395f904796a114c5e9
Reviewed-on: https://chromium-review.googlesource.com/950135
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#51748}
2018-03-06 00:24:46 +00:00
Junliang Yan
7b43e11c9b PPC/s390: Reland [in-place weak refs] Add in-place weak references & migrate one WeakCell to it.
Port 88062a2cbc

Original Commit Message:

    Implement in-place weak reference handling in GC.

    Turn FeedbackVector::optimized_code_or_smi into an in-place weak reference (this
    is the only in-place weak reference at this point).

    (See bug for design doc.)

R=marja@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:7308
LOG=N

Change-Id: I00c6aa7c08524b7769d3428d0c18ce334f35a722
Reviewed-on: https://chromium-review.googlesource.com/949368
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#51747}
2018-03-05 23:11:55 +00:00
Jakob Kummerow
2ce122e3f2 [bigint] Fix GC unsafety issue
There must not be both an allocating function call and a handle deref
in the list of arguments to a call. Depending on the evaluation order
that the C++ compiler chooses, the deref could happen before the call
and the resulting raw pointer be invalidated by the GC.

Bug: chromium:818424
Change-Id: I525947252ff9d0b048a5bf82c2976e0acce739be
Reviewed-on: https://chromium-review.googlesource.com/949782
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51746}
2018-03-05 22:26:25 +00:00
Clemens Hammacher
1f0419da93 [Liftoff] Add support for f32.div and f64.div
I initially left them out because I thought they are harder to
implement than the other float binops, but it turns out it is actually
just the same.

R=ahaas@chromium.org

Bug: v8:6600
Change-Id: I68b98daf4dfaf4e00d57fc68257fe43977c4ae6a
Reviewed-on: https://chromium-review.googlesource.com/948543
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51745}
2018-03-05 19:32:41 +00:00
Camillo Bruni
3fdf554c05 [printing] Improve Map printing
- Only show ElementsKind for JSObject Maps
- Display non-variable instance-size for non-JSObject Maps

Change-Id: I224b6ca2985f9c51635cc44ab5faa4cb977695ba
Reviewed-on: https://chromium-review.googlesource.com/946489
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51744}
2018-03-05 19:12:21 +00:00
Camillo Bruni
bca7242580 [tools] Improve HeapStats category percentages
- Provide sorted instance type contribution per GC
- Visualize percentages per InstanceType based on the selected GC
- Visualize percentags per category
- Use some more arrow functions
- Introduce helper.js file

Bug: v8:7266
Change-Id: I26099cc64d9545b2de9e4574da2faf52d54ad198
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/949222
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51743}
2018-03-05 18:28:51 +00:00
Adam Klein
7c914dd022 [ast] Slim down FunctionLiteral
This patch moves the has_braces_ bool to the bit_field_, and moves
function_literal_id_ into the freed-up slack space. This saves
4 bytes on 32-bit platforms and 8 bytes on 64-bit.

Change-Id: Ib5ba475915e46494c75019cfc184aafe72f6407f
Reviewed-on: https://chromium-review.googlesource.com/947467
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51742}
2018-03-05 17:52:01 +00:00
Ulan Degenbaev
f7a93fbd99 [heap] Fix MockPlatform in IncrementalMarkingUsingTasks test.
Now the mock platform delays all background tasks and forwards them
to the real platform in its destructor.

This fixes a race that happens when the background tasks calls
TestPlatform::MonotonicallyIncreasingTime() while the mock platform
is being destroyed.

BUG: v8:7494
Change-Id: I659ccc19121144152f447d59ff3c5e7ef1bec6d5
Reviewed-on: https://chromium-review.googlesource.com/949202
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51741}
2018-03-05 17:30:21 +00:00
Clemens Hammacher
23520d938e [wasm][cleanup] Use {Read,Write}UnalignedValue
Minor cleanup: Instead of a cryptic memcpy, just use ReadUnalignedValue
and WriteUnalignedValue.
Also add DCHECKs to these helpers to ensure that they are only used for
trivially copyable types.

R=ahaas@chromium.org

Bug: v8:7310
Change-Id: Id5014a828573f8d13a6c3a5380eae2f377e8f130
Reviewed-on: https://chromium-review.googlesource.com/948544
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51740}
2018-03-05 17:24:31 +00:00