Commit Graph

46157 Commits

Author SHA1 Message Date
Michael Starzinger
67fa841bcb [wasm] Turn {WasmDebugInfo} into a proper {Struct}.
This makes sure that the object can be identified by a unique instance
type and hence is not accidentally confused with other FixedArrays on
the heap.

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

Change-Id: I66e3d779ff9a323b64f5464bdd5fe02aefe468c6
Reviewed-on: https://chromium-review.googlesource.com/943442
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51665}
2018-03-01 19:34:07 +00:00
Jakob Kummerow
ed2e7dc618 [bigint] Expose BigInt on the API
Bug: v8:6791, v8:7486
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I733d0fb886c42928816fe570712ed23f41c8e751
Reviewed-on: https://chromium-review.googlesource.com/938945
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51664}
2018-03-01 18:58:38 +00:00
Igor Sheludko
40a3e6dcb9 [runtime] Move validity cell from PrototypeInfo to Map.
This is a first step towards using Maps as store transition handlers.
It is expected for this CL to noticeably regress memory consumption
but most of it should be recovered by the next CL.

Bug: v8:5988
Change-Id: Ic2e301f9ccebc36e699383ded8c8cd284a906ce1
Reviewed-on: https://chromium-review.googlesource.com/928646
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51663}
2018-03-01 15:58:16 +00:00
Gabriel Charette
70222a9d03 [v8 platform] Rename BackgroundThread methods to WorkerThreads method.
Follow-up to https://chromium-review.googlesource.com/c/v8/v8/+/941442.

"background" refers to a priority and is inappropriate to refer to
worker threads as many tasks posted to worker threads by v8 are in
fact high priority.

Also took advantage of this rename to make NumberOfWorkerThreads()
return an int instead of size_t. While it is never negative, int is
simpler and Google C++ style guide states to avoid unsigned integers in
such cases (ref. "On Unsigned Integers" @
https://google.github.io/styleguide/cppguide.html#Integer_Types).

The Chromium embedder for that call provided an int which was converted
to size_t for this override and most often casted back down to int on the
v8 side, adding churn, and readability overhead.

R=ahaas@chromium.org

Bug: v8:7310
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ib5280df73d2846b111d985be65a10b049995ea6a
Reviewed-on: https://chromium-review.googlesource.com/941944
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51662}
2018-03-01 15:30:35 +00:00
Igor Sheludko
16a3a4e946 [ic] Properly handle kApiGetter case with null prototype.
Bug: chromium:808845
Change-Id: I406ca472e74b8fce5f79bc389bd40aec7dcebb84
Reviewed-on: https://chromium-review.googlesource.com/943261
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51661}
2018-03-01 15:18:44 +00:00
Mathias Bynens
15e207b300 [builtins] Refactor the StringConstructor builtin
This patch removes the StringConstructor_ConstructStub builtin,
merging its functionality into the refactored StringConstructor
TurboFan builtin.

This brings us closer to our goal of deprecating the `construct_stub`
field in `SharedFunctionInfo`.

Bug: v8:7503
Change-Id: Ie98520c652f49dda91eff2fc51263611f29e0ebe
Reviewed-on: https://chromium-review.googlesource.com/942882
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51660}
2018-03-01 15:02:44 +00:00
v8-autoroll
896fc89cce Update V8 DEPS.
Rolling v8/build: b1d6c28..df4bee0

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

Change-Id: Ic81a2974eb31627ae07630bcfad7346cdd7f1dd6
Reviewed-on: https://chromium-review.googlesource.com/936671
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51659}
2018-03-01 14:53:54 +00:00
Junliang Yan
5804db9cb4 PPC/s390: [Compiler] Use conditional move / select to generate poison mask.
Port 6687007028

Original Commit Message:

    Replace bitwise arithmetic with conditional move / select instructions
    on ia32, x64, Arm and Arm64. In local tests this improves --noopt Ignition
    performance by between 2-5%.

R=rmcilroy@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=chromium:798964
LOG=N

Change-Id: I3cb65bdf2cf48df30e97b8a12966636fa6aca5ec
Reviewed-on: https://chromium-review.googlesource.com/939852
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#51658}
2018-03-01 14:50:34 +00:00
Benedikt Meurer
433b369991 [turbofan] Migrate the Array iterator lowering to JSCallReducer.
This is a purely mechanical change.

Bug: v8:7250, v8:7510
Change-Id: I9f450ca86fadd96f7c941e1adf7091a8ef97e8b2
Reviewed-on: https://chromium-review.googlesource.com/943065
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51657}
2018-03-01 14:44:14 +00:00
Gabriel Charette
ce1cc81468 [v8 platform] Use V8_DEPRECATED macro for CallOnBackgroundThread().
Follow-up to https://chromium-review.googlesource.com/c/v8/v8/+/941442#message-bc46157bdd4667cb44c2533bfd3201b45c32fe75

TBR=rmcilroy@chromium.org

Bug: v8:7310
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: If3afbdca1393e7f3bb264abadd99f83f5a2b554a
Reviewed-on: https://chromium-review.googlesource.com/942823
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51656}
2018-03-01 14:32:04 +00:00
Clemens Hammacher
0afe5051e8 Reland "[Assembler][x64] Make immediates immutable"
This is a reland of 01db326cc2.

Original change's description:
> [Assembler][x64] Make immediates immutable
> 
> On x64, we already pass immediates by value. This CL ensures that this
> is indeed cheap, and it makes immediates immutable.
> 
> R=mstarzinger@chromium.org
> 
> Bug: v8:7310
> Change-Id: I53a0666d53b9de69d390621298798c03b5190497
> Reviewed-on: https://chromium-review.googlesource.com/934341
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#51613}

Bug: v8:7310
Change-Id: I37f1bd1528c742e8df11b7f524316935dd289f00
Reviewed-on: https://chromium-review.googlesource.com/941621
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51655}
2018-03-01 14:10:13 +00:00
Sigurd Schneider
80447cff70 [js-perf-test] Add regression benchmark
This CL adds a regression benchmark for a fast-path of
String.p.charCodeAt, which is important for node.js.

Bug: v8:7326
Change-Id: I54efaa2988c595dd40e6a55a3464b3ee7de6f07b
Reviewed-on: https://chromium-review.googlesource.com/942885
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51654}
2018-03-01 13:52:44 +00:00
Michael Hablich
ac9b1ebe7c Update V8 version to 6.7
TBR=machenbach@chromium.org

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I4b5675a02364631f88f203b5c60edc14314a4617
Reviewed-on: https://chromium-review.googlesource.com/942904
Commit-Queue: Michael Hablich <hablich@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Hablich <hablich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51653}
2018-03-01 13:51:39 +00:00
Clemens Hammacher
08a9e3eb20 [Liftoff] Fix get_use_count for register pairs
R=ahaas@chromium.org

Bug: v8:7508, v8:6600
Change-Id: I9eb04171eb489383bb746e2d04c6ffff304b7918
Reviewed-on: https://chromium-review.googlesource.com/942821
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51652}
2018-03-01 13:06:17 +00:00
Clemens Hammacher
9dd6f0d089 Fix is_trivially_copyable check for MSVC and older stdlibc++
MSVC 2015 and 2017 implement std::is_trivially_copyable, but not
correctly. Hence, reimplement it using more low-level primitives.

For stdlibc++ versions below 5.0, we already have a workaround for the
missing support of std::is_trivially_copyable, but this is an unsound
approximation, because it is ignoring move constructor, move assignment
and copy assignment. Therefore, do not use this approximation for
asserting trivial copyability of a type.

Finally, add unittests for the new is_trivially_copyable
implementations.

R=mstarzinger@chromium.org
CC=loorongjie@gmail.com

Change-Id: I9ee56a65882e8c94b72c9a2d484edd27963a5d89
Reviewed-on: https://chromium-review.googlesource.com/941521
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51651}
2018-03-01 13:05:12 +00:00
Gabriel Charette
2600038ddb [v8 platform] Introduce CallBlockingTaskFromBackgroundThread()
and use it for parallel GC as it blocks the main thread.

On Chromium this will result in a TaskPriority::USER_BLOCKING task,
allowing TaskScheduler to prioritize them above all other async work.

R=ahaas@chromium.org

Bug: chromium:817421
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I8c782eb045035ce2899214528deae5a45f0e6600
Reviewed-on: https://chromium-review.googlesource.com/941946
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51650}
2018-03-01 13:00:07 +00:00
Ivica Bogosavljevic
e89daf3b3a MIPS: Rename macros for sid sysroot update
Some macros in test-assembler-mips have the same name
as newly introduced macros in sid sysroot. We rename
them in order to prevent compilation problems

Change-Id: I84d9562f39c1aca8ac20e979466862228f438425
Reviewed-on: https://chromium-review.googlesource.com/942322
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#51649}
2018-03-01 12:58:27 +00:00
Georg Neis
5f8ba95a93 [js-perf-test] Add a slightly more general benchmark for spread calls.
Bug: v8:7446
Change-Id: Ic4eaeeb1e4852cffde679b359e562a48e5ba39e9
Reviewed-on: https://chromium-review.googlesource.com/942922
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51648}
2018-03-01 12:42:06 +00:00
Ilija Pavlovic
1fd5a25b10 [test] Add status-file variable mips_arch_variant.
Introducing a new status-file variable: mips_arch_variant. With this
variable, in status files will be possible to define selections which
are based on MIPS architecture revisions/variants.

TEST=
BUG=

Change-Id: Ifd682552db2f26be4e56dc94ad50bed063ff14c5
Reviewed-on: https://chromium-review.googlesource.com/941212
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#51647}
2018-03-01 12:11:36 +00:00
jgruber
184721e23f [builtins] Access external references through constants table
External references are process-specific and thus need to be accessed
through an indirection (or reloc'd by the linker). This CL moves all
used external references to the builtins constants table and rewrites
accesses to load from there.

In the future, this could be made more efficient by removing levels of
indirection or using the native linker.

Bug: v8:6666
Change-Id: I63491670549654edeb59c60bb833acfdc5a48495
Reviewed-on: https://chromium-review.googlesource.com/939783
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51646}
2018-03-01 10:38:22 +00:00
Gabriel Charette
86b4b5345a [v8 platform] Get rid of unused ExpectedRuntime parameter.
With a temporary intermediate step to allow adapting embedders before
getting rid of the ExpectedRuntime method altogether.

The method is being renamed to CallOnWorkerThread() as an effort to
go away from "background" nomenclature for worker threads ("background"
usually refers to a priority but worker threads are commonly used for
high priority tasks in v8).
Other CLs will follow to rename other "background" APIs.

Bug: v8:7310
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I2fd4eac7458708d4eacb0f4871c982a567a3865e
Reviewed-on: https://chromium-review.googlesource.com/941442
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51645}
2018-03-01 10:35:42 +00:00
Kim-Anh Tran
1516520832 [wasm] Introduce Tier enum to replace the current is_liftoff flag
Bug: v8:7310
Change-Id: I87bdb640a3c006a268974b34808f184307badeb2
Reviewed-on: https://chromium-review.googlesource.com/934243
Commit-Queue: Kim-Anh Tran <kimanh@google.com>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51644}
2018-03-01 08:56:00 +00:00
Camillo Bruni
923ba7dabf [CSA] Type HasInstanceType and helpers
Bug: v8:7310
Change-Id: I328fd1b9ebff405f827f7ef810ab1e8459582fca
Reviewed-on: https://chromium-review.googlesource.com/941203
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51643}
2018-03-01 07:33:00 +00:00
jing.bao
36ddd0755f Add phaddd/vphaddd, phaddw/vphaddw and vhaddps to ia32
Also Add vhaddps to x64
Fix haddps for SSE3 scope and disassembler on ia32/x64

Change-Id: If511e6428fa1ce034b4281943dfee1405c9d4ffc
Reviewed-on: https://chromium-review.googlesource.com/939265
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Jing Bao <jing.bao@intel.com>
Cr-Commit-Position: refs/heads/master@{#51642}
2018-03-01 01:30:59 +00:00
Kanghua Yu
a4b615eba1 [x64] Use XOR instruction to zero register in SpeculationPoison
kind = BYTECODE_HANDLER
name = Wide
compiler = turbofan
Body (size = 64)
Instructions (size = 56)
                  -- Prologue: generate speculation poison --
0x3f54d38b5c0     0  488d1df9ffffff REX.W leaq rbx,[rip+0xfffffff9]
0x3f54d38b5c7     7  49c7c100000000 REX.W movq r9,0x0

=>
...
Body (size = 60)
Instructions (size = 52)
                  -- Prologue: generate speculation poison --
0x3f54d38b5c0     0  488d1df9ffffff REX.W leaq rbx,[rip+0xfffffff9]
0x3f54d38b5c7     7  4533c9         xorl r9,r9

Change-Id: I2e3926a01423a979fd77cfc0c0081f049bb01eb8
Reviewed-on: https://chromium-review.googlesource.com/940778
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Kanghua Yu <kanghua.yu@intel.com>
Cr-Commit-Position: refs/heads/master@{#51641}
2018-03-01 01:05:09 +00:00
Erik Luo
0d2c85b70b [inspector] expose throwOnSideEffect for Runtime.evaluate
Bug: chromium:810176
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I16e4148434f5cbf44058e1aa5f01693bcba82d0a
Reviewed-on: https://chromium-review.googlesource.com/932943
Commit-Queue: Erik Luo <luoe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51640}
2018-02-28 23:54:46 +00:00
Georg Neis
df35adc763 [bigint] Fix bug in exponentiation.
R=jkummerow@chromium.org

Bug: v8:7505, v8:6791
Change-Id: I11b0031dfafa499a813e3e52080ee5542224799a
Reviewed-on: https://chromium-review.googlesource.com/941130
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51639}
2018-02-28 21:16:15 +00:00
Georg Neis
148cb4d1b1 [modules] Fix handling of uninitialized exports in namespace objects.
For namespace objects, [[GetOwnProperty]] on an uninitialized property
throws a ReferenceError. This was not implemented everywhere. This CL
fixes all such issues I'm aware of.

Bug: v8:7470
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I5f024450005c4f4dcb3f41c844ef055f67a9a869
Reviewed-on: https://chromium-review.googlesource.com/937341
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51638}
2018-02-28 21:13:16 +00:00
Jakob Kummerow
c94df3cec4 Fix buffer-detached check in TypedArray.of/from
The assert-guarded comment claiming that ToNumber could not
possibly neuter the target array unfortunately turns out to
have been wishful thinking.

Bug: chromium:816961
Change-Id: Ib98f96f4cd7f33414c0b5a6037bfb881938cc15e
Reviewed-on: https://chromium-review.googlesource.com/939767
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51637}
2018-02-28 20:52:55 +00:00
Nico Weber
58b386c4de Make v8 build with -Wmicrosoft-cast under clang-cl.
gcc and clang (and the standard) don't allow implicit conversion of
function pointers to object pointers. MSVC does allow that, and since
system headers require this to work, clang-cl allows it too -- but
it emits a -Wmicrosoft-cast warning (which we currently suppress in
the Chromium build, but which we want to enable.)

As a side effect, when printing a function pointer to a stream, MSVC
(and clang-cl) will pick the operator<<(void*) overload, while gcc
and clang will pick operator<<(bool) since the best allowed conversion
they find is from function pointer to bool.

To prevent the clang-cl warning, we need to make sure that we never
directly print a function pointer to a stream. In v8, this requires
two changes:

1. Give PrintCheckOperand() an explicit specialization for function
   pointers and explicitly cast to void* there.  This ports
   https://codereview.chromium.org/2515283002/ to V8, and also fixes a
   bug on non-Windows where DCHECK() of function pointers would print
   "(1 vs 1)" instead of the function's addresses.
   (The bug remains with member function pointers,
   where it's not clear what to print instead of the 1.)

2. has_output_operator<T> must not use operator<< on its argument
   in an evaluated context if T is a function pointer.  This patch
   modifies has_output_operator<> to use an unevaluated context instead,
   which is simpler than the current approach (and matches what Chromium's
   base does), but changes behavior    in minor (boring) ways
   (see template-utils-unittest.cc), since operator<<() is now
   called with a temporary and only operator<<() implementations callable
   with a temporary are considered.
   A more complicated but behavior-preserving alternative would be to
   add an explicit specialization for function pointers. You can see
   this variant in patch set 1 on gerrit.

Bug: chromium:550065
Change-Id: Idc2854d6c258b7fc0b959604006d8952a79eca3d
Reviewed-on: https://chromium-review.googlesource.com/940004
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51636}
2018-02-28 18:06:57 +00:00
Andreas Haas
9bacf52359 [cleanup] Deprecate EnsureEventLoopInitialized
Due to a recent refactoring the function EnsureEventLoopInitialized on
the default platform became obsolete. It does not contain a single line
of code. With this CL we prepare the removal of this function from the
V8 platform API.

R=rmcilroy@chromium.org

Bug: v8:7310
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: If4d54cd989f8df2f40b322be3b67bb8a482398d0
Reviewed-on: https://chromium-review.googlesource.com/934221
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51635}
2018-02-28 15:32:28 +00:00
Mathias Bynens
fa82d01ed0 [builtins] Remove DataViewConstructor_ConstructStub builtin
This brings us closer to our goal of deprecating the `construct_stub`
field in `SharedFunctionInfo`.

Bug: v8:7503
Change-Id: I9502246f5e463e487a989ab7f8c96c008f0fa9d9
Reviewed-on: https://chromium-review.googlesource.com/941143
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51634}
2018-02-28 14:42:27 +00:00
Mathias Bynens
0ffaedf8d5 [builtins] Remove SymbolConstructor_ConstructStub builtin
This brings us closer to our goal of deprecating the `construct_stub`
field in `SharedFunctionInfo`.

Bug: v8:7503
Change-Id: Id7bee0d61830f7bcf2cad4f6e50ff9f24b58a51b
Reviewed-on: https://chromium-review.googlesource.com/939790
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51633}
2018-02-28 13:49:37 +00:00
Andreas Haas
344a5c3907 [wasm] Update spec tests
R=clemensh@chromium.org

Change-Id: Ib6f0c0de813049192ea99b194d5ef4b17d44cd72
Reviewed-on: https://chromium-review.googlesource.com/939784
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51632}
2018-02-28 13:22:37 +00:00
Sigurd Schneider
4dd446ab47 [js-perf-tests] Add substring perf tests
This CL also reorganizes the Strings test suite

Bug: v8:7340
Change-Id: I54d4d76a16c362e38ebfc9719ac8cb1a490ef3cc
Reviewed-on: https://chromium-review.googlesource.com/941122
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51631}
2018-02-28 13:03:57 +00:00
Benedikt Meurer
251f63d82f [builtins] Remove DateConstructor_ConstructStub builtin.
Next step on deprecating the construct_stub field in the
SharedFunctionInfo.

Bug: v8:7503
Change-Id: Ibcbf9dc0dbcbcf0e26c103167e8a30074cbdd888
Reviewed-on: https://chromium-review.googlesource.com/940942
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51630}
2018-02-28 12:44:07 +00:00
Mathias Bynens
f8c688f4c2 [builtins] Remove ArrayBufferConstructor_ConstructStub builtin
This brings us closer to our goal of deprecating the `construct_stub`
field in `SharedFunctionInfo`.

Bug: v8:7503
Change-Id: I0e995e6ed9e7c04990f76dd8fe8afaaa8d38294b
Reviewed-on: https://chromium-review.googlesource.com/940124
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51629}
2018-02-28 12:40:37 +00:00
Sigurd Schneider
2533c87ce9 [turbofan] Lower String.p.substr to StringSubstring
Bug: v8:7250, v8:7340
Change-Id: I6267787d297b0aab698b8b38d475f6eff61a730f
Reviewed-on: https://chromium-review.googlesource.com/921523
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51628}
2018-02-28 12:04:57 +00:00
Mathias Bynens
306f2fd5a7 [builtins] Remove BigIntConstructor_ConstructStub builtin
This brings us closer to our goal of deprecating the `construct_stub`
field in `SharedFunctionInfo`.

Bug: v8:7503
Change-Id: I215539fb8ac52fd437d3c04a02ecba2cd38cd101
Reviewed-on: https://chromium-review.googlesource.com/940125
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51627}
2018-02-28 11:42:37 +00:00
Mathias Bynens
df5483caee [builtins] Remove BooleanConstructor_ConstructStub builtin
This brings us closer to our goal of deprecating the `construct_stub`
field in `SharedFunctionInfo`.

Bug: v8:7503
Change-Id: I20e6c7d58e7cdcc7316e35568357a4ad3059a892
Reviewed-on: https://chromium-review.googlesource.com/940129
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51626}
2018-02-28 11:34:47 +00:00
Benedikt Meurer
c8f34835af [builtins] Remove the ObjectConstructor_ConstructStub builtin.
This is the first step on the way to eventually get rid of the
construct_stub field in SharedFunctionInfos.

Bug: v8:7503
Change-Id: Ib14627613851c7f2a5ab795c642bb74176285863
Reviewed-on: https://chromium-review.googlesource.com/940222
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51625}
2018-02-28 10:14:08 +00:00
Sigurd Schneider
265ef0b635 [turbofan] Lower String.p.slice to StringSubstring operator
Bug: v8:7250, v8:7340
Change-Id: Ice54ee684f77a575d7479f4e7d4fdb55e7427da9
Reviewed-on: https://chromium-review.googlesource.com/919164
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51624}
2018-02-28 10:08:39 +00:00
Clemens Hammacher
7071504d14 [Liftoff] Handle statically-known memory OOB better
If memory is statically known to be out of bounds, do not generate code
for the load or store, and also mark the rest of the current block
unreachable to avoid unnecessary code generation.
This also prevents us from having to special-case illegal memory
offsets in the LiftoffAssembler. For valid code, the offset will always
be smaller than 2GB.

R=ahaas@chromium.org

Bug: v8:6600
Change-Id: Ib5a9006780098e9f2ab9eda4bac7939f15612ae0
Reviewed-on: https://chromium-review.googlesource.com/939821
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51623}
2018-02-28 09:37:57 +00:00
Clemens Hammacher
567dcad1ae [wasm] Fix prototype property of exported functions
According to the spec, exported wasm functions should not have a
[[Construct]] method, hence they don't have a prototype.

R=bmeurer@chromium.org
CC=​titzer@chromium.org

Bug: v8:7503
Change-Id: I9e142d65a80c0ef6dbd743421771f194c2d50614
Reviewed-on: https://chromium-review.googlesource.com/939782
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51622}
2018-02-28 09:14:57 +00:00
Junliang Yan
03caf2c214 PPC/s390: [turbofan] Support poisoning arguments in JavaScript.
Port be4cd67ce2

Original Commit Message:

    This adds support for poisoning the stack pointer and implicit register
    arguments like the context register and the function register in the
    prologue of generated code with JavaScript linkage. The speculation
    poison is computed similarly to the interpreter by matching expected
    with actual code start addresses.

R=mstarzinger@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=chromium:798964
LOG=N

Change-Id: I0d015fd8a8f05982d947a4a1c0be1a825ac19d64
Reviewed-on: https://chromium-review.googlesource.com/940460
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#51621}
2018-02-28 05:37:36 +00:00
Junliang Yan
1ce7a7f92a PPC/s390: [turbofan] Better checking of code start register.
Port 5586ecfc68

Original Commit Message:

    This decouples the checking of the {kJavaScriptCallCodeStartRegister}
    from the deoptimization checks. We now rely more heavily on the above
    register and should check its validity more broadly. Note that there
    also is a bug fix for the ARM port contained in this change.

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

Change-Id: Ic8b58994b083c6c0ec73173120cedf6391b1c964
Reviewed-on: https://chromium-review.googlesource.com/938522
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#51620}
2018-02-28 05:25:56 +00:00
Junliang Yan
278b00c527 Reland "PPC/s390: [turbofan] Ensure instruction start is in fixed register."
This is a reland of 89737c5d04.

Original change's description:
> PPC/s390: [turbofan] Ensure instruction start is in fixed register.
> 
> Port c462ddc80b
> 
> Original Commit Message:
> 
>     This makes sure that {JSFunction} invocations always load the code start
>     address into the fixed {kJavaScriptCallCodeStartRegister} register. This
>     allows us to perform PC-relative operations more effective. For now this
>     only applies to code with {kCallJSFunction} linkage.
> 
> R=mstarzinger@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
> BUG=
> LOG=N
> 
> Change-Id: If346a3cbaea820b1fcec38c5105605496961a888
> Reviewed-on: https://chromium-review.googlesource.com/938721
> Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
> Cr-Commit-Position: refs/heads/master@{#51608}

Change-Id: I5b118c3903847cc13e2ce228e9713f8ae55ce193
Reviewed-on: https://chromium-review.googlesource.com/940342
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#51619}
2018-02-28 05:23:46 +00:00
Michael Achenbach
4f6df6e346 [CQ] Let presubmit scripts point to correct LUCI bots
TBR=iannucci@chromium.org
NOTRY=true

Change-Id: I6bee8db469b43a01402798953a1bcdaf3dc06cf7
Reviewed-on: https://chromium-review.googlesource.com/940421
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51618}
2018-02-27 23:26:51 +00:00
Junliang Yan
dc65eb54d5 Revert "PPC/s390: [turbofan] Ensure instruction start is in fixed register."
This reverts commit 89737c5d04.

Reason for revert: Sorry, missed the portion in code-generator

Original change's description:
> PPC/s390: [turbofan] Ensure instruction start is in fixed register.
> 
> Port c462ddc80b
> 
> Original Commit Message:
> 
>     This makes sure that {JSFunction} invocations always load the code start
>     address into the fixed {kJavaScriptCallCodeStartRegister} register. This
>     allows us to perform PC-relative operations more effective. For now this
>     only applies to code with {kCallJSFunction} linkage.
> 
> R=​mstarzinger@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
> BUG=
> LOG=N
> 
> Change-Id: If346a3cbaea820b1fcec38c5105605496961a888
> Reviewed-on: https://chromium-review.googlesource.com/938721
> Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
> Cr-Commit-Position: refs/heads/master@{#51608}

TBR=mstarzinger@chromium.org,michael_dawson@ca.ibm.com,jyan@ca.ibm.com,joransiu@ca.ibm.com

Change-Id: I9a0810aa35ff39651397055ab53d250c2f6f09e0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/940341
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#51617}
2018-02-27 22:35:21 +00:00
Eric Holk
c137eb509d [typed arrays] GetBuffer returns old buffer for guarded buffers
This also adds a DCHECK that the buffer does not have guard pages in
MaterializeArrayBuffer because the code there does not know how correctly set up
a buffer with guard pages.

Bug: chromium:801849
Change-Id: Ic761fcdfbd16a2d6e87f4eb135f5d03b7aa2d71d
Reviewed-on: https://chromium-review.googlesource.com/938968
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Eric Holk <eholk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51616}
2018-02-27 20:36:54 +00:00