Commit Graph

49694 Commits

Author SHA1 Message Date
Tobias Tebbi
cb588dfbfd [csa] disable release build FixedArray bounds checks by default
Not unexpectedly, always emitting bounds checks regressed performance quite
a bit. This CL disables release builds bounds checks for now, until we found
and disabled the performance critical bounds checks.

Bug: v8:8029
Change-Id: Ifab95b2baf88adc5443765e8c132f80ed2bb4aad
Reviewed-on: https://chromium-review.googlesource.com/1170768
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55052}
2018-08-10 13:45:54 +00:00
Michael Achenbach
18c90f4860 [test] Pass suite environment to Android test runner
TBR=sergiyb@chromium.org

Bug: v8:8046
Change-Id: I201f7a7ee119628e14c864602a2d3cbadfc4052b
Reviewed-on: https://chromium-review.googlesource.com/1170779
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55051}
2018-08-10 13:35:18 +00:00
Creddy
ec8700c418 [interpreter][runtime] Avoid AllocationSites for oneshot code
No need to create allocation site for literals in oneshot code since
they are executed only once. The interpreter emits a runtime call to
CreateObjectLiteralWithoutAllocationSite for creating literals in
oneshot code instead.

Change-Id: I224b3a30f10361cfe9ff63129b36da8230c5e403
Reviewed-on: https://chromium-review.googlesource.com/1163615
Commit-Queue: Chandan Reddy <chandanreddy@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55050}
2018-08-10 13:34:13 +00:00
Ivica Bogosavljevic
b321c95b10 MIPS64: Invalid register used in call to AreAliased
In Trunc_ul_d and Trunc_ul_s, register result is optional and
this is signaled by setting its value to invalid.
AreAliased expects that all registers are valid. For this reason
the compilation fails in snapshot generation mode.

This CL fixes the issue by calling AreAliased macro only
with valid registers.

Change-Id: Iae931447887b94e64b19b50c53e605656b8c3906
Reviewed-on: https://chromium-review.googlesource.com/1170766
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#55049}
2018-08-10 13:32:22 +00:00
Tobias Tebbi
aeb08efc24 [csa] add release-mode bounds checks for StoreFixedDoubleArrayElement
This is a follow-up to https://crrev.com/c/1166910

Bug: v8:8029
Change-Id: I2605f9b2a7b25c096da5a57c3c23b9b636213fff
Reviewed-on: https://chromium-review.googlesource.com/1169051
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55048}
2018-08-10 13:03:12 +00:00
Michael Achenbach
a4355b77b3 [test] Add files not pushed for test on Android
TBR=neis@chromium.org
NOTRY=true

Bug: v8:8047
Change-Id: I6d59cd9137f56a5061d836afb02b33f7b25d4aa0
Reviewed-on: https://chromium-review.googlesource.com/1170772
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55047}
2018-08-10 12:39:35 +00:00
Rodrigo Bruno
3a5751dcd4 [test-heap] fixed test that was not allowing gc to collect an object
Bug: chromium:845409
Change-Id: I865826c0e8927aea264a4f9177380ec3bb8aee4f
Reviewed-on: https://chromium-review.googlesource.com/1170764
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
Cr-Commit-Position: refs/heads/master@{#55046}
2018-08-10 12:20:45 +00:00
Rodrigo Bruno
d077c1fa7e [test-heap] fixed test to avoid internal call that will be removed
Bug: chromium:845409
Change-Id: I73a5db1c09e0adb3eab0ee0bdf675edbdea6c6e7
Reviewed-on: https://chromium-review.googlesource.com/1170762
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
Cr-Commit-Position: refs/heads/master@{#55045}
2018-08-10 12:12:07 +00:00
Sigurd Schneider
e3aab0fbc7 Revert "Reland "[wasm] Publish new code from the background threads.""
This reverts commit 38584fd47e.

Reason for revert: failures on Mac64

https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Mac64/23574

Original change's description:
> Reland "[wasm] Publish new code from the background threads."
> 
> This is a reland of f991465b42
> 
> Original change's description:
> > [wasm] Publish new code from the background threads.
> > 
> > R=clemensh@chromium.org
> > BUG=v8:7921
> > 
> > Change-Id: Ib86cb5f742907b6e54365827facfc765867ca22e
> > Reviewed-on: https://chromium-review.googlesource.com/1156384
> > Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> > Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#54985}
> 
> Bug: v8:7921
> Change-Id: I08c5eb689fe4f8ef2f7b576f0145eb0ae617fd9d
> Reviewed-on: https://chromium-review.googlesource.com/1170603
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55042}

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

Change-Id: Ia7526f97fc7bd9d8c0627c958647fe6137eb98ab
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7921
Reviewed-on: https://chromium-review.googlesource.com/1170802
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55044}
2018-08-10 12:03:38 +00:00
Tobias Tebbi
96ae2856bf Revert "[csa] CSA type checks: allow the empty FixedArray to be CAST() to FixedDoubleArray"
This reverts commit 60d1277f66.

Reason for revert:  This is not sound as long as cast<FixedDoubleArray>() doesn't do the same.

Original change's description:
> [csa] CSA type checks: allow the empty FixedArray to be CAST() to FixedDoubleArray
> 
> This should allow to re-land https://crrev.com/c/1039190
> 
> Bug: chromium:871886
> 
> Change-Id: If815537410b3fa09902026dc26205421f5c36ae5
> Reviewed-on: https://chromium-review.googlesource.com/1169019
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55015}

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

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

Bug: chromium:871886
Change-Id: Ib81f3a069776f9e1aa01d16b9d4979de7c56fcde
Reviewed-on: https://chromium-review.googlesource.com/1170742
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55043}
2018-08-10 11:46:26 +00:00
Michael Starzinger
38584fd47e Reland "[wasm] Publish new code from the background threads."
This is a reland of f991465b42

Original change's description:
> [wasm] Publish new code from the background threads.
> 
> R=clemensh@chromium.org
> BUG=v8:7921
> 
> Change-Id: Ib86cb5f742907b6e54365827facfc765867ca22e
> Reviewed-on: https://chromium-review.googlesource.com/1156384
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54985}

Bug: v8:7921
Change-Id: I08c5eb689fe4f8ef2f7b576f0145eb0ae617fd9d
Reviewed-on: https://chromium-review.googlesource.com/1170603
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55042}
2018-08-10 11:37:11 +00:00
Michael Achenbach
4c0943424c [test] Add logic to run tests on Android
This adds a new command abstraction for running commands on Android
using dockered devices on swarming.

The new abstraction handles pushing all required files to the device.
The logic used for pushing and running is reused from the perf runner.

This adds only the mjsunit test suite. Others will be handled in
follow up CLs. The suite logic is enhanced with auto-detection of files
to be pushed to devices, for e.g. load or import statements.

Some test cases need an extra resource section for specifying required
files.

Remaining failing tests are marked in the status files for later
triage.

Bug: chromium:866862
Change-Id: I2b957559f07fdcd8c1bd2f7034f5ba7754a31fb7
Reviewed-on: https://chromium-review.googlesource.com/1150153
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55041}
2018-08-10 10:11:53 +00:00
Toon Verwaest
a2bd649f2e Reland "[scanner] Simplify TemplateSpan raw literal character handling"
This is a reland of c1226cea1ec11d5b766226c912c475647a731274

Original change's description:
> [scanner] Simplify TemplateSpan raw literal character handling
> 
> Instead of adding and removing literal chars, only add raw literal characters when we have to and never remove them.
> 
> Change-Id: Ib604c8c9fb69a96708eec3a03de102e0668c01d7
> Reviewed-on: https://chromium-review.googlesource.com/1167505
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Reviewed-by: Caitlin Potter <caitp@igalia.com>
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>

Change-Id: Ia15501d75c3beaf336e90a80e0abb738f696ef9e
Reviewed-on: https://chromium-review.googlesource.com/1170604
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55040}
2018-08-10 09:48:20 +00:00
Simon Zünd
1413f07bfd [csa] Add ToObject_Inline macro
This CL adds a ToObject_Inline CSA macro that avoids the "ToObject"
builtin call if the passed argument is already a JSReceiver.

The CL also replaces all occurences of ToObject in Torque code with
ToObject_Inline.

R=jgruber@chromium.org

Change-Id: I1cd66d5d51dde5a93d9a0c55489b13a6f4ba9dc2
Reviewed-on: https://chromium-review.googlesource.com/1169819
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55039}
2018-08-10 09:24:27 +00:00
Bret Sepulveda
f642de00bf Escape backslashes when logging.
Log::MessageBuilder was already escaping most unsafe characters when
they were being logged, but plain backslashes were not. Merely updating
the existing escaping path was not sufficient, as recursion would cause
escape codes to be doubly escaped. This patches refactors the API to
ensure incoming text is escaped exactly once.

Bug: v8:8039
Change-Id: Id48aabf29fb6153189ae4a1ad7dfaaf4b41b62ad
Reviewed-on: https://chromium-review.googlesource.com/1169049
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Bret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55038}
2018-08-10 09:09:19 +00:00
Michael Starzinger
2392fd87b0 [wasm] Avoid internal implicit receivers for API functions.
This assigns dummy instance templates to all WebAssembly API functions
used as constructors. It hence avoids implicit receivers from having the
internal instance types. These objects would never be fully initialized
and causes heap iterations to stumble over these objects.

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

Change-Id: I3c81d8dc3ae4a38e650b390a04170585cb31ec77
Reviewed-on: https://chromium-review.googlesource.com/1170685
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55037}
2018-08-10 09:03:53 +00:00
Simon Zünd
f4ca3fc56e [array] Prepare Array.p.shift for removal of the JavaScript fall-back
This CL changes the ArrayPrototypeShift builtin to a CSA macro which
is used in a newly created Torque builtin.

This is in preparation for removing the JavaScript fall-back, which
will be replaced by a baseline Torque implementation.

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

Bug: v8:7624
Change-Id: I9b7898beea2802cc02d394e040a1e500387cf108
Reviewed-on: https://chromium-review.googlesource.com/1169172
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#55036}
2018-08-10 09:02:52 +00:00
Michael Lippautz
1536ef9052 Remove bogus DCHECKs for API objects
Objects created through the API may be of different types then JS_API_* and
WASM types. E.g. a JsGlobalProxy may be created through an ObjectTemplate.

Bug: v8:8022
Change-Id: I393353cc89c82258d7ad3ba460b5bbd94af33090
Reviewed-on: https://chromium-review.googlesource.com/1169021
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55035}
2018-08-10 08:28:26 +00:00
Michael Starzinger
e7070c2fab [wasm] Fix race in code lookup for exception locations.
R=clemensh@chromium.org
BUG=v8:7424

Change-Id: Ifa7029872c4d5cfda2f2411534abad6970dda323
Reviewed-on: https://chromium-review.googlesource.com/1156549
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55034}
2018-08-10 08:27:21 +00:00
Simon Zünd
aa87ae475f [cleanup] Replace 'let' with 'const' in array-foreach.tq
This CL replaces 'let' with 'const' where applicable. This will
generate TNodes instead of TVARIABLEs in the resulting CSA code.

R=jgruber@chromium.org

Bug: v8:8015
Change-Id: I806702c1bfa141e4c934a83c34dd49c321e18ce7
Reviewed-on: https://chromium-review.googlesource.com/1169811
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#55033}
2018-08-10 07:48:36 +00:00
Clemens Hammacher
17d9c1a393 [Liftoff] Make ChangeEndianness* methods private to mips
Most platforms do not need these methods. Thus, make them private to
the mips headers.

R=titzer@chromium.org

Bug: v8:6600
Change-Id: I3fb1a2a3fd9a53dfc55b45763c150911db43b537
Reviewed-on: https://chromium-review.googlesource.com/1169203
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55032}
2018-08-10 07:47:16 +00:00
Simon Zünd
27040f9729 [cleanup] Replace runtime call with stub call in Torque code
This CL replaces Delete/SetProperty runtime calls with calls to their
stub version. The stubs will bail to the runtime themselves if they
can't perform the action.

R=jgruber@chromium.org

Bug: v8:8015
Change-Id: I1f141296ee074e028c27a3682e2eb46d9f74c0d9
Reviewed-on: https://chromium-review.googlesource.com/1169810
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#55031}
2018-08-10 07:38:43 +00:00
v8-ci-autoroll-builder
7495925011 Update V8 DEPS.
Rolling v8/build: 1f2ff68..f5a5b7b

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/8fa35d1..bca7d20

Rolling v8/third_party/depot_tools: dd5051f..15a5a77

Rolling v8/tools/clang: 7302dfb..d299f06

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

Change-Id: Icb8dba9717a64abe8faa2c8e2557587937fce5af
Reviewed-on: https://chromium-review.googlesource.com/1170399
Commit-Queue: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Reviewed-by: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#55030}
2018-08-10 04:03:55 +00:00
Alexey Kozyatinskiy
dbfcc4878a [inspector] added V8InspectorClient::resourceNameToUrl
Some clients (see Node.js) use platform path as ScriptOrigin.
Reporting platform path in protocol makes using protocol much harder.
This CL introduced V8InspectorClient::resourceNameToUrl method that
is called for any reported using protocol url.
V8Inspector uses url internally as well so protocol client may generate
pattern for blackboxing with file urls only and does not need to build
complicated regexp that covers files urls and platform paths on
different platforms.

R=lushnikov@chromium.org
TBR=yangguo@chromium.org

Bug: none
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Iff302e7441df922fa5d689fe510f5a9bfd470b9b
Reviewed-on: https://chromium-review.googlesource.com/1164624
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55029}
2018-08-09 21:36:24 +00:00
John Barboza
e7fad930a8 Use gn from PATH on aix
Change-Id: I853f7899dbba9112ba1ca2ce78e2838b5a09c975
Reviewed-on: https://chromium-review.googlesource.com/1168087
Commit-Queue: John Barboza <jbarboza@ca.ibm.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55028}
2018-08-09 21:01:15 +00:00
Deepti Gandluri
145dd87b90 Add I64Atomic Load/Store ops for ia32
Bug: v8:6532
Change-Id: I6391c3d5e86d2b04735e241a1e0549a170ab4852
Reviewed-on: https://chromium-review.googlesource.com/1164640
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55027}
2018-08-09 19:47:30 +00:00
Junliang Yan
195f2f2a94 s390: [wasm] Support 4GiB memories in Liftoff
Port 352e408b0e

Original Commit Message:

    Add codegen support for up to 4GiB memories in Liftoff code.

    This CL also adds three new mjsunit tests that stress large WASM
    memories (1, 2, and 4 GiB) and checks that accesses near these
    boundaries properly generate traps.

    Note there is still some trickiness around the setting of:
      1.) the flag --wasm-max-mem-pages
      2.) wasm-limits.h kSpecMaxWasmMemoryPages = 65536
      3.) wasm-limits.h kV8MaxWasmMemoryPages = 32767

    In particular, the allocation of memories is still limited to
    3.) and the runtime flag can only lower this limit.

    The above means that the tests for 2GiB and 4GiB memories will silently
    OOM by design until 3.) is changed (though they currently pass with
    manual testing). I argue it is better to include these tests up front,
    since they will immediately trigger if their memory allocation succeeds.

    Therefore the plan is to lift the restriction on 3.) after removing
    all other other internal V8 limitations including array buffers and views.

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

Change-Id: Ice70a9ac5a9a26b08cc77acb7deec98305574d01
Reviewed-on: https://chromium-review.googlesource.com/1167914
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55026}
2018-08-09 19:23:33 +00:00
Simon Zünd
e66824ebc4 [cleanup] Re-order parameters for HasProperty
This CL changes the order of the parameters of HasProperty to be
more consistent with other CSA macros.

Drive-by-change: Use HasProperty stub directly in Torque.

R=jgruber@chromium.org

Bug: v8:8015
Change-Id: I73d1096afbb86d52e2af67c1969549f1158448a7
Reviewed-on: https://chromium-review.googlesource.com/1166831
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55025}
2018-08-09 19:18:24 +00:00
Michael Achenbach
46507be7f8 Whitespace change to trigger bots
NOTRY=true
NOTREECHECKS=true
TBR=santa

Change-Id: I1f14da5476fdf6b52f62c5259ff36cdfe24105e3
Reviewed-on: https://chromium-review.googlesource.com/1169802
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55024}
2018-08-09 19:15:09 +00:00
Michael Starzinger
46a49fdfab [asm.js] Split large asm.js test into parts.
R=sigurds@chromium.org
TEST=mjsunit/wasm/asm-wasm
BUG=v8:8038

NOTREECHECKS=true

Change-Id: Id12226116aae1b12c8cc948b28097c1dc126f17c
Reviewed-on: https://chromium-review.googlesource.com/1169046
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55023}
2018-08-09 14:02:04 +00:00
jgruber
3c1f40de25 [builtins] Fix argument order inconsistency in HasProperty
The HasProperty builtin differed in its expected argument order from
the HasProperty runtime function. Like all other related spec
primitives (e.g.: GetProperty, SetProperty, DeleteProperty), it should
take {object} as the first argument and {key} as the second.

This CL changes the builtin and all related spots to use the correct
order.

There was also a tricky bug in interpreter intrinsic rewriting, which
assumes (but does not verify) that the argument order between runtime
function and builtin is identical. Besides cctests, HasProperty
intrinsic rewriting seems to be dead code.

Bug: v8:8036
Change-Id: Ia669fd6f5c73a30df4e4607064603be759ced392
Reviewed-on: https://chromium-review.googlesource.com/1167297
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55022}
2018-08-09 12:30:27 +00:00
Ulan Degenbaev
27aecd5c54 Avoid excessive GCs triggered by AdjustAmountOfExternalMemory
When the memory pressure level is critical and there are managed objects
that call AdjustAmountOfExternalMemory in their finalizer, we trigger
GC for each dying managed object. See the test for an example.

This fixes the bug by clearing the memory pressure level before GC.

Bug: v8:8014
Change-Id: Id5144430a52fb8545aa23f33229a11b1714cbf10
Reviewed-on: https://chromium-review.googlesource.com/1169011
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55021}
2018-08-09 12:10:21 +00:00
Marja Hölttä
d4070531dc [in-place weak refs] Remove DeoptimizationData::WeakCellCache
It's now unused.

BUG=v8:7308

Change-Id: I301b83fde1d941d5d535922a1174d017186b82ce
Reviewed-on: https://chromium-review.googlesource.com/1169017
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55020}
2018-08-09 12:02:52 +00:00
Marja Hölttä
e8f5d29d70 [in-place weak refs] Use in-place weak refs in Context::map_cache
BUG=v8:7308

Change-Id: I940ed715949307abb831d47c197b7e75ed5b0fca
Reviewed-on: https://chromium-review.googlesource.com/1169047
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55019}
2018-08-09 11:41:42 +00:00
Ben L. Titzer
6aa2a25313 [wasm] Add WasmFeatures to enable/detect features
This CL introduces a set of configuration options implemented as
a struct of booleans that together comprise the set of enabled
or detected features. The configuration options replace command-line
flags that were checked deep in the implementation. As such, it is
necessary to plumb them through multiple levels of abstraction.

R=ahaas@chromium.org
CC=mstarzinger@chromium.org
BUG=chromium:868844

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I1b82f5826e4fd263f68e8cafcd923bac5818a637
Reviewed-on: https://chromium-review.googlesource.com/1163670
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55018}
2018-08-09 10:58:22 +00:00
Creddy
3b2b858f11 Reland "[Interpreter] Do not use IC slots for property load/stores in an IIFE and top-level code"
This is a reland of 690bda84eb

Original change's description:
> [Interpreter] Do not use IC slots for property load/stores in an IIFE and top-level code
> 
> An IIFE or top-level code is executed only once hence, there is no need to collect
> type feedback. We can save some memory by not using IC slots for property Loads/Stores
> within a IIFE/top-level code. This CL emits Runtime Get/Set property calls instead of LdaNamedProperty
> /StaNamedProperty for the property loads within a IIFE and top-level code.
> 
> Change-Id: I3e0ce26d05d82bb3648cb9262c4e112a2c4556c9
> Reviewed-on: https://chromium-review.googlesource.com/1146579
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Chandan Reddy <chandanreddy@google.com>
> Cr-Commit-Position: refs/heads/master@{#54949}

Change-Id: I7b07ce86f7236d82191caaceafd31b86e5863ff5
Reviewed-on: https://chromium-review.googlesource.com/1167802
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Chandan Reddy <chandanreddy@google.com>
Cr-Commit-Position: refs/heads/master@{#55017}
2018-08-09 10:47:38 +00:00
Michael Starzinger
538bd6c709 [wasm][arm64] Extend jump table stress test to ARM64.
R=clemensh@chromium.org
TEST=test-jump-table-assembler/JumpTablePatchingStress
BUG=v8:8018

Change-Id: I1bb4c52a912a7c7ec7fbaf19c79cb7c7dd00a13e
Reviewed-on: https://chromium-review.googlesource.com/1167283
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55016}
2018-08-09 10:37:58 +00:00
Tobias Tebbi
60d1277f66 [csa] CSA type checks: allow the empty FixedArray to be CAST() to FixedDoubleArray
This should allow to re-land https://crrev.com/c/1039190

Bug: chromium:871886

Change-Id: If815537410b3fa09902026dc26205421f5c36ae5
Reviewed-on: https://chromium-review.googlesource.com/1169019
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55015}
2018-08-09 10:36:53 +00:00
Tobias Tebbi
eb5cfbe086 [csa] runtime bounds-checks on FixedArray indexed access
Bug: v8:8029

Change-Id: I5d5575a74af49236ff55a39c6a6805472bd63609
Reviewed-on: https://chromium-review.googlesource.com/1166910
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55014}
2018-08-09 10:32:07 +00:00
Marja Hölttä
e06ef53fb5 [in-place weak refs] Migrate PrototypeInfo::weak_cell.
Currently it was only used for modules, so repurposed it to be a weak pointer to
JSModuleNamespace.

BUG=v8:7308

Change-Id: I4ef522fafebd37624c309081d7432501c2c69b7a
Reviewed-on: https://chromium-review.googlesource.com/1163704
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55013}
2018-08-09 10:31:01 +00:00
Ivica Bogosavljevic
84daf4a692 MIPS[64]: Fix wrong operand call in SIMD S8x16Concat operator
TEST=cctest/test-run-wasm-simd/RunWasm_S8x16Concat_turbofan

Change-Id: Ifcc14b57d65d15e5ae8477a05746027356bac547
Reviewed-on: https://chromium-review.googlesource.com/1166909
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#55012}
2018-08-09 10:09:25 +00:00
Andreas Haas
5012e883dd [api] Add API callback setter for the wasm thread origin trial
With the callback we can check if the origin trial is turned on for a
given context.

I will not land the other CL which added a flag to the isolate. The
information if the origin trial is on is context-specific and not
isolate-specific, and it's hard on the embedder side to track all
creations of a context.

With the API proposed in this CL we will ask the embedder every time we
start compilation whether the origin trial is on or off.

R=yangguo@chromium.org

Bug:868844

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I8822f40ab12582a5b0bd6640790a269107fc085a
Reviewed-on: https://chromium-review.googlesource.com/1163621
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55011}
2018-08-09 10:05:19 +00:00
Tobias Tebbi
5b74a7ee63 [csa] avoid FixedDoubleArray CAST on empty FixedArray
Bug: chromium:871886
Change-Id: I91c6099ebaa064575db1ee3d7354e02cd42bbfd2
Reviewed-on: https://chromium-review.googlesource.com/1166906
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55010}
2018-08-09 10:00:25 +00:00
Georg Neis
ad57762948 [ast] Make AstPrinter print a block's labels.
Also make printing of an incomplete AST more robust.

Change-Id: I56636890deb6e38882a3f8206aff7cde3e4bab60
Reviewed-on: https://chromium-review.googlesource.com/1168498
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55009}
2018-08-09 09:51:13 +00:00
Kanghua Yu
a6e0a0b74c [csa] Introduce CodeAssembler::Branch(condition, true_body, false_body)
Benefit from constant folding, this CL reduce snapshot by 704 bytes
for {Call,Construct}WithArrayLike builtins.

R=tebbi@chromium.org

Change-Id: I34f055c9b46039698150f560644459aa492cde9e
Reviewed-on: https://chromium-review.googlesource.com/1168739
Commit-Queue: Kanghua Yu <kanghua.yu@intel.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55008}
2018-08-09 09:36:20 +00:00
Clemens Hammacher
70f2bd0d14 [cleanup] Make {AreAliased} generic and variadic
This allows to have only one version of {AreAliased} which has a
clean implementation.

R=mstarzinger@chromium.org

Bug: v8:8015
Change-Id: I25c64a8c2077383129548773319799fac768521e
Reviewed-on: https://chromium-review.googlesource.com/1167290
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55007}
2018-08-09 09:07:40 +00:00
Rodrigo Bruno
ecf51e3477 [heap] refactoring HeapController.
The HeapController is now refactored in a way that new controllers only
need to specify the constants that define how a space grows and shrinks.

Bug: chromium:845409
Change-Id: I804eed440a791d6fbd232b7540a1cbe66b16a5f1
Reviewed-on: https://chromium-review.googlesource.com/1165347
Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55006}
2018-08-09 09:04:26 +00:00
Simon Zünd
ac66ba625f Implement SetProperty stub
This CL adds a SetProperty method to the KeyedStoreGenericGenerator
that mirrors what "KeyedStoreGeneric" does (used for
KeyedStoreIC_MegaMorphic). This new SetProperty method is then used
in the SetProperty stub.

Change-Id: I72a684238ef6c3b8c4db8ba957d5b79238f7e495
Reviewed-on: https://chromium-review.googlesource.com/1164945
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55005}
2018-08-09 09:03:20 +00:00
jgruber
b0fc9db503 [builtins] Remove duplicate elements store
Elements is already set by CSA::AllocateJSArray.

Bug: v8:7871
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I89b87f9f33eca4a92216f248606fb746f0de5412
Reviewed-on: https://chromium-review.googlesource.com/1168487
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55004}
2018-08-09 08:56:05 +00:00
Simon Zünd
5a3893958a [array] Move Array.p.sort to Torque and use TimSort instead of QuickSort
This CL changes the sorting algorithm used in Array.p.sort from
QuickSort to TimSort (implemented in Torque).

Detailed performance results can be found here: https://goo.gl/4E733J

To save on code space, fast-paths are implemented as sets of
function pointers instead of specializing generics.

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

Bug: v8:7382, v8:7624
Change-Id: I7cd4287e4562d84ab7c79c58ae30780630f976de
Reviewed-on: https://chromium-review.googlesource.com/1151199
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55003}
2018-08-09 08:45:39 +00:00