Commit Graph

18021 Commits

Author SHA1 Message Date
Yang Guo
54bf4d20de [snapshot] support serializing external strings with known resource.
TBR=ulan@chromium.org
R=jgruber@chromium.org


Bug: v8:7240
Change-Id: I4273105b496da16a5e00f53a6df3112efddedc91
Reviewed-on: https://chromium-review.googlesource.com/842882
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50307}
2017-12-26 16:02:47 +00:00
Ivica Bogosavljevic
4c490296df Fix [Memory] Add OnCriticalMemoryPressure overload to v8::Platform.
Fix 29bb707e9b

Compilation on GYP fails due to missing OnCriticalMemoryPressure
overload that accepts size_t parameter. In this case the compiler
complains about hiding virtual function.

This patch reintroduces the missing functions.

Bug: 
Change-Id: I493891f6908987a6f27c669a16f6c3772339333d
Reviewed-on: https://chromium-review.googlesource.com/844077
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#50306}
2017-12-26 10:55:07 +00:00
Georg Neis
a067281d39 [modules] Implement recent ES revisions.
- Instantiation errors are no longer recorded. If instantiation fails,
  the module(s) are reset to "uninstantiated". When instantiation is
  re-attempted, the thrown exception will be fresh.
- Instantiation can succeed even where there are modules in the graph
  that previously failed evaluation.

Bug: v8:1569
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I429f616918afe5f8ab1a956024f0a22f464b8c44
Reviewed-on: https://chromium-review.googlesource.com/763369
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50301}
2017-12-22 17:56:03 +00:00
Andreas Haas
461274fb63 [mips64][turbofan] Implement on-stack returns.
This is the implementation of crrev.com/c/766371 for mips64.

Original description:

Add the ability to return (multiple) return values on the stack:

- Extend stack frames with a new buffer region for return slots.
  This region is located at the end of a caller's frame such that
  its slots can be indexed as caller frame slots in a callee
  (located beyond its parameters) and assigned return values.
- Adjust stack frame constructon and deconstruction accordingly.
- Extend linkage computation to support register plus stack returns.
- Reserve return slots in caller frame when respective calls occur.
- Introduce and generate architecture instructions ('peek') for
  reading back results from return slots in the caller.
- Aggressive tests.
- Some minor clean-up.

R=v8-mips-ports@googlegroups.com

Change-Id: Ia924f94367320b9062e33d35b58ccd38c8fc3ca3
Reviewed-on: https://chromium-review.googlesource.com/842483
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50299}
2017-12-22 15:07:13 +00:00
Andreas Haas
e6e6e83848 [wasm] Update spec tests.
TBR=bradnelson@chromium.org

Change-Id: I133a1fd4135ac50182163c3632ba02fd806aa27a
Reviewed-on: https://chromium-review.googlesource.com/843024
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50295}
2017-12-22 13:31:22 +00:00
Andreas Haas
57a1d86ca2 [turbofan][x64] Remove the kX64PeekFloat32 and kX64PeekFloat64 instructions
Instead of these two instructions I generalize the kX64Peek instruction.

R=bmeurer@chromium.org

Change-Id: Ie5f8c7d428b65df3ca8b75594f6a06a75cc8e978
Reviewed-on: https://chromium-review.googlesource.com/839863
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50294}
2017-12-22 13:17:31 +00:00
Daniel Ehrenberg
94d53d8742 [class] Split out static fields into a separate flag
This patch implements https://github.com/tc39/proposal-class-fields/pull/65
and https://github.com/tc39/proposal-static-class-features/ by
splitting out instance and static field declarations into separate
flags for the separate proposals. Instance class fields is currently
at Stage 3 whereas static class fields is currently at Stage 2.

Bug: v8:5367
Change-Id: I133c945fd0b22dc5718c7bb61b10f22348087acd
Reviewed-on: https://chromium-review.googlesource.com/839778
Commit-Queue: Daniel Ehrenberg <littledan@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50293}
2017-12-22 13:04:51 +00:00
Andreas Haas
3caf0f20b6 [arm] Fix off-by-1 issue with stack returns
On 32-bit platforms, float64 stack returns take 2 stack slots. In the
implemention of the kArmPeek instruction we assume that provided slot
index points to the first stack slot. However, due to an off-by-1 issue
the provided slot index pointed to the second stack slot. This CL fixes
the problem and generalizes an existing test which reproduces it.

R=v8-arm-ports@googlegroups.com

Change-Id: Ibb2fd8275cf912da064e2f863c2d64d2526caaac
Reviewed-on: https://chromium-review.googlesource.com/839761
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50291}
2017-12-22 10:14:19 +00:00
Michael Achenbach
460af93123 [test] Enable slow-path variant on a subset of bots
Prepared by:
https://crrev.com/c/798412

Bug: v8:7120
Change-Id: I28a00f175673209e6d5f662e30a5448236e7a7c9
Reviewed-on: https://chromium-review.googlesource.com/800612
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50287}
2017-12-21 22:05:09 +00:00
Michael Achenbach
18d68fe72e [test] Skip more flaky tests
https://build.chromium.org/p/client.v8/builders/V8%20Mac64/builds/19464
https://build.chromium.org/p/client.v8/builders/V8%20Mac64/builds/19539

NOTRY=true
TBR=bbudge@chromium.org

Bug: v8:5193
Change-Id: I4d6f73be30dfb1e563aa2f93c11651f739e0741b
Reviewed-on: https://chromium-review.googlesource.com/833868
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50286}
2017-12-21 22:02:59 +00:00
Daniel Clifford
7bcd92650c Implement Array.prototype.reduceRight inlining in TF
Bug: v8:1956
Change-Id: I785986ed20e60e21966abe82a1567d239b22b416
Reviewed-on: https://chromium-review.googlesource.com/840026
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50283}
2017-12-21 20:05:13 +00:00
Bill Budge
699144a225 [Memory] Add PageAllocator concept to v8::Platform.
- Adds abstract base class PageAllocator, defined in v8-platform.h. Adds
  GetPageAllocator method to v8::Platform.
- Implements a DefaultPageAllocator, implemented in terms of base::OS
  page allocation methods.

Bug: chromium:756050
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Iece0b261a07294a49c30ac25e848dc39cb1a32e2
Reviewed-on: https://chromium-review.googlesource.com/809778
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50282}
2017-12-21 19:46:23 +00:00
Hannes Payer
ff57712b8d [heap] Remove OldSpaces iterator.
Bug: chromium:796896
Change-Id: I4bfff3595455ff1fe1ca0d83d264ecef140c056e
Reviewed-on: https://chromium-review.googlesource.com/839764
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50279}
2017-12-21 17:10:19 +00:00
Michal Majewski
a130438e13 [test] Removed old output parsing functions.
All get outcome logic moved out from testsuite which makes output
processors serializable. Output processors that are not global
are stored inside testcase to share them with all test copies.

Bug: v8:6917
Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: I625466b2b00565d885556f96cab03d8d16fa7ff4
Reviewed-on: https://chromium-review.googlesource.com/837069
Commit-Queue: Michał Majewski <majeski@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50275}
2017-12-21 15:25:33 +00:00
Clemens Hammacher
58c82bdaa9 [wasm] [fuzzer] Add support for calls
The wasm compile fuzzer now generates up to four functions with
different signatures, and generates calls between them.

R=ahaas@chromium.org
CC=eholk@chromium.org

Change-Id: I94903a80c78f8463dc1dee91ccf3be33c431e25a
Reviewed-on: https://chromium-review.googlesource.com/839860
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50274}
2017-12-21 15:09:53 +00:00
Clemens Hammacher
5da204c87c [wasm] [fuzzer] Avoid reuse of input data
I just fixed an annoying bug where I accidentally used DataRange more
than once, leading to endless recursion.
This CL avoids that by forbidding copying of DataRange. Instead, it's
mostly passed by reference now.

R=ahaas@chromium.org
CC=eholk@chromium.org

Change-Id: I3925548951645d13823ff42d9d833bde76d6cca6
Reviewed-on: https://chromium-review.googlesource.com/839762
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50273}
2017-12-21 15:01:33 +00:00
Andreas Haas
3ede348741 [mips][turbofan] Implement on-stack returns.
This is the implementation of crrev.com/c/766371 for mips.

Original description:

Add the ability to return (multiple) return values on the stack:

- Extend stack frames with a new buffer region for return slots.
  This region is located at the end of a caller's frame such that
  its slots can be indexed as caller frame slots in a callee
  (located beyond its parameters) and assigned return values.
- Adjust stack frame constructon and deconstruction accordingly.
- Extend linkage computation to support register plus stack returns.
- Reserve return slots in caller frame when respective calls occur.
- Introduce and generate architecture instructions ('peek') for
  reading back results from return slots in the caller.
- Aggressive tests.
- Some minor clean-up.

R=v8-mips-ports@googlegroups.com

Change-Id: I2f30cc297771ec74b0b935b6ea28d3d61a986d5c
Reviewed-on: https://chromium-review.googlesource.com/839660
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50272}
2017-12-21 14:49:53 +00:00
Michal Majewski
848487ad61 [test] Output processor for message
Bug: v8:6917
Change-Id: I51ec0be7ea961d3c81e03675cc65d03ecf526c3d
Reviewed-on: https://chromium-review.googlesource.com/836988
Commit-Queue: Michał Majewski <majeski@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50268}
2017-12-21 14:38:28 +00:00
Clemens Hammacher
f0d9686848 [wasm] [fuzzer] Add the drop opcode
Adds support for emitting the drop opcode in the wasm compile fuzzer.

R=ahaas@chromium.org
CC=eholk@chromium.org

Change-Id: Idb6f07f3f50ffda472107bd6276221e803c37152
Reviewed-on: https://chromium-review.googlesource.com/839760
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50267}
2017-12-21 14:27:03 +00:00
peterwmwong
bd1f8050b0 [builtins] Add Object#toLocaleString stack check
Fixes a regression causing a seg fault instead of the
expected stack overflow.

Bug: chromium:796427, v8:6005
Change-Id: Ifc752a4009a25f447f5e87745dcc1bb83722c34e
Reviewed-on: https://chromium-review.googlesource.com/838854
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50265}
2017-12-21 14:24:02 +00:00
Michal Majewski
b0db2dc6ae [test] Output processors for inspector and webkit
Bug: v8:6917
Change-Id: I81bff2190766b3ccbc5da43ff2f3105c6c95da67
Reviewed-on: https://chromium-review.googlesource.com/836557
Commit-Queue: Michał Majewski <majeski@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50263}
2017-12-21 12:55:35 +00:00
Daniel Clifford
14cd4b5455 Implement Array.prototype.reduce inlining in TF
Bug: v8:1956,v8:4869
Change-Id: Id5822319c14142be2dd984c922b2b65717b96dee
Reviewed-on: https://chromium-review.googlesource.com/803974
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50261}
2017-12-21 12:31:54 +00:00
Timothy Gu
d5fbf7c5c3 [api] Prefer Descriptor interceptor over Getter in GetPropertyAttributes
Also fix GetPropertyDescriptorWithInterceptor so that it only calls the
interceptor once.

R=ahaas@chromium.org, franzih@chromium.org

Bug: node:17480, node:17481
Change-Id: I2c3813f80df2962ec909bae7267884ce0b8ccbef
Reviewed-on: https://chromium-review.googlesource.com/816515
Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
Reviewed-by: Franziska Hinkelmann <franzih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50260}
2017-12-21 11:57:18 +00:00
Georgia Kouveli
5d10735e18 [arm64] Pad function arguments.
This patch updates the instruction selector and code generator to pad arguments
for arm64 and drop an even number of slots when dropping the arguments. It also
updates the builtins that handle arguments. These changes need to be made at
the same time.

It also adds some tests for forwarding varargs, as this was affected by the
builtin changes and the existing tests did not catch all issues.

Bug: v8:6644
Change-Id: I81318d1d1c9ab2568f84f2bb868d2a2d4cb56053
Reviewed-on: https://chromium-review.googlesource.com/829933
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50259}
2017-12-21 11:05:58 +00:00
Deepti Gandluri
f7601238f1 [wasm] Allocate SAB when memory is shared
When shared memory is defined in the module bytes, and not imported/exported
underlying memory should be a SharedArrayBuffer. This was missing in the
allocate flow during instantiation. Fixed to use a SharedArrayBuffer.

BUG=v8:6532

Change-Id: Ic62ed3fd578a0e03124ee40b273e6a4ea474bba4
Reviewed-on: https://chromium-review.googlesource.com/835348
Reviewed-by: Eric Holk <eholk@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50255}
2017-12-21 01:01:32 +00:00
Brad Nelson
a10324c214 [wasm] Don't mutate ArrayBuffer sizes for wasm memory.
R=eholk@chromium.org,mlippautz@chromium.org
B=https://bugs.chromium.org/p/chromium/issues/detail?id=775047

Change-Id: Ia3b2f51d6cb4dabbf0f1f9ec78ecb8935775f53a
Reviewed-on: https://chromium-review.googlesource.com/809165
Commit-Queue: Brad Nelson <bradnelson@chromium.org>
Commit-Queue: Eric Holk <eholk@chromium.org>
Reviewed-by: Eric Holk <eholk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50254}
2017-12-21 00:59:12 +00:00
Mircea Trofin
c8fe2635ea [wasm] Freeze mutability of tables
Bug: v8:7232
Change-Id: I1eed337749686ec749b970b4af56413c5614b980
Reviewed-on: https://chromium-review.googlesource.com/837646
Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50253}
2017-12-21 00:37:01 +00:00
Mircea Trofin
f9c9616e62 [wasm] Ensure free-standing tables are rooted.
Bug: chromium:796584
Change-Id: Ib6a62d616d36344f35cad0b0a177f8f07c7fd2ac
Reviewed-on: https://chromium-review.googlesource.com/836849
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50244}
2017-12-20 19:17:12 +00:00
Michal Majewski
2d3eb1ba3e [test] Output processor for mkgrokdump
Bug: v8:6917
Change-Id: I36ab28500742ae1b906f806e0afb477059eb0380
Reviewed-on: https://chromium-review.googlesource.com/836548
Commit-Queue: Michał Majewski <majeski@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50242}
2017-12-20 16:12:39 +00:00
Michal Majewski
b43550b7ee [test] Share output procs in mozilla and test262
Bug: v8:6917
Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: I8783192268cc0860b553af418d56f1117817d747
Reviewed-on: https://chromium-review.googlesource.com/836609
Commit-Queue: Michał Majewski <majeski@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50241}
2017-12-20 16:08:19 +00:00
Georg Neis
26e21fa67a [bigint] Increase maximum length.
In a benchmark that I'm looking at, the numbers quickly overflow our
current limit.

This patch increases kMaxLength to the greatest value that's possible
without requiring further code changes.

Bug: v8:6791
Change-Id: I7a0d126dcd566d536375a294fa4dcf10b8823ed7
Reviewed-on: https://chromium-review.googlesource.com/833876
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50240}
2017-12-20 14:49:48 +00:00
Georgia Kouveli
f687903383 Reland "[arm64] Preparation for padding of arguments"
This is a reland of bcf1172992

The test was timing out in no snapshot builds, as each CodeAssemblerTester
creates a new Context. Reduced the random iterations significantly.

Original change's description:
> [arm64] Preparation for padding of arguments
>
> As part of JSSP removal, we need to align the arguments passed to functions
> on the stack, by adding a padding slot when the total number of arguments
> is odd.
>
> This patch introduces the kPadArguments flag (which is currently set to
> false for all architectures), which will control padding of arguments in
> architecture-independent parts of the code (deoptimizer, instruction
> selector).
>
> It also adds some executable tests for tail calls with various stack
> parameter counts on the caller and callee sides.
>
> This will be turned on for arm64 together with arm64-specific changes to
> the code generator, the MacroAsembler and the builtins, in a later patch.
>
> Bug: v8:6644
> Change-Id: I79a5c149123fe8130cedd1ccffec3d9b50361e08
> Reviewed-on: https://chromium-review.googlesource.com/806554
> Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#50134}

TBR=jarin@chromium.org

Bug: v8:6644
Change-Id: I795877ed9791e126ffac6841dbbb65189e95d207
Reviewed-on: https://chromium-review.googlesource.com/833046
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50238}
2017-12-20 13:50:36 +00:00
Andreas Haas
9c7b6e1e8a [arm][turbofan] Implement on-stack returns.
This is the implementation of crrev.com/c/766371 for arm.

Original description:

Add the ability to return (multiple) return values on the stack:

- Extend stack frames with a new buffer region for return slots.
  This region is located at the end of a caller's frame such that
  its slots can be indexed as caller frame slots in a callee
  (located beyond its parameters) and assigned return values.
- Adjust stack frame constructon and deconstruction accordingly.
- Extend linkage computation to support register plus stack returns.
- Reserve return slots in caller frame when respective calls occur.
- Introduce and generate architecture instructions ('peek') for
  reading back results from return slots in the caller.
- Aggressive tests.
- Some minor clean-up.

R=v8-arm-ports@googlegroups.com

Change-Id: I7d61424a184d5778baf1d1270013f4e0c7ec68b4
Reviewed-on: https://chromium-review.googlesource.com/836608
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50237}
2017-12-20 13:39:46 +00:00
Michal Majewski
1ed3bd5304 [test] Output processors for mozilla and test262.
Bug: v8:6917
Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: I8920ed24699ab5e6e4ed82f38bd7c8d8548fddfe
Reviewed-on: https://chromium-review.googlesource.com/834131
Commit-Queue: Michał Majewski <majeski@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50235}
2017-12-20 13:22:16 +00:00
Hannes Payer
3b914b2bf5 [heap] Remove --heap-stats.
Bug: 
Change-Id: I53b68e8a4200a87d9f14b9540b52cab316678b2d
Reviewed-on: https://chromium-review.googlesource.com/836593
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50233}
2017-12-20 12:49:06 +00:00
Jaroslav Sevcik
eab08dae95 [compiler] Introduce a new node for array index masking.
Bug: 
Change-Id: Idf3829f59cebe5c68b011ab6a0fa766ca2bad359
Reviewed-on: https://chromium-review.googlesource.com/832448
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50231}
2017-12-20 12:30:26 +00:00
Andreas Haas
bf691e79d7 [wasm] Turn on tests for multiple returns on Windows
R=clemensh@chromium.org

Change-Id: Id2978d2c37a5fb4191db285f4660e22472b70f9d
Reviewed-on: https://chromium-review.googlesource.com/836427
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50225}
2017-12-20 10:09:42 +00:00
Yang Guo
9c6bc7afc0 Leave spaces between instance types.
We used to frequently break the ABI when we introduced new instance
types because some instance types are hard-coded in v8.h.

Now that we have more instance types available, we can leave some
room to anticipate future new instance types.

Also take this opportunity to reorder some instance types.

Also see: https://github.com/nodejs/node/issues/17754

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I9b59eeab9dfcdf11d779f0b700fc5dce30d3eebe
Reviewed-on: https://chromium-review.googlesource.com/833874
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50223}
2017-12-20 07:34:39 +00:00
Caitlin Potter
18dc491c7a [builtins] abort FrameFunctionIterator::next if frame summary empty
Previously, FrameFunctionIterator::next() assumed that the frame summary
was non-empty. It's now possible for the list not to be empty, if the
JS microtask pump invokes a builtin function which uses
FrameFunctionIterator directly. While this is unlikely to show up in
real world code, it is necessary to handle it to prevent crashes.

BUG=chromium:794744
R=mstarzinger@chromium.org, cbruni@chromium.org, verwaest@chromium.org

Change-Id: Ie95c2228544f57730d1c6c1ff955b2c94ff1c06b
Reviewed-on: https://chromium-review.googlesource.com/833266
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Cr-Commit-Position: refs/heads/master@{#50221}
2017-12-20 00:08:35 +00:00
Alexey Kozyatinskiy
17a6ec1b88 [inspector] aligned Runtime.evaluate(returnValue:true) result with json
If object contains undefined property then JSON.stringify will skip it,
if array contains undefined as property then JSON.stringify will censor
it to null. [1]

[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify

R=alph@chromium.org

Bug: none
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Iafa9d2828d264d89b26675b0e194ad0bfc4621fc
Reviewed-on: https://chromium-review.googlesource.com/834669
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50220}
2017-12-19 20:16:09 +00:00
peterwmwong
bce199bbe7 Reland "[builtins] Port Object.p.toLocaleString to CSA from JS"
This is a reland of ab38b03d1b
Original change's description:
> [builtins] Port Object.p.toLocaleString to CSA from JS
>
> - Added ObjectPrototypeToLocaleString TFJ
> - Remove v8natives.js
> - Move GetMethod and GetIterator into prologue.js
>
> TBR=adamk@chromium.org
>
> Bug: v8:6005
> Change-Id: I2b5b65892304e62bf64375458f8ffb9473b2c9b7
> Reviewed-on: https://chromium-review.googlesource.com/826479
> Reviewed-by: Peter Wong <peter.wm.wong@gmail.com>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
> Cr-Commit-Position: refs/heads/master@{#50120}

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng

TBR=adamk@chromium.org

Bug: v8:6005
Change-Id: Ie8c8810c5231e933e61ea8babe963e58bb6dcaed
Reviewed-on: https://chromium-review.googlesource.com/831156
Reviewed-by: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Cr-Commit-Position: refs/heads/master@{#50218}
2017-12-19 19:46:10 +00:00
Max Moroz
f9eb31bb8e [fuzzer] Declare LLVMFuzzerInitialize with attributes only if V8_OS_MACOSX.
R=ahaas@chromium.org, clemensh@chromium.org, mathias@chromium.org

Bug: chromium:754124, chromium:787723
Change-Id: I7eafee50a47ca0ad56a5458f1f232e3ed07c1cca
Reviewed-on: https://chromium-review.googlesource.com/834457
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Max Moroz <mmoroz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50217}
2017-12-19 19:44:20 +00:00
Ulan Degenbaev
42ac7fe04b [runtime] Make access to FLAG_runtime_stats atomic.
Background tasks read this flag, which creates a data race. This patch
works around the data races by making the access to the flag atomic.

The actual fix will be to not mutate the flag.

Bug: chromium:794911
Change-Id: Idcf03b7a1037e876036918418ce989b420784428
Reviewed-on: https://chromium-review.googlesource.com/834508
Reviewed-by: Fadi Meawad <fmeawad@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50215}
2017-12-19 19:01:50 +00:00
Clemens Hammacher
2203a37c5d Replace CHECK(false) by UNREACHABLE()
... or sometimes by FATAL(...) to give a better error message.
The benefit of UNREACHABLE() over CHECK(false) is that the compiler
knows that this macro will never return, hence we can omit the return
of a dummy value afterwards.

R=neis@chromium.org

Change-Id: I14e6a4f1d75f1338f481bd1520d841fd383d6202
Reviewed-on: https://chromium-review.googlesource.com/832431
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50214}
2017-12-19 18:58:07 +00:00
Clemens Hammacher
3ffbef33bc Revert "[fuzzer] Add attributes to LLVMFuzzerInitialize definition."
This reverts commit 004f348aba.

Reason for revert: Breaks msvc compile: https://build.chromium.org/p/client.v8/builders/V8%20Win64%20-%20msvc/builds/672

Original change's description:
> [fuzzer] Add attributes to LLVMFuzzerInitialize definition.
> 
> That prevents the linker from dead-stripping the function, as it is not called
> directly, it is resolved in the runtime via dlsym().
> 
> Bug: chromium:754124, chromium:787723
> Change-Id: I46a02ef01349f59b7ed944ce1483b7277e234a19
> Reviewed-on: https://chromium-review.googlesource.com/833995
> Commit-Queue: Max Moroz <mmoroz@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Mathias Bynens <mathias@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#50212}

TBR=ahaas@chromium.org,mmoroz@chromium.org,mathias@chromium.org

Change-Id: Iba35b55ee4d11aca0dfb9cffde7a6a51e0c8e46c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:754124, chromium:787723
Reviewed-on: https://chromium-review.googlesource.com/834548
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50213}
2017-12-19 18:57:01 +00:00
Max Moroz
004f348aba [fuzzer] Add attributes to LLVMFuzzerInitialize definition.
That prevents the linker from dead-stripping the function, as it is not called
directly, it is resolved in the runtime via dlsym().

Bug: chromium:754124, chromium:787723
Change-Id: I46a02ef01349f59b7ed944ce1483b7277e234a19
Reviewed-on: https://chromium-review.googlesource.com/833995
Commit-Queue: Max Moroz <mmoroz@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50212}
2017-12-19 18:18:11 +00:00
Andreas Haas
ca199ef872 Reland [wasm] Stop decoding operands after error.
The problem was that parts of Simd8x16ShuffleOperand were uninitialized.

Original message:

[wasm] Stop decoding operands after error.

When we decode operands of WebAssembly instructions, we do not use the
current pc but a pc of the instruction plus some offset. However, the
pc of the instruction + offset can become invalid in case of a decoder
error. Therefore we have to stop decoding operands explicitly in case
of an error.

R=clemensh@chromium.org

Bug: chromium:795131
Change-Id: I732bc23547dbe531019d81a4397d22165a26d46b
Reviewed-on: https://chromium-review.googlesource.com/833934
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50211}
2017-12-19 17:29:00 +00:00
Michal Majewski
5e6fd798f9 [test] Fixed target_name in json progress indicator
Pass shell name instead of an absolute path.

Bug: v8:796166
Change-Id: Ia9472e893fd2cb3fde2a94997f3e9daf30da06ea
Reviewed-on: https://chromium-review.googlesource.com/833917
Commit-Queue: Michał Majewski <majeski@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50207}
2017-12-19 15:23:54 +00:00
Leszek Swirski
9128e8bf1b [ignition] Move object/array literal init to bytecode gen
Move the object and array literal flag and depth initialization to when
they are visited by the bytecode generator. This avoids issues with
doing this initialization before we know whether the (syntactic) literal
is actually a literal value or a destructuring assignment.

Bug: chromium:795922
Bug: v8:7178
Change-Id: I022178ab4bc9e71f80560f3b78a759d95d4d0584
Reviewed-on: https://chromium-review.googlesource.com/833882
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50204}
2017-12-19 14:50:19 +00:00
Michal Majewski
1f60466659 [test] Store outcomes in the testcase
Bug: v8:6917
Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: Ia52d4bedbeff5b93915ef69a2dc78f6d92669061
Reviewed-on: https://chromium-review.googlesource.com/832467
Commit-Queue: Michał Majewski <majeski@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50200}
2017-12-19 14:10:06 +00:00