Commit Graph

41888 Commits

Author SHA1 Message Date
Mircea Trofin
e8f98899a1 [wasm] Faster Instantiate by avoiding redundant default code init
The compiler patches all call sites with a default code object value.
We used to populate a vector with that value. Turns out that avoiding
having that vector measurably reduces instantiation time.

Bug: 
Change-Id: I2c843210a2ab24541f370b5493c3cbb555149e1a
Reviewed-on: https://chromium-review.googlesource.com/609480
Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47296}
2017-08-10 20:12:27 +00:00
Ulan Degenbaev
468d5faa6b [heap] Fix atomicity of IterateAndScavengePromotedObject
Bug: chromium:694255
TBR: mlippautz@chromium.org
No-Tree-Checks: true
No-Try: true
Change-Id: I720dcc79c4cb8c1cbd7dd6e6de4c6113c363b2f0
Reviewed-on: https://chromium-review.googlesource.com/610561
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47295}
2017-08-10 19:46:06 +00:00
Eric Holk
f315b32267 Add eholk to Wasm-related OWNERS files
Bug: 
Change-Id: I1ab93d5b2d02d9a4851c2e67d33968a7cafaedd3
Reviewed-on: https://chromium-review.googlesource.com/610892
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Commit-Queue: Brad Nelson <bradnelson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47294}
2017-08-10 18:58:00 +00:00
Ulan Degenbaev
a7ab836aba [heap] Fix atomicity of IncrementalMarking::TransferColor.
Bug: chromium:694255
TBR: mlippautz@chromium.org
Change-Id: Ie9f2f7bff8ada297b1d078947f073eaf62ac0649
Reviewed-on: https://chromium-review.googlesource.com/610782
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47293}
2017-08-10 18:46:40 +00:00
Michael Lippautz
7adbb4a24c [heap] MC: Go through marking deque when marking roots
Bug: chromium:750084
Change-Id: I3c0059f1e986b5e4400f84f44b7f179e7232eae1
Reviewed-on: https://chromium-review.googlesource.com/610781
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47292}
2017-08-10 18:38:50 +00:00
Adam Klein
774c6413d5 [parser] Move PatternRewriter declaration to pattern-rewriter.cc
PatternRewriter is an implementation detail of the Parser; as such,
there's no need for it to be exposed in parser.h (or even to most
of the Parser). This patch is a cleanup that hides all of PatternRewriter
in pattern-rewriter.cc, exposing only the few helper methods needed
by the rest of Parser in parser.h.

Also removed some duplication between the two PatternRewriter
initialization functions by adding a constructor, and added
a few DCHECKs here and there.

Change-Id: I1dbae8dc0172ff16e40585d0e718d206d2075b3a
Reviewed-on: https://chromium-review.googlesource.com/609365
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47291}
2017-08-10 18:14:41 +00:00
Maya Lekova
753d987a51 Add micro-benchmark for Proxy set property
Add additional tests for Proxy get and has property.

Bug: v8:6560, v8:6557
Change-Id: I56360c230b03a16425f4068d8023f90b3164eebb
Reviewed-on: https://chromium-review.googlesource.com/607889
Commit-Queue: Maya Lekova <mslekova@google.com>
Reviewed-by: Franziska Hinkelmann <franzih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47290}
2017-08-10 18:11:50 +00:00
Ulan Degenbaev
a17ed358b1 [heap] Fix assert in Heap::NotifyObjectLayoutChange
This partially relands b35a078.

Bug: chromium:752426
Change-Id: Ia6f9853115278109189291bca92e94974cfe35b0
Reviewed-on: https://chromium-review.googlesource.com/610580
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47289}
2017-08-10 17:34:49 +00:00
Ulan Degenbaev
4af9cfccf6 [heap] Refactor object marking state.
This patch merges ObjectMarking and MarkingState. The new marking state
encapsulates object marking, live byte tracking, and access atomicity.

The old ObjectMarking calls are now replaced with calls to marking
state. For example:
ObjectMarking::WhiteToGrey<kAtomicity>(obj, marking_state(obj)
becomes
marking_state()->WhiteToGrey(obj)

This simplifies custom handling of live bytes and allows to chose
atomicity of markbit accesses depending on collector's state.

This also decouples marking bitmap from the marking code, which will
allows in future to use different data-structure for mark-bits.

Bug: chromium:694255
Change-Id: Ifb4bc0144187bac1c08f6bc74a9d5c618fe77740
Reviewed-on: https://chromium-review.googlesource.com/602132
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47288}
2017-08-10 17:28:03 +00:00
Ulan Degenbaev
17f7efee49 [heap] Add missing atomicity parameter in NotifyLeftTrimming.
Bug: chromium:752461
Change-Id: Ie70a4ed1314e040d0edecece6a1dca7b1fc8d001
Reviewed-on: https://chromium-review.googlesource.com/610083
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47287}
2017-08-10 17:23:03 +00:00
Mircea Trofin
d9b54ff988 [wasm] Rename an internal wasm cctest member.
Bug: 
Change-Id: Ia8fd50cad1c7d0dd82eeadb22807e301246423a8
Reviewed-on: https://chromium-review.googlesource.com/610309
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47286}
2017-08-10 15:59:21 +00:00
Mythri
a0c2b7f2ad [Turbofan] Inline only if the candidate doesn't use all the available budget.
Inline only if there is some additional budget left even after inlining
the current candidate. This allows any small functions exposed by this
function to be inlined. Earlier we used to check for the limit after
inlining the function.

Bug: v8:6682
Change-Id: Ia3931751f212e89ca6d9c8500c6b3a909f12d962
Reviewed-on: https://chromium-review.googlesource.com/608970
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47285}
2017-08-10 15:57:41 +00:00
Ross McIlroy
493a7d6475 [TurboFan] Delete AstGraphBuilder.
Deletes AstGraphBuilder and associated classes now that it is
unreachable. The following classes are also removed:
 - ControlBuilders
 - JSFrameSpecialization
 - AstLoopAssignmentAnalysis

Also removes flags from compilation-info which are no longer used, and removes
the no-deoptimization paths from TypedOptimization, JsTypedLowering,
JSIntrinsicLowering and JSBuiltinLowering.

BUG=v8:6409

Change-Id: I63986e8e3497bf63c4a27ea8ae827b8a633d4a26
Reviewed-on: https://chromium-review.googlesource.com/583652
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47284}
2017-08-10 15:56:21 +00:00
Leszek Swirski
dadbde038d [profview] Distinguish between parse/opt/unopt compile
Rather than lumping in parsing, bytecode compilation and optimized
compilation all into the same VM "compile" state, seperate them out
into individual states.  Additionally, add support for these states
to tickprocessor and profview.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I5be943e23cae042e32e9ccb24415c67c18658b4b
Reviewed-on: https://chromium-review.googlesource.com/608973
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47283}
2017-08-10 15:44:36 +00:00
Ben L. Titzer
c35c54bb20 [wasm] Naming consistency for min/max pages and sizes in wasm-module.h
This is a pure renaming CL; no functionality changes.

R=mtrofin@chromium.org

Bug: 
Change-Id: I2f8262bdb17b9256d5b66fad56a7e51063f6f0d9
Reviewed-on: https://chromium-review.googlesource.com/610007
Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
Commit-Queue: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47282}
2017-08-10 15:43:10 +00:00
Alexey Kozyatinskiy
cf4adddbfa [inspector] forEachSession iterates in predictable order
protocol::HashMap(std::unordered_map)::iterator doesn't provide any
guarantees about iteration order. At least Visual C++ from vS 2015 and
clang compile for loop inside forEachSession differently.
For tests we need stable order of iteration, so let's use std::map
instead.

R=dgozman@chromium.org

Bug: none
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I329cb24cd182baa86c0ea4a526257856718f32b1
Reviewed-on: https://chromium-review.googlesource.com/609489
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47281}
2017-08-10 15:39:06 +00:00
Mircea Trofin
1ca0eea23c [wasm] Correctly reconstitute ModuleEnv from runtime data
When lazy-compiling, it is important we reconstitute the
ModuleEnv accurately. Besides addressing a bug, this change
also does away with the need to relocate memory and globals
parameters (in lazy compilation), by using "the right ones" upfront.

Bug: chromium:753496
Change-Id: I1412a499f05d02d49319fced1b3047698328f3b5
Reviewed-on: https://chromium-review.googlesource.com/609376
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Commit-Queue: Brad Nelson <bradnelson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47280}
2017-08-10 14:52:50 +00:00
Ilija Pavlovic
ef3ad19b63 MIPS64: Fix code generator for load and store data
For load and store operations, the code generator for MIPS64 used simple
instructions. In this CL, these instructions are substituted with
corresponding macro-instructions.

TEST=mjsunit/asm/poppler/poppler,
     mjsunit/asm/sqlite3/sqlite,
     mjsunit/asm/sqlite3/sqlite-pointer-masking

BUG=

Change-Id: I1a15be880cd32046b9e5eeea49e5c81ebd2f3138
Reviewed-on: https://chromium-review.googlesource.com/608975
Reviewed-by: Miran Karić <Miran.Karic@imgtec.com>
Commit-Queue: Miran Karić <Miran.Karic@imgtec.com>
Cr-Commit-Position: refs/heads/master@{#47279}
2017-08-10 13:09:29 +00:00
Tobias Tebbi
14b8db68bf [turbofan] escape analysis: support type None as ObjectState input
Bug: chromium:753616
Change-Id: I0e9495184d83f30b91ba0c813c4222a962ec235e
Reviewed-on: https://chromium-review.googlesource.com/610003
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47278}
2017-08-10 13:00:27 +00:00
Ross McIlroy
961a2c885d [fullcodegen] Remove ability to compile with Full-Codegen.
Removes the pathways to use Full-Codegen from compiler.cc. Also removes all
paths to optimize using AstGraphBuilder, which relies on Full-codegen.
Cleans up ast-numbering, runtime-profiler and some runtime functions to
remove now dead code.

This makes Full-codegen and AstGraphBuilder dead, but doesn't remove their
code yet, that will be done in a followup CL to keep things reviewable.

BUG=v8:6409

Change-Id: I3901ff17d960b2bb084cef0cb39fa16cb8419881
Reviewed-on: https://chromium-review.googlesource.com/583328
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47277}
2017-08-10 11:13:31 +00:00
Michael Starzinger
45b4522e40 [fullcodegen] Remove --stress-fullcodegen flag.
This is in preparation to the removal of the FullCodeGenerator, we no
longer need the ability to stress the underlying implementation.

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

Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: Iad3177d6de4a68b57c12a770b6e85ed7a9710254
Reviewed-on: https://chromium-review.googlesource.com/584747
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47276}
2017-08-10 09:52:49 +00:00
Ulan Degenbaev
d09f9c424f [runtime] Do not clear prototype map descriptors.
Mutating the descriptor array and the layout descriptor of a map
races with the concurrent marking. This patch simply transfers
ownership of the descriptor array without mutating the map.

Since the old map is not going to be used anymore and there are
not transitions from the old map, this should be safe for trimming
the descriptor arrays during GC.

This patch also adds checks in IC code avoid caching of dummy
transitions from the abandoned prototype map.

Bug: chromium:752461
Change-Id: I7b44ba7c369199bdb3ff48235226fe504c7eb4a5
Reviewed-on: https://chromium-review.googlesource.com/602210
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47275}
2017-08-10 08:56:49 +00:00
Enrico Bacis
80423e89b1 [test] Use glob expansion in test selection
The run_test.py tool test selection only expands asterisks at the end of
the test name. This CL introduces glob expansion in test selection
(asterisks are expanded anywhere in the path).

This is useful when tests that belong to the same area have different
prefixes. For example wasm cctests have two different prefixes:
'cctest/test-run-wasm*' and 'cctest/test-wasm*'. With this CL it is
possible to specify the selector 'cctest/*wasm*' to run them all.

R=machenbach@chromium.org

Change-Id: I1c7cc5136b21e71f3eaf69fb98d5dfd77d336e2a
Reviewed-on: https://chromium-review.googlesource.com/609000
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Enrico Bacis <enricobacis@google.com>
Cr-Commit-Position: refs/heads/master@{#47274}
2017-08-10 08:47:59 +00:00
jgruber
94196e4e0c Fix test-heap/Regress5831
This test started failing on arm64-debug-nosnap builds since we'd have
leftover NEVER_EVACUATE code-space pages from Isolate initialization.

Ensure that we exhaust all such pages and overflow into LO_SPACE before
continuing into the real test, and simply generate dummy code instead of
copying a fake CEntryStub.

Bug: v8:6690
Change-Id: I3889b5818e2467dcdce3485f1372f3b7383478f4
Reviewed-on: https://chromium-review.googlesource.com/608139
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47273}
2017-08-10 08:30:59 +00:00
Benedikt Meurer
4dfd750302 [array] Make array normalization independent of heap configuration.
The heuristic for deciding whether to normalize elements in a JSArray
should not depend on the current old generation size, for the sake of
predictability. This also wouldn't work when we start inlining this
into optimized code, where we'd bake in the max old generation size
value at the time of optimization.

Bug: v8:6399
Change-Id: Ie30d8855953b8fa97b86b18d9eac6e5de87e5aa9
Reviewed-on: https://chromium-review.googlesource.com/609013
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47272}
2017-08-10 07:54:54 +00:00
Peter Marshall
a5f321cd9b [serializer] Enable TypedArrays and ArrayBuffers in the snapshot.
Previously we could not support these due to their unique memory layout
including off-heap backing store allocations. We now serialize these
allocations and then fix-up references to them in the PostProcess step
of deserialization.

Bug: v8:6691
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ic215049c06e6ee655bd17c11dfab0d8630568a84
Reviewed-on: https://chromium-review.googlesource.com/597709
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47271}
2017-08-10 07:49:14 +00:00
Mythri Alle
402f276011 Revert "[Turbofan] Include size of parent function in inlining decisions."
This reverts commit 48cee973c8.

Reason for revert: Including size of parent function in the inlining budget does not allow even small functions to be inlined into large functions. This causes regressions on some benchmarks: https://bugs.chromium.org/p/chromium/issues/detail?id=747247  

Bug:747247

Original change's description:
> [Turbofan] Include size of parent function in inlining decisions.
> 
> The size of parent function is not considered when taking decisions
> on which functions to inline. This cl, includes the size of the
> parent function to the cumulative count. 
> 
> Bug: 
> Change-Id: Ib8f4ec684f8313f7c2e29237580bb3c0403930bd
> Reviewed-on: https://chromium-review.googlesource.com/506205
> Commit-Queue: Mythri Alle <mythria@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46789}

TBR=mstarzinger@chromium.org,mythria@chromium.org

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

Change-Id: Ic8a5282f4f41474dc1608044a81920cdd794437d
Reviewed-on: https://chromium-review.googlesource.com/609780
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47270}
2017-08-10 07:33:24 +00:00
Michael Achenbach
6527d863d1 [test] Roll luci-go to most recent version
TBR=vadimsh@chromium.org

Bug: chromium:753739
Change-Id: I8a61609aa68910b47a22e0358ef0acfc7cd5e444
Reviewed-on: https://chromium-review.googlesource.com/609002
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47269}
2017-08-10 07:10:44 +00:00
Alexey Kozyatinskiy
df6d46983f [inspector] fixed script-parsed-hash.js test
Original intention of longScript was to check how hashing works with long
script source. Current implementation calculates hash for longString function,
it's non reliable since Function.toString is still not specified and can return
different line endings on different architectures.

TBR=dgozman@chromium.org

Bug: none
Change-Id: I4c5b6f30c2849a1a2702c74665b86ced731f1b28
Reviewed-on: https://chromium-review.googlesource.com/609486
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47268}
2017-08-10 07:00:53 +00:00
Alexey Kozyatinskiy
78caf8d5fe [inspector] resolve async evaluation on context destroyed
On context destroyed we discard corresponded injected-script and won't be able to wrap async evaluation result, so we can resolve callback with an error right now.

R=dgozman@chromium.org

Bug: none
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ib62f255297f306ad9f2c96a2a5b80e4b5aa33475
Reviewed-on: https://chromium-review.googlesource.com/604213
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47267}
2017-08-10 06:43:14 +00:00
Jaroslav Sevcik
92d13a12fc [profiler] Add script name to v8.log with --log-source-code.
This also changes logging of code address to Code::instruction_start rather
than Code::address().

Bug: v8:6239
Change-Id: I4ef975630574e23409123468a3f7fb8fe6ad39e7
Reviewed-on: https://chromium-review.googlesource.com/605887
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47266}
2017-08-10 04:43:43 +00:00
Alexey Kozyatinskiy
e6f5a80f0e [inspector] don't discard injected-script on runtime.disable
Most methods on runtime agent are available when agent is disabled, we compile
injected-script lazily and should not invalidate it on runtime.disable since it
will invalidate all related objectIds.

R=dgozman@chromium.org

Bug: none
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I86f3c5d6908862cd4c0847c433f35a6d83c6396b
Reviewed-on: https://chromium-review.googlesource.com/607153
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47265}
2017-08-10 04:33:14 +00:00
Benedikt Meurer
293283d559 [builtins] Fix no elements check on the prototype chain.
Invoking Object.freeze on either the Object.prototype or the
Array.prototype changes its elements backing store to
DICTIONARY_ELEMENTS kind, which is not properly checked in all
placeswhere we test for elements in the prototype chain, i.e. in
JSObject::PrototypeHasNoElements. This causes several Array
builtins to take the slow path, i.e. Array.prototype.splice.

Fix this for now by consistently checking for either empty_fixed_array
or empty_slow_element_dictionary in both C++ and CSA runtime.

Bug: v8:6689
Change-Id: I3f62643131b3a874b5c2a3d7ed054dd1e799bbaf
Reviewed-on: https://chromium-review.googlesource.com/608127
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47264}
2017-08-10 03:49:12 +00:00
v8-autoroll
f70347492d Update V8 DEPS.
Rolling v8/build: 220748c..b6996c4

Rolling v8/third_party/catapult: 49fffef..bd05965

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

Change-Id: I4a91e2bc240a532af977a3ed447a00497a3bb7af
Reviewed-on: https://chromium-review.googlesource.com/608948
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47263}
2017-08-10 03:48:01 +00:00
Michael Hablich
dfb4f08489 Revert "[heap, runtime] Fix conversion of large strings to thin strings."
This reverts commit b35a0789bc.

Reason for revert: Roll blocker for https://chromium-review.googlesource.com/c/607193

Original change's description:
> [heap, runtime] Fix conversion of large strings to thin strings.
> 
> This patch removes creation of fillers in the middle of a large page and
> fixes assert in Heap::NotifyObjectLayoutChange.
> 
> The fillers in large pages are useless since we do not sweep large
> object space.
> 
> Bug: chromium:752426
> Change-Id: I01c230223f28d6d54b7362ee70e9d83de50678fd
> Reviewed-on: https://chromium-review.googlesource.com/601994
> Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#47221}

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

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

Bug: chromium:752426
Change-Id: I58a632af37fa018d82693099a7a395ca5db5af0f
Reviewed-on: https://chromium-review.googlesource.com/609404
Reviewed-by: Michael Hablich <hablich@chromium.org>
Commit-Queue: Michael Hablich <hablich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47262}
2017-08-10 00:28:32 +00:00
Sathya Gunasekaran
58bbc6bf77 [parser] Check if async function before throwing error
This changes the DCHECK (which could correctly fail) to be part of the
conditional that checks if we're in an async function.

Bug: chromium:751789
Change-Id: I3b8c1239ac93190055622c41fa1122e83b69d255
Reviewed-on: https://chromium-review.googlesource.com/607356
Reviewed-by: Daniel Ehrenberg <littledan@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47261}
2017-08-09 23:43:52 +00:00
Sathya Gunasekaran
35f149e1d8 Revert "[runtime] Store hash code in length field"
This reverts commit decf5750c6.

Reason for revert: broken layout tests

Original change's description:
> [runtime] Store hash code in length field
> 
> Store the hash code in 21 bits of the length field.
> 
> Change the GetIdentityHash API to be unhandlified, since there's no
> property lookup anymore.
> 
> Update js/ and test/ to match new API and expections.
> 
> Bug: 
> Change-Id: I8dc75de4021f59e79b45f3f38ec997c3b3687b24
> Reviewed-on: https://chromium-review.googlesource.com/589688
> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#47259}

TBR=ulan@chromium.org,jkummerow@chromium.org,mstarzinger@chromium.org,cbruni@chromium.org,gsathya@chromium.org

Change-Id: I32db9c20a51b2401464924cafea502628a0d0b92
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/609322
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47260}
2017-08-09 22:04:36 +00:00
Sathya Gunasekaran
decf5750c6 [runtime] Store hash code in length field
Store the hash code in 21 bits of the length field.

Change the GetIdentityHash API to be unhandlified, since there's no
property lookup anymore.

Update js/ and test/ to match new API and expections.

Bug: 
Change-Id: I8dc75de4021f59e79b45f3f38ec997c3b3687b24
Reviewed-on: https://chromium-review.googlesource.com/589688
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47259}
2017-08-09 20:17:41 +00:00
Michaël Zasso
d8e37c32f3 FreeBSD/Solaris: Fix OS::Allocate
The signature of the method was changed in
implementation was not updated for those platforms.

https: //chromium-review.googlesource.com/c/558876 but the
Change-Id: I507d7877988287c352ee2690bac540f835c19ebf
Reviewed-on: https://chromium-review.googlesource.com/600194
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47258}
2017-08-09 18:46:00 +00:00
Adam Klein
1c9de0b2c2 [scopes] Clarify and narrow when scopes care about an eval() call
There are two reasons for Scopes to need information about eval calls
inside them:

  - Eval in a scope, or any of its inner scopes, turns off a bunch of
    scope analysis optimizations (e.g., all variables have to be treated
    as "used" and context-allocated).
  - Eval in a sloppy declaration scope means allows runtime addition
    of var declarations.

This patch aims to make the code better-reflect this reality.
It's meant as a pure cleanup, with no expected change in behavior.

Change-Id: I744c5051bb7a90b11420930e9596e5d6c35eb440
Reviewed-on: https://chromium-review.googlesource.com/602848
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47257}
2017-08-09 18:13:19 +00:00
Anisha Rohra
053918b35e PPC/s390: [turbofan] Properly check new.target parameter in inlined Reflect.construct.
Port cb9402aa98

Original Commit Message:

    The ConstructFunctionForwardVarargs and ConstructForwardVarargs
    builtins, which are used when inlining the Reflect.construct
    builtin into TurboFan optimized code, didn't properly check the
    new.target parameter whether it's a constructor.

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

Change-Id: I9d006961e15bedadc98ca786fcb1f032755ec608
Reviewed-on: https://chromium-review.googlesource.com/608549
Reviewed-by: Jaideep Bajwa <bjaideep@ca.ibm.com>
Commit-Queue: Jaideep Bajwa <bjaideep@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#47256}
2017-08-09 16:24:24 +00:00
Mythri
d72c97e20b [Turbofan] Allow recursive inlining
Currently, we do not inline recursive functions. This is in general a
good idea but could be useful in some cases. For example, in rayTrace
there is a class.create function to create new classes, which basically
calls the initialize function on the object. When there are classes which
instantiate other classes this leads to recursion. These are really small
functions (within the small function budget) and it is good to inline them.
Allowing such functions to inline improves the score on rayTrace by 12-16%
and box2d by 24-30%.

There is also an absolute limit on the maximum levels of inlining to avoid
any corner cases and to ensure inlining always terminates.

Bug: v8:6682
Change-Id: I6784f68d6395097d126c0850b1a1336b6583d958
Reviewed-on: https://chromium-review.googlesource.com/608235
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47255}
2017-08-09 16:00:24 +00:00
Jaideep Bajwa
74af07c125 PPC/s390: skip wasm atomic test cases
Atomic operation instructions are not implemented in s390/ppc
yet. Disabling the testcases for now.

R=machenbach@chromium.org, jkummerow@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com
BUG=
LOG=N

Change-Id: If12ad7886bd517a281efa8c9a3ddfaf3479de68b
Reviewed-on: https://chromium-review.googlesource.com/608488
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Jaideep Bajwa <bjaideep@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#47254}
2017-08-09 15:41:14 +00:00
Caitlin Potter
fa1a339777 [async-iteration] eliminate implicit Await when resuming with .return()
AsyncGenerators, when resumed with a "return" completion, Await the sent
value to provide consistency with syntactic return statements. This
moves the await to during AsyncGeneratorResumeNext, shrinking the number
of bytecodes.

There's a minor change to BytecodeGenerator which removes a
%_GeneratorClose() call, since it's inserted implicitly by the parser.

BUG=v8:5855
TBR=neis@chromium.org

Change-Id: I2965c610e5985ac24c713b481e62f6b97f96a3d8
Reviewed-on: https://chromium-review.googlesource.com/582218
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47253}
2017-08-09 14:53:14 +00:00
Peter Marshall
06f5f84656 [runtime] Align Seq{One,Two}ByteString::kMaxSize.
Because SizeFor only returns aligned values, when we check values
returned there against kMaxSize, they can be larger if they were
rounded up.

It wasn't possible to write a test for the 2-byte version that didn't
regularly OOM.

Bug: chromium:752764
Change-Id: Id2f387449e0fafe633a2fde1ac728be31487f62d
Reviewed-on: https://chromium-review.googlesource.com/607935
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47252}
2017-08-09 14:48:54 +00:00
Ben L. Titzer
f6d5504f98 [wasm] Fix patching of table sizes.
BUG=chromium:752423
R=mtrofin@chromium.org,bradnelson@chromium.org

Change-Id: Ie6d80a82cd40b598e917a79842e6639e73be9194
Reviewed-on: https://chromium-review.googlesource.com/606587
Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
Commit-Queue: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47251}
2017-08-09 14:44:33 +00:00
Ivica Bogosavljevic
7f58863d33 MIPS64: Fix compilation failure on target MIPS64 because of invalid
type conversion

Bug: 
Change-Id: I3e2ea55b47044bb43fe60d8287bb28df8f7d2c08
Reviewed-on: https://chromium-review.googlesource.com/608135
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
Reviewed-by: Miran Karić <Miran.Karic@imgtec.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
Cr-Commit-Position: refs/heads/master@{#47250}
2017-08-09 14:04:43 +00:00
Michael Achenbach
b27bf3201d Revert "[parser] Turn FLAG_experimental_preparser_scope_analysis on."
This reverts commit 2e9f725338.

Reason for revert: Done experimenting...

Original change's description:
> [parser] Turn FLAG_experimental_preparser_scope_analysis on.
> 
> Experimental run, just for getting data from RuntimeCallstats bots.
> 
> To be reverted soon - expected to break various things.
> 
> BUG=v8:5516
> NOTREECHECKS=true
> 
> Change-Id: I6d235fddee36b0f0efe70065166d25ed40d6e163
> Reviewed-on: https://chromium-review.googlesource.com/557863
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Marja Hölttä <marja@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#47248}

TBR=adamk@chromium.org,machenbach@chromium.org,marja@chromium.org

Change-Id: I871d8a68442597b777e8f9e3d04ba3298ae87549
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:5516
Reviewed-on: https://chromium-review.googlesource.com/608190
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47249}
2017-08-09 13:55:47 +00:00
Marja Hölttä
2e9f725338 [parser] Turn FLAG_experimental_preparser_scope_analysis on.
Experimental run, just for getting data from RuntimeCallstats bots.

To be reverted soon - expected to break various things.

BUG=v8:5516
NOTREECHECKS=true

Change-Id: I6d235fddee36b0f0efe70065166d25ed40d6e163
Reviewed-on: https://chromium-review.googlesource.com/557863
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47248}
2017-08-09 13:40:25 +00:00
Michael Achenbach
57200ddb42 Revert "Reland ^3 "[builtins] Port getting property from Proxy to CSA"""
This reverts commit edc4ae14c8.

Reason for revert: There's still this problem:
https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20nosnap%20-%20debug/builds/5835

Original change's description:
> Reland ^3 "[builtins] Port getting property from Proxy to CSA""
> 
> This is a reland of e86c066b77
>  
> With fixes for crbug.com/752846, crbug.com/752712, crbug.com/752850
> 
> Previously landed as: 47a97aa53b / 47113
> Previously landed as: 15ef03cbf3 / 47159
> 
> TBR=jkummerow@chromium.org, franzih@chromium.org, bmeurer@chromium.org,
> jgruber@chromium.org, mstarzinger@chromium.org
> 
> Bug: v8:6559, v8:6557
> Change-Id: I12ccae44331b05dd3f304ac538c0154133b43c35
> Reviewed-on: https://chromium-review.googlesource.com/608187
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#47245}

TBR=jkummerow@chromium.org,mstarzinger@chromium.org,neis@chromium.org,franzih@chromium.org,jgruber@chromium.org,ishell@chromium.org,bmeurer@chromium.org,mslekova@google.com

Change-Id: Ib46b68f011c056675f2024f91c7f1024767b4dd0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6559, v8:6557
Reviewed-on: https://chromium-review.googlesource.com/608189
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47247}
2017-08-09 13:37:37 +00:00