Commit Graph

13382 Commits

Author SHA1 Message Date
kozyatinskiy
f0649c8f08 [inspector] added inspector test runner [part 3]
- added test runner, that takes file names and V8 flags as arguments and run scripts from passed files with passed flags in frontend context

BUG=chromium:635948
R=dgozman@chromium.org,alph@chromium.org

Committed: https://crrev.com/f3f9f4448dfa533d768878245a9bdbb57b4d941b
Review-Url: https://codereview.chromium.org/2372793002
Cr-Original-Commit-Position: refs/heads/master@{#39891}
Cr-Commit-Position: refs/heads/master@{#39929}
2016-10-02 18:10:39 +00:00
kozyatinskiy
751814a128 [inspector] added inspector test runner [part 2]
- added the channel implementation,
- added inspector implementation,
- added v8::Extension for communication between backend and frontend.

BUG=chromium:635948
R=dgozman@chromium.org,alph@chromium.org

Committed: https://crrev.com/cceaa1225c6a96a28d2c7410d1db520423fb8c31
Review-Url: https://codereview.chromium.org/2368393003
Cr-Original-Commit-Position: refs/heads/master@{#39888}
Cr-Commit-Position: refs/heads/master@{#39928}
2016-10-02 16:45:46 +00:00
akos.palfi
cb1084a800 MIPS: Fix Sltu macro instruction.
Fixes the case when the 'imm' is in range [8000,ffff], as the specification
says the 'imm' is sign-extended before the comparsion, so the effective range
is [max_unsigned-7fff,max_unsigned].

TEST=mjsunit/generated-transition-stub@3b8ad45e
BUG=

Review-Url: https://codereview.chromium.org/2386673002
Cr-Commit-Position: refs/heads/master@{#39922}
2016-09-30 18:29:24 +00:00
leszeks
050bf39d85 Instead of having a hashmap with a function pointer defining its
matching function, creates a hashmap the specialises the case of keys
that simply check pointer equality.

I measure an average ~1% improvement on Octane code-load.

Review-Url: https://codereview.chromium.org/2369963002
Cr-Commit-Position: refs/heads/master@{#39920}
2016-09-30 16:17:06 +00:00
jpp
7ed565b6a5 [WASM] Implements catch for the wasm low level exception mechanism.
This is essentially CL/2275293002, with the difference that the effect
dependencies are now updated correctly.

BUG=

Review-Url: https://codereview.chromium.org/2378773013
Cr-Commit-Position: refs/heads/master@{#39919}
2016-09-30 16:09:32 +00:00
kozyatinskiy
80d400641f [inspector] added inspector test runner [part 1]
- added a inspector folder,
- added related GN and gyp files,
- added task handling infrastructure for test runner.

BUG=chromium:635948
R=dgozman@chromium.org,alph@chromium.org

Committed: https://crrev.com/dc1c71c0dc8a5c4ade4aa291f2ddcd02e90c64b2
Review-Url: https://codereview.chromium.org/2361623006
Cr-Original-Commit-Position: refs/heads/master@{#39866}
Cr-Commit-Position: refs/heads/master@{#39918}
2016-09-30 15:52:46 +00:00
mlippautz
eb582256d6 [heap] Set progress bar flag for FixedArray upon allocation
R=hpayer@chromium.org
TEST=test-heap/Regress598319

Review-Url: https://codereview.chromium.org/2381493004
Cr-Commit-Position: refs/heads/master@{#39912}
2016-09-30 11:13:51 +00:00
rmcilroy
38c57c5ddb [Test] Don't call deprecated readdir_r in generate-bytecode-expectations.
Review-Url: https://codereview.chromium.org/2385653002
Cr-Commit-Position: refs/heads/master@{#39911}
2016-09-30 11:05:40 +00:00
machenbach
0e704cdac6 Revert "[inspector] added inspector test runner [part 1-2]"
Revert "[inspector] added inspector test runner [part 1]"

This reverts commit dc1c71c0dc.

Revert "[inspector] added inspector test runner [part 2]"

This reverts commit cceaa1225c.

Blocks the roll:
https://codereview.chromium.org/2379053003/

In particular android debug:
https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/137605

BUG=chromium:635948
TBR=kozyatinskiy@chromium.org,
NOTRY=true

Review-Url: https://codereview.chromium.org/2387603002
Cr-Commit-Position: refs/heads/master@{#39909}
2016-09-30 09:56:00 +00:00
machenbach
ee0d69910b Revert "[inspector] added inspector test runner [part 3-5]"
Revert "[inspector] added inspector test runner [part 3]"

This reverts commit f3f9f4448d.

Revert "[inspector] added inspector test runner [part 4]"

This reverts commit 4a5f5d0991.

Revert "[inspector] added inspector test runner [part 5]"

This reverts commit 9ddbdab195.

Reverting this in order to revert parts 1-2 which block the roll:
https://codereview.chromium.org/2379053003/

BUG=chromium:635948
TBR=kozyatinskiy@chromium.org,
NOTRY=true

Review-Url: https://codereview.chromium.org/2379303002
Cr-Commit-Position: refs/heads/master@{#39908}
2016-09-30 09:25:31 +00:00
rmcilroy
27fe988b85 [Interpreter] Replace BytecodeRegisterAllocator with a simple bump pointer.
There are only a few occasions where we allocate a register in an outer
expression allocation scope, which makes the costly free-list approach
of the BytecodeRegisterAllocator unecessary. This CL replaces all
occurrences with moves to the accumulator and stores to a register
allocated in the correct scope. By doing this, we can simplify the
BytecodeRegisterAllocator to be a simple bump-pointer allocator
with registers released in the same order as allocated.

The following changes are also made:
 - Make BytecodeRegisterOptimizer able to use registers which have been
   unallocated, but not yet reused
 - Remove RegisterExpressionResultScope and rename
   AccumulatorExpressionResultScope to ValueExpressionResultScope
 - Introduce RegisterList to represent consecutive register
   allocations, and use this for operands to call bytecodes.

By avoiding the free-list handling, this gives another couple of
percent on CodeLoad.

BUG=v8:4280

Review-Url: https://codereview.chromium.org/2369873002
Cr-Commit-Position: refs/heads/master@{#39905}
2016-09-30 09:03:25 +00:00
neis
e500144780 [test262] Temporarily disable Date tests that fail depending on the timezone.
BUG=v8:5449
R=machenbach@chromium.org
TBR=littledan@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2383003002
Cr-Commit-Position: refs/heads/master@{#39903}
2016-09-30 08:30:01 +00:00
neis
427242326c Reland: [modules] Properly initialize declared variables.
Before evaluating a module, all variables declared at the top-level
in _any_ of the modules in the dependency graph must be initialized.
This is observable because a module A can access a variable imported
from module B (e.g. a function) at a point when module B's body hasn't
been evaluated yet.

We achieve this by implementing modules internally as generators with
two states (not initialized, initialized).

R=adamk@chromium.org
BUG=v8:1569
CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_win_dbg

Committed: https://crrev.com/f4dfb6fbe1cdd9a0f287a1a9c496e1f69f6f5d20
Committed: https://crrev.com/8c52a411583e870bd5ed100864caa58f491c5d88
Review-Url: https://codereview.chromium.org/2375793002
Cr-Original-Original-Commit-Position: refs/heads/master@{#39871}
Cr-Original-Commit-Position: refs/heads/master@{#39892}
Cr-Commit-Position: refs/heads/master@{#39900}
2016-09-30 07:53:57 +00:00
kozyatinskiy
9ddbdab195 [inspector] added inspector test runner [part 5]
- added most part of inspector tests that depends only on JavaScript domains.

BUG=chromium:635948
R=dgozman@chromium.org,alph@chromium.org

Review-Url: https://codereview.chromium.org/2369753004
Cr-Commit-Position: refs/heads/master@{#39897}
2016-09-30 04:50:17 +00:00
bmeurer
669cb71e60 Revert of Reland: [modules] Properly initialize declared variables. (patchset #6 id:100001 of https://codereview.chromium.org/2375793002/ )
Reason for revert:
Speculative revert for christmas tree

Original issue's description:
> Reland: [modules] Properly initialize declared variables.
>
> Before evaluating a module, all variables declared at the top-level
> in _any_ of the modules in the dependency graph must be initialized.
> This is observable because a module A can access a variable imported
> from module B (e.g. a function) at a point when module B's body hasn't
> been evaluated yet.
>
> We achieve this by implementing modules internally as generators with
> two states (not initialized, initialized).
>
> R=adamk@chromium.org
> BUG=v8:1569
> CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_win_dbg
>
> Committed: https://crrev.com/f4dfb6fbe1cdd9a0f287a1a9c496e1f69f6f5d20
> Committed: https://crrev.com/8c52a411583e870bd5ed100864caa58f491c5d88
> Cr-Original-Commit-Position: refs/heads/master@{#39871}
> Cr-Commit-Position: refs/heads/master@{#39892}

TBR=adamk@chromium.org,mstarzinger@chromium.org,machenbach@chromium.org,neis@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2387593002
Cr-Commit-Position: refs/heads/master@{#39896}
2016-09-30 04:22:41 +00:00
kozyatinskiy
4a5f5d0991 [inspector] added inspector test runner [part 4]
- added inspector test suite definition in testcfg.py
- added JS infrastructure for tests in protocol-test.js

BUG=chromium:635948
R=dgozman@chromium.org,alph@chromium.org

Review-Url: https://codereview.chromium.org/2370743003
Cr-Commit-Position: refs/heads/master@{#39895}
2016-09-30 01:35:42 +00:00
neis
8c52a41158 Reland: [modules] Properly initialize declared variables.
Before evaluating a module, all variables declared at the top-level
in _any_ of the modules in the dependency graph must be initialized.
This is observable because a module A can access a variable imported
from module B (e.g. a function) at a point when module B's body hasn't
been evaluated yet.

We achieve this by implementing modules internally as generators with
two states (not initialized, initialized).

R=adamk@chromium.org
BUG=v8:1569
CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_win_dbg

Committed: https://crrev.com/f4dfb6fbe1cdd9a0f287a1a9c496e1f69f6f5d20
Review-Url: https://codereview.chromium.org/2375793002
Cr-Original-Commit-Position: refs/heads/master@{#39871}
Cr-Commit-Position: refs/heads/master@{#39892}
2016-09-29 22:24:56 +00:00
kozyatinskiy
f3f9f4448d [inspector] added inspector test runner [part 3]
- added test runner, that takes file names and V8 flags as arguments and run scripts from passed files with passed flags in frontend context

BUG=chromium:635948
R=dgozman@chromium.org,alph@chromium.org

Review-Url: https://codereview.chromium.org/2372793002
Cr-Commit-Position: refs/heads/master@{#39891}
2016-09-29 22:23:47 +00:00
adamk
a2a9b4a7ea Revert of [wasm] Remove improper assembler check for grow memory. (patchset #2 id:20001 of https://codereview.chromium.org/2376153003/ )
Reason for revert:
grow-memory test now fails on Linux dbg, blocking the CQ:

https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20debug/builds/11217

Original issue's description:
> [wasm] Remove improper assembler check for grow memory.
>
> Note that the offset can still be out of bounds, even after grow memory. The calculation of the remaining size can overflow.
>
> R=gdeepti@chromium.org
> BUG=chromium:644670
>
> Committed: https://crrev.com/e6071a9c067e07304329250e040b652fb82e9b5e
> Cr-Commit-Position: refs/heads/master@{#39886}

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

Review-Url: https://codereview.chromium.org/2378973003
Cr-Commit-Position: refs/heads/master@{#39889}
2016-09-29 21:54:57 +00:00
kozyatinskiy
cceaa1225c [inspector] added inspector test runner [part 2]
- added the channel implementation,
- added inspector implementation,
- added v8::Extension for communication between backend and frontend.

BUG=chromium:635948
R=dgozman@chromium.org,alph@chromium.org

Review-Url: https://codereview.chromium.org/2368393003
Cr-Commit-Position: refs/heads/master@{#39888}
2016-09-29 21:40:48 +00:00
titzer
ab21fec6d3 [wasm] Refactor handling of data segments in WasmModuleBuilder.
R=bradnelson@chromium.org,aseemgarg@chromium.org,mstarzinger@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2384483002
Cr-Commit-Position: refs/heads/master@{#39887}
2016-09-29 18:13:39 +00:00
titzer
e6071a9c06 [wasm] Remove improper assembler check for grow memory.
Note that the offset can still be out of bounds, even after grow memory. The calculation of the remaining size can overflow.

R=gdeepti@chromium.org
BUG=chromium:644670

Review-Url: https://codereview.chromium.org/2376153003
Cr-Commit-Position: refs/heads/master@{#39886}
2016-09-29 18:04:00 +00:00
titzer
424cd4cf84 [wasm] Implement WebAssembly.validate()
R=bradnelson@chromium.org,mtrofin@chromium.org
BUG=chromium:575167

Review-Url: https://codereview.chromium.org/2384513002
Cr-Commit-Position: refs/heads/master@{#39885}
2016-09-29 18:02:58 +00:00
machenbach
5bb978461f Revert of [WASM] Implements catch for the wasm low level exception mechanism. (patchset #16 id:300001 of https://codereview.chromium.org/2275293002/ )
Reason for revert:
nosse4 errors:
https://build.chromium.org/p/client.v8/builders/V8%20Linux/builds/13524
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20debug/builds/11215

Original issue's description:
> [WASM] Implements catch for the wasm low level exception mechanism.
>
> BUG=
>
> Committed: https://crrev.com/93e5425c46453764779bd557628d61fae670027a
> Cr-Commit-Position: refs/heads/master@{#39881}

TBR=titzer@chromium.org,bradnelson@chromium.org,jpp@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://codereview.chromium.org/2383613002
Cr-Commit-Position: refs/heads/master@{#39884}
2016-09-29 18:00:52 +00:00
jpp
93e5425c46 [WASM] Implements catch for the wasm low level exception mechanism.
BUG=

Review-Url: https://codereview.chromium.org/2275293002
Cr-Commit-Position: refs/heads/master@{#39881}
2016-09-29 15:59:29 +00:00
caitp
3c52ac79cd Reland "[builtins] migrate C++ String Iterator builtins to baseline TurboFan"
Migrate newly added C++ String Iterator builtins to TFJ builtins, per
step 4. of the String Iterator Baseline Implementation section of the design doc

BUG=v8:5388
R=bmeurer@chromium.org, mstarzinger@chromium.org, jkummerow@chromium.org

Committed: https://crrev.com/f9a2c8b1112c4e915df8bc5f7ea1fccdf7a33ff8
Cr-Commit-Position: refs/heads/master@{#39765}

patch from issue 2358263002 at patchset 260001 (http://crrev.com/2358263002#ps260001)

Review-Url: https://codereview.chromium.org/2381053002
Cr-Commit-Position: refs/heads/master@{#39879}
2016-09-29 15:49:19 +00:00
leszeks
537c855882 [ignition] BytecodeGraphBuilder: Merge correct environment in try block
Making new nodes inside of exception-handled blocks fiddles around with the
current environment to merge the exception paths. In particular, the current
environment pointer is mutated. This patch ensures that when we merge the fast
and slow paths of the LdaContextLookup, we actually merge the correct
environment and do not accidentally merge the exceptional environment.

BUG=chromium:651394

Review-Url: https://codereview.chromium.org/2379043002
Cr-Commit-Position: refs/heads/master@{#39878}
2016-09-29 15:18:06 +00:00
alph
57b0e37443 [tracing] r39794 follow-up: Update the missing part of the test.
The test now checks the case when an observer is added after tracing is started.

BUG=chromium:406277

Review-Url: https://codereview.chromium.org/2376953002
Cr-Commit-Position: refs/heads/master@{#39874}
2016-09-29 15:13:46 +00:00
machenbach
7496c9de94 Revert of [modules] Properly initialize declared variables. (patchset #5 id:80001 of https://codereview.chromium.org/2375793002/ )
Reason for revert:
Suspect for causing win64 debug problems:
https://build.chromium.org/p/client.v8/builders/V8%20Win64%20-%20debug/builds/12646

Original issue's description:
> [modules] Properly initialize declared variables.
>
> Before evaluating a module, all variables declared at the top-level
> in _any_ of the modules in the dependency graph must be initialized.
> This is observable because a module A can access a variable imported
> from module B (e.g. a function) at a point when module B's body hasn't
> been evaluated yet.
>
> We achieve this by implementing modules internally as generators with
> two states (not initialized, initialized).
>
> R=adamk@chromium.org
> BUG=v8:1569
>
> Committed: https://crrev.com/f4dfb6fbe1cdd9a0f287a1a9c496e1f69f6f5d20
> Cr-Commit-Position: refs/heads/master@{#39871}

TBR=adamk@chromium.org,mstarzinger@chromium.org,neis@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2379063002
Cr-Commit-Position: refs/heads/master@{#39873}
2016-09-29 15:10:30 +00:00
neis
f4dfb6fbe1 [modules] Properly initialize declared variables.
Before evaluating a module, all variables declared at the top-level
in _any_ of the modules in the dependency graph must be initialized.
This is observable because a module A can access a variable imported
from module B (e.g. a function) at a point when module B's body hasn't
been evaluated yet.

We achieve this by implementing modules internally as generators with
two states (not initialized, initialized).

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

Review-Url: https://codereview.chromium.org/2375793002
Cr-Commit-Position: refs/heads/master@{#39871}
2016-09-29 14:20:56 +00:00
kozyatinskiy
dc1c71c0dc [inspector] added inspector test runner [part 1]
- added a inspector folder,
- added related GN and gyp files,
- added task handling infrastructure for test runner.

BUG=chromium:635948
R=dgozman@chromium.org,alph@chromium.org

Review-Url: https://codereview.chromium.org/2361623006
Cr-Commit-Position: refs/heads/master@{#39866}
2016-09-29 13:46:06 +00:00
verwaest
fecd09ce32 Readd default function variables upon scope reset for preparse abort
BUG=chromium:651327

Review-Url: https://codereview.chromium.org/2380993003
Cr-Commit-Position: refs/heads/master@{#39864}
2016-09-29 13:29:15 +00:00
titzer
c1e320b074 [wasm] Rename encoder.(cc,h) to wasm-module-builder.(cc,h)
R=bradnelson@chromium.org,mtrofin@chromium.org,mstarzinger@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2383463002
Cr-Commit-Position: refs/heads/master@{#39861}
2016-09-29 11:29:19 +00:00
machenbach
964f54ba1a [test] Reduce time spent on js-perf tests and fix timeouts.
Strings takes a considerate amount of time and times out on
many platforms. Generally the iterations need to be reduced
to free resources.

NOTRY=true
TBR=hablich@chromium.org

Review-Url: https://codereview.chromium.org/2374393002
Cr-Commit-Position: refs/heads/master@{#39856}
2016-09-29 09:33:45 +00:00
mlippautz
9af3142fba Revert of [heap] Remove border page
Reason for revert:
No real improvement as we still lack the ability to promote from
scavenges/young gen GCs.

Let's keep this in mind for later.

Original issue's description:
> [heap] Remove border page
>
> A page now belongs either the nursery *or* the intermediate gen. The page that
> contained objects of both spaces is removed in this change.
>
> BUG=chromium:636331
>
> Committed: https://crrev.com/42ece47446f0dbd3779d6e0e00dce97a1931a9f9
> Cr-Commit-Position: refs/heads/master@{#39778}

TBR=ulan@chromium.org,hpayer@chromium.org
BUG=chromium:636331

Review-Url: https://codereview.chromium.org/2383443002
Cr-Commit-Position: refs/heads/master@{#39854}
2016-09-29 09:21:08 +00:00
mtrofin
aff5ab1132 [wasm] fix for GC during instantiation.
BUG=chromium:651070

Review-Url: https://codereview.chromium.org/2371403003
Cr-Commit-Position: refs/heads/master@{#39848}
2016-09-29 04:24:42 +00:00
mtrofin
df490c3484 [wasm] Fix for cloning module heap size value
The module size is encoded as a HeapNumber, and needs to be
explicitly cloned.

BUG=chromium:647649

Review-Url: https://codereview.chromium.org/2347333002
Cr-Commit-Position: refs/heads/master@{#39845}
2016-09-29 00:48:28 +00:00
gdeepti
64e43be959 Fix bounds check of a store instruction after a grow_memory instruction
- Store instruction with an offset bigger than GrowMemory offset should handle out of bounds correctly
 - Refactor to separate runnning from compile so arguments can be passed in to module builder tests.

BUG=chromium:644670

R=ahaas@chromium.org, titzer@chromium.org

Review-Url: https://codereview.chromium.org/2373613004
Cr-Commit-Position: refs/heads/master@{#39840}
2016-09-28 20:56:01 +00:00
ulan
7e652694a0 Reland "[heap] New heuristics for starting of incremental marking. (patchset #9 id:160001 of https://codereview.chromium.org/2364923002/ )"
This reverts commit a5440d1190.

BUG=chromium:616434
TBR=hpayer@chromium.org
LOG=NO

Review-Url: https://codereview.chromium.org/2379663002
Cr-Commit-Position: refs/heads/master@{#39838}
2016-09-28 17:52:00 +00:00
bradnelson
21e46b05a2 [wasm] [asm.js] Fix various asm.js issues.
Several of the asm.js tests were disabled and wrong (mismatched number of args
on the stdlib functions).

Fixing issue around negation and float + doubles.

Renaming function for IsNegate to IsInvert (to reflect what it actually does).

Added tests for negate and invert.

BUG= https://bugs.chromium.org/p/v8/issues/detail?id=4203
R=aseemgarg@chromium.org,jpp@chromium.org

Review-Url: https://codereview.chromium.org/2377903002
Cr-Commit-Position: refs/heads/master@{#39836}
2016-09-28 16:37:04 +00:00
machenbach
a5440d1190 Revert of [heap] New heuristics for starting of incremental marking. (patchset #9 id:160001 of https://codereview.chromium.org/2364923002/ )
Reason for revert:
OOMs in nosnap debug:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap%20-%20debug/builds/9572

Original issue's description:
> [heap] New heuristics for starting of incremental marking.
>
> The motivation for this patch is to move more marking work to tasks.
> This is done by postponing the start of incremental marking until
> a marking task is running.
>
> This patch introduces a soft and a hard limits for incremental marking.
> When the soft limit is reached, the marking task is scheduled.
> If the hard limit is reached before the task is running, then
> incremental marking is started without waiting for the task.
>
> BUG=chromium:616434
> LOG=NO
>
> Committed: https://crrev.com/55683ddd2a32e0dfb8df66271fbf53e3618cce9d
> Cr-Commit-Position: refs/heads/master@{#39831}

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

Review-Url: https://codereview.chromium.org/2375983002
Cr-Commit-Position: refs/heads/master@{#39833}
2016-09-28 15:20:10 +00:00
ulan
55683ddd2a [heap] New heuristics for starting of incremental marking.
The motivation for this patch is to move more marking work to tasks.
This is done by postponing the start of incremental marking until
a marking task is running.

This patch introduces a soft and a hard limits for incremental marking.
When the soft limit is reached, the marking task is scheduled.
If the hard limit is reached before the task is running, then
incremental marking is started without waiting for the task.

BUG=chromium:616434
LOG=NO

Review-Url: https://codereview.chromium.org/2364923002
Cr-Commit-Position: refs/heads/master@{#39831}
2016-09-28 14:43:59 +00:00
mvstanton
9686d0811e [turbofan] Type::Contains() and Constants() is unnecessary.
Cleanup.

BUG=

Review-Url: https://codereview.chromium.org/2379573002
Cr-Commit-Position: refs/heads/master@{#39830}
2016-09-28 14:09:28 +00:00
ulan
1beb89f24c [heap] New heuristics for incremental marking step size.
This patch simplifies code for speeding up marking and
removes write barrier counter.

The step size is now computed based in two parts:
- bytes to mark in order to keep up with allocation,
- bytes to mark in order to make progress.

BUG=chromium:616434, chromium:646139, chromium:644819
LOG=NO

Review-Url: https://codereview.chromium.org/2359903002
Cr-Commit-Position: refs/heads/master@{#39827}
2016-09-28 13:27:59 +00:00
ulan
4c2fd5cd5f [heap] Simplify incremental marking counters in GCTracer.
This patch replaces cumulative counters with the counters for the current GC cycle.

It also replaces the ring buffer of record incremental marking speeds with a single variable.

Review-Url: https://codereview.chromium.org/2361563004
Cr-Commit-Position: refs/heads/master@{#39826}
2016-09-28 12:58:21 +00:00
ishell
8d8c134b12 [ic][mips][mips64] Ensure store handlers return value in proper register.
BUG=chromium:650973

Review-Url: https://codereview.chromium.org/2374003002
Cr-Commit-Position: refs/heads/master@{#39823}
2016-09-28 11:46:44 +00:00
bmeurer
3304ea9122 [intrinsics] Nuke the %_StringCharFromCode intrinsic.
As of https://codereview.chromium.org/2348493003 there are no users of
this intrinsic left in the code, and we don't want to have any new users
of it. The runtime function remains as it serves as a fallback for the
optimized code (Crankshaft code actually).

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

Review-Url: https://codereview.chromium.org/2378693002
Cr-Commit-Position: refs/heads/master@{#39822}
2016-09-28 11:24:21 +00:00
jgruber
da27e0c886 Allow empty first parts of ConsStrings
TurboFan lowering (see [0]) of ConsString creation cannot ensure that
the first part of the cons string is non-empty without introducing a phi
and negatively impacting performance.

This modifies ConsStringIterator to allow empty first parts of
ConsStrings.

BUG=v8:5440

Review-Url: https://codereview.chromium.org/2377983002
Cr-Commit-Position: refs/heads/master@{#39817}
2016-09-28 09:46:56 +00:00
mlippautz
6d32126cb7 [heap] Make committed counters on space size_t
BUG=

Review-Url: https://codereview.chromium.org/2371133002
Cr-Commit-Position: refs/heads/master@{#39811}
2016-09-28 08:48:37 +00:00
zhengxing.li
990a8e3913 [tracing] Avoid Gcc compilation fail by declaring AddTraceEvent function in Class derived from Platform Class.
The CL #39789 (https://codereview.chromium.org/2367603002 ) caused the Gcc compilation fail for v8 debug mode.
  The error message was:
  In file included from .././include/libplatform/v8-tracing.h:13:0,
                   from .././src/libplatform/default-platform.h:14,
                   from ../src/libplatform/default-platform.cc:5:
  .././include/v8-platform.h:169:20: error: ‘virtual uint64_t v8::Platform::AddTraceEvent(char, const uint8_t*, const char*, const char*, uint64_t, uint64_t, int32_t, const char**, const uint8_t*, const uint64_t*, unsigned int)’ was hidden [-Werror=overloaded-virtual]
     virtual uint64_t AddTraceEvent(
                      ^
  In file included from ../src/libplatform/default-platform.cc:5:0:
  .././src/libplatform/default-platform.h:55:12: error:   by ‘virtual uint64_t v8::platform::DefaultPlatform::AddTraceEvent(char, const uint8_t*, const char*, const char*, uint64_t, uint64_t, int32_t, const char**, const uint8_t*, const uint64_t*, std::unique_ptr<v8::ConvertableToTraceFormat>*, unsigned int)’ [-Werror=overloaded-virtual]
     uint64_t AddTraceEvent(
              ^

  This CL fixed this issue by adding "using Platform::AddTraceEvent;" before all declarations of AddTraceEvent functions in Classes derived from Platform Class.

BUG=

Review-Url: https://codereview.chromium.org/2380583002
Cr-Commit-Position: refs/heads/master@{#39810}
2016-09-28 08:47:33 +00:00
ishell
632e261a3a [es8] Remove syntactic tail calls support.
BUG=v8:4915

Review-Url: https://codereview.chromium.org/2372513003
Cr-Commit-Position: refs/heads/master@{#39808}
2016-09-28 08:25:45 +00:00
cbruni
24e29f28ba [test] Add micro benchmark for Object.create
BUG=

Review-Url: https://codereview.chromium.org/2378613002
Cr-Commit-Position: refs/heads/master@{#39807}
2016-09-28 08:14:21 +00:00
bmeurer
19b3943607 [turbofan] ChangeFloat64ToTagged shouldn't canonicalize.
This matches current Crankshaft/fullcodegen behavior more closely and
thus reduces the chances that we run into unnecessary polymorphism due
to the field representation tracking in our object model.

Drive-by-fixes: Make sure the JSRegExp::lastIndex field stays Smi
if possible (otherwise we tank the regexp benchmark in Octane).

CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_mac64_rel,v8_mac64_dbg
R=jarin@chromium.org
BUG=v8:5267

Committed: 6a939714e9
Committed: https://crrev.com/ee158e6c4cc896479a32245432a3c2fdd31bcb73
Committed: https://crrev.com/ddf792beb3a72f6dba83e94fc8ada03ebf1630bd
Review-Url: https://codereview.chromium.org/2367593003
Cr-Original-Original-Commit-Position: refs/heads/master@{#39692}
Cr-Original-Commit-Position: refs/heads/master@{#39748}
Cr-Commit-Position: refs/heads/master@{#39803}
2016-09-28 06:07:57 +00:00
bmeurer
15a449b141 [typedarray] Properly initialize JSTypedArray::length with Smi.
Even after https://codereview.chromium.org/2371963002 we still did not
always store a Smi into the JSTypedArray::length field, the runtime
function %TypedArrayInitializeFromArrayLike was still storing whatever
it got from the JavaScript code, which is highly dependent on internal
decisions of the ICs and the representation selection in the optimizing
compilers, so that's pretty fragile.

R=verwaest@chromium.org
BUG=chromium:650933

Review-Url: https://codereview.chromium.org/2377943002
Cr-Commit-Position: refs/heads/master@{#39802}
2016-09-28 05:49:37 +00:00
bradnelson
53b228239e [wasm] asm.js: Work around parser converting !0 and !1 to boolean.
!0 -> true and !1 -> false etc in the parser.
This clashes with some of the typing logic in asm.js,
and can show up in some real programs in the wild (at least in past asm.js
versions).

BUG= https://bugs.chromium.org/p/v8/issues/detail?id=4203
R=aseemgarg@chromium.org,jpp@chromium.org

Review-Url: https://codereview.chromium.org/2372823004
Cr-Commit-Position: refs/heads/master@{#39798}
2016-09-27 23:20:21 +00:00
mtrofin
fa071284ed [wasm] resolve mips build error post 0xC land
BUG=

Review-Url: https://codereview.chromium.org/2377683003
Cr-Commit-Position: refs/heads/master@{#39796}
2016-09-27 22:09:51 +00:00
titzer
28392ab196 [wasm] Master CL for Binary 0xC changes.
[0xC] Convert to stack machine semantics.
[0xC] Use section codes instead of names.
[0xC] Add elements section decoding.
[0xC] Decoding of globals section.
[0xC] Decoding of memory section.
[0xC] Decoding of imports section.
[0xC] Decoding of exports section.
[0xC] Decoding of data section.
[0xC] Remove CallImport bytecode.
[0xC] Function bodies have an implicit block.
[0xC] Remove the bottom label from loops.
[0xC] Add signatures to blocks.
[0xC] Remove arities from branches.
Add tests for init expression decoding.
Rework compilation of import wrappers and how they are patched.
Rework function indices in debugging.
Fix ASM->WASM builder for stack machine.
Reorganize asm.js foreign functions due to import indices change.

R=ahaas@chromium.org,rossberg@chromium.org,bradnelson@chromium.org
BUG=chromium:575167
LOG=Y

Committed: https://crrev.com/76eb976a67273b8c03c744f64ad850b0432554b9
Review-Url: https://codereview.chromium.org/2345593003
Cr-Original-Commit-Position: refs/heads/master@{#39678}
Cr-Commit-Position: refs/heads/master@{#39795}
2016-09-27 20:46:30 +00:00
alph
fcf1bac99a [tracing] Implement Add/RemoveTraceStateObserver for default platform.
BUG=chromium:406277

Review-Url: https://codereview.chromium.org/2369073003
Cr-Commit-Position: refs/heads/master@{#39794}
2016-09-27 20:12:55 +00:00
adamk
34922e8d77 Remove empty SNPrintF call to make mips build happy
TBR=klaasb@google.com

Review-Url: https://codereview.chromium.org/2370033004
Cr-Commit-Position: refs/heads/master@{#39792}
2016-09-27 19:28:51 +00:00
alph
4810f41a52 [tracing] Support ConvertableToTraceFormat argument type.
Drive-by: Use perfect forwarding for AddTraceEvent arguments.

BUG=406277

Committed: https://crrev.com/dcac49af485fe5d4c0027f153901435dbb29c232
Review-Url: https://codereview.chromium.org/2367603002
Cr-Original-Commit-Position: refs/heads/master@{#39742}
Cr-Commit-Position: refs/heads/master@{#39789}
2016-09-27 18:08:53 +00:00
neis
b7913f33a3 [modules] Don't throw when detecting cycle while processing star exports.
We must not throw when seeing a cycle while trying to resolve a name through
star exports.  (It may be surprising that we do have to throw when seeing an
ambiguity, but this is what the spec says.)

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

Review-Url: https://codereview.chromium.org/2376563002
Cr-Commit-Position: refs/heads/master@{#39787}
2016-09-27 17:31:37 +00:00
klaasb
0d1e15d6e5 Remove decision by Turbofan OSR to optimize on next call
When we OSR using Turbofan, we would set the function to be optimized
on the next call, irrespective of the runtime profiler's previous
decisions - such as compiling for baseline. It seems more prudent to
always make these decisions in the runtime profiler where the data is
available.

Review-Url: https://codereview.chromium.org/2369043002
Cr-Commit-Position: refs/heads/master@{#39782}
2016-09-27 16:27:42 +00:00
mlippautz
42ece47446 [heap] Remove border page
A page now belongs either the nursery *or* the intermediate gen. The page that
contained objects of both spaces is removed in this change.

BUG=chromium:636331

Review-Url: https://codereview.chromium.org/2209583002
Cr-Commit-Position: refs/heads/master@{#39778}
2016-09-27 15:02:22 +00:00
mstarzinger
437a33efd2 [turbofan] Fix indirect escapes in escape analysis.
This makes sure we only replace load operations for fields on virtual
objects. Even though data flow information for non-virtual (escaping)
allocations is available, it might be inaccurate in certain situations
where object state hasn't been cleared.

R=jarin@chromium.org
TEST=mjsunit/compiler/regress-escape-analysis-indirect

Review-Url: https://codereview.chromium.org/2369953002
Cr-Commit-Position: refs/heads/master@{#39776}
2016-09-27 14:53:17 +00:00
jgruber
515994b8ca [regexp] Don't cache exec method in Regexp.proto[@@split]
The call to RegExpSubclassExec may refer to a different exec method
since splitter is newly constructed previously to the call.

BUG=v8:5351

Review-Url: https://codereview.chromium.org/2370733003
Cr-Commit-Position: refs/heads/master@{#39774}
2016-09-27 14:02:33 +00:00
mstarzinger
66e73b3a1b [turbofan] Remove unsafe JSToBoolean lowering.
The lowering of {JSToBoolean} operators in {JSTypedLowering} inserts
loads that are not part of the effect chain. This does not play well
with effect-sensitive data flow analysis (e.g. escape analysis). This
removes the lowering in question, we can implement it using a dedicated
simplified operator eventually if needed.

R=bmeurer@chromium.org
TEST=mjsunit/wasm/embenchen/lua_binarytrees

Review-Url: https://codereview.chromium.org/2366363003
Cr-Commit-Position: refs/heads/master@{#39773}
2016-09-27 13:55:25 +00:00
jgruber
0ce95e0878 [stubs] Add a test for canary crashes in SubStringStub
These crashes were caused by an invalid pointer stored in a tagged
variable in SubStringStub. This can be reproduced by calling the stub on
an external string and ensuring GC kicks in on the subsequent
allocation.

Only the TurboFan implementation of SubStringStub is affected, the current
PlatformStub implementation handles this case just fine.

BUG=chromium:649967

Review-Url: https://codereview.chromium.org/2374603003
Cr-Commit-Position: refs/heads/master@{#39772}
2016-09-27 13:53:15 +00:00
verwaest
c0ded71713 Don't reset parameters if we aborted preparsing, rebuild them from the params_ list
BUG=

Review-Url: https://codereview.chromium.org/2372703004
Cr-Commit-Position: refs/heads/master@{#39769}
2016-09-27 13:05:32 +00:00
mvstanton
c9cc3d164d [turbofan] Remove the representation dimension from Type.
Adding this back in because it's not part of the stability issue.

BUG=chromium:649967
TBR=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2365373004
Cr-Commit-Position: refs/heads/master@{#39761}
2016-09-27 11:12:43 +00:00
caitp
8fea775784 [builtins] adapt arguments for Builtins::kIteratorPrototypeIterator
BUG=chromium:650172
R=mstarzinger@chromium.org, bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2368323002
Cr-Commit-Position: refs/heads/master@{#39760}
2016-09-27 11:05:42 +00:00
epertoso
e25b264957 [turbofan] Introduces the BitcastWordToTaggedSigned and BitcastTaggedToWord opcodes.
They are nops, but will be used when verifying the machine graph.

BUG=

Review-Url: https://codereview.chromium.org/2367413002
Cr-Commit-Position: refs/heads/master@{#39758}
2016-09-27 10:26:24 +00:00
epertoso
2db734df39 [turbofan] Reduces x << y ^ x >>> (32 - y) to x ror (32 - y).
The MachineOperatorReducer was only reducing word32 expressions of the type x << y | x >>> (32 - y) (and variants) to the equivalent Word32Ror. This CL applies the same pattern-matching logic to Word32Xor.

BUG=

Committed: https://crrev.com/a86397d890d3caa01a947e2a6e71beb1f58e6e6b
Review-Url: https://codereview.chromium.org/2199323003
Cr-Original-Commit-Position: refs/heads/master@{#38284}
Cr-Commit-Position: refs/heads/master@{#39757}
2016-09-27 10:15:44 +00:00
cbruni
1f9863aa18 Reland of Preparse inner functions (new try) (patchset #1 id:1 of https://codereview.chromium.org/2373443003/ )
Reason for revert:
Stability thief found, relanding speculative reverts.

Original issue's description:
> Revert of Preparse inner functions (new try) (patchset #21 id:420001 of https://codereview.chromium.org/2352593002/ )
>
> Reason for revert:
> We currently have some stability issues on Canary. Let's reland this after we verified that we "fixed" Canary again.
>
> Original issue's description:
> > Preparse inner functions (new try)
> >
> > This is an overly pessimistic approach where PreParser only keeps
> > track of unresolved variables, but doesn't declare anything. This
> > will result in context-allocating variables in the outer function
> > unnecessarily, if the variable names clash with variable names
> > used by the inner function (even if the variables are not the
> > same). However, we have been unable to prove that this approach
> > wouldn't be good enough for the practical purposes.
> >
> > Fixes after the previous try ( https://codereview.chromium.org/2322243002/ ):
> > Keep the context-allocation decision stable when compiling fully eagerly.
> >
> > Tests which exercise this functionality:
> > mjsunit/fixed-context-shapes-when-recompiling.js
> >
> > Design document (chromium):
> >
> > https://docs.google.com/a/chromium.org/document/d/1rRv5JJZ0JpOZAZN2CSUwZPFJiBAdRnTiSYhazseNHFg/edit?usp=sharing
> >
> > BUG=
> >
> > Committed: https://crrev.com/7c73cf32c60484cdf37c84f1d61b4640e87068d7
> > Cr-Commit-Position: refs/heads/master@{#39719}
>
> TBR=verwaest@chromium.org,adamk@chromium.org,marja@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=
>
> Committed: https://crrev.com/1e6296b2a7cfc307fd9e722e619f42965da4a267
> Cr-Commit-Position: refs/heads/master@{#39730}

TBR=verwaest@chromium.org,adamk@chromium.org,marja@chromium.org,hablich@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://codereview.chromium.org/2377513006
Cr-Commit-Position: refs/heads/master@{#39755}
2016-09-27 09:48:34 +00:00
mythria
245e5b323c [Ignition] Use binary operation feedback from Ignition to Crankshaft.
Ignition collects type feedback for binary and compare operations in type
feedback vector and FCG uses Binary/CompareOpICs to collect type feedback.
The feedback collected by ignition is not used by crankshaft. This hits the
performance, when trying to optimize functions that did not tier upto FCG.
This cl merges the feedback collected by ignition and FCG when passing to
crankshaft.

BUG=v8:4280

Review-Url: https://codereview.chromium.org/2361043002
Cr-Commit-Position: refs/heads/master@{#39753}
2016-09-27 08:03:40 +00:00
ishell
2390243564 [stubs] Port store IC dispatcher to TurboFan.
This CL introduces StoreICTFStub and StoreICTrampolineTFStub and a switch
to enable them instead of respective platform stubs.

This should ease the split of StoreIC to StoreGlobalIC and StoreIC.

StubCache tests now exercise both load and store ICs.

BUG=chromium:576312

Review-Url: https://codereview.chromium.org/2163253002
Cr-Commit-Position: refs/heads/master@{#39751}
2016-09-27 07:20:53 +00:00
machenbach
2c9661a62a Revert of [tracing] Support ConvertableToTraceFormat argument type. (patchset #5 id:80001 of https://codereview.chromium.org/2367603002/ )
Reason for revert:
Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/10100

See also:
https://github.com/v8/v8/wiki/Blink%20layout%20tests

Original issue's description:
> [tracing] Support ConvertableToTraceFormat argument type.
>
> Drive-by: Use perfect forwarding for AddTraceEvent arguments.
>
> BUG=406277
>
> Committed: https://crrev.com/dcac49af485fe5d4c0027f153901435dbb29c232
> Cr-Commit-Position: refs/heads/master@{#39742}

TBR=jochen@chromium.org,caseq@chromium.org,fmeawad@chromium.org,alph@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=406277

Review-Url: https://codereview.chromium.org/2371103002
Cr-Commit-Position: refs/heads/master@{#39750}
2016-09-27 07:02:02 +00:00
bmeurer
76b68915b3 Revert of [turbofan] ChangeFloat64ToTagged shouldn't canonicalize. (patchset #6 id:100001 of https://codereview.chromium.org/2367593003/ )
Reason for revert:
Still blows up on the main waterfall even after Jakob's fix:

https://build.chromium.org/p/client.v8/builders/V8%20Mac64/builds/11557/steps/Check/logs/typedarray-indexing
https://build.chromium.org/p/client.v8/builders/V8%20Mac64/builds/11557/steps/Check/logs/typedarray
https://build.chromium.org/p/client.v8/builders/V8%20Win64/builds/12982/steps/Check/logs/typedarray

Original issue's description:
> [turbofan] ChangeFloat64ToTagged shouldn't canonicalize.
>
> This matches current Crankshaft/fullcodegen behavior more closely and
> thus reduces the chances that we run into unnecessary polymorphism due
> to the field representation tracking in our object model.
>
> R=jarin@chromium.org
> BUG=v8:5267
>
> Committed: 6a939714e9
> Committed: https://crrev.com/ee158e6c4cc896479a32245432a3c2fdd31bcb73
> Committed: https://crrev.com/ddf792beb3a72f6dba83e94fc8ada03ebf1630bd
> Cr-Original-Commit-Position: refs/heads/master@{#39692}
> Cr-Commit-Position: refs/heads/master@{#39748}

TBR=jarin@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5267

Review-Url: https://codereview.chromium.org/2365353006
Cr-Commit-Position: refs/heads/master@{#39749}
2016-09-27 05:10:55 +00:00
bmeurer
ddf792beb3 [turbofan] ChangeFloat64ToTagged shouldn't canonicalize.
This matches current Crankshaft/fullcodegen behavior more closely and
thus reduces the chances that we run into unnecessary polymorphism due
to the field representation tracking in our object model.

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

Committed: 6a939714e9
Committed: https://crrev.com/ee158e6c4cc896479a32245432a3c2fdd31bcb73
Review-Url: https://codereview.chromium.org/2367593003
Cr-Original-Commit-Position: refs/heads/master@{#39692}
Cr-Commit-Position: refs/heads/master@{#39748}
2016-09-27 04:47:39 +00:00
neis
841458036a [modules] Add tests for the name property of default-exported functions.
R=adamk@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2372873002
Cr-Commit-Position: refs/heads/master@{#39746}
2016-09-27 00:48:28 +00:00
neis
9f5ef0a453 [modules] Never do lazy parsing in modules.
If we want to allow this in the future, we must force context-allocation for all
variables that are declared at the module level but not MODULE-allocated.

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

Review-Url: https://codereview.chromium.org/2373573003
Cr-Commit-Position: refs/heads/master@{#39745}
2016-09-26 23:19:57 +00:00
jkummerow
142f9dfcad [crankshaft] TypedArrayInitialize: force length to be a Smi
BUG=chromium:650404

Review-Url: https://codereview.chromium.org/2371963002
Cr-Commit-Position: refs/heads/master@{#39744}
2016-09-26 23:00:45 +00:00
adamk
b48eb56905 [modules] Detect and throw exceptions for cyclic dependencies
Use an unordered_map<Module, unordered_set<String>> to keep track
of visited Module/ExportName pairs during ResolveExport.

This required adding a Hash() method to Module, which is accomplished
by allocating a Symbol and storing it in the SharedFunctionInfo::name
slot, then delegating the hash to that Symbol.

Also added a helper method Module::shared() to easily get ahold of
the SharedFunctionInfo and call it in the appropriate places instead
of re-doing the ternary operator.

BUG=v8:1569

Review-Url: https://codereview.chromium.org/2367623004
Cr-Commit-Position: refs/heads/master@{#39743}
2016-09-26 22:42:42 +00:00
alph
dcac49af48 [tracing] Support ConvertableToTraceFormat argument type.
Drive-by: Use perfect forwarding for AddTraceEvent arguments.

BUG=406277

Review-Url: https://codereview.chromium.org/2367603002
Cr-Commit-Position: refs/heads/master@{#39742}
2016-09-26 21:54:56 +00:00
neis
1594b706a2 [modules] Disallow return statement in module body.
R=adamk@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2367403003
Cr-Commit-Position: refs/heads/master@{#39740}
2016-09-26 19:35:09 +00:00
neis
0614eb5471 [modules] Add tests for empty imports.
R=adamk@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2369133002
Cr-Commit-Position: refs/heads/master@{#39739}
2016-09-26 18:56:01 +00:00
bmeurer
b9cdb630dd Revert of [compiler] Properly guard the speculative optimizations for instanceof. (patchset #3 id:40001 of https://codereview.chromium.org/2370693002/ )
Reason for revert:
Tanks EarleyBoyer.

Original issue's description:
> [compiler] Properly guard the speculative optimizations for instanceof.
>
> Add a general feedback slot for instanceof similar to what we already have
> for for-in, which basically has a fast (indicated by the uninitialized
> sentinel) and a slow (indicated by the megamorphic sentinel) mode. Now
> we can only take the fast path when the feedback slot says it hasn't
> seen any funky inputs and nothing funky appeared in the prototype chain.
> In the TurboFan code we also deoptimize whenever we see a funky object
> (i.e. a proxy or an object that requires access checks) in the prototype
> chain (similar to what Crankshaft already did).
>
> Drive-by-fix: Also make Crankshaft respect the mode and therefore
> address the deopt loop in Crankshaft around instanceof.
>
> We might want to introduce an InstanceOfIC mechanism at some point and
> track the map of the right-hand side.
>
> BUG=v8:5267
> R=mvstanton@chromium.org
>
> Committed: https://crrev.com/a0484bc6116ebc2b855de87d862945e2ae07169b
> Cr-Commit-Position: refs/heads/master@{#39718}

TBR=mvstanton@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5267

Review-Url: https://codereview.chromium.org/2365223003
Cr-Commit-Position: refs/heads/master@{#39736}
2016-09-26 17:40:35 +00:00
hpayer
b1b47aaea7 [heap] Reland Concurrently free empty typed slot set chunks.
BUG=chromium:648568

Review-Url: https://codereview.chromium.org/2366393002
Cr-Commit-Position: refs/heads/master@{#39735}
2016-09-26 15:54:18 +00:00
hablich
1e6296b2a7 Revert of Preparse inner functions (new try) (patchset #21 id:420001 of https://codereview.chromium.org/2352593002/ )
Reason for revert:
We currently have some stability issues on Canary. Let's reland this after we verified that we "fixed" Canary again.

Original issue's description:
> Preparse inner functions (new try)
>
> This is an overly pessimistic approach where PreParser only keeps
> track of unresolved variables, but doesn't declare anything. This
> will result in context-allocating variables in the outer function
> unnecessarily, if the variable names clash with variable names
> used by the inner function (even if the variables are not the
> same). However, we have been unable to prove that this approach
> wouldn't be good enough for the practical purposes.
>
> Fixes after the previous try ( https://codereview.chromium.org/2322243002/ ):
> Keep the context-allocation decision stable when compiling fully eagerly.
>
> Tests which exercise this functionality:
> mjsunit/fixed-context-shapes-when-recompiling.js
>
> Design document (chromium):
>
> https://docs.google.com/a/chromium.org/document/d/1rRv5JJZ0JpOZAZN2CSUwZPFJiBAdRnTiSYhazseNHFg/edit?usp=sharing
>
> BUG=
>
> Committed: https://crrev.com/7c73cf32c60484cdf37c84f1d61b4640e87068d7
> Cr-Commit-Position: refs/heads/master@{#39719}

TBR=verwaest@chromium.org,adamk@chromium.org,marja@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://codereview.chromium.org/2373443003
Cr-Commit-Position: refs/heads/master@{#39730}
2016-09-26 14:03:45 +00:00
ahaas
7bffaaac2c [wasm] Do a proper HasProperty() check in the memory and table setup.
The WebAssembly spec requires a HasProperty() check for the maximum
property of the descriptor object which is used to set up a
WebAssembly.Memory object or a WebAssembly.Table object.

The original implementation only approximated the HasProperty() check.
It used Get() to get the value of the maximum property of the descriptor
object and compared the resulting value to {undefined}. However, this
approximation is incorrect if the property exists but its value is
{undefined}.

R=titzer@chromium.org, franzih@chromium.org
BUG=chromium:649461
TEST=mjsunit/wasm/memory

Review-Url: https://codereview.chromium.org/2367673003
Cr-Commit-Position: refs/heads/master@{#39722}
2016-09-26 13:08:01 +00:00
mvstanton
f584ca3088 Revert "[turbofan] Remove the representation dimension from Type."
Reverted for stability reasons.

BUG=chromium:649967
TBR=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2370763002
Cr-Commit-Position: refs/heads/master@{#39720}
2016-09-26 12:55:55 +00:00
marja
7c73cf32c6 Preparse inner functions (new try)
This is an overly pessimistic approach where PreParser only keeps
track of unresolved variables, but doesn't declare anything. This
will result in context-allocating variables in the outer function
unnecessarily, if the variable names clash with variable names
used by the inner function (even if the variables are not the
same). However, we have been unable to prove that this approach
wouldn't be good enough for the practical purposes.

Fixes after the previous try ( https://codereview.chromium.org/2322243002/ ):
Keep the context-allocation decision stable when compiling fully eagerly.

Tests which exercise this functionality:
mjsunit/fixed-context-shapes-when-recompiling.js

Design document (chromium):

https://docs.google.com/a/chromium.org/document/d/1rRv5JJZ0JpOZAZN2CSUwZPFJiBAdRnTiSYhazseNHFg/edit?usp=sharing

BUG=

Review-Url: https://codereview.chromium.org/2352593002
Cr-Commit-Position: refs/heads/master@{#39719}
2016-09-26 12:36:32 +00:00
bmeurer
a0484bc611 [compiler] Properly guard the speculative optimizations for instanceof.
Add a general feedback slot for instanceof similar to what we already have
for for-in, which basically has a fast (indicated by the uninitialized
sentinel) and a slow (indicated by the megamorphic sentinel) mode. Now
we can only take the fast path when the feedback slot says it hasn't
seen any funky inputs and nothing funky appeared in the prototype chain.
In the TurboFan code we also deoptimize whenever we see a funky object
(i.e. a proxy or an object that requires access checks) in the prototype
chain (similar to what Crankshaft already did).

Drive-by-fix: Also make Crankshaft respect the mode and therefore
address the deopt loop in Crankshaft around instanceof.

We might want to introduce an InstanceOfIC mechanism at some point and
track the map of the right-hand side.

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

Review-Url: https://codereview.chromium.org/2370693002
Cr-Commit-Position: refs/heads/master@{#39718}
2016-09-26 12:32:33 +00:00
mvstanton
a10c69f093 Revert "[turbofan] Cleanup: Type only has a semantic dimension."
Reverted for stability reasons.

BUG=chromium:649967
TBR=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2366313002
Cr-Commit-Position: refs/heads/master@{#39716}
2016-09-26 12:02:17 +00:00
jarin
3218ef30b8 [turbofan] Fix restriction type for modulus in representation inference.
BUG=chromium:650215

Review-Url: https://codereview.chromium.org/2373453002
Cr-Commit-Position: refs/heads/master@{#39715}
2016-09-26 11:45:07 +00:00
ahaas
10d7ad9d94 [wasm] Bound the table size by Smi::kMaxValue.
BUG=chromium:649283
R=titzer@chromium.org
TEST=mjsunit/wasm/table

Review-Url: https://codereview.chromium.org/2358923003
Cr-Commit-Position: refs/heads/master@{#39711}
2016-09-26 10:15:15 +00:00
jgruber
22606f0c29 Enable component builds for fuzzers
V8 is collecting a growing amount of fuzzers, all of which take substantial
space on the bots and in chromium build archives. This CL improves that
situation by allowing component (shared library) builds for almost all fuzzers.

The parser fuzzer is handled as an exception since it would require exporting a
large number of additional functions.

A component build results in about a 50-100x improvement in file size for each
fuzzer (~50M-100M to around 1.1M).

BUG=chromium:648864
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_compile_dbg_ng;master.tryserver.chromium.android:android_clang_dbg_recipe

Review-Url: https://codereview.chromium.org/2360983002
Cr-Commit-Position: refs/heads/master@{#39709}
2016-09-26 07:40:44 +00:00
littledan
cd049c2c76 Fix crash from turning on DevTools in the middle of catch prediction
If DevTools is turned on in the middle of doing some things with async
functions, then more items may be popped from the Promise stack than were
pushed to it. In this sort of case, it's OK to have a catch misprediction,
but a crash is unacceptable. This patch defensively handles this edge
case where the Promise stack is unexpectedly empty for that reason.

BUG=v8:5167

Review-Url: https://codereview.chromium.org/2361333003
Cr-Commit-Position: refs/heads/master@{#39705}
2016-09-24 03:31:13 +00:00
neis
6168959875 [modules] Support star exports.
R=adamk@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2362153003
Cr-Commit-Position: refs/heads/master@{#39700}
2016-09-24 01:47:01 +00:00
adamk
756f669003 [modules] Initialize requested_modules before recursing in Module::Instantiate
Also fix recursive call to avoid going back through the API.

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

Review-Url: https://codereview.chromium.org/2366063002
Cr-Commit-Position: refs/heads/master@{#39696}
2016-09-23 23:46:12 +00:00
littledan
f296dad962 Improve stack traces for async functions
This patch tracks the stack of async functions differently from other
Promise async stack tracking. With this patch, the stack trace of a
callstack of async functions should look similarly to the call stack
if all of the functions were synchronous. An example can be found in
the updated test expectations: https://codereview.chromium.org/2362923002 .

The new stack traces are implemented using existing mechanisms in the
inspector. The inspector has two ways to save async stack traces: recurring
and non-recurring stacks. An example of a non-recurring stack is setTimeout,
and a recurring one is saved for setInterval. Recurring stacks are deleted
only when a special "cancel" function is called, rather than being deleted
after being used the first time. Previous Promise async stack tracking always
used non-recurring stacks.

For async functions, this patch saves a recurring stack. The top frame of
the stack is duplicated, as the resuming function contains a similar frame;
the devtools frontend is responsible for removing or marking this frame,
which it can do based on seeing the [async function] line which follows it.
The second frame will instead be provided by the resuming execution
context. The recurring stack is saved when the async function is entered, and
it is deleted from a finally block. The id of the stack is saved in the outer
Promise being constructed by the async function. When an intermediate
throwaway Promise will be triggered as a reaction, it will be identified as
such based on its debugging metadata, and the corresponding async function's
recurring stack will be used.

BUG=v8:4483

Review-Url: https://codereview.chromium.org/2357423002
Cr-Commit-Position: refs/heads/master@{#39695}
2016-09-23 22:24:03 +00:00