Commit Graph

40324 Commits

Author SHA1 Message Date
scottmg
dc3de67047 Stubbed out linking on Fuchsia
Follows https://codereview.chromium.org/2931143002/. Sufficient to link
d8 with target_os="fuchsia" in Chrome. No implementations of platform
functions yet, just stubs.

BUG=chromium:731217

Review-Url: https://codereview.chromium.org/2932053004
Cr-Commit-Position: refs/heads/master@{#45832}
2017-06-11 14:34:32 +00:00
scottmg
c72a612667 Basic compilation on Fuchsia
Sufficient to compile //v8 in Chrome with target_os="fuchsia". Doesn't
link yet, due to missing implementations (primarily VirtualMemory, as
well as a few utility functions).

BUG=chromium:731217
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng

Review-Url: https://codereview.chromium.org/2931143002
Cr-Commit-Position: refs/heads/master@{#45831}
2017-06-11 06:31:33 +00:00
v8-autoroll
710229e531 Update V8 DEPS.
Rolling v8/build: 7e9e29e..b8ed7ac

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

Change-Id: Ibacdf4134dbdf2f943f3008d45d903fdc1266a62
Reviewed-on: https://chromium-review.googlesource.com/530704
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45830}
2017-06-11 03:25:29 +00:00
v8-autoroll
0107fed698 Update V8 DEPS.
Rolling v8/build: 41581bc..7e9e29e

Rolling v8/buildtools: 31d4daa..b53a03d

Rolling v8/third_party/catapult: 32bdd96..36e1cda

Rolling v8/tools/clang: 7474c16..fbd95a5

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

Change-Id: Idebff46b3228c7fdd16e4cc9c47dbe9de7f1bfa8
Reviewed-on: https://chromium-review.googlesource.com/530286
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45829}
2017-06-10 03:31:49 +00:00
bjaideep
03ee37859c PPC: Add the missing cmp instr for 32bit
Minor fix to original CL https://chromium-review.googlesource.com/527156
adding the cmp instr to set the condition code for 32bit.

R=joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2934553002
Cr-Commit-Position: refs/heads/master@{#45828}
2017-06-09 18:14:48 +00:00
Igor Sheludko
efc3e1c2ba [runtime] Fix broken Mips big-endian build.
It was too early to remove SharedFunctionInfo::kCompilerHintsSize.

TBR=jkummerow@chromium.org

Bug: v8:6470
Change-Id: I6d4ff1399155ebb587896cc2b1f117df14bea082
Reviewed-on: https://chromium-review.googlesource.com/529130
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45827}
2017-06-09 17:40:29 +00:00
bjaideep
9385fd40e0 PPC/s390: [builtins] Start refactoring the Apply builtin.
Port af76779aa3

Original Commit Message:

    This splits the monolithic Apply builtin into several smaller builtins,
    namely CallVargargs and ConstructVarargs, which accept a length and a
    FixedArray of elements and deal with the actual stack manipulation, and
    CallWithArrayLike / ConstructWithArrayLike that deal with getting the
    elements from the receiver (for Function.prototype.apply, Reflect.apply
    and Reflect.construct), which can now be written using the CSA.

    The idea is that these builtins can be reused by TurboFan directly in
    the future when we optimize apply better, and that we can also reuse the
    core logic in the handling of spread calls/constructs.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:4587,v8:5269
LOG=N

Review-Url: https://codereview.chromium.org/2932833002
Cr-Commit-Position: refs/heads/master@{#45826}
2017-06-09 17:13:18 +00:00
Igor Sheludko
3b16f6769f [runtime] Cleanup SharedFunctionInfo fields definitions (4).
Define compiler hints bits as bit fields but not as enum.
This eases adding new bit fields to the compiler hints field.

TBR=marja@chromium.org

Bug: v8:6470
Change-Id: Ia023bab25b925847924c45d5a57f85a14c8f1971
Reviewed-on: https://chromium-review.googlesource.com/529044
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45825}
2017-06-09 16:52:29 +00:00
Clemens Hammacher
be1135132a [wasm] [cleanup] Avoid shouting WASM
This CL removes most occurences of "WASM" from outputs and comments in
the code. They are replaced either by "WebAssembly" or (especially in
comments) "wasm". These are the spellings officially proposed on
http://webassembly.org/.

R=ahaas@chromium.org
BUG=v8:6474

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Id39fa5e25591678263745a4eab266db546e65983
Reviewed-on: https://chromium-review.googlesource.com/529085
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45824}
2017-06-09 16:24:19 +00:00
Jakob Kummerow
e5a4275d8c [cleanup] Remove unnecessary entries in cctest.status
BUG=v8:6474

Change-Id: Ic2548b5d80d3208271d34080c3d06acd1078fe75
Reviewed-on: https://chromium-review.googlesource.com/528106
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45823}
2017-06-09 16:05:09 +00:00
Clemens Hammacher
ac01752ac8 [wasm] [cleanup] Introduce and use base::make_unique
Introduce base::make_unique as a replacement for std::make_unique,
introduced in C++14.
Use it in the wasm code base to construct new objects and wrap them in
a unique_ptr, making the code more compact and readable.

R=ahaas@chromium.org
BUG=v8:6474

Change-Id: I2b9c800edc456021b057f1e69d3c144889b1c9f4
Reviewed-on: https://chromium-review.googlesource.com/529167
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45822}
2017-06-09 15:16:33 +00:00
Ross McIlroy
fc826e3735 [TurboFan] Fix typing of INTERNALIZED_STRING_TYPE for new EmptyString type.
Add kInternalizedNonEmptySeqString and make kInternalizedString = 
kEmptyString | kInternalizedNonEmptySeqString.

BUG=chromium:731495

Change-Id: I60a6f37242423407ad97188b3f4bd48ae6989ad2
Reviewed-on: https://chromium-review.googlesource.com/528275
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45821}
2017-06-09 15:10:56 +00:00
Clemens Hammacher
96062c0427 [wasm] Use spec'ed location format
This CL changes the printed wasm locations to use the spec'ed format
(see https://github.com/WebAssembly/design/blob/master/Web.md#developer-facing-display-conventions).

Before: <WASM[<id>]+<offset>
After:  wasm-function[<id>]:<offset>

R=ahaas@chromium.org

Change-Id: If8018012b518143d6353f5a1f5319764ee46f148
Reviewed-on: https://chromium-review.googlesource.com/529104
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45820}
2017-06-09 15:04:36 +00:00
Michael Starzinger
2b9e36e968 [cleanup] Bring back comment lost in refactoring.
R=cbruni@chromium.org
BUG=v8:6474

Change-Id: I84be45bab041082cc66b5fdd70a9e799a44facee
Reviewed-on: https://chromium-review.googlesource.com/529207
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45819}
2017-06-09 14:58:36 +00:00
Toon Verwaest
5287d48bca [cleanup] Remove Key template parameter from HashTable and Dictionary
Shape also contains the Key type. Read it through there instead.

Bug: v8:6474
Also-By: cbruni@chromium.org
Change-Id: Ia47f6143c671c104901a714d4151c9fe9f525b5f
Reviewed-on: https://chromium-review.googlesource.com/529305
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45818}
2017-06-09 13:48:04 +00:00
Daniel Ehrenberg
0d70437942 [parser] Remove an overzealous syntax error check
In some [1] cases where a lexical declaration is not allowed, ASI will
cause a `let` at the end of a line to be interpreted as an
identifier. A recent patch [2] to fix up the error messages from
misplaced `let` usage was a little overzealous in triggering
the error, throwing a SyntaxError in this edge case. This patch
restores the ASI behavior, which is permitted in JSC and
SpiderMonkey as well. Thanks to a test262 test from Andre Bargull
for raising this issue.

[1] https://tc39.github.io/ecma262/#sec-expression-statement
[2] https://codereview.chromium.org/2697193007

Bug: v8:3305
Change-Id: I80ae8ad9a8a93389ff1003323f0d3f003e7a8c8e
Reviewed-on: https://chromium-review.googlesource.com/529225
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Daniel Ehrenberg <littledan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45817}
2017-06-09 13:41:28 +00:00
Clemens Hammacher
8cb1af2ced [cleanup] Replace more unique_ptr by Optional
And in one case just remove it since it is superflous.

R=mstarzinger@chromium.org
BUG=v8:6474

Change-Id: I60bfac75f5d65a56c7ca8d67923e9314ec703eac
Reviewed-on: https://chromium-review.googlesource.com/529244
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45816}
2017-06-09 13:18:04 +00:00
Wiktor Garbacz
5ac26293f1 [tools] Make gm.py work without GOMA again.
Change-Id: I2d8f4defd465b2f9838ed002add088da5b6739ef
Reviewed-on: https://chromium-review.googlesource.com/528197
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45815}
2017-06-09 13:04:40 +00:00
Toon Verwaest
33f11a1f8c [runtime] Cleanup NumberOfEnumerableProperties
Bug: v8:6474
Also-By: cbruni@chromium.org
Change-Id: I1aefa1156b89a7f8ffafe27e58cacbfecc9a1d02
Reviewed-on: https://chromium-review.googlesource.com/528885
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45814}
2017-06-09 13:00:02 +00:00
Ulan Degenbaev
ac3e4e0127 [cleanup] Rename base::MemoryBarrier to base::MemoryFence.
This reduces confusion with GC write barrier. The word "barrier" is
reserved for GC write barrier and "fence" for memory ordering fence.

BUG=v8:6474

Change-Id: Ic4352f04430eaca742b72db1580ee0a42a1ffefb
Reviewed-on: https://chromium-review.googlesource.com/528103
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45813}
2017-06-09 12:43:58 +00:00
Andreas Haas
2082009796 [wasm] Fix parameter values in the wasm-code fuzzer
The wasm-code fuzzer used different parameters for the interpreter and
the generated code due to a typo. This typo is fixed by this CL.

R=clemensh@chromium.org

Change-Id: Ia9c72b83e7722e0a8b3fe6efb3f4b32ca5c937ab
Reviewed-on: https://chromium-review.googlesource.com/527447
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45812}
2017-06-09 12:08:54 +00:00
Wiktor Garbacz
f4f723e818 [parsing] Fix past the end position for streaming streams.
Also, as this is hard to track down, always DCHECK position after ReadBlock().

Change-Id: Ie32c3a311dd8df91f651b6d82ccacc7c95e6fde0
Reviewed-on: https://chromium-review.googlesource.com/528196
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45811}
2017-06-09 11:35:24 +00:00
Clemens Hammacher
58ca2115ad [base] Introduce base::Optional, cloned from chromium
base::Optional is a replacement for std::optional, until we switch to
C++17 and can use std::optional directly.
The implementation is copied from chromium's base::Optional, but put in
the {v8::base} namespace instead of just {base}. Also, the
specialization of std::hash for base::Optional is omitted, since it's
disallowed in the style guide.

A first use in the AsmJsParser is introduced, if that one sticks, I
will refactor more uses of std::unique_ptr to use base::Optional
instead, avoiding the heap allocation.

R=mstarzinger@chromium.org
BUG=v8:6474

Change-Id: I019599d4bf9ff0105bf592dfb96d6050feba18ae
Reviewed-on: https://chromium-review.googlesource.com/528884
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45810}
2017-06-09 11:11:13 +00:00
Marja Hölttä
4424f5d1de [parser|cleanup] Remove unnecessary ExpressionClassifying.
ExpressionClassifier was used just for transmitting information back and forth
to DeclareFormalParameters.

As a bonus, we now do the Scope::IsDeclaredParameter check only when we're going
to use the information it produces.

BUG=v8:6092,v8:6474

Change-Id: Ib5ac6a779705caa74e933e1c6f03eaaf0f49bf05
Reviewed-on: https://chromium-review.googlesource.com/455836
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45809}
2017-06-09 11:06:51 +00:00
Mythri
05b9778d12 Sub-categorize bytecode handler benchmarks in test/js-perf-test.
All the bytecode handlers were added a one test, so we would get a
total on all of the bytecode handler benchmarks. It is not a good
indicator when we total unrelated benchmarks. So added more categories
to group only related benchmarks together. This also makes it easier
to look at the results.

Bug: chromium:730628
Change-Id: I1c5858f40c1ce584c4b7bd833a7f3c52a43d07c6
Reviewed-on: https://chromium-review.googlesource.com/527436
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45808}
2017-06-09 10:43:49 +00:00
jgruber
d1ffd45e53 [debug] Untangle DebugInfo from break point support (mips,mips64)
The mips/mips64 port of http://crrev.com/2909893002. Original commit message:

DebugInfo was very closely tied to break point support:
* It contained only information relevant to break points.
* It was created and freed by break point implementation.
* Existence of a DebugInfo on the shared function info implied existence of
  break points.

This CL is a step towards making DebugInfo usable by other debugging
functionality such as block coverage by decoupling it from break point support,
which is now only one kind of information stored on the DebugInfo object.

BUG=v8:6000

Change-Id: Ia770ff3c048022652d8abbe30d372fde5cb452a4
Reviewed-on: https://chromium-review.googlesource.com/528112
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45807}
2017-06-09 10:11:27 +00:00
Ulan Degenbaev
6738bbeb55 [heap] Refactor marking deque processing.
This makes popping from the marking deque safe for concurrent marking.

BUG=chromium:694255

Change-Id: I3edf8ece3d3c3dd8f045b3ea2f8196b322a56a54
Reviewed-on: https://chromium-review.googlesource.com/527154
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45806}
2017-06-09 10:02:26 +00:00
Alexandre Talon
8edef78d4d [ignition] Fix register flushing performance issue
In some codes flushing the registers was costly: we processed each
register whereas all the registers alone in their equivalence class need
not to be processed. We now overapproximate easily which classes are of
size 2 so as to save many iterations in the Flush() loop in some cases.

Bug: v8:6432
Change-Id: I945e151736e8a515263ac76312127d930fd20d74
Reviewed-on: https://chromium-review.googlesource.com/525795
Commit-Queue: Alexandre Talon <alexandret@google.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45805}
2017-06-09 09:58:15 +00:00
Igor Sheludko
5c82f3bd24 [runtime] Cleanup SharedFunctionInfo fields definitions (3).
Use convenient macros for accessing bit fields.

Bug: v8:6470
Change-Id: Iada9779ce56c7ca2e8b6a9617c236e294db7325e
Reviewed-on: https://chromium-review.googlesource.com/527432
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45804}
2017-06-09 09:56:22 +00:00
Michael Starzinger
c0bf6ee331 [compiler] Unplug Crankshaft from compilation pipeline.
This removes the ability of the compilation pipeline to invoke the
Crankshaft optimizing compiler for JavaScript functions. Note that in
this state Crankshaft can still be used to compile code stubs.

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

Change-Id: I0bec7c8ec7c705c13257df43796403a228ea631c
Reviewed-on: https://chromium-review.googlesource.com/527443
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45803}
2017-06-09 09:26:47 +00:00
Daniel Ehrenberg
38a3e0741b [parser] Allow multiple labels for function declarations
In sloppy mode, allow multiply labelled function declarations, such as

a: b: function c() {}

Such a form is allowed by the specification, as well as ChakraCore,
SpiderMonkey and JSC (though ChakraCore because it doesn't enforce
any lexical label restrictions.)

Thanks to Andre Bargull for adding the test262 test which caught the bug.

Change-Id: I2d3f172830c2e63252f00afa03177a7d17d79a27
Reviewed-on: https://chromium-review.googlesource.com/527639
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Daniel Ehrenberg <littledan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45802}
2017-06-09 09:06:37 +00:00
bmeurer
2a20ded9a1 [turbofan] JSCreateClosure doesn't have any JS observable side effects.
The JSCreateClosure operator was not marked as Eliminatable, esp. it
wasn't marked as NoWrite (read: no JavaScript observable side-effect),
which lead to a weird performance cliff with the new Array builtin
inlining. For example

  a.forEach(c => c);

was not inlined, whereas

  const f = c => c;
  a.forEach(f);

was properly inlined, despite not causing any trouble for TurboFan in
general. The reason was that the JSCreateClosure for the arrow function
was marked as "can cause potential side effect", which it cannot. This
fixes the operator to be properly marked as Eliminatable, thus removing
this performance cliff.

BUG=v8:1956,v8:6475
R=danno@chromium.org

Review-Url: https://codereview.chromium.org/2930933002
Cr-Commit-Position: refs/heads/master@{#45801}
2017-06-09 09:03:33 +00:00
Michael Starzinger
4e86ae8c2c Decouple the --ignition from the --turbo flag.
Both Ignition and TurboFan have been enabled by default for a while.
This just disentangles the implication between those two flags and sets
the --ignition individually. They can now be controlled individually.

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

Change-Id: I08eca85120160efa5868b5ca36d1613964ed82eb
Reviewed-on: https://chromium-review.googlesource.com/527637
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45800}
2017-06-09 08:04:39 +00:00
v8-autoroll
d7dbf7b353 Update V8 DEPS.
Rolling v8/build: 9d6666d..41581bc

Rolling v8/tools/swarming_client: 5c4eed8..af6b06c

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

Change-Id: If888be1ca55a3eda40e6e6dd7e38f351d3b3ab6d
Reviewed-on: https://chromium-review.googlesource.com/527359
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45799}
2017-06-09 03:32:15 +00:00
bjaideep
0732cbee89 PPC/s390: Inline Array.prototype.forEach in TurboFan
Port 90c3a2d54b

Original Commit Message:

    This CL contains a few pieces:

    - A new mechanism to create "BuiltinContinuation" checkpoints in TurboFan
      graphs, which--when triggered--swizzle the values in the the FrameState to be
      parameters to a typically TF-generated builtin that resumes execution to finish
      the slow-case functionality.
    - Continuation builtins that have special handling in the deoptimizer and their own
      new frame type to ensure that the values they need to begin executing can be stashed
      away and restored immediately before the builtin is called via a trampoline that runs
      when the continuation builtin's frame execution resumes.
    - An implementation of Array.prototype.forEach in TurboFan that can be used to
      inline it. The inlined forEach implementation uses the checkpoints mechanism
      described above to deopt in the middle of the forEach in the cases that optimization
      invariants are violated. There is a slightly different continuation stub for each
      deopt point in the forEach implementation to ensure the correct side-effects, i.e.
      that the deopt of the builtin isn't programmatically observable.

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

Review-Url: https://codereview.chromium.org/2926043005
Cr-Commit-Position: refs/heads/master@{#45798}
2017-06-08 21:34:22 +00:00
machenbach
195eab4619 Revert of [heap] Use larger marking steps during external allocation pressure (patchset #4 id:60001 of https://codereview.chromium.org/2927553003/ )
Reason for revert:
Blocks the roll. Fails some layout tests:
https://build.chromium.org/p/tryserver.v8/builders/v8_linux_blink_rel/builds/21757

STDERR: # Fatal error in ../../v8/src/heap/heap.cc, line 957
STDERR: # Check failed: 1.0 <= pressure (1 vs. -0.00503761).

Original issue's description:
> [heap] Use larger marking steps during external allocation pressure
>
> BUG=chromium:626082, chromium:728228
>
> Review-Url: https://codereview.chromium.org/2927553003
> Cr-Commit-Position: refs/heads/master@{#45784}
> Committed: 8d75644fc0

TBR=ulan@chromium.org,hpayer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:626082, chromium:728228

Review-Url: https://codereview.chromium.org/2925333002
Cr-Commit-Position: refs/heads/master@{#45797}
2017-06-08 21:19:44 +00:00
bjaideep
39e42b5ef0 PPC/s390: [debug] Untangle DebugInfo from break point support
Port d3371c23cb

Original Commit Message:

    DebugInfo was very closely tied to break point support:
    * It contained only information relevant to break points.
    * It was created and freed by break point implementation.
    * Existence of a DebugInfo on the shared function info implied existence of
      break points.

    This CL is a step towards making DebugInfo usable by other debugging
    functionality such as block coverage by decoupling it from break point support,
    which is now only one kind of information stored on the DebugInfo object.

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

Review-Url: https://codereview.chromium.org/2927813004
Cr-Commit-Position: refs/heads/master@{#45796}
2017-06-08 21:08:54 +00:00
bbudge
381f7da02c [WASM] Eliminate SIMD boolean vector types.
- Eliminates b1x4, b1x8, and b1x16 as distinct WASM types.
- All vector comparisons return v128 type.
- Eliminates b1xN and, or, xor, not.
- Selects take a v128 mask vector and are now bit-wise.
- Adds a new test for Select, where mask is non-canonical (not 0's and -1's).

LOG=N
BUG=v8:6020

Review-Url: https://codereview.chromium.org/2919203002
Cr-Commit-Position: refs/heads/master@{#45795}
2017-06-08 20:54:32 +00:00
bmeurer
af76779aa3 [builtins] Start refactoring the Apply builtin.
This splits the monolithic Apply builtin into several smaller builtins,
namely CallVargargs and ConstructVarargs, which accept a length and a
FixedArray of elements and deal with the actual stack manipulation, and
CallWithArrayLike / ConstructWithArrayLike that deal with getting the
elements from the receiver (for Function.prototype.apply, Reflect.apply
and Reflect.construct), which can now be written using the CSA.

The idea is that these builtins can be reused by TurboFan directly in
the future when we optimize apply better, and that we can also reuse the
core logic in the handling of spread calls/constructs.

R=petermarshall@chromium.org
BUG=v8:4587,v8:5269

Review-Url: https://codereview.chromium.org/2930623002
Cr-Commit-Position: refs/heads/master@{#45794}
2017-06-08 18:31:59 +00:00
sampsong
ae947e26fe PPC/s390: [compiler] Delay allocation of code-embedded heap numbers.
Port 659e8f7b5c

Original Commit Message:

    Instead of allocating and embedding certain heap numbers into the code
    during code assembly, emit dummies but record the allocation requests.
    Later then, in Assembler::GetCode, allocate the heap numbers and patch
    the code by replacing the dummies with the actual objects. The
    RelocInfos for the embedded objects are already recorded correctly when
    emitting the dummies.

R=neis@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, bjaideep@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:6048
LOG=N

Review-Url: https://codereview.chromium.org/2929843002
Cr-Commit-Position: refs/heads/master@{#45793}
2017-06-08 17:41:56 +00:00
Ulan Degenbaev
e34f802132 [heap] Fix premature unmapping of new space pages.
concurrent sweeping is disabled, which is not correct.

MemoryAllocator: :CanFreeMemoryChunk returns true for the case when
Change-Id: I560bac0275473445b52fba28b5e647b54f523a3a
Reviewed-on: https://chromium-review.googlesource.com/528081
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45792}
2017-06-08 16:23:04 +00:00
kschimpf
f073a20b69 Localize counter class member functions.
This CL takes advantage of the fact that StatsCounter is now local to
the Counters class. This includes:

1) Method StatsTable::SetCreateHistogramFunction() was only called in
one spot (in api.cc), which also called Counters::ResetHistograms()
and Counters::InitializeHistorgram(). InitializeHistogram can be
folded into Histogram.Reset().

2) Since Histogram::Reset() now regenerats the histogram, we no longer
need the field lookup_done_. Therefore there is no longer a race
between updating ptr_ and lookup_done_, making the Histogram class
thread safe.

3) Made the constructors of several classes private (except for class
Counters), minimizing the scope that they are used. When the couldn't
be moved, add comment that they were public only for test cases.

4) Removed the need for a mutex lock on StatsCounter::Reset(), since
it is now guaranteed to only be called when
StatsTable::SetCounterFunction() is called.

BUG=v8:6361
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng

Review-Url: https://codereview.chromium.org/2918703002
Cr-Commit-Position: refs/heads/master@{#45791}
2017-06-08 16:18:32 +00:00
Toon Verwaest
fe048410f8 [builtins] Make sure to perform ToPrimitive(key, hint string) in hasOwnProperty even if the receiver is a smi.
Bug: chromium:707580
Change-Id: I38f8740ac0df5d5e4e99808e4fa20bae88a23a11
Reviewed-on: https://chromium-review.googlesource.com/528077
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45790}
2017-06-08 15:12:31 +00:00
Michael Starzinger
af2a8eae63 Decouple the --thin-strings from the --turbo flag.
Both TurboFan and ThinStrings have been enabled by default for a while.
This just disentangles the implication between those two flags and sets
the --thin-strings individually. There is no technical reason for the
implication.

R=jkummerow@chromium.org

Change-Id: I26e5357ffaf953de897c76d6edb8ac640bbeafd0
Reviewed-on: https://chromium-review.googlesource.com/528076
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45789}
2017-06-08 14:21:11 +00:00
v8-autoroll
e840a6160b Update V8 DEPS.
Rolling v8/build: 4161431..9d6666d

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

Change-Id: I3bddd9d99ea1840cce06dcb2c5b2bed33d2e7a7b
Reviewed-on: https://chromium-review.googlesource.com/527576
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45788}
2017-06-08 14:08:12 +00:00
Sathya Gunasekaran
8c9ea5eda6 [Collections] Dont adapt args for constructors
Bug: v8:5717
Change-Id: I03579764656aa743bbc9bbf08e6affecd626d73d
Reviewed-on: https://chromium-review.googlesource.com/527338
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45787}
2017-06-08 14:02:42 +00:00
Ross McIlroy
2c296b7eb3 [TurboFan] Add typing for the EmptyString and use this for JSToPrimitiveToString
Add the ability for the typer to track whether a string could be the empty
string. This is needed for typed lowering of JSStringConcat since we can't
create cons string chain with the empty string in arbitrary positions.

The ToPrimitiveToString bytecode handler is modified to collect feedback on
whether it has ever seen the empty string, which is used by
SpeculativeToPrimitiveToString to ensure that the output is non-empty (or
depot) which will subsiquently be used to enable inline cons-string creation
for the JSStringConcat operator in typed lowering in a subsiquent CL.

BUG=v8:6243

Change-Id: I41b99b59798993f756aada8cff90fb137d65ea52
Reviewed-on: https://chromium-review.googlesource.com/522122
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45786}
2017-06-08 09:51:26 +00:00
Michael Starzinger
e5fb221d55 [test] Deprecate and remove 'noturbofan' test variant.
The variant in question was intended to test Crankshaft, which is being
deprecated. Note that the variants 'nooptimization' and 'fullcode' still
test configuration where TurboFan is not active.

R=machenbach@chromium.org
BUG=v8:6408

Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: I587c3eee7ba511dfc270aab66b546d2532bc635f
Reviewed-on: https://chromium-review.googlesource.com/528133
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45785}
2017-06-08 09:48:36 +00:00
hpayer
8d75644fc0 [heap] Use larger marking steps during external allocation pressure
BUG=chromium:626082, chromium:728228

Review-Url: https://codereview.chromium.org/2927553003
Cr-Commit-Position: refs/heads/master@{#45784}
2017-06-08 08:58:30 +00:00
Mythri
aed96e7b04 [Turbofan] Simplify handling of hole check bytecodes in bytecode-graph-builder.
ThrowIfHole bytecodes were handled by introducing deopt points to check
for a hole. To avoid deopt loops a hole check protector was used to
generate control flow if there was a deopt due to a hole. However, the
normal control flow version should be as fast as the deopt version
in general. The deopt version could potentially consume less compile time
but it may not be worth the complexity added. Hence simplifying it to
only construct the control flow.

Bug: v8:6383
Change-Id: Icace11f7a6e21e64e1cebd104496e3f559bc85f7
Reviewed-on: https://chromium-review.googlesource.com/525573
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45783}
2017-06-08 08:53:16 +00:00