Commit Graph

43613 Commits

Author SHA1 Message Date
Daniel Bevenius
b8331cc030 Fix path to v8 include files
I believe the paths to the V8 include headers are incorrect. The paths
to other sources seem to be relative to the parent directory.

When building Node.js I get the following warning on Windows:
Warning: Missing input files:
deps\v8\src\..\..\include\v8-inspector-protocol.h
deps\v8\src\..\..\include\v8-inspector.h

This commit updates the two include paths.

Bug: 
Change-Id: I51a057abba61e294e7811ba69db03e283b0bdc3f
Reviewed-on: https://chromium-review.googlesource.com/743981
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49121}
2017-11-04 00:25:59 +00:00
Ross McIlroy
5dc02ef2b8 Revert "[Ast] Teach Ast Printer to print raw literal values."
This reverts commit c60934e9e4.

Reason for revert: breaks nosnap build


Original change's description:
> [Ast] Teach Ast Printer to print raw literal values.
> 
> Converts the ast prettyprinter to printing literals from the raw values
> rather than internalized on-heap strings. This enables ast printing before
> internalizing, and means we can avoid use of the isolate in the interpreter's
> off-thread phase.
> 
> Also removes --print-builtin-ast and relies on just --print-ast to print
> everything.
> 
> Finally, converts FunctionLiteral's debug_name function to return a
> char[] which is created from the raw name literal where it exists, rather
> than relying on the value having been internalized.
> 
> BUG=v8:5203
> 
> Change-Id: I0e358d6acc9ae4516ed49e7a763e208fea5fcf66
> Reviewed-on: https://chromium-review.googlesource.com/749261
> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49119}

TBR=rmcilroy@chromium.org,adamk@chromium.org

Change-Id: Ic9d511f5107666a2f6a2bf59d8e93643c32d4d2b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:5203
Reviewed-on: https://chromium-review.googlesource.com/753627
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49120}
2017-11-03 23:45:52 +00:00
Ross McIlroy
c60934e9e4 [Ast] Teach Ast Printer to print raw literal values.
Converts the ast prettyprinter to printing literals from the raw values
rather than internalized on-heap strings. This enables ast printing before
internalizing, and means we can avoid use of the isolate in the interpreter's
off-thread phase.

Also removes --print-builtin-ast and relies on just --print-ast to print
everything.

Finally, converts FunctionLiteral's debug_name function to return a
char[] which is created from the raw name literal where it exists, rather
than relying on the value having been internalized.

BUG=v8:5203

Change-Id: I0e358d6acc9ae4516ed49e7a763e208fea5fcf66
Reviewed-on: https://chromium-review.googlesource.com/749261
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49119}
2017-11-03 23:03:10 +00:00
Ross McIlroy
ddd2a727bb [Cleanup] Remove unused counters.
Bug: 
Change-Id: I9648c10c81a976b179fb58e8192366ee49f57db4
Reviewed-on: https://chromium-review.googlesource.com/741720
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49118}
2017-11-03 22:27:27 +00:00
Karl Schimpf
f3bfe56590 Fix UMA stats for WASM function size
The code was updating the UMA stats for V8.WasmFunctionSizeBytes when
the WASM function was decoded. Unfortunately, decoding of functions is
no longer done as a separate step. Rather, it is done as part of the
compilation step.

This CL moves the UMA updates to the compilation step.

Bug: v8:7032
Change-Id: I4679036035540fabd43855c1ba5ba66ffee6762a
Reviewed-on: https://chromium-review.googlesource.com/754023
Commit-Queue: Karl Schimpf <kschimpf@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49117}
2017-11-03 20:45:46 +00:00
Benedikt Meurer
1b9e9bb9ab Revert "Disable --string-slices."
This reverts commit fd5b067f1e.

Reason for revert: Tanks Babylon by around 40%

Original change's description:
> Disable --string-slices.
> 
> This is an experiment to quantify the impact of SlicedStrings on both
> performance and memory usage. The intention is to get Canary coverage
> for the experiment and then decide how to proceed.
> 
> Bug: v8:7025
> Change-Id: Ied548cd9e2fab127c1ad2aea3e60b2615d3de663
> Reviewed-on: https://chromium-review.googlesource.com/750082
> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49070}

TBR=yangguo@chromium.org,bmeurer@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: v8:7025
Change-Id: I95dc36e632ecb5ddcddda8f6f58528439d5c102b
Reviewed-on: https://chromium-review.googlesource.com/753621
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49116}
2017-11-03 19:51:06 +00:00
Sathya Gunasekaran
4f781ecabf [class] Evaluate static computed props during class definition
This patch evaluates computed properties in the order of declaration
during class definition time.

This patch creates a synthetic variable to store the result of
evaluating a computed property and then looks this up in the
initializer function.

Bug: v8:5367
Change-Id: I4182c6a01196d2538991818142890f6afb0e532b
Reviewed-on: https://chromium-review.googlesource.com/752567
Reviewed-by: Mythri Alle <mythria@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49115}
2017-11-03 18:51:00 +00:00
Bill Budge
6346cc53ad [Memory] Clean up base OS memory abstractions.
- Sanitize Windows page size / alignment code.
- Reorder some methods to match header file.
- Rename AllocateAlignment to AllocatePageSize to be consistent
  with CommitPageSize.
- Eliminate OS::Allocate overload with is_executable argument.
- Eliminate base::OS::AllocateGuarded - it's not implemented.

Bug: chromium:756050
Change-Id: I046bb019cddde0c0063d617adc2c94a23989d9d1
Reviewed-on: https://chromium-review.googlesource.com/742684
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49114}
2017-11-03 18:49:55 +00:00
Jakob Gruber
91ec9872fb [error] Add use counters for non-standard Error features
V8 provides non-standard Error API through:

Error.captureStackTrace
Error.prepareStackTrace
Error.stackTraceLimit

Let's add use counters to gauge how wide-spread these are used.

This is the V8 side of required changes.
The Chromium-side CL: https://crrev.com/c/753446

Bug: v8:6975
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I917cd6344a01670799f6cbf88a4bfff8e8d0d6ad
Reviewed-on: https://chromium-review.googlesource.com/753443
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49113}
2017-11-03 18:32:02 +00:00
Michael Achenbach
3510728f8d Revert "[compiler] Add background compilation mode."
This reverts commit c61f917179.

Reason for revert: (Speculative)
Seems to block the roll:
https://chromium-review.googlesource.com/c/chromium/src/+/753602

Also failures on webkit win unittests and gpu tests:
https://build.chromium.org/p/client.v8.fyi/builders/Win%20Release%20%28NVIDIA%29/builds/3382
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Win/builds/11512

Original change's description:
> [compiler] Add background compilation mode.
> 
> Adds support for compiling top-level code on a background thread behind a flag.
> When the flag is enabled, any background-parsing-task will perform compilation
> as well as parsing.
> 
> BUG=v8:5203
> 
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
> Change-Id: I88ab05c97cd6aea8d6be26e27d8da327f2c9c3a8
> Reviewed-on: https://chromium-review.googlesource.com/741716
> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49103}

TBR=rmcilroy@chromium.org,marja@chromium.org,mstarzinger@chromium.org

Change-Id: I49b0b0ee61fb79766a9a928b43d51d0eeb793d39
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:5203
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/753302
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49112}
2017-11-03 18:18:37 +00:00
Peter Marshall
d29ef43226 [cleanup] Replace ZoneList with ZoneVector in frames, json-parser and
more.

Bug: v8:6333, v8:6921
Change-Id: I442190988f2c853560b28efa54e04ff73f9d94ca
Reviewed-on: https://chromium-review.googlesource.com/718343
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49111}
2017-11-03 17:56:21 +00:00
Camillo Bruni
e4a97a2e6f [log] Escape newline with \n
Change-Id: I456b3456351860e3e5e7e9dcb800d42d543a7c47
Reviewed-on: https://chromium-review.googlesource.com/753681
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49110}
2017-11-03 16:41:39 +00:00
Georg Neis
cc5574799c [test/message] Allow numbers to have more than one leading digit.
The {NUMBER} regexp only allowed one, leading to occasional test
failures such as:
https://build.chromium.org/p/client.v8/builders/V8%20Mac%20-%20debug/builds/17156

Bug: 
Change-Id: I25a08b80640d9af19ba70c61c846163685f1cb82
Reviewed-on: https://chromium-review.googlesource.com/753322
Reviewed-by: Franziska Hinkelmann <franzih@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49109}
2017-11-03 15:25:25 +00:00
Predrag Rudic
d007fe9b20 MIPS[64]R6 Fix test-run-wasm-simd/RunWasm_S32x4Dup_compiled
Bug: 
Change-Id: If922715b071276613fd27b6cc7f5326fdc9a37db
Reviewed-on: https://chromium-review.googlesource.com/753091
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
Cr-Commit-Position: refs/heads/master@{#49108}
2017-11-03 15:06:55 +00:00
Junliang Yan
a39e79734d PPC/s390: Precalculate the exception handler address.
Port c192569047

Original Commit Message:

    We expect no GC between the call to UnwindAndFindHandler and
    the call to that handler. We can precalculate the handler entrypoint
    and then let the CEntryStub just load and call that address.

    The main motivation for this change is the wasm on the native heap
    work, and making the CEntryStub able to work with non- Code* values.

R=mtrofin@chromium.org, mstarzinger@chromium.org, bradnelson@chromium.org, titzer@chromium.org, joransiu@ca.ibm.com, bjaideep@ca.ibm.com, michael_dawson@ca.ibm.com

Change-Id: I139fddabef9f601b46dac9011db3ab8e01e3346d
Reviewed-on: https://chromium-review.googlesource.com/752483
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#49107}
2017-11-03 14:25:38 +00:00
Clemens Hammacher
7d231e576a [bits] Consolidate Count{Leading,Trailing}Zeros
Instead of having one method for 32 bit integers and one for 64 bit,
plus a templatized version to choose from those two, just implement one
version which handles unsigned integers of any size. Also, make them
constexpr.
The Count{Leading,Trailing}Zeros{32,64} methods are kept for now in
order to keep the amount of code changes small. Also, sometimes it
improves readability by stating exactly the size of the argument,
especially for leading zeros (where zero-extending would add more
leading zeros).

CountLeadingZeros now uses a binary search inspired implementation
as proposed in Hacker's Delight. It's more than 20% faster on x64 if
the builtins are disabled.
CountTrailingZeros falls back to CountPopulation instead of counting in
a naive loop. This is ~50% faster.

R=mstarzinger@chromium.org

Change-Id: I1d8bf1d7295b930724163248150444bd17fbb34e
Reviewed-on: https://chromium-review.googlesource.com/741231
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49106}
2017-11-03 14:06:25 +00:00
Camillo Bruni
c35c40ae4e [literals] Document that literals with simple getters cause dict-properties
Drive-by-fix: increase coverage in object literals test.

Change-Id: Iccfdf35b29229f63b3e8c1d961bee56ee03da688
Reviewed-on: https://chromium-review.googlesource.com/751661
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49105}
2017-11-03 12:43:54 +00:00
Clemens Hammacher
eee9fcbccb [d8] Report errors in setTimeout
If an error is thrown in a setTimeout callback, exit d8 with an error
code.
This will allow us to test asynchronous failures better, see linked bug.

R=yangguo@chromium.org
CC=mathias@chromium.org

Bug: v8:6981
Change-Id: Ifad152e6039f12dc4ceaac0bdc4b87f709898087
Reviewed-on: https://chromium-review.googlesource.com/738372
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49104}
2017-11-03 12:21:53 +00:00
Ross McIlroy
c61f917179 [compiler] Add background compilation mode.
Adds support for compiling top-level code on a background thread behind a flag.
When the flag is enabled, any background-parsing-task will perform compilation
as well as parsing.

BUG=v8:5203

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I88ab05c97cd6aea8d6be26e27d8da327f2c9c3a8
Reviewed-on: https://chromium-review.googlesource.com/741716
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49103}
2017-11-03 11:03:21 +00:00
Sergiy Byelozyorov
0a7a87f608 Add vpython verification presubmit
R=machenbach@chromium.org

Bug: chromium:777893
Change-Id: I2816934494309da458589b7d9b0c46fba9beaf38
Reviewed-on: https://chromium-review.googlesource.com/741221
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49102}
2017-11-03 10:39:56 +00:00
Benedikt Meurer
82b3ac945c [turbofan] Properly handle Array.prototype and Object.prototype in the runtime.
We don't use ICs for the Array.prototype and the Object.prototype
because the runtime has to be able to intercept them properly (for the
global protectors). So we better make sure that TurboFan doesn't
outsmart the system by storing to elements of either prototype directly.

Bug: chromium:781116
Change-Id: I0f521601ef02c1b21018abd1bf1028fd8a811e84
Reviewed-on: https://chromium-review.googlesource.com/753089
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49101}
2017-11-03 10:38:51 +00:00
Franziska Hinkelmann
38d626b54a [cleanup] Use range based for loop
Bug: 
Change-Id: I5be4eabfc61f885f380fbec27dc537ed5d031493
Reviewed-on: https://chromium-review.googlesource.com/753084
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49100}
2017-11-03 10:37:41 +00:00
Benedikt Meurer
49999742b5 Revert "RegExp: Add the ability to switch flags on and off within the regexp"
This reverts commit 68212c80c3.

Reason for revert: https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20noi18n%20-%20debug/builds/17200

Original change's description:
> RegExp: Add the ability to switch flags on and off within the regexp
> 
> R=​yangguo@chromium.org
> 
> This is a reupload of https://chromium-review.googlesource.com/c/v8/v8/+/571746
> with a different user, since the other one was not allowed to commit to V8 any
> more.
> 
> Bug: 
> Change-Id: I6171afd44e514f6c934390faab6f9bee3953ac77
> Reviewed-on: https://chromium-review.googlesource.com/752522
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49098}

TBR=erik.corry@gmail.com,yangguo@chromium.org,erikcorry@chromium.org,jgruber@chromium.org

Change-Id: I651c5618f09f43104af50cb1319ab7b49011573e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/752802
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49099}
2017-11-03 10:29:03 +00:00
Erik
68212c80c3 RegExp: Add the ability to switch flags on and off within the regexp
R=yangguo@chromium.org

This is a reupload of https://chromium-review.googlesource.com/c/v8/v8/+/571746
with a different user, since the other one was not allowed to commit to V8 any
more.

Bug: 
Change-Id: I6171afd44e514f6c934390faab6f9bee3953ac77
Reviewed-on: https://chromium-review.googlesource.com/752522
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49098}
2017-11-03 09:35:25 +00:00
Tobias Tebbi
113527b6bc [ic] Internalize strings on the fly in KeyedStoreICGeneric
Internalizing a key in the KeyedStoreICGeneric avoids an expensive SetProperty runtime call. 
This improves the prepack benchmark by ~5%. 
In the micro-benchmark copy-object.js attached to the bug, it surfaces as a ~2.5x improvement.
The performance improvement currently relies on the stub cache, since we don't search for 
transitions from within the CSA. As this CL puts additional stress on the stub cache, 
performance regressions wouldn't be too surprising.

Bug: v8:6936, v8:6997
Change-Id: Id1469499a3ae5450519ff40d3c5a0915c6de0d45
Reviewed-on: https://chromium-review.googlesource.com/749951
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49097}
2017-11-03 09:25:45 +00:00
Franziska Hinkelmann
b48f850ab5 [cleanup] Fix code style
Bug: 
Change-Id: I341ab2833896afcb1f97a6d4c3af3afb12a26b8a
Reviewed-on: https://chromium-review.googlesource.com/753083
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49096}
2017-11-03 09:22:35 +00:00
Benedikt Meurer
b7168573ed [turbofan] Generalized OOB support for KeyedLoadIC.
This extends the support in TurboFan and the ICs for OOB loads to also
apply to typed arrays and receivers whose prototype chain is protected
by the "no elements" protector (aka the Array protector). TurboFan will
generate code to materialize undefined instead when it sees a load that
has the OOB bit set and add an appropriate code dependency on the global
protector. For typed arrays it doesn't even need to check the global
protector since elements are never looked up in the prototype chain
for typed arrays.

In the simple micro-benchmark from the bug we go from

  testInBounds: 103 ms.
  testOutOfBounds: 289 ms.

to

  testInBounds: 103 ms.
  testOutOfBounds: 102 ms.

which fixes the 3x slowdown and thus addresses the performance cliff. In
general it's still beneficial to make sure that you don't access out of
bounds, especially once we introduce a bounds check elimination pass to
TurboFan.

This also seems to improve the jQuery benchmark on the Speedometer test
suite by like 1-2% on average. And the SixSpeed rest benchmarks go from

  rest-es5: 25 ms.
  rest-es6: 23 ms.

to

  rest-es5: 6 ms.
  rest-es6: 4 ms.

so a solid 5.7x improvement there.

Bug: v8:6936, v8:7014, v8:7027
Change-Id: Ie99699c69cc40057512e72fd40ae28107216c423
Reviewed-on: https://chromium-review.googlesource.com/750089
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49095}
2017-11-03 07:35:14 +00:00
v8-autoroll
b4a4f6e3f6 Update V8 DEPS.
Rolling v8/build: ec29950..53fa255

Rolling v8/buildtools: 3275a09..df36429

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/1471560..7208715

Rolling v8/tools/clang: 4ea1d22..9f0284f

Rolling v8/tools/swarming_client: fe94e72..5da404c

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

Change-Id: I837c1aa249d66b24733fbfbef597df6fd5480e6e
Reviewed-on: https://chromium-review.googlesource.com/752881
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49094}
2017-11-03 03:55:24 +00:00
Benedikt Meurer
96b1fdb276 [ic] Internalize strings on the fly in KeyedLoadICGeneric.
This turns on the existing --internalize_on_the_fly flag for the
MEGAMORPHIC KeyedLoadIC to properly internalize strings before
looking up the property. This avoids the otherwise taken runtime
call to %KeyedGetProperty, which is definitely slower.

Initially the --internalize_on_the_fly flag was turned off because
internalizing strings on the fly causes too much traffic on the
megamorphic stub cache. We avoid this problem here by not probing
the stub cache in that case, which still gives the benefit of not
having to go to the runtime.

This improves the babylon test on the web-tooling-benchmark by around
2-3% and will probably also help with several tests (like React or
Ember) on the Speedometer benchmark.

If this CL causes trouble (i.e. tanks something important), we can
just turn off the --internalize_on_the_fly flag again.

Bug: v8:6936, v8:7026
Change-Id: If295ed3fd013f8b0ff031f9979e7df21dab817b6
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/751464
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49093}
2017-11-02 20:57:10 +00:00
Michael Lippautz
0488cb19f7 [heap] Heap remove broken perferred page handling by the Scavenger
Sweeping a page while currently scavenging it is broken as the scavenger
might override the slot it is currently processing.

Bug: chromium:779503
Change-Id: I224a144b84e97a956bf10ba018132c2713e8f78d
Reviewed-on: https://chromium-review.googlesource.com/752081
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49092}
2017-11-02 20:51:33 +00:00
Alexei Filippov
4a26804cf0 [runtime-call-stats] Remove debug dumps.
No more crashes are seen in the RuntimeCallStats::Leave function. So
we can remove the debug info.

BUG=chromium:760649

Change-Id: If0a5f4ebf9ae359e3b8180ef2f8d37cab8659b06
Reviewed-on: https://chromium-review.googlesource.com/747483
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49091}
2017-11-02 19:34:50 +00:00
Ulan Degenbaev
586067e45d Reland "[heap] Temporarily disable concurrent marking."
This is a reland of a9a50dc9a8

Buildbot crashes are fixed by a274fc6.

Original change's description:
> [heap] Temporarily disable concurrent marking.
> 
> The 6.3 branch has a data race that is fixed in 6.4 but the fix is too
> large for back merging.
> 
> This CL will be back-merged to 6.3 after getting Canary coverage.
> 
> Concurrent marking will be re-enabled afterwards.
> 
> Bug: chromium:774644
> Change-Id: I4112da0e133a637cc4fb52dee2e4c165cdc74f1f
> Reviewed-on: https://chromium-review.googlesource.com/749811
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49080}

Bug: chromium:774644
Change-Id: Idf5d179eca25a1481c70c6ca3bccde4869deb544
Reviewed-on: https://chromium-review.googlesource.com/751271
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49090}
2017-11-02 19:10:00 +00:00
Michal Majewski
694a18781c Deprecated shell dir option.
Bug: v8:6917
Change-Id: Ia80de1d0430efb0c5f41a79267ba9146c5be42ce
Reviewed-on: https://chromium-review.googlesource.com/751462
Commit-Queue: Michał Majewski <majeski@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49089}
2017-11-02 19:03:15 +00:00
Benedikt Meurer
fd35526f36 [turbofan] Avoid duplicate JSType function.
Reduce code duplication, which breaks jumbo builds. Put the StrictEqual
typing rule into the OperationTyper and share the JSType function,
which is also used by SameValue.

Bug: chromium:779531
Change-Id: If292f319217286fd1c676be04f9de3925ed56965
Reviewed-on: https://chromium-review.googlesource.com/751665
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49088}
2017-11-02 19:02:10 +00:00
Ulan Degenbaev
a274fc6536 [heap] Properly clear the weak slot in CodeDataContainer.
During iteration of the optimized code list to process weak slots, we
need to clear the next_code_link in the CodeDataContainer of a dying
code object because the CodeDataContainer can still be alive.

BUG=v8:6792

Change-Id: Iec5f7430a4097cb622de2157bdec2a7d539dbba0
Reviewed-on: https://chromium-review.googlesource.com/751663
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49087}
2017-11-02 18:28:20 +00:00
Michael Lippautz
aa371fac37 [heap] Introduce a separate pass for destroying phantom handles
Phantom handles were processed at the same time as finalizers. This 
meant that if a finalizer kept an object alive the phantom handle
was still destroyed.

This becomes a problem in the context of Blink GCs where internal
fields are roots for Blink. Prematurely destroying a phantom handle
can lead to stale pointers.

Bug: chromium:772299
Change-Id: If02365c457be8ce48379ad357cce36baa9617cfb
Reviewed-on: https://chromium-review.googlesource.com/750625
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49086}
2017-11-02 18:16:20 +00:00
Michal Majewski
e053582a55 Removed shell option from testrunner.
Bug: v8:6917
Change-Id: I95355d445ae08a500a3210314dc893dfaddf209d
Reviewed-on: https://chromium-review.googlesource.com/750808
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michał Majewski <majeski@google.com>
Cr-Commit-Position: refs/heads/master@{#49085}
2017-11-02 18:09:30 +00:00
Mircea Trofin
c192569047 Precalculate the exception handler address.
We expect no GC between the call to UnwindAndFindHandler and
the call to that handler. We can precalculate the handler entrypoint
and then let the CEntryStub just load and call that address.

The main motivation for this change is the wasm on the native heap
work, and making the CEntryStub able to work with non- Code* values.

Bug: v8:6876
Change-Id: I660f29619edc315afbb537ef3df018865fab7ba4
Reviewed-on: https://chromium-review.googlesource.com/744723
Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49084}
2017-11-02 18:08:20 +00:00
Ulan Degenbaev
49c62872db Revert "[heap] Temporarily disable concurrent marking."
This reverts commit a9a50dc9a8.

Reason for revert: buildbot crashes.

Original change's description:
> [heap] Temporarily disable concurrent marking.
> 
> The 6.3 branch has a data race that is fixed in 6.4 but the fix is too
> large for back merging.
> 
> This CL will be back-merged to 6.3 after getting Canary coverage.
> 
> Concurrent marking will be re-enabled afterwards.
> 
> Bug: chromium:774644
> Change-Id: I4112da0e133a637cc4fb52dee2e4c165cdc74f1f
> Reviewed-on: https://chromium-review.googlesource.com/749811
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49080}

TBR=ulan@chromium.org,hpayer@chromium.org,mlippautz@chromium.org

Change-Id: Ia9d2128c01b811073c1c8f0392eb13b7d7745cd1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:774644
Reviewed-on: https://chromium-review.googlesource.com/751501
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49083}
2017-11-02 15:47:57 +00:00
Clemens Hammacher
edf12f104f [wasm] [cleanup] Rename tests
After renaming the WasmExecutionMode constants, I should also have
renamed the tests generated from the WASM_EXEC_TEST macro. This CL
cleans this up.

R=titzer@chromium.org

Change-Id: Ifcb1a1e09422a06f89c3b44dc6b7799d3f84f7ac
Reviewed-on: https://chromium-review.googlesource.com/744044
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49082}
2017-11-02 14:34:13 +00:00
Toon Verwaest
b976b30b7d Check is_simple_api_call before IsCrossContextLazyAccessorPair, accessor could be null
Bug: chromium:779367
Change-Id: I0d361ffc9be1e271e91ce81c3e5cf70697c0ac0b
Reviewed-on: https://chromium-review.googlesource.com/749812
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49081}
2017-11-02 14:23:32 +00:00
Ulan Degenbaev
a9a50dc9a8 [heap] Temporarily disable concurrent marking.
The 6.3 branch has a data race that is fixed in 6.4 but the fix is too
large for back merging.

This CL will be back-merged to 6.3 after getting Canary coverage.

Concurrent marking will be re-enabled afterwards.

Bug: chromium:774644
Change-Id: I4112da0e133a637cc4fb52dee2e4c165cdc74f1f
Reviewed-on: https://chromium-review.googlesource.com/749811
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49080}
2017-11-02 14:20:32 +00:00
Jakob Gruber
759cfaa2ba [regexp] Abort on compilation overflow if flag passed
Abort execution on stack overflow during compilation if
--abort-on-stack-or-string-length-overflow was passed (for correctness
fuzzer support).

Bug: chromium:778962
Change-Id: Idd50b47c4ddc03b7839ce850da95502fce4cc848
Reviewed-on: https://chromium-review.googlesource.com/750842
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49079}
2017-11-02 14:00:24 +00:00
Michal Majewski
fd1fa35721 Reland "Setting up the environment for testrunner refactored"
This is a reland of 697b2c09a5
Original change's description:
> Setting up the environment for testrunner refactored
> 
> Bug: v8:6917
> Change-Id: Ibc3c738ef807d37d8b76f440d9765c4d0405c021
> Reviewed-on: https://chromium-review.googlesource.com/735421
> Commit-Queue: Michał Majewski <majeski@google.com>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#48923}

Bug: v8:6917
Change-Id: I07918814ee8277eca96bcb2d330e6b08f6a0505d
Reviewed-on: https://chromium-review.googlesource.com/741621
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michał Majewski <majeski@google.com>
Cr-Commit-Position: refs/heads/master@{#49078}
2017-11-02 13:55:25 +00:00
Michael Achenbach
e06c116379 Revert "[ic] Internalize strings on the fly in KeyedLoadICGeneric."
This reverts commit 6366a01008.

Reason for revert: Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/19429

Original change's description:
> [ic] Internalize strings on the fly in KeyedLoadICGeneric.
> 
> This turns on the existing --internalize_on_the_fly flag for the
> MEGAMORPHIC KeyedLoadIC to properly internalize strings before
> looking up the property. This avoids the otherwise taken runtime
> call to %KeyedGetProperty, which is definitely slower.
> 
> Initially the --internalize_on_the_fly flag was turned off because
> internalizing strings on the fly causes too much traffic on the
> megamorphic stub cache. We avoid this problem here by not probing
> the stub cache in that case, which still gives the benefit of not
> having to go to the runtime.
> 
> This improves the babylon test on the web-tooling-benchmark by around
> 2-3% and will probably also help with several tests (like React or
> Ember) on the Speedometer benchmark.
> 
> If this CL causes trouble (i.e. tanks something important), we can
> just turn off the --internalize_on_the_fly flag again.
> 
> Bug: v8:6936, v8:7026
> Change-Id: Ia59a8a3799d9624d831d66b05bae3ecef31cee0a
> Reviewed-on: https://chromium-review.googlesource.com/750821
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49072}

TBR=ishell@chromium.org,bmeurer@chromium.org

Change-Id: I5345eb29016ecd6b7788b1b49b2f53992ea82b58
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6936, v8:7026
Reviewed-on: https://chromium-review.googlesource.com/750904
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49077}
2017-11-02 13:37:35 +00:00
peterwmwong
43858375cf [builtins] Port WeakMap.p.delete and WeakSet.p.delete to CSA from JS
- Add WeakMapPrototypeDelete and WeakSetPrototypeDelete TFJ builtins
  - Fast paths when it's not necessary to shrink the table
- Add WeakCollectionDelete TFS

Some quick benchmarks shows 1.4x - 2.15x gains in performance.
https://github.com/peterwmwong/v8-perf/blob/master/weakcollection-delete/README.md

Bug: v8:5049, v8:6604
Change-Id: I14036df153f3a0242f9083d751658b868b16660a
Reviewed-on: https://chromium-review.googlesource.com/743864
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49076}
2017-11-02 13:12:53 +00:00
Michael Achenbach
d9c5e5d0fc Revert "Revert "[cctest] Clarify that tests for sync instructions are simulator specific""
This reverts commit 1feadfe81b.

Reason for revert: Reland as bot stayed red after revert.

Original change's description:
> Revert "[cctest] Clarify that tests for sync instructions are simulator specific"
> 
> This reverts commit 4013518fe3.
> 
> Reason for revert:
> https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20gc%20stress
> 
> Original change's description:
> > [cctest] Clarify that tests for sync instructions are simulator specific
> > 
> > Some tests were recently added to test-simulator-arm.cc, however this file is
> > meant for tests that are specific to the simulator and therefore are not written
> > to work on hardware. While this sounds surprising, the reason is that our simulation
> > of synchronisation instructions is more conservative than on hardware.
> > 
> > To make this more clear, this patch renames the "test-simulator-arm{,64}.cc"
> > files to "test-sync-primitives-arm{,64}.cc", and moves the vneg and vabs tests
> > into "test-assembler-arm.cc" which is were tests that are garanteed to work in
> > either native or simulated environments live.
> > 
> > Finally, take the opportunity to share a little bit of code.
> > 
> > Bug: v8:6963
> > Change-Id: Ifb85d3671c823b9bba73d09f419536b089a4e87c
> > Reviewed-on: https://chromium-review.googlesource.com/749387
> > Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> > Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
> > Cr-Commit-Position: refs/heads/master@{#49073}
> 
> TBR=clemensh@chromium.org,pierre.langlois@arm.com,bmeurer@chromium.org
> 
> Change-Id: I1bfb4e9c7c18b716f417a84b18a14cb2e1fa3a7a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: v8:6963
> Reviewed-on: https://chromium-review.googlesource.com/750624
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49074}

TBR=machenbach@chromium.org,clemensh@chromium.org,pierre.langlois@arm.com,bmeurer@chromium.org

Change-Id: I5af7bd3678758130534730a2f6f0b651b64c6956
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6963
Reviewed-on: https://chromium-review.googlesource.com/750903
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49075}
2017-11-02 13:11:45 +00:00
Michael Achenbach
1feadfe81b Revert "[cctest] Clarify that tests for sync instructions are simulator specific"
This reverts commit 4013518fe3.

Reason for revert:
https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20gc%20stress

Original change's description:
> [cctest] Clarify that tests for sync instructions are simulator specific
> 
> Some tests were recently added to test-simulator-arm.cc, however this file is
> meant for tests that are specific to the simulator and therefore are not written
> to work on hardware. While this sounds surprising, the reason is that our simulation
> of synchronisation instructions is more conservative than on hardware.
> 
> To make this more clear, this patch renames the "test-simulator-arm{,64}.cc"
> files to "test-sync-primitives-arm{,64}.cc", and moves the vneg and vabs tests
> into "test-assembler-arm.cc" which is were tests that are garanteed to work in
> either native or simulated environments live.
> 
> Finally, take the opportunity to share a little bit of code.
> 
> Bug: v8:6963
> Change-Id: Ifb85d3671c823b9bba73d09f419536b089a4e87c
> Reviewed-on: https://chromium-review.googlesource.com/749387
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
> Cr-Commit-Position: refs/heads/master@{#49073}

TBR=clemensh@chromium.org,pierre.langlois@arm.com,bmeurer@chromium.org

Change-Id: I1bfb4e9c7c18b716f417a84b18a14cb2e1fa3a7a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6963
Reviewed-on: https://chromium-review.googlesource.com/750624
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49074}
2017-11-02 11:39:04 +00:00
Pierre Langlois
4013518fe3 [cctest] Clarify that tests for sync instructions are simulator specific
Some tests were recently added to test-simulator-arm.cc, however this file is
meant for tests that are specific to the simulator and therefore are not written
to work on hardware. While this sounds surprising, the reason is that our simulation
of synchronisation instructions is more conservative than on hardware.

To make this more clear, this patch renames the "test-simulator-arm{,64}.cc"
files to "test-sync-primitives-arm{,64}.cc", and moves the vneg and vabs tests
into "test-assembler-arm.cc" which is were tests that are garanteed to work in
either native or simulated environments live.

Finally, take the opportunity to share a little bit of code.

Bug: v8:6963
Change-Id: Ifb85d3671c823b9bba73d09f419536b089a4e87c
Reviewed-on: https://chromium-review.googlesource.com/749387
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#49073}
2017-11-02 10:45:21 +00:00
Benedikt Meurer
6366a01008 [ic] Internalize strings on the fly in KeyedLoadICGeneric.
This turns on the existing --internalize_on_the_fly flag for the
MEGAMORPHIC KeyedLoadIC to properly internalize strings before
looking up the property. This avoids the otherwise taken runtime
call to %KeyedGetProperty, which is definitely slower.

Initially the --internalize_on_the_fly flag was turned off because
internalizing strings on the fly causes too much traffic on the
megamorphic stub cache. We avoid this problem here by not probing
the stub cache in that case, which still gives the benefit of not
having to go to the runtime.

This improves the babylon test on the web-tooling-benchmark by around
2-3% and will probably also help with several tests (like React or
Ember) on the Speedometer benchmark.

If this CL causes trouble (i.e. tanks something important), we can
just turn off the --internalize_on_the_fly flag again.

Bug: v8:6936, v8:7026
Change-Id: Ia59a8a3799d9624d831d66b05bae3ecef31cee0a
Reviewed-on: https://chromium-review.googlesource.com/750821
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49072}
2017-11-02 10:14:07 +00:00