Commit Graph

40084 Commits

Author SHA1 Message Date
Georg Neis
e92c52ba8a [test] Remove obsolete variants of generator JSTests.
R=adamk@chromium.org

Bug: 
Change-Id: I47087c6a15beceb7084079dcf644de7e9ede772c
Reviewed-on: https://chromium-review.googlesource.com/505620
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45342}
2017-05-16 14:53:32 +00:00
Leszek Swirski
094cb0e9b4 [ignition] Use jump table for "finally" deferred commands
Bug: v8:6218
Change-Id: I5d245ea485c93fcc03fcd95c82ae0474f31ffa5e
Reviewed-on: https://chromium-review.googlesource.com/505491
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45341}
2017-05-16 12:45:48 +00:00
Georg Neis
bb90a2e85d [compiler] Delay allocation of heap numbers for deoptimization literals.
... until after the main bulk of code generation, which will soon run on a
different thread.

R=jarin@chromium.org

Bug: v8:6048
Change-Id: I12aaaf2725e2422f588c29f50084eb77b56ad9a5
Reviewed-on: https://chromium-review.googlesource.com/505616
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45340}
2017-05-16 12:43:18 +00:00
ivica.bogosavljevic
4a5adb43ac [turbofan] Reland of Add alignment parameter to StackSlot operator
Reland d8bfdb7a99

Original commit message:
If alignment parameter is set, the memory returned by the
StackSlot operator will be aligned according to the parameter.

The implementation goes like this. If alignment parameter is set
we allocate a bit more memory than actually needed and so we
can move the beginning of the StackSlot in order to have it aligned.

BUG=

Review-Url: https://codereview.chromium.org/2874713003
Cr-Commit-Position: refs/heads/master@{#45339}
2017-05-16 12:27:56 +00:00
Ross McIlroy
b96e8a60e2 [deopt] Remove JSFunction materialization.
JSFunctions should no longer be materialized on deopt, and the code doing
the materialization doesn't keep track of clearing the optimized code slot
if the function is marked for deopt, so just remove it.

BUG=chromium:718891

Change-Id: I8a1abfd2a1b810017c06fa6f889a85b428cb9dbd
Reviewed-on: https://chromium-review.googlesource.com/498628
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45338}
2017-05-16 11:54:27 +00:00
Leszek Swirski
04ac13deef [ignition] Mark switches as being side-effect free
Bug: v8:6218
Change-Id: I53806585ee2ba5ea5bc49748a659cceb2eeaf501
Reviewed-on: https://chromium-review.googlesource.com/506668
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45337}
2017-05-16 11:37:09 +00:00
Wiktor Garbacz
ce538f70c1 [parser] Refactor streaming scanner streams.
Unify, simplify logic, reduce UTF8 specific handling.

Intend of this is also to have stream views.
Stream views can be used concurrently by multiple threads, but
only one thread may fetch new data from the underlying source.
This together with unified stream view creation is intended to be
used for parse tasks.

BUG=v8:6093

Change-Id: Ied8e93090c506d4735080298f0fdaeed32043915
Reviewed-on: https://chromium-review.googlesource.com/501789
Commit-Queue: Wiktor Garbacz <wiktorg@google.com>
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45336}
2017-05-16 11:34:41 +00:00
Leszek Swirski
e418a1e4f3 [ignition] Fix wide switch bytecodes' offsets
Bug: v8:6351
Bug: v8:6366
Change-Id: I3ec9bd75031b2c6148278353461f442c1eaf60ca
Reviewed-on: https://chromium-review.googlesource.com/506015
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45335}
2017-05-16 11:20:24 +00:00
Georg Neis
1972e37392 [compiler] Compare handles by location only.
This is in preparation for running code generation off the main thread.

Bug: v8:6048
Change-Id: Ic1ddcbbb8995d49dfcef1ffbf135117291a00ea7
Reviewed-on: https://chromium-review.googlesource.com/505513
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45334}
2017-05-16 11:15:14 +00:00
Georg Neis
f846e7df71 [compiler] Make root detection thread-safe.
... by only looking at the handle.

This is in preparation for running code generation off the main thread.

Bug: v8:6048
Change-Id: I19b105c13278a2821a0b2395033e54abf5552a43
Reviewed-on: https://chromium-review.googlesource.com/506190
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45333}
2017-05-16 11:14:05 +00:00
Jakob Kummerow
1345de0b1e [builtins] Tune Array.indexOf performance
BUG=v8:6371

Change-Id: Iacb4ad572ea83ade6262272ed30d4cb684f9d8ed
Reviewed-on: https://chromium-review.googlesource.com/505107
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45332}
2017-05-16 10:56:21 +00:00
dusan.simicic
64fb9441fd [wasm] Implement simd lowering for I8x16
This change adds simd lowering support for:
I8x16Splat,I8x16ExtractLane,I8x16ReplaceLane,I8x16Neg,I8x16Shl,
I8x16ShrS,I8x16Add,I8x16AddSaturateS,I8x16Sub,I8x16SubSaturateS,
I8x16Mul,I8x16MinS,I8x16MaxS,I8x16ShrU,I8x16AddSaturateU,
I8x16SubSaturateU,I8x16MinU,I8x16MaxU,I8x16Eq,I8x16Ne,I8x16LtS,
I8x16LeS,I8x16LtU,I8x16LeU operations

BUG=

Review-Url: https://codereview.chromium.org/2867343002
Cr-Commit-Position: refs/heads/master@{#45331}
2017-05-16 10:54:49 +00:00
Jakob Kummerow
6aaccd0f95 [elements] Fix pathological slowness when deleting many elements
When most elements of an object are deleted, we want to normalize its
elements backing store to a dictionary in order to save space. Finding
the right time to do so should not incur a linear cost on each delete
operation. This patch changes the heuristic to an amortized-constant
approach based on a global counter and the current backing store
capacity.

BUG=chromium:542978

Change-Id: Ifdf29ab2211fdde1df9078f63be4118627d6a67e
Reviewed-on: https://chromium-review.googlesource.com/506191
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45330}
2017-05-16 09:53:16 +00:00
Georg Neis
9fd97a5fb1 [compiler] Fix a comment.
R=jarin@chromium.org

Bug: v8:6048
Change-Id: Ia80a403f647b176ef02807f6d15b3198b55234bc
Reviewed-on: https://chromium-review.googlesource.com/506013
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45329}
2017-05-16 09:45:25 +00:00
Ross McIlroy
73d21080c9 Reland: [Interpreter] Transition JSFunctions to call optimized code when possible.
Now that the optimized code hangs off the feedback vector, it is possible
to check whether a function has optimized code available every time it's
called in the interpreter entry trampoline. If optimized code exists, the
interpreter entry trampoline 'self-heals' the closure to point to the
optimized code and links the closure into the optimized code list.
 
BUG=v8:6246

Change-Id: I53b095db2a75ae4824c8195faf8649d766c86118
Reviewed-on: https://chromium-review.googlesource.com/501967
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45328}
2017-05-16 09:19:27 +00:00
Marja Hölttä
fab691b8ba [parser] Skipping inner funcs: add more tests.
These tests already pass.

BUG=v8:5516

Change-Id: I7f4796cca98aa6c276143d83bcb018a67e0cbe55
Reviewed-on: https://chromium-review.googlesource.com/506193
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45327}
2017-05-16 09:18:22 +00:00
Michael Lippautz
a1de6262bf [heap] MinorMC: Use different recursion strategy
Only use recursion for objects with more than
kMinRangeForMarkingRecursion (8) pointers.

Bug: chromium:651354
Change-Id: Ic71967ef535f6a32268c7097301a313db2335bf8
Reviewed-on: https://chromium-review.googlesource.com/505615
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45326}
2017-05-16 09:10:52 +00:00
bmeurer
724d8dfe93 [turbofan] Fully reduce node in JSCallReducer::ReduceSpreadCall.
When turning a JSCallWithSpread into a JSCall or a JSConstructWithSpread
into a JSConstruct, we need to (manually) invoke the JSCallReducer logic
again on the changed node to make sure that optimizations that are now
possible for the JSCall or JSConstruct operator are properly applied.

BUG=v8:5932,v8:5895,v8:6344,v8:6399,v8:6400
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2882153003
Cr-Commit-Position: refs/heads/master@{#45325}
2017-05-16 09:02:07 +00:00
Tobias Tebbi
cd33ec5542 [runtime] avoid trim/grow loop when adding and removing one element
We currently grow the backing store to (old_capacity*1.5)+16 if we exceed capacity, 
but shrink the capacity to the current length when 2*length <= capacity.
For short arrays (up to length 32), this can lead to a copy on every operation when using push/pop or push/shift.

Example:
Array of length 32, capacity 32
push
Array grown to length 33, capacity 32*1.5+16 = 64
pop
Array trimmed to length 32, capacity 32 because 2*32 <= 64
...

This CL leaves additional slag space when calling pop and restricts the trimming to backing stores with at least 16 elements to prevent excessive re-trimming on short arrays.

Bug: 
Change-Id: I9dd13e5e2550c7ac819294c8e29f04c8855e02a4
Reviewed-on: https://chromium-review.googlesource.com/502911
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45324}
2017-05-16 08:56:30 +00:00
jgruber
63984db060 [json] Specialize parsed arrays to most specific elements kind
Depending on the input elements, we can allocate a FAST_{SMI_,DOUBLE_,}KIND
backing store.

BUG=v8:6398

Review-Url: https://codereview.chromium.org/2887653002
Cr-Commit-Position: refs/heads/master@{#45323}
2017-05-16 08:53:17 +00:00
Michael Achenbach
2178590afd [foozzie] Fix detection of suppression delimiter
NOTRY=true
TBR=jkummerow@chromium.org,bmeurer@chromium.org

Bug: chromium:718739
Change-Id: I9b80a3098bf2c8d3a294e1908f058cabe1ed758c
Reviewed-on: https://chromium-review.googlesource.com/506092
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45322}
2017-05-16 07:39:24 +00:00
v8-autoroll
b0ce3b6f29 Update V8 DEPS.
Rolling v8/build: 63fb52b..7571a8a

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

Change-Id: Ibd90b14f080b21f7283a09ea28366f3eafab8df4
Reviewed-on: https://chromium-review.googlesource.com/505557
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45321}
2017-05-16 03:34:09 +00:00
dusan.simicic
35c850e5c5 [wasm] Add simd lowering for I16x8Neg
BUG=

Review-Url: https://codereview.chromium.org/2861113002
Cr-Commit-Position: refs/heads/master@{#45320}
2017-05-15 21:43:55 +00:00
Deepti Gandluri
7a581fa28f Revert "[ignition] Be smarter about register allocation in VisitSuspend"
This reverts commit 98927ea51b.

Reason for revert: Breaks Mac GC Stress bot.
https://uberchromegw.corp.google.com/i/client.v8/builders/V8%20Mac%20GC%20Stress/builds/13299/steps/Mjsunit/logs/for-await-of

Original change's description:
> [ignition] Be smarter about register allocation in VisitSuspend
> 
> Split BytecodeGenerator::VisitSuspend into two pieces, one for
> building the suspension code and one for resumption (these
> are split into separate Build methods for convenience).
> Each gets its own RegisterAllocationScope, which allows us to
> reduce the register file size of the empty generator by 1.
> 
> For consistency, rename VisitGeneratorPrologue() to
> BuildGeneratorPrologue() to match the names of the two
> newly-created methods.
> 
> Bug: v8:6379
> Change-Id: I08a617a44f99706cfff09bf86fb0a25a9cd6e032
> Reviewed-on: https://chromium-review.googlesource.com/503593
> Commit-Queue: Adam Klein <adamk@chromium.org>
> Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#45318}

TBR=rmcilroy@chromium.org,adamk@chromium.org,neis@chromium.org,kozyatinskiy@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Bug: v8:6379

Change-Id: I787fc3811c4f33a8021cf9170d43a74ed9b55d1c
Reviewed-on: https://chromium-review.googlesource.com/506548
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45319}
2017-05-15 20:58:49 +00:00
Adam Klein
98927ea51b [ignition] Be smarter about register allocation in VisitSuspend
Split BytecodeGenerator::VisitSuspend into two pieces, one for
building the suspension code and one for resumption (these
are split into separate Build methods for convenience).
Each gets its own RegisterAllocationScope, which allows us to
reduce the register file size of the empty generator by 1.

For consistency, rename VisitGeneratorPrologue() to
BuildGeneratorPrologue() to match the names of the two
newly-created methods.

Bug: v8:6379
Change-Id: I08a617a44f99706cfff09bf86fb0a25a9cd6e032
Reviewed-on: https://chromium-review.googlesource.com/503593
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45318}
2017-05-15 19:49:58 +00:00
Michael Achenbach
762d689c8b [foozzie] Add suppression for .caller
NOTRY=true

Bug: chromium:718739
Change-Id: Ie28b3848a3809473d6c8757e7a86e3a786483ef1
Reviewed-on: https://chromium-review.googlesource.com/506090
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45317}
2017-05-15 19:35:48 +00:00
Sathya Gunasekaran
61109b9e50 [ESNext] Stage new constructor return semantics
Bug: v8:5536
Change-Id: Ia3129222e3eb67239fe05411bfb42f3eaf250357
Reviewed-on: https://chromium-review.googlesource.com/505931
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45316}
2017-05-15 18:35:04 +00:00
pierre.langlois
2dc261e1c4 [turbolizer] Match instruction offsets as a hexadecimal numbers
The output of disassemblers was changed to display instruction offsets as
hexadecimal numbers instead of a decimal numbers. Reflect this change in
turbolizer.

BUG=

Review-Url: https://codereview.chromium.org/2885453002
Cr-Commit-Position: refs/heads/master@{#45315}
2017-05-15 17:43:26 +00:00
Leszek Swirski
f133bc8ad5 [ignition] Introduce Switch bytecode for generators
Introduce a new SwitchSmiTable bytecode for generators, which does a
table lookup for the accumulator value in a jump table stored in the
constant array pool. This removes the if-else chains at resumable
function/loop headers.

As a drive-by, add a scoped environment saving struct to the bytecode
graph builder.

Bug: v8:6351
Bug: v8:6366
Change-Id: I63be15a8b599d6684c7df19dedb8860562678fb0
Reviewed-on: https://chromium-review.googlesource.com/500271
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45314}
2017-05-15 17:43:17 +00:00
Clemens Hammacher
ae4216160d Revert "[builtins] port Promise.all to CSA"
This reverts commit 7ef1df858a.

Reason for revert: Breaks inspector/debugger/get-possible-breakpoints-restrict-to-function: https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap%20-%20debug/builds/13191/steps/Check/logs/get-possible-breakpoi..

Original change's description:
> [builtins] port Promise.all to CSA
> 
> Introduces CodeStubAssembler helpers for common Iterator operations
> (GetIterator, IteratorStep, IteratorClose).
> 
> Moves the Promise.all resolveElement closure and it's caller to
> builtins-promise-gen.cc.
> 
> Instead of creating an internal array (and copying its elements into a result
> array), a single JSArray is allocated, and appended with BuildAppendJSArray(),
> falling back to %CreateDataProperty(), and elements are updated in the resolve
> closure the same way. This should always be unobservable.
> 
> This CL increases the size of snapshot_blob.bin on an x64.debug build by 11.44kb
> 
> BUG=v8:5343
> R=​cbruni@chromium.org, gsathysa@chromium.org, jgruber@chromium.org
> 
> Change-Id: Id69b7f76866b29caccd97f35870154c4be85f418
> Reviewed-on: https://chromium-review.googlesource.com/497974
> Commit-Queue: Caitlin Potter <caitp@igalia.com>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#45306}

TBR=adamk@chromium.org,cbruni@chromium.org,gsathya@chromium.org,caitp@igalia.com,jgruber@chromium.org,ishell@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5343

Change-Id: I831738003643561fa628266af2bcebbb18000e55
Reviewed-on: https://chromium-review.googlesource.com/506014
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45313}
2017-05-15 17:17:47 +00:00
dusan.simicic
b99a1ba0a6 MIPS[64]: Support for some SIMD operations (6)
Add support for I16x8Mul, I16x8MaxS, I16x8MinS, I16x8Eq, I16x8Ne,
I16x8LtS, I16x8LeS, I16x8AddSaturateU, I16x8SubSaturateU, I16x8MaxU,
I16x8MinU, I16x8LtU, I16x8LeU, I8x16Splat, I8x16ExtractLane,
I8x16ReplaceLane, I8x16Neg, I8x16Shl, I8x16ShrS, S16x8Select,
S8x16Select for mips32 and mips64 architectures.

BUG=

Review-Url: https://codereview.chromium.org/2791213003
Cr-Commit-Position: refs/heads/master@{#45312}
2017-05-15 15:46:04 +00:00
Camillo Bruni
02c032c601 [CSA] Improve error mesage when re-binding the same label
Change-Id: I102558ee4fac29e5bc259117129a47632cc8bd58
Reviewed-on: https://chromium-review.googlesource.com/505508
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45311}
2017-05-15 15:29:55 +00:00
martyn.capewell
f8a6c6c48e Add DEPS.chromium for recursive DEPS tracking.
DEPS.chromium allows the Chromium build system's DEPS to recurse into V8's own
dependencies. Initially, this is populated with some tests files for the ARM64
simulator.

BUG=chromium:718439

Review-Url: https://codereview.chromium.org/2880293002
Cr-Commit-Position: refs/heads/master@{#45310}
2017-05-15 15:23:48 +00:00
Michael Achenbach
260eb5bb9b Revert "[objects.h splitting] Move Map and related classes."
This reverts commit 7be0159e4b.

Reason for revert: Breaks node integration:
https://build.chromium.org/p/client.v8.fyi/builders/V8%20-%20node.js%20integration/builds/5555

Original change's description:
> [objects.h splitting] Move Map and related classes.
> 
> BUG=v8:5402
> 
> Change-Id: I64fae0a0271eb0f1b71f4ec5d9bd5d22deb1cf59
> Reviewed-on: https://chromium-review.googlesource.com/502808
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Commit-Queue: Marja Hölttä <marja@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#45305}

TBR=marja@chromium.org,mstarzinger@chromium.org,jarin@chromium.org,ishell@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5402

Change-Id: I7abbe535484f89288f11d963317e1552e1dac17f
Reviewed-on: https://chromium-review.googlesource.com/506012
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45309}
2017-05-15 15:06:47 +00:00
Clemens Hammacher
79b075beb9 [wasm] Speed up LEB decoding
Speed up LEB decoding by forcing the decoding loop to be unrolled.
Even though the compiler was free to unroll the loop before, clang did
not do so. We now manually unroll by using a template function which
calls itself recursively, passing the byte index to be decoded next.
For efficient execution, we still depend on the compiler to inline the
recursive calls (which clang does).

This optimization speeds up interpreted execution of the Jetstream
benchmarks by 15 percent.
Speedup on module decoding is negligible though.

Drive-by: Change "unsigned" to "uint32_t".

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

Change-Id: I06d4230f92bfb2a80cdc5029d965fc3bf84ca1cc
Reviewed-on: https://chromium-review.googlesource.com/506188
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45308}
2017-05-15 15:02:36 +00:00
Marja Hölttä
cc2c11441c Revert "[objects.h splitting] Move Map and related classes."
This reverts commit 7be0159e4b.

Reason for revert: Broke node by generating a broken debug-support.cc

Original change's description:
> [objects.h splitting] Move Map and related classes.
> 
> BUG=v8:5402
> 
> Change-Id: I64fae0a0271eb0f1b71f4ec5d9bd5d22deb1cf59
> Reviewed-on: https://chromium-review.googlesource.com/502808
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Commit-Queue: Marja Hölttä <marja@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#45305}

TBR=marja@chromium.org,mstarzinger@chromium.org,jarin@chromium.org,ishell@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5402

Change-Id: Ifa65537447eb0a1ef947b9d0dae6f07a8b150968
Reviewed-on: https://chromium-review.googlesource.com/506011
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45307}
2017-05-15 15:01:03 +00:00
Caitlin Potter
7ef1df858a [builtins] port Promise.all to CSA
Introduces CodeStubAssembler helpers for common Iterator operations
(GetIterator, IteratorStep, IteratorClose).

Moves the Promise.all resolveElement closure and it's caller to
builtins-promise-gen.cc.

Instead of creating an internal array (and copying its elements into a result
array), a single JSArray is allocated, and appended with BuildAppendJSArray(),
falling back to %CreateDataProperty(), and elements are updated in the resolve
closure the same way. This should always be unobservable.

This CL increases the size of snapshot_blob.bin on an x64.debug build by 11.44kb

BUG=v8:5343
R=cbruni@chromium.org, gsathysa@chromium.org, jgruber@chromium.org

Change-Id: Id69b7f76866b29caccd97f35870154c4be85f418
Reviewed-on: https://chromium-review.googlesource.com/497974
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45306}
2017-05-15 14:47:40 +00:00
Marja Hölttä
7be0159e4b [objects.h splitting] Move Map and related classes.
BUG=v8:5402

Change-Id: I64fae0a0271eb0f1b71f4ec5d9bd5d22deb1cf59
Reviewed-on: https://chromium-review.googlesource.com/502808
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45305}
2017-05-15 14:41:01 +00:00
Ross McIlroy
663a8ef470 [Compile] Fix test for marked for deopt in CompileLazy builtin.
BUG=chromium:721078,v8:6246

Change-Id: I10f20d9cc2c7cabff8a3fba02aff351fcecc0ce2
Reviewed-on: https://chromium-review.googlesource.com/505611
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45304}
2017-05-15 14:35:41 +00:00
Marja Hölttä
3e12ed1f78 [parser] Skipping inner funcs: Fix related to classes.
- Default constructor scopes won't need the scope data for deciding the scope
allocation of variables inside them. Also, PreParser doesn't construct them. So
they should be just skipped when applying the scope data.

- PreParser needs to declare the class name + have a proper end position for
the class scope.

- This makes all mjsunit tests pass with --experimental-preparser-scope-analysis.

- Also added several DCHECKs which were useful for debugging.

BUG=v8:5516

Change-Id: I5b3e6c60ed79efe25f33576a3547d707c700c6dd
Reviewed-on: https://chromium-review.googlesource.com/503208
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45303}
2017-05-15 14:22:34 +00:00
Michael Lippautz
6546bfe316 [heap] Factor out NumberOfAvailableCores
Bug: chromium:651354
Change-Id: Ie940c8715a33e5fc8e8859c4660ab14ecc6f9233
Reviewed-on: https://chromium-review.googlesource.com/505488
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45302}
2017-05-15 13:53:27 +00:00
Wiktor Garbacz
cea359906a Fix V8_NORETURN for MSVC
Change-Id: Ie141097c12ad578c752f51393bd5a5df176b3cad
Reviewed-on: https://chromium-review.googlesource.com/504528
Commit-Queue: Wiktor Garbacz <wiktorg@google.com>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45301}
2017-05-15 13:33:59 +00:00
Clemens Hammacher
45d5dc8c02 [asm.js] Re-enable asm-wasm translation timer
This timer is disabled since the switch to the new validator.
This CL brings it back.

R=mstarzinger@chromium.org

Change-Id: Ie454af72205564d6fec05dd4b7b44c1e3d0c37d6
Reviewed-on: https://chromium-review.googlesource.com/505610
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45300}
2017-05-15 13:26:50 +00:00
Michael Starzinger
f2b9c5005c [asm.js] Fix evaluation of first for-statement expression.
This makes sure that the evaluation result of the first expression in
for-statements is properly dropped, to leave the stack in a balanced
state after the statement. It also makes sure validation failures in
said expression are handled correctly.

R=clemensh@chromium.org
TEST=mjsunit/regress/regress-crbug-721835
BUG=chromium:721835

Change-Id: I7e6cff4cea0bbf5aad6a3459e27a08ea814dbdbe
Reviewed-on: https://chromium-review.googlesource.com/506148
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45299}
2017-05-15 13:19:49 +00:00
Mythri
96b0928939 Remove crankshaft flag.
Crankshaft flag and opt flag mostly serve the same purpose. Using 
crankshaft to mean use optimizing compiler is a bit confusing.
This cl: https://chromium-review.googlesource.com/c/490206/ fixes 
the tests to use opt instead of crankshaft flag.

One difference between --no-crankshaft and --no-opt would be that 
--no-opt would mean no optimizations at all where as with --no-crankshaft
would mean we can force optimizations using %OptimizeFunctionOnNextCall.

Bug: v8:6325
Change-Id: If17393ac5b6af4ea6e9a98e092f0261c2e0899c5
Reviewed-on: https://chromium-review.googlesource.com/490307
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45298}
2017-05-15 12:34:20 +00:00
georgia.kouveli
9171d91c23 [arm] Print address for load literal instructions.
BUG=

Review-Url: https://codereview.chromium.org/2871863003
Cr-Commit-Position: refs/heads/master@{#45297}
2017-05-15 11:00:16 +00:00
Mythri
4acca5ba88 [Interpreter] Inline feedback collection in relational compare bytecode handlers.
This is the last in the series of simplifying the logic to collect feedback
in compare bytecode handlers. This cl inlines the type feedback collection
for the relational compare (lessthan, lessthan or equal, greater than,
gerater than or equal) bytecode handlers.

Bug: v8:4280
Change-Id: I4a896c9cbe5628c76785882c0632bfa07b18b099
Reviewed-on: https://chromium-review.googlesource.com/500309
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@{#45296}
2017-05-15 10:28:13 +00:00
Camillo Bruni
5ce6090d1b [CSA] Improve CSA debuggability
- Add BasicBlock::Print method for easier inspection in gdb
- Print detailed error message in InstructionSelector::VisitControl instead
  of just a check failure

Change-Id: Ice9d70567114f014b244c1b4e41e450900030994
Reviewed-on: https://chromium-review.googlesource.com/504388
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45295}
2017-05-15 10:14:38 +00:00
bmeurer
130d7dc34c [turbofan] Properly merge compatible field access infos.
For a polymorphic access to o.x we would only merge it into a single
PropertyAccessInfo so far, if x is at the same offset in all maps and
the property index of x (in the descriptor arrays) is the same. But that
doesn't matter for code generation and blocks optimizations even.

BUG=v8:6278,v8:6344,v8:6396
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2883883002
Cr-Commit-Position: refs/heads/master@{#45294}
2017-05-15 09:03:58 +00:00
jing.bao
1073dc987b [ia32] Add rcpps, rsqrtps, cvtdq2ps, cvttps2dq
instr(xmm, xmm/mem)
vinstr(xmm, xmm/mem)

BUG=

Review-Url: https://codereview.chromium.org/2870253003
Cr-Commit-Position: refs/heads/master@{#45293}
2017-05-15 09:00:42 +00:00