Commit Graph

44161 Commits

Author SHA1 Message Date
Yang Guo
aae52f6b0f [snapshot] introduce more maps for rehashing.
R=mstarzinger@chromium.org

Bug: v8:6593
Change-Id: Ica794c7b0d779f04647d2b2c5ce7762a537620ae
Reviewed-on: https://chromium-review.googlesource.com/759793
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49469}
2017-11-19 10:39:16 +00:00
Yang Guo
678f910375 [snapshot] no longer iterate strong roots twice.
Previously, in order to get immortal immovable objects onto
the first page, the serializer would iterate the root list
twice. The first time it would prioritize immortal immovables.
The second time it would serialize the rest.

This does not guarantee that immortal immovable objects
actually end up on the first page, and by now this is not
necessary anymore, since we mark all pages created during
heap init as immortal immovable pages.

R=mlippautz@chromium.org

Change-Id: Ie95fcd779377a75337621ba862bc1a745ed5cbaa
Reviewed-on: https://chromium-review.googlesource.com/768731
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49468}
2017-11-19 08:39:16 +00:00
v8-autoroll
ec1ad5f337 Update V8 DEPS.
Rolling v8/tools/clang: f2ca3e0..509676b

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

Change-Id: I5d6e78e23d83234c8c80eaef4a7c8a51c7575e6a
Reviewed-on: https://chromium-review.googlesource.com/777929
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49467}
2017-11-19 07:59:12 +00:00
Anna Henningsen
09b53eef4c [api] Make running scripts in AddMessageListener callback work in debug mode
The existance of an `AllowJavascriptExecutionDebugOnly` scope in
`Isolate::ReportPendingMessages()` indicates that the API supports
running arbitrary JS code in a `AddMessageListener` callback.

Currently, this can fail in debug mode: The
`!isolate->external_caught_exception()` condition is checked when
entering API methods inside such a handler. However, if there is
a verbose `TryCatch` active when the exception occurs, this
check fails, and when calling `ToString()` on the exception object
leaves a pending exception itself, the flag is re-set to `true`.

Fix this problem by clearing the flag and the pending exception if
there was one during `ToString()`. This matches the code a few lines
up in `messages.cc`, so the exception state is now consistent
during the callback.

This currently makes a Node.js test fail in debug mode
(`parallel/test-error-reporting`).

Bug: node:7144
Bug: node:17016
Change-Id: I060d00fea3e9a497f4df34c6ff8d6e29ebe96321
Reviewed-on: https://chromium-review.googlesource.com/718096
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49466}
2017-11-18 23:39:29 +00:00
v8-autoroll
87d7722be4 Update V8 DEPS.
Rolling v8/build: 5698e23..5718716

Rolling v8/buildtools: 3196d83..461b345

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/fd88dfb..37921f1

Rolling v8/third_party/instrumented_libraries: e07d437..ebf8d92

Rolling v8/tools/clang: e70074d..f2ca3e0

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

Change-Id: Ib22ef3b367d667199b3c3b12c892a1f7b476d7a7
Reviewed-on: https://chromium-review.googlesource.com/777595
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49465}
2017-11-18 04:53:08 +00:00
Camillo Bruni
a4af0ce633 [ic] Track the IC state change in FeedbackNexus::ConfigureMegamorphic
- This precents us from logging two ICEvents for a megamorphic miss that adds
  a new property
- We don't have to reset the profiler ticks anymore for this miss

The particular case for missing to add a new property happens ~1700 times in
the Speedometer Angular benchmark where we get an already internalized key
as property name.

Change-Id: I2362c3b7a66d9def1bc4295f6f1e64c96b25fe8a
Reviewed-on: https://chromium-review.googlesource.com/777259
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49464}
2017-11-18 00:52:12 +00:00
Adam Klein
00772e4d37 [grokdump] Fix --web instruction output for ARM disassembly
Fixes instruction names to be all in one <td>, rather than being
split between two due to miscalculation of op_offset.

Change-Id: Ieef5d20c238c8e0a5b2316239324d375090006a1
Reviewed-on: https://chromium-review.googlesource.com/777761
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49463}
2017-11-18 00:45:37 +00:00
Jakob Kummerow
977da55033 [bigint] Encapsulate internals in MutableBigInt
This CL creates the invariant that the BigInt class treats
BigInt objects as immutable. Writing to new BigInt objects
as part of their construction is done by the MutableBigInt
helper class, which in turn is hidden as an implementation
detail in bigint.cc.
As a side effect, this refactoring enforces right-trimming
checks for all newly created BigInts, and ensures that all
BigInt allocations possibly exceeding kMaxLength check for
this case and throw a RangeError instead of crashing.

Bug: v8:6791
Tbr: mlippautz@chromium.org
Change-Id: Id239746108e6b076b47a03ba37462001eb501507
Reviewed-on: https://chromium-review.googlesource.com/742329
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49462}
2017-11-17 23:06:52 +00:00
Ulan Degenbaev
61bf2cc692 [runtime] Make layout descriptor helper safe for concurrent marking.
The layout descriptor helper computes the object header size using
map->instance_size() and map->GetInObjectProperties().

It races with finalization of slack tracking, which changes both
the instance size and the in-object properties count.

This patch replaces the in-object properties count byte in the map
with the byte that stores the start offset of in-object properties.

The new byte can be used in the layout descriptor to compute the
object header size and it is immutable.

This patch also renames InstanceSize to InstanceSizeInWords where
the instance size is represented in words.

Bug: chromium:786069, chromium:694255
Change-Id: I4b48c6944d3fe8a950bd7b0ba43d75216b177a78
Reviewed-on: https://chromium-review.googlesource.com/776720
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49461}
2017-11-17 21:57:23 +00:00
Igor Sheludko
ed53f05c83 [runtime] Fix class literal instantiation.
Class' prototype temporarily got properies backing store inconsistent with
the map which obviously confused heap verifier.

Bug: v8:5799
Change-Id: Ie28b0418daa657763d07c8a928851111680718ed
Reviewed-on: https://chromium-review.googlesource.com/777560
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49460}
2017-11-17 20:36:52 +00:00
Pierre Langlois
027cecdb21 [perf-prof] Do not crash on BytecodeArray move events
The logger for perf does not support relocating code objects so as a result we
disable code space compacting to make sure code does not move. However, a
a CodeMove event may still happen if a BytecodeArray object moves, which isn't
relevant to the perf jit support so we can ignore it.

Bug: 
Change-Id: Ie6acf58fe6adfb5cec2f8756f457134cf3b13c2a
Reviewed-on: https://chromium-review.googlesource.com/759795
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#49459}
2017-11-17 20:22:42 +00:00
Leszek Swirski
25820bdab9 [code-cache] Log resources with no cache handler
Add another entry to the NoCacheReason enum, reporting that the chromium
ScriptResource has no cache handler.

Also, the amount of chromium-specific entries in this enum is getting
too high. So, added a TODO for removing them -- possibly in the future
we want to do this no-cache reason logging in Chromium after all,
propagating isolate cache hits and consume failures back up the API with
an out parameter.

Bug: chromium:769203
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I63ca863cfef61e04e7104318eb79810796b61a9c
Reviewed-on: https://chromium-review.googlesource.com/776893
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49458}
2017-11-17 18:16:44 +00:00
Igor Sheludko
cc9e77abe8 Reland^2 "[runtime] Slightly optimize creation of class literals."
This CL also includes fixes for CF issues found while the previous
reland was active.

Bug: v8:5799, chromium:783902, chromium:783926, chromium:783822
Change-Id: I1f7d9b037d90838469c45f5d72771a77444c662e
Reviewed-on: https://chromium-review.googlesource.com/764067
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49457}
2017-11-17 18:15:34 +00:00
Michael Lippautz
71ad48fb8f [api] Mark MarkIndependent as soon deprecated
Persistent handles are always independent these days. Users should mark
weak handles as active using MarkActive if they want to keep weak
handles that are otherwise unreachable alive across scavenges.

Bug: chromium:780749
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I116e984ce14a035d1cef491d49f11a388fa8169d
Reviewed-on: https://chromium-review.googlesource.com/759794
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49456}
2017-11-17 18:14:29 +00:00
Adam Klein
16943d2d71 Revert "[wasm] Unify deoptimization data"
This reverts commit 236298acbf.

Reason for revert: suspected cause of failures on GC stress bots:

https://build.chromium.org/p/client.v8/builders/V8%20Mac%20GC%20Stress/builds/16341
https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/builds/16269

Original change's description:
> [wasm] Unify deoptimization data
> 
> Add methods to add deoptimization data and use them from all the places
> where we currently add them manually. Also add them to wasm-to-wasm
> wrappers compiled on table set, which was missing before, leading to
> the referenced bug.
> 
> Drive-by: Disable non-applicable MaybeHandle constructors to allow
> overloading functions with different Handle types.
> 
> R=​ahaas@chromium.org
> 
> Bug: chromium:779292
> Change-Id: Ib9132d9faeb1092c46e22dd8196d201ce5c0942f
> Reviewed-on: https://chromium-review.googlesource.com/774838
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49452}

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

Change-Id: I02fb49d2ece8e04ac5fb26f618bfe6fb2f133d06
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:779292
Reviewed-on: https://chromium-review.googlesource.com/777079
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49455}
2017-11-17 17:27:46 +00:00
Jakob Gruber
9037639eb1 Revert "[coverage] add coverage for binary expressions"
This reverts commit 4d3bc552b5.

Reason for revert: https://crbug.com/785778

Original change's description:
> [coverage] add coverage for binary expressions
> 
> Adds block-level coverage tracking for binary && and ||
> expressions. Introduces a BinaryOperation source-range
> for tracking the operations themselves and an Expression
> source-range, used for tracking NaryLogical expressions.
> 
> This builds on work by jgruber@chromium.org in
> the issue.
> 
> TBR=marja@chromium.org
> R=​jgruber@chromium.org, rmcilroy@chromium.org
> 
> Bug: v8:6660
> Change-Id: I83a81f13a3514a734c06948b2d3e91138fb00e18
> Reviewed-on: https://chromium-review.googlesource.com/754564
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49304}

TBR=rmcilroy@chromium.org,marja@chromium.org,jgruber@chromium.org,ben@npmjs.com

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

Bug: v8:6660
Change-Id: Ie017c528604b2e01400f527511413eaea5786198
Reviewed-on: https://chromium-review.googlesource.com/776768
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49454}
2017-11-17 17:05:39 +00:00
Adam Klein
d42534d441 Remove always-on flags for RegExp dotAll and lookbehind
Both of these features were shipped in Chrome 62.

Bug: v8:4545, v8:6172
Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: Ie00dcbeded7517a15696d4a78fcfbbf162919923
Reviewed-on: https://chromium-review.googlesource.com/775601
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49453}
2017-11-17 16:47:19 +00:00
Clemens Hammacher
236298acbf [wasm] Unify deoptimization data
Add methods to add deoptimization data and use them from all the places
where we currently add them manually. Also add them to wasm-to-wasm
wrappers compiled on table set, which was missing before, leading to
the referenced bug.

Drive-by: Disable non-applicable MaybeHandle constructors to allow
overloading functions with different Handle types.

R=ahaas@chromium.org

Bug: chromium:779292
Change-Id: Ib9132d9faeb1092c46e22dd8196d201ce5c0942f
Reviewed-on: https://chromium-review.googlesource.com/774838
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49452}
2017-11-17 16:28:38 +00:00
Jakob Gruber
4ad4a8d725 Eager-deserialize in test-debug/BuiltinsExceptionPrediction
This test iterates all builtin objects; explicitly deserialize builtins
when necessary to avoid verifying DeserializeLazy by accident.

Bug: v8:6624
Change-Id: Iab3f708380809b7486ef11a2816e9593ee7e65cd
Reviewed-on: https://chromium-review.googlesource.com/654902
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49451}
2017-11-17 16:11:48 +00:00
Sergiy Byelozyorov
f9079126e6 [tools] Whitespace CL to test if presubmit works correctly on CQ
TBR=machenbach@chromium.org

Bug: chromium:748057
No-Try: true
Change-Id: I20a74823678510f343c865b074b2d088c1080b94
Reviewed-on: https://chromium-review.googlesource.com/776719
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49450}
2017-11-17 15:55:29 +00:00
Bill Budge
a0345a44d5 [Memory] Warn on unused result for base/platform memory functions.
- Warn on unused result for OS Allocate, Free, SetPermissions,
  CommitRegion, UncommitRegion functions.
- Adds CHECKS or DCHECK/USE around call sites.

Bug: chromium:756050

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ic00b0a42a1e09bdba013b7fa2b1b4e2b7591bac6
Reviewed-on: https://chromium-review.googlesource.com/769792
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49449}
2017-11-17 15:53:48 +00:00
Sergiy Byelozyorov
1438986d63 Migrate v8_presubmit to LUCI
R=machenbach@chromium.org

Bug: chromium:748057
Change-Id: I013bae778c3cc1ccf545d33bf99aadb42ad49834
Reviewed-on: https://chromium-review.googlesource.com/775122
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49448}
2017-11-17 15:40:21 +00:00
Michael Achenbach
c13b62d7db Revert "[log] Properly log all maps creating during bootstrapping"
This reverts commit acfef3ec93.

Reason for revert: Makes logmaps timeout in nosnap mode:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap/builds/18933

Original change's description:
> [log] Properly log all maps creating during bootstrapping
> 
> Logger::LogMaps will print all maps currently present on the heap.
> 
> Note that currently this does not properly log the detailed transitions
> for these maps.
> 
> Change-Id: Ia3218d371549d7634fe3eda9e8e59b0b0bd8bebb
> Reviewed-on: https://chromium-review.googlesource.com/753885
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49444}

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

Change-Id: I264362552cbc2f8f0c1df84412f4dbeea08ef384
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/776815
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49447}
2017-11-17 13:38:54 +00:00
Ulan Degenbaev
372fc681be [heap] Fix undefined shift in LiveObjectRange::AdvanceToNextValidObject.
Bug: 
Change-Id: Ide7fab96e5ba1650aa17ba266e6ed2ed893208d7
Reviewed-on: https://chromium-review.googlesource.com/776658
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49446}
2017-11-17 13:17:01 +00:00
Leszek Swirski
5aa6f58952 [cleanup] Move preparsed data into function data in SFI
Since we only ever have preparsed scope info data for functions that
haven't been parsed yet, it never overlaps with there being other
function data (such as a bytecode array). So, we can merge the two
fields.

This drops the SharedFunctionInfo size by one pointer.

Bug: chromium:783853
Change-Id: I7166010271cf661b04d3d118ac87c65c79555f96
Reviewed-on: https://chromium-review.googlesource.com/774863
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49445}
2017-11-17 13:14:21 +00:00
Camillo Bruni
acfef3ec93 [log] Properly log all maps creating during bootstrapping
Logger::LogMaps will print all maps currently present on the heap.

Note that currently this does not properly log the detailed transitions
for these maps.

Change-Id: Ia3218d371549d7634fe3eda9e8e59b0b0bd8bebb
Reviewed-on: https://chromium-review.googlesource.com/753885
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49444}
2017-11-17 12:55:51 +00:00
Predrag Rudic
e6d92f61e7 MIPS[64]: Skip regress-779407 test
This test uses 136GB of memory which is too much for our MIPS boards.

NOTRY=true

Bug: v8:7093
Change-Id: I382bf0832da6ae74241e89a2016c3738f03979fd
Reviewed-on: https://chromium-review.googlesource.com/776765
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49443}
2017-11-17 12:47:12 +00:00
Michael Starzinger
4a7698fcdd [runtime] Remove support for missing deoptimization.
This removes support for optimized frame which lack deoptimization
information. All optimized JavaScript frames now imply that the
underlying bytecode is available too.

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

Change-Id: Ie73c0a376002466884388f1da9e1ec2741884596
Reviewed-on: https://chromium-review.googlesource.com/612162
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49442}
2017-11-17 12:33:28 +00:00
Clemens Hammacher
4c420258d3 Revert "MIPS[64] Implementation of MSA instructions in builtin simulator"
This reverts commit 3e0bf580e8.

Reason for revert: MSVC does not compile any more, see https://build.chromium.org/p/client.v8/builders/V8%20Win64%20-%20msvc/builds/172

Original change's description:
> MIPS[64] Implementation of MSA instructions in builtin simulator
> 
> This commit is a step toward enabling test-run-wasm-simd tests for MIPS.
> 36 of those were failing in V8 builtin simulator because some instructions
> were not implemented.  Also there are minor fixes to some of the already
> implemented instructions.
> 
> This commit has only 32-bit implementation. After review I will add
> 64-bit version.
> 
> Bug: 
> Change-Id: I25b0cac352db3efb56b922ace64ab2aaef82472d
> Reviewed-on: https://chromium-review.googlesource.com/744008
> Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
> Cr-Commit-Position: refs/heads/master@{#49439}

TBR=jkummerow@chromium.org,mstarzinger@chromium.org,mlippautz@chromium.org,bmeurer@chromium.org,predrag.rudic@mips.com,ivica.bogosavljevic@mips.com,Ilija.Pavlovic@mips.com,sreten.kovacevic@mips.com,Miran.Karic@imgtec.com

Change-Id: Ic0c6339473481fa75908e942bc86de2b5c6349d8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/776655
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49441}
2017-11-17 11:02:48 +00:00
Clemens Hammacher
f8072dbdeb [handles] Use is_convertible instead of is_base_of
std::is_base_of<A, B> has undefined behaviour if B is not a complete
type. Hence, avoid it and use is_convertible<B*, A*> instead.
This captures exactly the requirement that
  Handle<A> foo() { return produce<Handle<B>>(); }
is valid exactly if
  A* foo() { return produce<B>(); }
is valid.
Also, change some static asserts to enable_ifs in order to allow
overloading a function by different Handle types, which would cause
disambiguity otherwise.

R=tebbi@chromium.org

Change-Id: I60fbdfcfd96c7b216e42819a5b5de3423a2c38d0
Reviewed-on: https://chromium-review.googlesource.com/774841
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49440}
2017-11-17 10:25:44 +00:00
Predrag Rudic
3e0bf580e8 MIPS[64] Implementation of MSA instructions in builtin simulator
This commit is a step toward enabling test-run-wasm-simd tests for MIPS.
36 of those were failing in V8 builtin simulator because some instructions
were not implemented.  Also there are minor fixes to some of the already
implemented instructions.

This commit has only 32-bit implementation. After review I will add
64-bit version.

Bug: 
Change-Id: I25b0cac352db3efb56b922ace64ab2aaef82472d
Reviewed-on: https://chromium-review.googlesource.com/744008
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#49439}
2017-11-17 10:24:15 +00:00
Ivo Markovic
dec077ae1a MIPS[64]: Fix issue with mjsunit/wasm/multi-value
Added return value registers on both MIPS32 and MIPS 64.

Bug: 
Change-Id: I3199a73f90ef7b0bc9e18d716fcdf4c8c479f7fd
Reviewed-on: https://chromium-review.googlesource.com/774286
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#49438}
2017-11-17 10:14:14 +00:00
Tom Anderson
31ccd1a645 [Reland] Remove no_custom_libcxx and update V8 DEPS.
Rolling v8/build: 98bbbff..5698e23

Rolling v8/buildtools: 93a751e..3196d83

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/755a485..fd88dfb

Rolling v8/tools/clang: 4b58512..e70074d

R=machenbach@chromium.org

Change-Id: If3f0ca871fbcf5e46876d2dab00b034dc496f91c
Bug: 
Reviewed-on: https://chromium-review.googlesource.com/775632
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49437}
2017-11-17 07:55:56 +00:00
Michael Achenbach
60c917313e Revert "Update V8 DEPS."
This reverts commit 01f670d8c1.

Reason for revert: https://crbug.com/785170

Original change's description:
> Update V8 DEPS.
> 
> Rolling v8/build: 98bbbff..610a818
> 
> Rolling v8/buildtools: 93a751e..9c40f80
> 
> Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/755a485..1087227
> 
> Rolling v8/third_party/instrumented_libraries: e07d437..7f70365
> 
> Rolling v8/tools/clang: 4b58512..c2f2e01
> 
> TBR=machenbach@chromium.org,hablich@chromium.org,sergiyb@chromium.org
> 
> Change-Id: Ic9902f605333991c0d33f91f22dca32763a7f21d
> Reviewed-on: https://chromium-review.googlesource.com/775835
> Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
> Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49435}

TBR=v8-autoroll@chromium.org,machenbach@chromium.org,hablich@chromium.org,sergiyb@chromium.org

Change-Id: I9c0a5c9130a59dbdc45648062c1ed7d470ee7b13
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/776593
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49436}
2017-11-17 07:27:29 +00:00
v8-autoroll
01f670d8c1 Update V8 DEPS.
Rolling v8/build: 98bbbff..610a818

Rolling v8/buildtools: 93a751e..9c40f80

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/755a485..1087227

Rolling v8/third_party/instrumented_libraries: e07d437..7f70365

Rolling v8/tools/clang: 4b58512..c2f2e01

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

Change-Id: Ic9902f605333991c0d33f91f22dca32763a7f21d
Reviewed-on: https://chromium-review.googlesource.com/775835
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49435}
2017-11-17 04:52:20 +00:00
Adam Klein
6e39c9e1a7 Remove always-on flag --harmony-strict-legacy-accessor-builtins
It was shipped in Chrome 62.

Bug: v8:5070
Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: I77119540411d1fe15691d40012cb96f4e2e45048
Reviewed-on: https://chromium-review.googlesource.com/776154
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49434}
2017-11-17 04:06:30 +00:00
Jakob Kummerow
b5997de8a9 [bigint] Fix accidental input modification in Divide
"AbsoluteDivSmall" had a shortcut path for abs(divisor) == 1 where
it would simply return the dividend as result. However, its caller
"Divide" was blissfully ignorant of this trick and would therefore
simply set the value's sign as needed, modifying the input.
This CL prevents that, while continuing to avoid the full division
algorithm for abs(divisor) == 1.

Bug: v8:6791
Change-Id: I04cdc93f5ed2a696587c35c754e68f07012dd1a9
Reviewed-on: https://chromium-review.googlesource.com/772332
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49433}
2017-11-17 01:50:50 +00:00
Michael Achenbach
7e9448edbc Revert "Remove no_custom_libcxx and update V8 DEPS."
This reverts commit b8092f4393.

Reason for revert: Seems to crash all tests on arm debug:
https://chromium-swarm.appspot.com/task?id=39df3b647e100a10&refresh=10&show_raw=1

Original change's description:
> Remove no_custom_libcxx and update V8 DEPS.
> 
> Rolling v8/build: 98bbbff..5698e23
> 
> Rolling v8/buildtools: 93a751e..9c40f80
> 
> Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/755a485..fd88dfb
> 
> Rolling v8/tools/clang: 4b58512..e70074d
> 
> R=​machenbach@chromium.org,hablich@chromium.org,sergiyb@chromium.org
> 
> Change-Id: I659fc77cdada9b96c42b9b7ea86766b47b6f8352
> Reviewed-on: https://chromium-review.googlesource.com/775320
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49428}

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

Change-Id: I9a6210bfdea9ad0d0a344a97bf0ce63d13e90288
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/775159
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49432}
2017-11-16 20:32:22 +00:00
Brad Nelson
d51f4c8268 [wasm] Adding public usage metric for WebAssembly.
BUG=v8:7068
R=kschimpf@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Iaf29d3696094722853fb67b29c697860752e256e
Reviewed-on: https://chromium-review.googlesource.com/763995
Commit-Queue: Eric Holk <eholk@chromium.org>
Reviewed-by: Eric Holk <eholk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49431}
2017-11-16 20:31:15 +00:00
Bill Budge
0df1471ac6 [Memory] Add base::OS::SetPermissions method.
- Adds SetPermissions method which returns bool result.
- Eliminates Guard, SetReadAndWritable, SetReadAndExecutable, and
  SetReadWriteAndExecutable methods.
- Adds some Fuchsia memory allocation implementation.
- Some minor fixes in usage of OS::AllocatePageSize and
  OS::CommitPageSize.
- Adds DCHECKs for sanitizing parameters to OS::Allocate/Free.

Bug: chromium:756050
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I966ec6f029dd0371d70eca20bae197d87956f8b5
Reviewed-on: https://chromium-review.googlesource.com/760657
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49430}
2017-11-16 20:09:12 +00:00
Tobias Tebbi
19ac10e58a Reland^6 "[turbofan] eagerly prune None types and deadness from the graph"
Reland of https://chromium-review.googlesource.com/c/v8/v8/+/727893
The crashes should be fixed by https://chromium-review.googlesource.com/c/v8/v8/+/763531

Original change's description:
> Revert "Reland^5 "[turbofan] eagerly prune None types and deadness from the graph""
> 
> This reverts commit ac0661b358.
> 
> Reason for revert: Clusterfuzz unhappy: chromium:783019 chromium:783035
> 
> Original change's description:
> > Reland^5 "[turbofan] eagerly prune None types and deadness from the graph"
> >
> > This gives up on earlier attempts to interpret DeadValue as a signal of
> > unreachable code. This does not work because free-floating dead value
> > nodes, and even pure branch nodes that use them, can get scheduled so
> > early that they get reachable. Instead, we now eagerly remove branches
> > that use DeadValue in DeadCodeElimination and replace DeadValue inputs
> > to value phi nodes with dummy values.
> >
> > Reland of https://chromium-review.googlesource.com/715716
> >
> > Bug: chromium:741225 chromium:776256
> > Change-Id: I251efd507c967d4a8882ad8fd2fd96c4185781fe
> > Reviewed-on: https://chromium-review.googlesource.com/727893
> > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> > Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#49188}
> 
> TBR=jarin@chromium.org,tebbi@chromium.org
> 
> Bug: chromium:741225 chromium:776256 chromium:783019 chromium:783035
> Change-Id: I6a8fa3a08ce2824a858ae01817688e63ed1f442e
> Reviewed-on: https://chromium-review.googlesource.com/758770
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49262}

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

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

Bug: chromium:741225 chromium:776256 chromium:783019 chromium:783035
Change-Id: I6c02b4beb02997ec34015ed2f6791a93c70f5e36
Reviewed-on: https://chromium-review.googlesource.com/772150
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49429}
2017-11-16 20:01:22 +00:00
Tom Anderson
b8092f4393 Remove no_custom_libcxx and update V8 DEPS.
Rolling v8/build: 98bbbff..5698e23

Rolling v8/buildtools: 93a751e..9c40f80

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/755a485..fd88dfb

Rolling v8/tools/clang: 4b58512..e70074d

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

Change-Id: I659fc77cdada9b96c42b9b7ea86766b47b6f8352
Reviewed-on: https://chromium-review.googlesource.com/775320
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49428}
2017-11-16 19:33:49 +00:00
Tobias Tebbi
82271defd6 [turbofan] fix typing and lowering of SpeculativeSafeInteger{Add,Subtract}
Bug: 
Change-Id: Ibd7c17b4ace25237c3d35466280aff27c44016f0
Reviewed-on: https://chromium-review.googlesource.com/774461
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49427}
2017-11-16 19:02:27 +00:00
Clemens Hammacher
6802775efc Reland "[wasm] Fix importing wasm-lazy-compile stubs"
This is a reland of 77b0baa649.

Original change's description:
> [wasm] Fix importing wasm-lazy-compile stubs
>
> If two modules use lazy compilation, and one imports a function of
> another, we are unwrapping the js-to-wasm wrapper of the export. This
> was failing so far, because during unwrapping we did not find the wasm
> code.
> This CL fixes this by also recognizing WasmCompileLazy stubs as "wasm
> code".
>
> R=ahaas@chromium.org
>
> Bug: chromium:779569, v8:5991
> Change-Id: If2260c3721e3746a7635b9d0182fd520df2fb773
> Reviewed-on: https://chromium-review.googlesource.com/771672
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49405}

Bug: chromium:779569, v8:5991
Change-Id: I4818e933467bd5a040f1514b8fc18db219a092c7
Reviewed-on: https://chromium-review.googlesource.com/774538
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49426}
2017-11-16 18:50:07 +00:00
Andreas Haas
82f5cbacb0 [wasm] Turn on async compilation
We extended the platform API so that it is now possible to post
foreground tasks from background tasks. This new platform API has been
implemented now in all platforms within V8, and in the gin platform in
chrome. The implementation in node.js is still missing. I don't think
there are any node.js tests which use async compilation for
WebAssembly. Therefore we could turn on async compilation again to get
canary coverage.

Bug:chromium:764313

R=titzer@chromium.org, bradnelson@chromium.org
CC=franzih@chromium.org

Change-Id: Ib7f17d84983ad73b936e1de691c18c2f7e06ca5e
Reviewed-on: https://chromium-review.googlesource.com/775338
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Brad Nelson <bradnelson@chromium.org>
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49425}
2017-11-16 18:33:17 +00:00
Andreas Haas
d9a91da635 [inspector] Dispose the isolate in the inspector tests
At the moment the inspector tests do not dispose the isolate. This is a
problem because the disposal of the isolate is used to stop the
execution of background tasks. The missing disposal of the isolate
caused flaky tests on the bots recently. With this CL the isolates of
the inspector tests get disposed.

The disposal of the isolate requires the following changes: 1) Store the
isolate in a unique_ptr so that it gets disposed when the isolate-data
gets disposed. It is necessary to use the unique_ptr so that the isolate
gets disposed after other members of isolate-data get disposed.  2)
Dispose all sessions. The reason is that the sessions require the
isolate to exist when they get disposed because they own handles.
Sessions, however, are stored in a static map, whereas the isolate is
stored indirectly in a local variable of the main function. Since local
variables get disposed before the static map is cleared, we have to
clear the map before the end of the main function.

R=kozyatinskiy@chromium.org

Change-Id: Icb33184de254638b6cdfb899e940f18e6064cd69
Reviewed-on: https://chromium-review.googlesource.com/774885
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49424}
2017-11-16 17:42:37 +00:00
Clemens Hammacher
1cec66d31b [Liftoff] Don't force unrelated stack slots into registers
When initializing the stack state at a merge point, don't force all
stack slots into registers. Allow constants to stay constants as long
as they are not part of the merge. Otherwise we might break assumptions
of outer blocks which then try to merge a register into a constant and
fail.
Also, add some documentation to {InitMergeStackSlot} to document the
intent of the implementation.

R=titzer@chromium.org

Bug: v8:784050, v8:6600
Change-Id: I3a4c83b446909027be075d3207cb7c748a6b1aad
Reviewed-on: https://chromium-review.googlesource.com/766353
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49423}
2017-11-16 17:34:17 +00:00
Ross McIlroy
72575d3c67 [Compile] Move stepping logic from compilation job to compiler dispatcher.
Now that UnoptimizedCompileJob only has three stages, move the logic for
stepping between these stages out of UnoptimizedCompileJob and back into
CompilerDispatcher.

BUG=v8:5203

Change-Id: I3bb776e14ef9da801dc9792e9e643b8026135060
Reviewed-on: https://chromium-review.googlesource.com/774743
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49422}
2017-11-16 17:20:07 +00:00
Leszek Swirski
024414d425 [cleanup] Make SFI::instance_class_name a String
Make the accessors of SharedFunctionInfo instance_class_name take and
return String rather than Object, since it's always a String anyway.

Change-Id: Ic5dacccf3835550e3533356fe7ded37ea107d720
Reviewed-on: https://chromium-review.googlesource.com/774882
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49421}
2017-11-16 17:00:28 +00:00
Martyn Capewell
4a509b3db8 [arm64] Align stack ops in the arm64 deoptimizer
Align the stack operations in the deoptimizer and take the opportunity to
factorise and improve the code generated for copying.

Bug: v8:6644
Change-Id: I854a975c371936bbf720d56e80dc0c9d68fe7c92
Reviewed-on: https://chromium-review.googlesource.com/763535
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Martyn Capewell <martyn.capewell@arm.com>
Cr-Commit-Position: refs/heads/master@{#49420}
2017-11-16 16:15:27 +00:00