Commit Graph

47143 Commits

Author SHA1 Message Date
Junliang Yan
3539c22d63 [turbofan] fix LowerStringFromSingleCodePoint on big-endian
R=jarin@chromium.org, mstarzinger@chromium.org
Bug=v8:7651

Change-Id: I4007c6de83806c2aad8fc105331986bfcf709033
Reviewed-on: https://chromium-review.googlesource.com/1012460
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52651}
2018-04-17 17:24:54 +00:00
Jakob Kummerow
622f9fe202 Fix interpreted regexp build after r52601
One more place behind a non-default build flag that needs updating
after the recent Address typedef change.

Change-Id: Ica5022966e7773c621624d1cd5c20296c52c0b39
Reviewed-on: https://chromium-review.googlesource.com/1014320
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52650}
2018-04-17 17:20:34 +00:00
Andreas Haas
a0d944ae66 [Refactoring] Remove {external_reference_redirector} from the isolate
In a recent CL (https://crrev.com/c/1012039) I removed the only valid
use case of {external_reference_redirector}. In this CL I remove the
remaining uses, which are more or less checks if there is a simulator
or not.


R=​mstarzinger@chromium.org

Change-Id: I96203b7b112d57bb3feb9d6863b036747b1963f0
Reviewed-on: https://chromium-review.googlesource.com/1014126
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52649}
2018-04-17 16:28:54 +00:00
Andreas Haas
013cf15dbf [Refactoring] Make external references more independent of the isolate
With this CL we do the redirection of ExternalReferences for simulators
independent of the isolate but instead use the redirector provided by
the simulator directly. Thereby we make the code independent of the
isolate.

I plan to remove the redirector from the isolate in a separate CL.

R=mstarzinger@chromium.org

Change-Id: I2ae0b2184da214cf7606fabeabc9bec35bf0616e
Reviewed-on: https://chromium-review.googlesource.com/1012039
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52648}
2018-04-17 16:16:52 +00:00
sreten.kovacevic
0cd4b3d69d [mips] Fix Float32Neg and Float64Neg tests on target
These tests fail since instructions were implemented in Liftoff.
Problem was with NaN cases, where additional job has to be done on
MIPS r2, r1 and Longsoon.

Change-Id: Id02462aa08e79b03d66b5083b81f19dc1c88cc3e
Reviewed-on: https://chromium-review.googlesource.com/1015001
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#52647}
2018-04-17 14:35:49 +00:00
Sathya Gunasekaran
eb4ebf98c9 [class] Initialize class fields after binding this
Class fields needs to be initialized after `this` is bound, as per the
new spec change:
https://github.com/tc39/proposal-class-fields/pull/92

This CL moves the initialization of `this` from parser desugaring to
the bytecode generator.

Bug: v8:7647
Change-Id: I20f749403e5a4d2f06a39726cf39012ceb541987
Reviewed-on: https://chromium-review.googlesource.com/1014383
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52646}
2018-04-17 13:40:39 +00:00
Georg Neis
a0a4c71e3f Remove bootstrapper's kMaxSafeInt in favour of global's kMaxSafeInteger.
R=bmeurer@chromium.org

Change-Id: I06b889333fe6481d4704138031ce6de0fcf70a4c
Reviewed-on: https://chromium-review.googlesource.com/1013715
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52645}
2018-04-17 13:35:48 +00:00
Georg Neis
92cde630df Check length in Array.prototype.concat.
Throw a TypeError if the length of a concat-spreadable object makes the
total length too large, as specified.

Bug: v8:7652
Change-Id: Ie3f694d64c949703edd733c0310cfb3f64b78a15
Reviewed-on: https://chromium-review.googlesource.com/1013714
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52644}
2018-04-17 13:04:18 +00:00
Yang Guo
c3da929020 Simplify Utf8Length calculation.
Flattening the string upfront has performance benefits and we can
also simplify the implementation quite a bit.

Bug: v8:6780
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ic75bdfdf900d30e51e95cdf1cb8d09aab06332c6
Reviewed-on: https://chromium-review.googlesource.com/1014102
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52643}
2018-04-17 11:41:25 +00:00
sreten.kovacevic
fbf9b5e4ff [mips] Cleanup: Refactor AddPair and SubPair, implement MulPair
Refactor AddPair and SubPair Macro-assembler instructions to
prevent register overwriting, refactor all the places where
these instructions are used. Also, implement MulPair instruction.

Change-Id: I3f8f9d5fe6fa5bf25df3446614ac311cf886b6ac
Reviewed-on: https://chromium-review.googlesource.com/1013571
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Commit-Queue: Sreten Kovacevic <sreten.kovacevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#52642}
2018-04-17 10:07:15 +00:00
Sigurd Schneider
b70dd880f2 Reland "[turbofan] Enable Promise constructor inlining by default"
This is a reland of 370d95dc36

Original change's description:
> [turbofan] Enable Promise constructor inlining by default
> 
> Bug: v8:7584
> Change-Id: I7443c28c74676ee1f27550674c8f712594e21cc7
> Reviewed-on: https://chromium-review.googlesource.com/992314
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52341}

Bug: v8:7584
Change-Id: Ie33b89bf8bb7abde426d477a8b39914e6d90e5b6
Reviewed-on: https://chromium-review.googlesource.com/1009862
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52641}
2018-04-17 09:35:44 +00:00
jgruber
c5945ca208 Update v8heapconst.py
TBR=yangguo@chromium.org

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6666
Change-Id: I051dd5a1578d2e611f4b6351aa9cff9451494a5c
Reviewed-on: https://chromium-review.googlesource.com/1013711
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52640}
2018-04-17 09:34:25 +00:00
Sergiy Byelozyorov
39efec9df8 [tools] Remove MB configs for old clusterfuzz builder names
R=machenbach@chromium.org

No-Try: true
Bug: chromium:793687
Change-Id: I6d2988a0a2644de806e7b273ed5ff9213fceda5d
Reviewed-on: https://chromium-review.googlesource.com/1013708
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52639}
2018-04-17 08:55:05 +00:00
Dan Elphick
6c68efac14 Reland "[heap] Move initial objects into RO_SPACE"
This is a reland of f8ae62fe14

Original change's description:
> [heap] Move initial objects into RO_SPACE
> 
> This moves:
> * the main oddballs (null, undefined, hole, true, false) as well as
> their supporting maps (also adds hole as an internalized string to make
> this work).
> * most of the internalized strings
> * the struct maps
> * empty array
> * empty enum cache
> * the contents of the initial string table
> * the weak_cell_cache for any map in RO_SPACE (and eagerly creates the
> value avoid writing to it during run-time)
> 
> The StartupSerializer stats change as follows:
> 
>      RO_SPACE  NEW_SPACE  OLD_SPACE  CODE_SPACE  MAP_SPACE  LO_SPACE
> old         0          0     270264       32608      12144         0
> new     21776          0     253168       32608       8184         0
> Overall memory usage has increased by 720 bytes due to the eager
> initialization of the Map weak cell caches.
> 
> Also extends --serialization-statistics to print out separate instance
> type stats for objects in RO_SPACE as shown here:
> 
>   Read Only Instance types (count and bytes):
>        404      16736  ONE_BYTE_INTERNALIZED_STRING_TYPE
>          2         32  HEAP_NUMBER_TYPE
>          5        240  ODDBALL_TYPE
>         45       3960  MAP_TYPE
>          1         16  BYTE_ARRAY_TYPE
>          1         24  TUPLE2_TYPE
>          1         16  FIXED_ARRAY_TYPE
>          1         32  DESCRIPTOR_ARRAY_TYPE
>         45        720  WEAK_CELL_TYPE
> 
> Bug: v8:7464
> Change-Id: I12981c39c82a7057f68bbbe03f89fb57b0b4c6a6
> Reviewed-on: https://chromium-review.googlesource.com/973722
> Commit-Queue: Dan Elphick <delphick@chromium.org>
> Reviewed-by: Hannes Payer <hpayer@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52435}

Bug: v8:7464
Change-Id: I50427edfeb53ca80ec4cf46566368fb2213ccf7b
Reviewed-on: https://chromium-review.googlesource.com/999654
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52638}
2018-04-17 08:28:53 +00:00
jgruber
c7e6cf7e6d [builtins] Re-enable embedded builtins
Re-enable embedded builtins now that 67 has branched.

This reverts two CLs:

Disable embedded builtins for M67 branch point
https://chromium-review.googlesource.com/c/v8/v8/+/982053

Enable embedded builtins on two bots
https://chromium-review.googlesource.com/c/v8/v8/+/983597

And partially:

Mark embedded builtins builds as non-shipping
https://chromium-review.googlesource.com/1005515

Bug: v8:6666
Change-Id: I8e12e99bd1ec6567baf25545147337b6a0127e2a
Reviewed-on: https://chromium-review.googlesource.com/1013570
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Hablich <hablich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52637}
2018-04-17 08:27:48 +00:00
Dan Elphick
7d291c7286 [heap] Add a read-only permission
Add a new permission kRead to PageAllocator::Permission and
OS::MemoryPermission and implement it in platform-*.

Not used yet, because it needs corresponding changes in chromium.

Bug: v8:7464
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I9f84251eff593536cbcc1cde04641d696c79d65c
Reviewed-on: https://chromium-review.googlesource.com/1006756
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52636}
2018-04-17 08:26:43 +00:00
Sergiy Byelozyorov
04d883cc91 [tools] Duplicate clusterfuzz MB configs to prepare builder renaming
R=machenbach@chromium.org

No-Try: true
Bug: chromium:793687
Change-Id: If4f125a0c1a2b818cdcc61200b14b73f56f65507
Reviewed-on: https://chromium-review.googlesource.com/1013523
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52635}
2018-04-17 07:53:52 +00:00
Clemens Hammacher
2baad44f01 [x64] Move float-to-uint64 conversions to TurboAssembler
Consolidate nearly identical implementations and move them to
TurboAssembler, such that they can be reused for Liftoff.

R=neis@chromium.org

Bug: v8:6600
Change-Id: I197445404df033ac1a05f4aa88501263ae4b75f3
Reviewed-on: https://chromium-review.googlesource.com/1013561
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52634}
2018-04-17 07:36:22 +00:00
Clemens Hammacher
e3e0f1173f Statically initialize ExternalReference constants
Make values which are referenced via ExternalReference constexpr, and
initialize them statically. This avoids dynamic initialization and
protects them against being overwritten from generated code.

R=neis@chromium.org

Bug: v8:7570
Change-Id: I1c6c10fbffea12dc1f5bf726313bf8388e6530a1
Reviewed-on: https://chromium-review.googlesource.com/1013518
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52633}
2018-04-17 06:56:42 +00:00
Jakob Kummerow
55110038a1 [bigint] API: Implement missing Big{Int,Uint}64Array::Cast
This doesn't change the API, it just makes it functional: the
functions were declared already, but they lacked an implementation
so far. Trying to use them in Blink detects that issue.

Bug: v8:6791
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I48902a5bba4a42f2922eafd22858d584731fc777
Reviewed-on: https://chromium-review.googlesource.com/1014668
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52632}
2018-04-17 03:19:02 +00:00
Jakob Kummerow
f7d6b19f6c [ubsan] Fix many static_cast<int32_t> with undefined behavior
Casting from a floating-point type to an integer type is undefined behavior
if the integral part of the float cannot be represented in the range of the
int.

Bug: v8:3770, chromium:831145
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I2e85ea8b0f09bbeeb3e0dcc1135fc747fa312f6d
Reviewed-on: https://chromium-review.googlesource.com/1011651
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52631}
2018-04-17 02:02:18 +00:00
Camillo Bruni
7bb79b96bd [keys] Don't keep chain of OrderedHashSets in KeyAccumulator
Bug: chromium:831984
Change-Id: Ie13b22bc2491acc255557ba0325d8d53c22d6acb
Reviewed-on: https://chromium-review.googlesource.com/1012874
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52630}
2018-04-16 21:07:06 +00:00
Ben L. Titzer
c536ea2dba [wasm] Remove temporary table immutability workaround
Now that tables and stack frames properly root instances, there is no
longer any need to disallow mutations that could unroot instances
while their code is on the stack.

Bug: v8:7232
Change-Id: I907b9522ac12ad7a67fb4124774713b6b3b40bb7
Reviewed-on: https://chromium-review.googlesource.com/1007004
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52629}
2018-04-16 18:39:33 +00:00
Michael Starzinger
73aa563316 [wasm] Remove support to serialize code stubs.
This removes the support to serialize copies of {CodeStub} codes during
native module serialization. It is still possible to serialize builtins
and all code objects copied from the GC heap are builtins by now.

R=ahaas@chromium.org

Change-Id: If009a82a9d7c7080f70f344040ebb91f20b8cc1a
Reviewed-on: https://chromium-review.googlesource.com/1012081
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52628}
2018-04-16 17:23:23 +00:00
Eric Holk
581fd6679b [wasm] enable --wasm-trap-handler by default
This will give us much better testing coverage for trap-based bounds
checks.

Note that this will not enable the trap handler by default in Chrome.
Instead, Chrome will need to explicitly enable the feature using
V8::EnableWebAssemblyTrapHandler.

Bug: v8:5277
Change-Id: I7d81f40c6f831c6fe7926375c677908952b78fa2
Reviewed-on: https://chromium-review.googlesource.com/964711
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Eric Holk <eholk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52627}
2018-04-16 16:51:53 +00:00
Michael Starzinger
120dfa48cf [wasm] Explicitly spill WasmInstanceObject in prologue.
This adds another fixed spill slot to the {WasmCompiledFrame} layout,
holding a reference to the current {WasmInstanceObject}. This slot
allows the stack walker to retrieve instances for WebAssembly frames
without having each code object be coupled to an instance. Hence it
enables sharing code across instances in the future.

R=titzer@chromium.org
BUG=v8:7424

Change-Id: I7fa095c6255754caf564edce4ee7e84dea666783
Reviewed-on: https://chromium-review.googlesource.com/1005516
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52626}
2018-04-16 16:38:03 +00:00
Clemens Hammacher
3baf75f734 [ia32] Avoid overwrite of src register
The Cvtui2ss method did overwrite the {src} register, and the given
{tmp} register. Because of this, the Turbofan code generator passed two
temporary registers.
This CL fixes this to avoid the overwrite of the {src} register (which
is now an Operand).

R=neis@chromium.org

Change-Id: I33e523ac3d7bb377899739e95058b87adefa6b65
Reviewed-on: https://chromium-review.googlesource.com/1014082
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52625}
2018-04-16 16:31:38 +00:00
Georg Neis
00a3bfacb9 Check new length in array splice and unshift.
If the new length is too large, we must throw a TypeError.

Bug: v8:7652
Change-Id: I47268c04405f7a5f5bbc971cd434f2d786af9ca1
Reviewed-on: https://chromium-review.googlesource.com/1013563
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52624}
2018-04-16 16:26:33 +00:00
Ivo Markovic
2279dda63c Mips[64] Use kScratchReg instead of at register
At is used in Macro Assembler, so we need other registers to hold temporary values.

Change-Id: Iffeddba7b3319666a605eea62ecc3cd01b065ad7
Reviewed-on: https://chromium-review.googlesource.com/1013978
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Commit-Queue: Sreten Kovacevic <sreten.kovacevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#52623}
2018-04-16 16:19:06 +00:00
Vincent Belliard
abfcc1124c [arm64][Liftoff] Start Liftoff implementation.
First version which can compile a very basic code.

Change-Id: I3b98412a5ca39a28f8fe5b60516b82c6981dd187
Reviewed-on: https://chromium-review.googlesource.com/993232
Commit-Queue: Vincent Belliard <vincent.belliard@arm.com>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52622}
2018-04-16 16:16:47 +00:00
Michael Achenbach
a5cb0f98b3 [build] Add MB config for new mips trybot
NOTRY=true
TBR=sergiyb@chromium.org

Change-Id: I285b32a5acbc302c29ca6085ab6998dbb1609539
Reviewed-on: https://chromium-review.googlesource.com/1013568
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52621}
2018-04-16 14:42:19 +00:00
Clemens Hammacher
386344e039 [ia32] Rename and move type conversions
Name type conversions from int to float and vice versa consistently,
and move them to the TurboAssembler, such that we can reuse them for
Liftoff.

R=jarin@chromium.org

Bug: v8:6600
Change-Id: Idced658a228eeb611dd4785aa277bd758c201eea
Reviewed-on: https://chromium-review.googlesource.com/1014037
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52620}
2018-04-16 13:32:23 +00:00
Michael Achenbach
38ebe52872 Torque: Fix mips compile error
Change-Id: I6a97005943b36c0dab70fe8f18bbfcab443c3e03
Reviewed-on: https://chromium-review.googlesource.com/1013566
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52619}
2018-04-16 13:15:28 +00:00
Daniel Clifford
a3353da846 Torque: Implement a DSL for CSA
An overview of motivation behind Torque and some of its principles
can be found here: https://bit.ly/2qAI5Ep

Note that there is quite a bit of work left to do in order to get
Torque production-ready for any non-trivial amount of code, but
landing the prototype as-is will allow for much faster iteration.

Bugs will be filed for all of the big-ticket items that are not
landing blockers but called out in this patch as important to fix.

Cq-Include-Trybots: luci.v8.try:v8_linux_nosnap_rel;luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ib07af70966d5133dc57344928885478b9c6b8b73
Reviewed-on: https://chromium-review.googlesource.com/845682
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52618}
2018-04-16 12:23:55 +00:00
sreten.kovacevic
c1401045e3 [Liftoff][mips] Implement i64 binops
Implement i64 binops (`add`, `sub`, `mul`, `and`, `or` and `xor` on MIPS64
and `add`, `mul` and `sub` on MIPS).

Bug: v8:6600
Change-Id: I96640a6b4420789f075b1d919789a72163c954d2
Reviewed-on: https://chromium-review.googlesource.com/1010203
Commit-Queue: Sreten Kovacevic <sreten.kovacevic@mips.com>
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#52617}
2018-04-16 12:19:24 +00:00
Georg Neis
a5f782745e Fix compilation with V8_TRACE_IGNITION enabled.
The recent changes related to the Address type broke this.

R=bmeurer@chromium.org

Change-Id: I404930435e9f48750a735beed7d79108b9cc96ee
Reviewed-on: https://chromium-review.googlesource.com/1014081
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52616}
2018-04-16 11:57:09 +00:00
Dan Elphick
5ed349d66d [ubsan] Make Isolate inherit from Factory
Previously Isolate and Factory relied on the undefined behavior of
reinterpret_cast to switch between the two unrelated classes (which worked
because Factory had no data members).

With Isolate inheriting from Factory, it's now possible to switch between the
two classes using c-style casts. These are allowed under the C++ standard.

The inheritance is private which allows the continuing separation of the
Factory and Isolate namespaces.

This is a defensive clean-up, since ubsan does not yet detect the previous
undefined behavior.

Bug: v8:3770
Change-Id: I0ccf09f1d34f747550812ce698ab7e182812409e
Reviewed-on: https://chromium-review.googlesource.com/1010122
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52615}
2018-04-16 10:37:15 +00:00
Yang Guo
a440efb27f [api] do not require source string for producing code cache.
The embedder should not need to keep track of the source string.

R=jgruber@chromium.org

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ie27df755a22fbcae7b6e87a435419d2d8f545558
Reviewed-on: https://chromium-review.googlesource.com/1013482
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52614}
2018-04-16 09:10:44 +00:00
Marja Hölttä
d3a2819ee9 [in-place weak refs] Add WeakArrayList & replace Heap::retained_maps with it.
BUG=v8:7308

Change-Id: I5e9f371b1db5515b723d9a2864bf2038706e2015
Reviewed-on: https://chromium-review.googlesource.com/960032
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52613}
2018-04-16 08:36:34 +00:00
Simon Zünd
2e59ff8c45 Extend Array.p.sort test coverage.
This adds tests for 'oddly' behaving comparison functions.
I.e. functions that cause an element kind change and/or
modify the array. The tests check that sort does not crash in these
instances.

R=jgruber@chromium.org

Bug: v8:7382
Change-Id: I4ac9aa081fda9088d1848a960dc66aba671872e5
Reviewed-on: https://chromium-review.googlesource.com/1010062
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52612}
2018-04-16 06:31:24 +00:00
Jakob Kummerow
207bb03714 [bigint] Allow BigInt(n) for n > MAX_SAFE_INTEGER
Spec change: https://github.com/tc39/proposal-bigint/pull/138

Bug: v8:6791
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I7367273ed1e98971be3b277f6486333a96412185
Reviewed-on: https://chromium-review.googlesource.com/1004120
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52611}
2018-04-16 05:37:04 +00:00
Igor Sheludko
9367f80f17 [builtins] Implement fast path of Object.assign using CSA.
Bug: v8:5988
Change-Id: I2e90ed8df6b966e04299774e50aeb2913a8c1922
Reviewed-on: https://chromium-review.googlesource.com/999603
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52610}
2018-04-16 02:06:46 +00:00
Jakob Kummerow
8cc5a7239a [bigint] Update "bigint < string" semantics
Per the spec change at [1], Abstract Relational Comparison between a
BigInt and a String converts the String to BigInt via StringToBigInt
before performing the comparison. Before this change, the String was
converted to a Number, and a BigInt/Number comparison was performed.

[1] https://github.com/tc39/proposal-bigint/pull/139

Bug: v8:6791
Change-Id: I40b4f4ddc78977adb0d44180eb58e0f9a8a70cb6
Reviewed-on: https://chromium-review.googlesource.com/1004117
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52609}
2018-04-15 00:53:36 +00:00
Ben L. Titzer
88b08f12f5 [wasm] Use the proper constant for exports limit
R=gdeepti@chromium.org

Change-Id: I3d0a21c6db671718b9f41fb8392f6900b2fecf27
Reviewed-on: https://chromium-review.googlesource.com/1013197
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52608}
2018-04-14 22:13:45 +00:00
Junliang Yan
9adf8fa8d6 PPC/s390: [ubsan] Change Address typedef to uintptr_t
Port 2459046c1d

Original Commit Message:

    The "Address" type is V8's general-purpose type for manipulating memory
    addresses. Per the C++ spec, pointer arithmetic and pointer comparisons
    are undefined behavior except within the same array; since we generally
    don't operate within a C++ array, our general-purpose type shouldn't be
    a pointer type.

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

Change-Id: Ic30ef19019e5b39b01f90587011c6a1b06c4b7a1
Reviewed-on: https://chromium-review.googlesource.com/1012461
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#52607}
2018-04-14 20:39:55 +00:00
Junliang Yan
5e8bc1c316 PPC/s390: [stubs] Convert DoubleToIStub and MathPowStub to builtins
Port a3b6067525

Original Commit Message:

    This is mostly a simple copy & paste of the stub implementation from
    code-stubs-arch.cc to builtins-arch.cc.

    The conversion allows removal of a special case for the DoubleToIStub
    within the compiler & wasm pipelines, and also makes the following
    builtins isolate-independent (in conjunction with
    https://crrev.com/c/1006581):

    TFC BitwiseAnd
    TFC BitwiseOr
    TFC BitwiseXor
    TFC Exponentiate
    TFC ShiftLeft
    TFC ShiftRight
    TFC ShiftRightLogical
    TFJ AtomicsAdd
    TFJ AtomicsAnd
    TFJ AtomicsCompareExchange
    TFJ AtomicsExchange
    TFJ AtomicsLoad
    TFJ AtomicsOr
    TFJ AtomicsStore
    TFJ AtomicsSub
    TFJ AtomicsXor
    TFJ MathClz32
    TFJ MathImul
    TFJ MathPow
    TFJ NumberParseInt
    TFJ StringFromCharCode
    TFJ TypedArrayFrom
    TFJ TypedArrayOf
    TFJ TypedArrayPrototypeMap

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

Change-Id: Iee9fc5671646772625556717db052b78089c5c66
Reviewed-on: https://chromium-review.googlesource.com/1013247
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#52606}
2018-04-14 19:39:45 +00:00
Junliang Yan
3110259efb PPC/s390: [stubs] Remove return register argument from DoubleToIStub
Port 87557649e4

Original Commit Message:

    This changes DoubleToIStub to return its result on the stack instead
    of a specific return register.

    In a follow-up, the DoubleToIStub could be converted into a builtin.

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

Change-Id: I952fec4fbe004e2734a84ba853f4f5a33c8dd8ce
Reviewed-on: https://chromium-review.googlesource.com/1013418
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#52605}
2018-04-14 16:40:15 +00:00
v8-autoroll
c1c6f55e97 Update V8 DEPS.
Rolling v8/build: 7726657..80b7a3c

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/67d01a2..f718fb1

Rolling v8/tools/clang: d7c36b0..5395a74

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

Change-Id: I2981aa8a42866ecc06091a0090ea69f3d5829a5d
Reviewed-on: https://chromium-review.googlesource.com/1012820
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52604}
2018-04-14 07:28:37 +00:00
Alexey Kozyatinskiy
edf15167b9 Reland "[inspector] added timeout argument for Runtime.evaluate"
This is a reland of deb875f7ea

Original change's description:
> [inspector] added timeout argument for Runtime.evaluate
> 
> R=yangguo@chromium.org,dgozman@chromium.org
> 
> Bug: none
> Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
> Change-Id: I31667b3d5f39db9d899d58acd5205a9c34e570db
> Reviewed-on: https://chromium-review.googlesource.com/1005985
> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52594}

Bug: none
Change-Id: Ib8aff5d9f83e41fc6c2019712708fda074bd1ad9
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Reviewed-on: https://chromium-review.googlesource.com/1012724
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52603}
2018-04-14 07:27:32 +00:00
Alexey Kozyatinskiy
bbf28ecb18 fixed build after intptr_t -> uintptr_t migration
Bug: none
Change-Id: I156bfe9846d0890ffdf482bcc8c84da53fe1af61
TBR: jkummerow@chromium.org
NOTREECHECKS: true
NOTRY: true
Reviewed-on: https://chromium-review.googlesource.com/1013392
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52602}
2018-04-14 07:12:22 +00:00