Commit Graph

35445 Commits

Author SHA1 Message Date
yangguo
62937cf533 [test] Speed up some slow tests.
- split up cctest/test-api/Threading*
- shortened mjsunit/math-floor-part*
- split up cctest/test-serialize/CustomSnapshotDataBlob
- skipped mjsunit/regress/regress-crbug-474297 unless gc-stress
- shortened cctest/test-serialize/CodeSerializerLargeCodeObject

R=jkummerow@chromium.org

Review-Url: https://codereview.chromium.org/2470143004
Cr-Commit-Position: refs/heads/master@{#40753}
2016-11-04 09:04:28 +00:00
neis
1dd241c44b [modules] Assign cell indices at validation time.
Instead of having a MODULE variable's index be 0 or 1, let it be the index of
its cell.  In this CL, we assign the indices but we continue to only use them to
distinguish imports from exports.  Actually using them to directly access the
cells will be done in a later CL.

R=adamk@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2460233003
Cr-Commit-Position: refs/heads/master@{#40752}
2016-11-04 08:51:39 +00:00
yangguo
c20f27a254 Add inspector tests to default tests to run locally.
R=machenbach@chromium.org

Review-Url: https://codereview.chromium.org/2474863002
Cr-Commit-Position: refs/heads/master@{#40751}
2016-11-04 08:50:07 +00:00
machenbach
8108a294a7 [test] Fix space in test expectation
BUG=v8:5598
TBR=adamk@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2479793003
Cr-Commit-Position: refs/heads/master@{#40750}
2016-11-04 08:42:30 +00:00
yangguo
388acfc4ed Add missing "end" to gdb macro
TBR=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2474433011
Cr-Commit-Position: refs/heads/master@{#40749}
2016-11-04 08:24:06 +00:00
yangguo
6ab61037f3 Add gdb macro to find assertion scopes on the stack.
This is how it would look like.

(gdb) bta
[1 ] V8_Fatal                                         ../../src/base/logging.cc:67
[2 ] v8::internal::Heap::AllocateRaw                  ../../src/heap/heap-inl.h:298
[3 ] v8::internal::Heap::AllocateHeapNumber           ../../src/heap/heap.cc:2432
[4 ] v8::internal::Factory::NewHeapNumber             ../../src/factory.cc:1253
[5 ] v8::internal::Factory::NewNumber                 ../../src/factory.cc:1228
[6 ] v8::internal::__RT_impl_Runtime_ConstructDouble  ../../src/runtime/runtime-test.cc:32
 -> Allow HEAP_ALLOCATION (yes_gc)
 -> Disallow HEAP_ALLOCATION (no_gc)
[7 ] v8::internal::Runtime_ConstructDouble            ../../src/runtime/runtime-test.cc:24

R=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2466263007
Cr-Commit-Position: refs/heads/master@{#40748}
2016-11-04 07:27:54 +00:00
adamk
288d9ffd95 Skip flaky test-api/SetJitCodeEventHandler on turbofan_opt/no_snap builds
R=machenbach@chromium.org
BUG=v8:5457
NOTRY=true
NOTREECHECKS=true

Review-Url: https://codereview.chromium.org/2471113004
Cr-Commit-Position: refs/heads/master@{#40747}
2016-11-04 07:26:21 +00:00
caitp
cbadac5528 [builtins] fix Allocate() call in ReduceStringIterator()
Use a NumberConstant op rather than an Int32Constant to make assertions in
v8::internal::compiler::EscapeAnalysis::ProcessAllocation() happy.

BUG=v8:5598
R=bmeurer@chromium.org, franzih@chromium.org

Review-Url: https://codereview.chromium.org/2478643002
Cr-Commit-Position: refs/heads/master@{#40746}
2016-11-04 05:45:15 +00:00
lpy
82f52d07d1 [Tracing] Use TracingCategoryObserver in runtime statistics
This patch is a follow-up patch to enable runtime statistics to use
TracingCategoryObserver.

BUG=v8:5590

Review-Url: https://codereview.chromium.org/2460973003
Cr-Commit-Position: refs/heads/master@{#40745}
2016-11-04 00:31:32 +00:00
kozyatinskiy
d7f82c11f7 [inspector] migrate Runtime to new style
BUG=none
R=dgozman@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Review-Url: https://codereview.chromium.org/2467853003
Cr-Commit-Position: refs/heads/master@{#40744}
2016-11-03 23:52:17 +00:00
lpy
5df5a28f2c Revert of [Tracing] Use TracingCategoryObserver in runtime statistics (patchset #6 id:140001 of https://codereview.chromium.org/2460973003/ )
Reason for revert:
Static-Initializers failed on Ubuntu-12.04

Original issue's description:
> [Tracing] Use TracingCategoryObserver in runtime statistics
>
> This patch is a follow-up patch to enable runtime statistics to use
> TracingCategoryObserver.
>
> BUG=v8:5590

TBR=cbruni@chromium.org,fmeawad@chromium.org,alph@chromium.org,bmeurer@chromium.org,mlippautz@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5590

Review-Url: https://codereview.chromium.org/2469403005
Cr-Commit-Position: refs/heads/master@{#40743}
2016-11-03 23:11:22 +00:00
lpy
059e077881 [Tracing] Use TracingCategoryObserver in runtime statistics
This patch is a follow-up patch to enable runtime statistics to use
TracingCategoryObserver.

BUG=v8:5590

Review-Url: https://codereview.chromium.org/2460973003
Cr-Commit-Position: refs/heads/master@{#40742}
2016-11-03 21:37:05 +00:00
franzih
0f7ea219f0 [compiler] Delete extra map check.
Use HeapConstant for string_iterator_map rather than loading it
manually. This avoids unnecessary map checks.

BUG= v8:3822,v8:5267

Review-Url: https://codereview.chromium.org/2479563003
Cr-Commit-Position: refs/heads/master@{#40741}
2016-11-03 21:25:59 +00:00
bmeurer
cdf9a4062e [turbofan][x64] Improve code generation for Float64LessThan with Float64Abs.
During instruction selection, match the pattern

  Float64LessThan(#0.0, Float64Abs(x))

which TurboFan generates for NumberToBoolean in the general case,
and which evaluates to false if x is 0, -0 or NaN, and compile this
to a simple (v)ucomisd using not_equal flags condition, which avoids
the costly Float64Abs.

Also consistently generate this pattern in TurboFan and the code
stubs/interpreter for ToBoolean.

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

Review-Url: https://codereview.chromium.org/2473923003
Cr-Commit-Position: refs/heads/master@{#40740}
2016-11-03 18:47:37 +00:00
lpy
2525b0573b [Tracing] Make TracingCategoryObserver v8 internal.
This patch removes TracingCategoryObserver API and moves the creation of
observer inside platform initialization, by assuming that either
Platform::AddTraceStateObserver is implemented correctly to add observer to
tracing controller that implemented by embedders, or default tracing controller
has already been set up and attached to platform before
v8::V8::InitializePlatform is called.

BUG=v8:5590

Review-Url: https://codereview.chromium.org/2471583004
Cr-Commit-Position: refs/heads/master@{#40739}
2016-11-03 18:03:56 +00:00
ishell
2010ac0c7d [ic] Avoid extra prototype chain iteration when creating a load IC data handler.
Since all possible data-encoded prototype chain checks are supported by LoadIC
we can remove this extra iteration.

LoadGlobalIC does not support data handlers yet.

BUG=v8:5561

Review-Url: https://codereview.chromium.org/2479523002
Cr-Commit-Position: refs/heads/master@{#40738}
2016-11-03 17:52:30 +00:00
ulan
3c96c5e232 Revert of [heap] Add a guard for restarting the memory reducer after mark-compact. (patchset #1 id:1 of https://chromiumcodereview.appspot.com/2433933005/ )
Reason for revert:
Speculative revert to see impact on crbug.com/659531

Original issue's description:
> [heap] Add a guard for restarting the memory reducer after mark-compact.
>
> Currently it is possible to get into a cycle of
> mark-compact -> memory reducer -> mark-compact -> memory reducer ...
> where the memory reducer does not free memory.
>
> This patch ensures that the memory reducer restarts only if the
> committed memory increased by sufficient amount after the last run.
>
> BUG=

TBR=hpayer@chromium.org,davidroutier17@gmail.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=

Review-Url: https://codereview.chromium.org/2472053003
Cr-Commit-Position: refs/heads/master@{#40737}
2016-11-03 17:27:04 +00:00
heimbuef
495354ffda Used ZoneChunkList in deoptimizer to conserve memory.
Exchanged the ZoneList for a ZoneChunkList to avoid
unnecessary growing.

Review-Url: https://codereview.chromium.org/2468183004
Cr-Commit-Position: refs/heads/master@{#40736}
2016-11-03 17:16:21 +00:00
ishell
9377226a73 [ic] Data handlers for loads of non-existent properties.
BUG=v8:5561

Review-Url: https://codereview.chromium.org/2471613006
Cr-Commit-Position: refs/heads/master@{#40735}
2016-11-03 17:15:29 +00:00
leszeks
a902ef88a3 [turbofan] Tune the ValueNumberingReducer's growth rate
Changes the ValueNumberingReducer to grow when at 80% capacity, rather
than at 50% capacity. This matches the behaviour of base/hashmap.

Review-Url: https://codereview.chromium.org/2474873003
Cr-Commit-Position: refs/heads/master@{#40734}
2016-11-03 16:15:11 +00:00
mstarzinger
e637154b8a [wasm] Fix compiled-module-management lifetime issues.
This makes sure the test in question does not rely on specific lifetime
characteristics for local variables within a function. Note that these
lifetimes are not specified by JavaScript and are not observable within
JavaScript proper. The natives syntax however makes it observable.

BUG=v8:5345
TEST=mjsunit/wasm/compiled-module-management
R=mtrofin@chromium.org

Review-Url: https://codereview.chromium.org/2474053002
Cr-Commit-Position: refs/heads/master@{#40733}
2016-11-03 15:53:56 +00:00
ivica.bogosavljevic
eaac3f0d5d MIPS[64]: Use immediate constants in Add, And, Or and Xor instructions in turbofan
BUG=

Review-Url: https://codereview.chromium.org/2472703002
Cr-Commit-Position: refs/heads/master@{#40732}
2016-11-03 15:42:59 +00:00
bjaideep
e81c410c7c PPC/s390: [builtins]: Uniformly push argument count in TF-generated builtins
Port 4447405b17

R=danno@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2474023002
Cr-Commit-Position: refs/heads/master@{#40731}
2016-11-03 15:05:45 +00:00
cornacch
fb7841b314 Fix JSArrayBuffer is shared check for big endian.
Load the correct 32-bit word to determine if the buffer is shared by
using kBitFieldOffset instead of kBitFieldSlot.

R=ishell@chromium.org,mstarzinger@chromium.org,jkummerow@chromium.org
BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2470023003
Cr-Commit-Position: refs/heads/master@{#40730}
2016-11-03 14:34:13 +00:00
ahaas
7f58be6b38 [wasm] Store the function_index directly in the js-to-wasm wrapper.
If a WebAssembly function is exported, its js-to-wasm wrapper has a
field which contains a reference to the WebAssembly function.
Originally this reference was an index into the export table, which
then contains an index into the function table, which then contains
the metadata of the WebAssembly function.

With this CL we use the index into the function table directly as
the reference to the WebAssembly function.

TEST=mjsunit/wasm/test-import-export-wrapper
R=rossberg@chromium.org, mtrofin@chromium.org
CC=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2472103002
Cr-Commit-Position: refs/heads/master@{#40729}
2016-11-03 14:28:37 +00:00
ulan
dd27284cb4 [heap] Compute number of pointer update tasks based on available cores.
BUG=

Review-Url: https://codereview.chromium.org/2477733002
Cr-Commit-Position: refs/heads/master@{#40728}
2016-11-03 14:27:45 +00:00
Michael Achenbach
50eac4239e Whitespace change to trigger bots
Cr-Commit-Position: refs/heads/master@{#40727}
2016-11-03 14:22:13 +00:00
danno
2445a502dd [stubs] Add a utility class to generate code to access builtin arguments
With an instance of CodeStubArguments, builtin stub generators can generate code
that accesses the receiver passed to the builtin, as well as access and iterate
over the variable number of arguments that are passed in.

Review-Url: https://codereview.chromium.org/2469273003
Cr-Commit-Position: refs/heads/master@{#40726}
2016-11-03 12:53:47 +00:00
bmeurer
6322bf4161 [turbofan] Improve representation selection for HeapObject checking.
For lowering CheckHeapObject, always report TaggedPointer representation
and let the RepresentationChanger come up with a reasonable conversion from
whatever input representation to TaggedPointer. This way we no longer insert
the useless ChangeSomethingToTagged and then check the result for HeapObject,
i.e. mostly reduces the amount of useless code being generated.

Note there are now two operators ChangeFloat64ToTaggedPointer and the old
ChangeFloat64ToTagged, because their semantics different wrt. the strength
reduction in the SimplifiedOperatorReducer.

Also set the output MachineRepresentation::kTaggedPointer properly in
SimplifiedLowering whenever we know that we produce a HeapObject.

R=jarin@chromium.org
BUG=v8:5267

Review-Url: https://codereview.chromium.org/2476593002
Cr-Commit-Position: refs/heads/master@{#40725}
2016-11-03 12:52:54 +00:00
rmcilroy
5bbc5e8eb7 [Tests] Remove skips from tests which no longer timeout on Ignition + Msan.
BUG=v8:4680

Review-Url: https://codereview.chromium.org/2467223005
Cr-Commit-Position: refs/heads/master@{#40724}
2016-11-03 12:42:45 +00:00
bmeurer
10033749fd [turbofan] CheckBounds cannot be used within asm.js.
Also properly deal with constant indices for String element access in
the JSNativeContextSpecialization.

BUG=chromium:661949
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2474013002
Cr-Commit-Position: refs/heads/master@{#40723}
2016-11-03 12:35:04 +00:00
predrag.rudic
f04a9b4936 Fix 'MIPS: Fix Utf16CharacterStream scanner crash due to missaligned access'
Removed a wrong condition test in  TwoByteExternalBufferedStream. This changed fixes errors that may occur under some conditions.

Review-Url: https://codereview.chromium.org/2469723002
Cr-Commit-Position: refs/heads/master@{#40722}
2016-11-03 12:32:16 +00:00
jarin
9b308dcaf5 [turbofan] Refactor the compare-zero folding in instruction selector.
Review-Url: https://codereview.chromium.org/2475433005
Cr-Commit-Position: refs/heads/master@{#40721}
2016-11-03 12:31:25 +00:00
ulan
e7aa6f91b3 [heap] Exclude the owner of the linear allocation area from evacuation.
This ensures that incremental marking step does not change the top and limit
pointers of the old space, which is needed for allocation folding.

For more info see:
https://bugs.chromium.org/p/chromium/issues/detail?id=659165#c13

BUG=chromium:659165

Review-Url: https://codereview.chromium.org/2469273002
Cr-Commit-Position: refs/heads/master@{#40720}
2016-11-03 12:13:23 +00:00
mlippautz
0eeee7cee9 [heap] Allow repeatedly setting EmbedderHeapTracer
Allow swapping the tracer if not in a GC.

BUG=chromium:468240
TBR=ulan@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2475503004
Cr-Commit-Position: refs/heads/master@{#40719}
2016-11-03 11:04:53 +00:00
rmcilroy
c887113d93 [Tests] Fix some concurrent optimization tests on Ignition.
BUG=v8:4680

Review-Url: https://codereview.chromium.org/2467223004
Cr-Commit-Position: refs/heads/master@{#40718}
2016-11-03 11:00:45 +00:00
qyearsley
7d94be5150 Update usage of linux blink try bot to use linux_trusty_blink_rel.
Reason: We're planning to drop support for Linux Precise for layout tests.

BUG=chromium:660580
NOTRY=true

Review-Url: https://codereview.chromium.org/2475563002
Cr-Commit-Position: refs/heads/master@{#40717}
2016-11-03 10:29:36 +00:00
mstarzinger
b02e7fb86e [turbofan] Disable usage of {maybe_assigned} variable flag.
This disables the usage of the {maybe_assigned} flag that the variable
resolution computes for each variable on non-asm.js code. Note that the
analysis is fundamentally broken for destructuring and top-level lexical
variables. Also note that this still uses the analysis for asm.js code
even though it is not validated. One can still trigger the bug by using
invalid constructs within a function marked with "use asm". The fix is
intentionally minimal so that it can be merged to release branches.

R=bmeurer@chromium.org
TEST=mjsunit/regress/regress-crbug-659915
BUG=chromium:659915

Review-Url: https://codereview.chromium.org/2471523005
Cr-Commit-Position: refs/heads/master@{#40716}
2016-11-03 10:24:06 +00:00
leszeks
cf1ebf3662 [ignition/turbo] Remove stack check from inlined functions
This removes the first stack check in inlined functions in the bytecode
graph builder, to match the behaviour of the AST graph builder.

I measure a ~1% statistically significant (p < 0.01) improvement on
Mandreel with --ignition-staging --turbo (on my x64 machine, YMMV).

Review-Url: https://codereview.chromium.org/2392333002
Cr-Commit-Position: refs/heads/master@{#40715}
2016-11-03 10:21:50 +00:00
verwaest
4fa2ebcbe0 Turn Scope::locals_ into a ThreadedList
This turns the ZoneList with minimum 6 words overhead into a linked list through variables, using 2 words for the empty list. Additionally the average number of pointers per entry goes down to the optimal 1 per variable that's in a list.

This does introduce 1 pointer unnecessary overhead for dynamic variables. If that becomes a problem we could distinguish between variables in lists and variables not in lists. We can distinguish them at construction-time.

BUG=v8:5209

Review-Url: https://codereview.chromium.org/2475433002
Cr-Commit-Position: refs/heads/master@{#40714}
2016-11-03 10:07:12 +00:00
ulan
8f85aba4ea Revert of [heap] Invoke incremental marking step before allocation. (patchset #1 id:1 of https://codereview.chromium.org/2464393002/ )
Reason for revert:
Performance regression on Octane and V8 runtime stats.

Original issue's description:
> [heap] Invoke incremental marking step before allocation.
>
> This ensures that the newly allocated object immediatly precedes the
> linear allocation area, which is needed for allocation folding.
>
> For more info see:
> https://bugs.chromium.org/p/chromium/issues/detail?id=659165#c13
>
> BUG=chromium:659165

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

Review-Url: https://codereview.chromium.org/2472043002
Cr-Commit-Position: refs/heads/master@{#40713}
2016-11-03 09:57:00 +00:00
danno
4447405b17 [builtins]: Uniformly push argument count in TF-generated builtins
Review-Url: https://codereview.chromium.org/2467513002
Cr-Commit-Position: refs/heads/master@{#40712}
2016-11-03 08:37:01 +00:00
dschuff
4d2659a706 v8gen.py: change file open mode from 'aw' to just 'a'
'a' and 'w' are mutually exclusive and just 'a' is what we actually
want. Linux doesn't care (it just takes the first one) but Windows
throws a ValueError.

R=machenbach@chromium.org
BUG=None

Review-Url: https://codereview.chromium.org/2467363002
Cr-Commit-Position: refs/heads/master@{#40711}
2016-11-02 22:04:05 +00:00
cbruni
fdf0b3ee7a Revert of [tools] Support custom script injection for callstats.py (patchset #1 id:1 of https://codereview.chromium.org/2455623002/ )
Reason for revert:
speculative revert to address regressions on cnn.com benchmark.

Original issue's description:
> [tools] Support custom script injection for callstats.py
>
> This is a poor-man's solution to trigger page interactions.
>
> BUG=

TBR=jochen@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=

Review-Url: https://codereview.chromium.org/2464053005
Cr-Commit-Position: refs/heads/master@{#40710}
2016-11-02 20:37:17 +00:00
alph
fdca1bb2da [profiler] Make certain Runtime Call Stats fields atomic.
Make RuntimeCallTimer::parent_ and RuntimeCallStats::current_timer_
fields atomic as they are accessed from the signal handler.

BUG=chromium:660428

Review-Url: https://codereview.chromium.org/2464973002
Cr-Commit-Position: refs/heads/master@{#40709}
2016-11-02 18:50:36 +00:00
ahaas
a3b77d560e [wasm] Fix br_table in the wasm interpreter to use varuint32.
The wasm interpreter crashed because it interpreted the table of
br_table as a table of uint8, but according to the spec it is a table of
varint32. Therefore the wasm interpreter misinterpreted 0x80 0x00 as 128
and not as 0, which caused a crash.

R=tizer@chromium.org
BUG=chromium:660262
TEST=cctest/test-run-wasm/RunWasmInterpreted_Regression_660262

Review-Url: https://codereview.chromium.org/2463063002
Cr-Commit-Position: refs/heads/master@{#40708}
2016-11-02 17:07:00 +00:00
yangguo
e3f2910da7 [heap] reorder empty scope info in the root list.
Apparently the previous clean up has regressed performance in some
cases. This is an attempt to recover these regressions.

R=ulan@chromium.org
BUG=chromium:661567

Review-Url: https://codereview.chromium.org/2471493003
Cr-Commit-Position: refs/heads/master@{#40707}
2016-11-02 15:19:51 +00:00
rmcilroy
0fbf7243c6 [Interpreter] Remove skips from mjsunit tests which now pass.
BUG=v8:4680

Review-Url: https://codereview.chromium.org/2469283002
Cr-Commit-Position: refs/heads/master@{#40706}
2016-11-02 14:47:11 +00:00
jochen
bf77741d43 Reland "Create internal fields on global proxy objects"
Original CL description:
> Create internal fields on global proxy objects
>
> BUG=v8:5588
> R=verwaest@chromium.org

BUG=v8:5588
TBR=verwaest@chromium.org

Review-Url: https://codereview.chromium.org/2472573004
Cr-Commit-Position: refs/heads/master@{#40705}
2016-11-02 14:40:31 +00:00
ulan
bb24b91f15 [heap] Invoke incremental marking step before allocation.
This ensures that the newly allocated object immediatly precedes the
linear allocation area, which is needed for allocation folding.

For more info see:
https://bugs.chromium.org/p/chromium/issues/detail?id=659165#c13

BUG=chromium:659165

Review-Url: https://codereview.chromium.org/2464393002
Cr-Commit-Position: refs/heads/master@{#40704}
2016-11-02 14:14:10 +00:00