Commit Graph

40313 Commits

Author SHA1 Message Date
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
Michael Starzinger
7c58b68dc7 Remove dual implication between --turbo and --ignition.
This removes the last remaining dual implications between sets of flags.
Support for this was originally added to support multiple subsequent
calls to {SetFlagFromString} switching a set of flags on and off. Now
that Chrome no longer relies on this behavior we can remove support for
this entirely.

Original CL: https://crrev.com/f774d8c56f00de92614886fc4cb541411eff7aa1

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

Change-Id: I5f9db8457c562c0b434ea7d6eca9941c76fe7d19
Reviewed-on: https://chromium-review.googlesource.com/527174
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@{#45782}
2017-06-08 08:44:14 +00:00
Toon Verwaest
3eabf5a529 [runtime] Drop PrototypeOptimizationMode to unify prototype handling
Don't treat new prototypes differently depending on how they become a
prototype. This is work towards always keeping prototypes in slow-mode.


Bug: v8:6471
Change-Id: I62de1018e21d91fda3a5da044615f32c718910b1
Reviewed-on: https://chromium-review.googlesource.com/526596
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45781}
2017-06-08 08:00:37 +00:00
gdeepti
b3802dbbd8 [wasm] Wasm Memory/Table relocations should not be GC'ed enums
Review-Url: https://codereview.chromium.org/2930833002
Cr-Commit-Position: refs/heads/master@{#45780}
2017-06-08 07:49:49 +00:00
jgruber
e65e2f870e [coverage] Add support for iteration (For,While,DoWhile)
This adds block coverage support for simple iteration. For-of and
for-in loops are not yet covered, and we don't yet keep execution counts
for init, cond, and next statements.

BUG=v8:6000

Change-Id: I30b468a2c93f0bb60e857b6632be92920f6857e0
Reviewed-on: https://chromium-review.googlesource.com/527113
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45779}
2017-06-08 07:11:46 +00:00
v8-autoroll
8ff91ab712 Update V8 DEPS.
Rolling v8/build: d122cd7..4161431

Rolling v8/third_party/catapult: 3919ea6..32bdd96

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

Change-Id: I89800f7149815faaf1c83764275b09d206515055
Reviewed-on: https://chromium-review.googlesource.com/527481
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45778}
2017-06-08 03:24:38 +00:00
Eric Holk
8f39e07d80 Add allocation information to ArrayBuffer::Contents
Array buffers can now have an allocation that is larger than the actual
buffer, such as when WebAssembly guard regions are enabled. Embedders
need to know the actual allocation start and length when externalizing
a buffer so they can deallocate it properly.

Bug: chromium:720302, v8:5277
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ifc184fdd59d77af01c07a64d2c0229ca859a01b0
Reviewed-on: https://chromium-review.googlesource.com/523271
Commit-Queue: Eric Holk <eholk@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45777}
2017-06-08 02:51:13 +00:00
sander
e285b71220 Support reading a binary file as ArrayBuffer
Calling `read(filename, 'binary')` should return an ArrayBuffer like
SpiderMonkey does. It is possible to call `readbuffer` instead, but that
function is not available in the SpiderMonkey JS shell.

BUG=v8:6464
R=bradnelson@chromium.org

Review-Url: https://codereview.chromium.org/2922353002
Cr-Commit-Position: refs/heads/master@{#45776}
2017-06-07 17:11:16 +00:00
Igor Sheludko
92c4588d7d [runtime] Cleanup SharedFunctionInfo fields definitions (2).
Store the rest raw data fields as ints.

Bug: v8:6470
Change-Id: I3d4ab56a722ed6c0b5cb30ecee2d94d7c8f07b40
Reviewed-on: https://chromium-review.googlesource.com/526638
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45775}
2017-06-07 17:00:04 +00:00
Igor Sheludko
62acc91a85 [runtime][builtins] Cleanup SharedFunctionInfo fields definitions (1).
Store 'length' and 'formal_parameter_count' fields as raw ints.
Also fixed a couple of issues on the way.

TBR=verwaest@chromium.org

Bug: v8:6470
Change-Id: I74ecd87cb0f041e61dab50d8bc29e3604dd1d09c
Reviewed-on: https://chromium-review.googlesource.com/527156
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45774}
2017-06-07 16:47:25 +00:00
Andreas Haas
c7892d3577 [wasm] Extract module compilation code into module-compiler.cc
This CL extracts the classes CompilationHelper, InstantiationHelper,
and AsyncCompileJob from wasm-module.cc and puts them into
module-compiler.{h|cc}. This is necessary to introduce a
WasmCompilationManager which is known to the isolate and manages the
lifetime of all AsyncCompileJobs.

In addition to the mechanical changes of copying the code and splitting
class declaration from instantiation, I did the following changes:

* I renamed the CompilationHelper to ModuleCompiler.
* A finalizer function is passed to the InstantiationHelper as a
  parameter.
* Adjusted UpdateDispatchTable in wasm-module.cc to make it available in
  wasm-module.h, also with the internal signature.
* Duplicate the ResolvePromise/RejectPromise helper functions.

I did not rename InstantiationHelper because I could not come up with a
good name, and it could benefit from a small special refactoring anyways.

BUG=v8:6436
R=clemensh@chromium.org, mtrofin@chromium.org

Change-Id: I4abe854c36dfc995b34c9d7b3e7ec0f4f0aa562e
Reviewed-on: https://chromium-review.googlesource.com/525572
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45773}
2017-06-07 16:38:03 +00:00
Michael Starzinger
18d82682d1 [test] Remove dead and unmaintained test variants.
The two variants "turbofan" and "turbofan_opt" are not part of any of
the default sets of variants that run-tests.py uses. The only way to
trigger execution would be via the --variants flag directly, which our
infrastructure is not doing.

R=machenbach@chromium.org

Change-Id: Ifa58cb4a83a3760ffba73e8b40b417a845f53506
Reviewed-on: https://chromium-review.googlesource.com/526637
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45772}
2017-06-07 15:57:56 +00:00