Commit Graph

35581 Commits

Author SHA1 Message Date
eholk
eaed31c5f5 [wasm] Add guard regions to end of WebAssembly.Memory buffers
With this change, WebAssembly.Memory objects have backing stores allocated as an
8GB region where everything beyond the size of the Wasm heap is inaccessible.

GrowMemory is now implemented by changing the protection on the guard regions to
make the new portions of the heap accessible.

Guard pages are not enabled by default, but this change adds a flag and a test
variant to make sure we get test coverage on them.

BUG= https://bugs.chromium.org/p/v8/issues/detail?id=5277

Review-Url: https://codereview.chromium.org/2396433008
Cr-Commit-Position: refs/heads/master@{#41089}
2016-11-17 20:29:13 +00:00
verwaest
932a865ee3 [counters] Fix runtime-call-stats wrt background parsing
BUG=

Review-Url: https://codereview.chromium.org/2507293003
Cr-Commit-Position: refs/heads/master@{#41088}
2016-11-17 16:52:23 +00:00
kozyatinskiy
afd49054ac [inspector] removed embbeder debugger script flag
After moving inspector from blink to V8, inspector can use DebugInterface to compile and mark internal scripts.

BUG=v8:5530
R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2502173002
Cr-Commit-Position: refs/heads/master@{#41087}
2016-11-17 16:51:23 +00:00
rmcilroy
7f8681c08c [Test] Remove now unecessary interpreter()->Initialize() from tests.
Review-Url: https://codereview.chromium.org/2509293002
Cr-Commit-Position: refs/heads/master@{#41086}
2016-11-17 16:40:52 +00:00
clemensh
a80d4d0314 [wasm] Remove two obsolete functions
With the new wasm object types, the GetCompiledModule and GetWasmBytes
functions are not needed any more. The same functions are already
public on the wasm objects.
In order to use them properly, I changed a few more locations to make
use of the new types.

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

Review-Url: https://codereview.chromium.org/2503403005
Cr-Commit-Position: refs/heads/master@{#41085}
2016-11-17 16:16:52 +00:00
alph
b46bdcd5c3 [profiler] Add extra CHECK to catch a crash in profiler.
BUG=chromium:665398

Review-Url: https://codereview.chromium.org/2509753002
Cr-Commit-Position: refs/heads/master@{#41084}
2016-11-17 16:03:12 +00:00
titzer
5e00cb5f08 [wasm] Introduce performance testing options.
Adds --wasm-no-bounds-checks and --wasm-no-stack-checks which
help in diagnosing potential sources of slowdown in WASM code.

R=ahaas@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2511113002
Cr-Commit-Position: refs/heads/master@{#41083}
2016-11-17 16:02:13 +00:00
clemensh
200cbe9235 [wasm] Quick-fix gc error
R=titzer@chromium.org
NOTRY=true
NOTREECHECKS=true

Review-Url: https://codereview.chromium.org/2511763002
Cr-Commit-Position: refs/heads/master@{#41082}
2016-11-17 15:36:21 +00:00
rmcilroy
721e74d9d9 [Interpreter] Collect NumberOrOddball feedback in CompareOps.
Collect feedback for oddballs in the interpreter compare operations handlers.
This is important to ensure that we don't consider oddball comparisons as
generic, which prevents optimization.

BUG=chromium:660947

Review-Url: https://codereview.chromium.org/2506283003
Cr-Commit-Position: refs/heads/master@{#41081}
2016-11-17 15:21:59 +00:00
vogelheim
541c36c00e Updated version to 5.7
BUG=
TBR=machenbach@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2515443002
Cr-Commit-Position: refs/heads/master@{#41080}
2016-11-17 15:15:22 +00:00
clemensh
8b306c6336 [wasm] Refactor interface to WasmCompiledModule
The ptr_to_* methods do (often unnecessary) type checks, and can
return nullptr. This is problematic since the handlified getter
uses them, and assumes the result to be non-null. So change
them to only to a DCHECK and never return nullptr, and introduce
maybe_ptr_to_* with the old semantics.

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

Review-Url: https://codereview.chromium.org/2509053003
Cr-Commit-Position: refs/heads/master@{#41079}
2016-11-17 15:10:14 +00:00
rmcilroy
5369874042 [Interpreter] Collect String feedback on CompareOps.
Collect string feedback for compare operations. Without this,
functions which have a lot of string compare operations end up with
a high generic type percentage, and don't get optimized until very
late.

Currently TurboFan doesn't use this String feedback for compare
operations, but this could be done in future work if it is useful.

BUG=chromium:660947

Review-Url: https://codereview.chromium.org/2506013005
Cr-Commit-Position: refs/heads/master@{#41078}
2016-11-17 14:45:31 +00:00
vegorov
29745ee927 [regexp] Fix matching of regexps that are both sticky and anchored at end.
V8 was applying incorrect optimization to them advancing the start position.

This would cause /foo$/y too match "barfoo", which it should not.

BUG=

Review-Url: https://codereview.chromium.org/2510743003
Cr-Commit-Position: refs/heads/master@{#41077}
2016-11-17 13:59:00 +00:00
rmcilroy
e003a45602 [Tools] Update linux_perf_report to split out GC.
Review-Url: https://codereview.chromium.org/2511553002
Cr-Commit-Position: refs/heads/master@{#41076}
2016-11-17 13:52:22 +00:00
yangguo
1fe704e113 [fuzzing] consistently honor --abort-on-stack-overflow.
R=machenbach@chromium.org
BUG=chromium:664068

Review-Url: https://codereview.chromium.org/2509843005
Cr-Commit-Position: refs/heads/master@{#41075}
2016-11-17 13:28:34 +00:00
rossberg
e2563e947f Test that table object indexing does not interfere with backing table
BUG=
R=ahaas@chromium.or

Review-Url: https://codereview.chromium.org/2502383003
Cr-Commit-Position: refs/heads/master@{#41074}
2016-11-17 12:55:45 +00:00
ishell
937b8cb684 [ic] Support data handlers in LoadGlobalIC.
Also fixed handling of load non-existent handlers outside typeof.

BUG=v8:5561, chromium:662854

Review-Url: https://codereview.chromium.org/2511603002
Cr-Commit-Position: refs/heads/master@{#41073}
2016-11-17 12:18:40 +00:00
neis
48bbd1a7fe [parser,ast] Simplify MarkExpressionAsAssigned.
There's no need to return anything.

Also add a DCHECK to make sure that we never mark a variable proxy as assigned
that is already resolved (to avoid potential inconsistency with the variable's
maybe_assigned status).

R=littledan@chromium.org
CC=mstarzinger@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2504613002
Cr-Commit-Position: refs/heads/master@{#41072}
2016-11-17 12:10:03 +00:00
ahaas
020e2c8d26 [wasm] Break a cycle with a loop node in the int64-lowering.
The control edges in a TurboFan graph can form a cycle. To break this cycle in the int64-lowering we add special handling for loop nodes. Similar handling already exists for phi nodes and effectphi nodes, which breaks cycles formed by value edges and effect edges, respectively.

Review-Url: https://codereview.chromium.org/2511503002
Cr-Commit-Position: refs/heads/master@{#41071}
2016-11-17 11:51:32 +00:00
clemensh
ae3ca62b6b [asmjs] Flush after printing error message
This hopefully avoids multiple error messages appearing on the same
line.

R=titzer@chromium.org, machenbach@chromium.org
BUG=chromium:660016

Review-Url: https://codereview.chromium.org/2503423006
Cr-Commit-Position: refs/heads/master@{#41070}
2016-11-17 11:32:24 +00:00
clemensh
4abdcad232 [inspector] Fix expected output of wasm source
TBR=ahaas@chromium.org, kozyatinskiy@chromium.org
NOTRY=true
NOTREECHECKS=true

Review-Url: https://codereview.chromium.org/2503213004
Cr-Commit-Position: refs/heads/master@{#41069}
2016-11-17 10:46:44 +00:00
clemensh
8c4224a596 [inspector] Add test case for wasm source
The test just prints the source text of each line on the stack.
Look how beautiful it reads \o/

BUG=chromium:659715
R=yangguo@chromium.org, kozyatinskiy@chromium.org
CC=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2492123003
Cr-Commit-Position: refs/heads/master@{#41068}
2016-11-17 10:18:16 +00:00
ivica.bogosavljevic
ff4513a69b MIPS: Fix This CL enables precise source positions for all V8 compilers
Fix c3a6ca68d0

Fix compilation failure on MIPS and GCC cross compile that started to appear
after the CL c3a6ca68d0 landed. The compilation
error is due to:

.././src/objects-inl.h:4129:54: error: assuming signed overflow does not occur
when assuming that (X + c) < X is always false [-Werror=strict-overflow]
   DCHECK(index >= 0 && length >= 0 && index + length >= index &&

BUG=

Review-Url: https://codereview.chromium.org/2501963002
Cr-Commit-Position: refs/heads/master@{#41067}
2016-11-17 10:10:37 +00:00
ulan
f0fa72babc [heap] Remove out of date IncrementalMarkingUsingIdleTasksAfterGC test.
Incremental marking does not use idle tasks anymore.

BUG=

Review-Url: https://codereview.chromium.org/2512643002
Cr-Commit-Position: refs/heads/master@{#41066}
2016-11-17 10:07:17 +00:00
yangguo
45cb0fc7b8 Refactor SharedFunctionInfo::IsBuiltin.
This method is a slight misnomer. What we actually want to know is
whether the function was defined in a user-provided script.

Also remove redundant Script::hide_source flag.

R=bmeurer@chromium.org, ulan@chromium.org

Review-Url: https://codereview.chromium.org/2505853003
Cr-Commit-Position: refs/heads/master@{#41065}
2016-11-17 09:43:12 +00:00
jgruber
2c8a4155aa [debug-wrapper] clearAllBreakPoints and several scripts functions
This adds clearAllBreakPoints functionality (which requires tracking set
breakpoints internally), and several script-related functions that rely
on runtime functions.

BUG=v8:5530

Review-Url: https://codereview.chromium.org/2508853003
Cr-Commit-Position: refs/heads/master@{#41064}
2016-11-17 09:34:18 +00:00
machenbach
2877764471 Add export annotation to fix component build
BUG=v8:5628
NOTRY=true

Review-Url: https://codereview.chromium.org/2508093002
Cr-Commit-Position: refs/heads/master@{#41063}
2016-11-17 08:55:06 +00:00
jgruber
4fb4f3408c [debug-wrapper] LiveEdit, frame.restart(), breakpoints
This adds access to the LiveEdit API object, frame.restart(), and
various breakpoint setters. The LiveEdit API still depends on the JS
debugging context and blocks its removal; but it should be removed
once LiveEdit is rewritten in the midterm.

BUG=v8:5530

Review-Url: https://codereview.chromium.org/2503293002
Cr-Commit-Position: refs/heads/master@{#41062}
2016-11-17 08:43:59 +00:00
cbruni
5f0be34cdd [tools] Fix callstats.py script
R=ishell@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2505853005
Cr-Commit-Position: refs/heads/master@{#41061}
2016-11-17 08:30:16 +00:00
yangguo
0d258b35c8 [api] deprecate v8::Function::IsBuiltin.
R=jochen@chromium.org, kozyatinskiy@chromium.org

Review-Url: https://codereview.chromium.org/2510633002
Cr-Commit-Position: refs/heads/master@{#41060}
2016-11-17 06:42:23 +00:00
bmeurer
08377af957 [crankshaft] No need to rely on the @@hasInstance protector.
In Crankshaft we can actually do an abstract interpretation of the
@@hasInstance lookup when optimizing instanceof and then use the
normal machinery to protect the result instead of relying on the
global @@hasInstance protector cell for optimizations.

This recovers the 100x performance drop in Node.js v7 reported in
https://github.com/nodejs/node/issues/9634. This patch should be
easily back-mergable to Node.js v7.

BUG=v8:5640
R=yangguo@chromium.org,franzih@chromium.org

Review-Url: https://codereview.chromium.org/2504263004
Cr-Commit-Position: refs/heads/master@{#41059}
2016-11-17 06:39:46 +00:00
bmeurer
b8c2035f26 [turbofan] Ship loop peeling.
R=jarin@chromium.org
BUG=v8:5267

Review-Url: https://codereview.chromium.org/2507063003
Cr-Commit-Position: refs/heads/master@{#41058}
2016-11-17 05:57:55 +00:00
franzih
5b3a893f9e [test] Add object literal micro-benchmarks.
Add computed property names in object literal micro-benchmarks.

Taken from http://kpdecker.github.io/six-speed/

BUG=v8:5622

Review-Url: https://codereview.chromium.org/2509593004
Cr-Commit-Position: refs/heads/master@{#41057}
2016-11-17 05:54:35 +00:00
kozyatinskiy
6808ec1f83 [inspector] introduced Script::TYPE_INSPECTOR
Inspector uses this type for all internal scripts, e.g. injected-script-source.js. Scripts with new type are not reported by remote debugging protocol, frames from them are ignored.

CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel
BUG=none
R=yangguo@chromium.org,dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2499273003
Cr-Commit-Position: refs/heads/master@{#41056}
2016-11-17 04:39:47 +00:00
clemensh
d4a42a5f89 [inspector] Introduce translation of wasm frames
This allows to show wasm source (disassembled wasm code) in DevTools.
See design doc for details.

More tests for the disassembly will have to follow. Also, the text
format (generated by V8) will be changed.

BUG=chromium:659715
R=yangguo@chromium.org, kozyatinskiy@chromium.org, titzer@chromium.org, dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2493773003
Cr-Commit-Position: refs/heads/master@{#41055}
2016-11-16 23:36:24 +00:00
ishell
32793ab33f [ic] Enable interceptor handlers for LoadGlobalIC.
BUG=chromium:576312, v8:5561

Review-Url: https://codereview.chromium.org/2507663003
Cr-Commit-Position: refs/heads/master@{#41054}
2016-11-16 21:04:50 +00:00
jarin
1929f80a3a [turbofan] Improve handling of TransitionElementsKind in load elimination.
We do not have to invalidate the abstract state if we are transitioning to
the object's map.

Review-Url: https://codereview.chromium.org/2510843002
Cr-Commit-Position: refs/heads/master@{#41053}
2016-11-16 20:56:43 +00:00
qyearsley
04fee02eaf Revert of Update usage of linux blink try bot to use linux_trusty_blink_rel. (patchset #1 id:1 of https://codereview.chromium.org/2475563002/ )
Reason for revert:
Submitting this before more capacity was added to linux_trusty_blink_rel caused that builder to get too busy (http://crbug.com/665246); should be able to reland after http://crbug.com/665917 is fixed.

Original issue's description:
> 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

TBR=machenbach@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=chromium:660580
NOTRY=true

Review-Url: https://codereview.chromium.org/2507853002
Cr-Commit-Position: refs/heads/master@{#41052}
2016-11-16 20:00:10 +00:00
kozyatinskiy
c8cff606c2 [inspector] remove profiler->collectSample from V8StackTraceImpl::capture
Now we don't need to call collectSample on each V8StackTraceImpl::capture during collecting profile.

CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel
BUG=none
R=alph@chromium.org,dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2510823002
Cr-Commit-Position: refs/heads/master@{#41051}
2016-11-16 19:57:39 +00:00
machenbach
1160e5edcc Revert of Refactor SharedFunctionInfo::IsBuiltin. (patchset #1 id:1 of https://codereview.chromium.org/2505853003/ )
Reason for revert:
Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/11394

Original issue's description:
> Refactor SharedFunctionInfo::IsBuiltin.
>
> This method is a slight misnomer. What we actually want to know is
> whether the function was defined in a user-provided script.
>
> Also remove redundant Script::hide_source flag.
>
> R=bmeurer@chromium.org, ulan@chromium.org

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

Review-Url: https://codereview.chromium.org/2512463002
Cr-Commit-Position: refs/heads/master@{#41050}
2016-11-16 19:48:48 +00:00
alph
ca3f487979 [runtime stats] Fix crash after r41001
The timer can be missing in the timers stack when RCS is started dynamically.

BUG=chromium:665659
TBR=cbruni@chromium.org

Review-Url: https://codereview.chromium.org/2505813002
Cr-Commit-Position: refs/heads/master@{#41049}
2016-11-16 19:13:28 +00:00
ahaas
006041e8d3 [wasm] Add the 0x prefix to all constants in PrintAstForDebugging
R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2502373002
Cr-Commit-Position: refs/heads/master@{#41048}
2016-11-16 19:07:44 +00:00
cbruni
7e4e34bb8f [counters] Use separate counters for background parsing
BUG=

Review-Url: https://codereview.chromium.org/2509683002
Cr-Commit-Position: refs/heads/master@{#41047}
2016-11-16 18:51:48 +00:00
ishell
d3231f5144 [ic] Pass name to LoadGlobalIC again.
The reasons are:
1) The names dictionaries in the feedback metadata seems to consume a lot of memory
   and the idea didn't payoff.
2) The absence of a name parameter blocks data handlers support in LoadGlobalIC.

This CL reverts a part of r37278 (https://codereview.chromium.org/2096653003/).

BUG=chromium:576312, v8:5561

Review-Url: https://codereview.chromium.org/2510653002
Cr-Commit-Position: refs/heads/master@{#41046}
2016-11-16 18:17:49 +00:00
ishell
f718cd1309 [ic] Invalidate prototype validity cell when a slow prototype becomes fast.
BUG=chromium:665886

Review-Url: https://codereview.chromium.org/2502393002
Cr-Commit-Position: refs/heads/master@{#41045}
2016-11-16 17:45:33 +00:00
clemensh
764371bc3b [inspector] Change ScriptBreakpoint to include scriptId
The ScriptBreakpoint struct was before just holding line, column and
condition. It now additionally holds the scriptId.
This encapsulates information nicer, and allows for easier translation
of wasm locations, since one struct now holds all information needed
for the translation.

BUG=chromium:659715
R=yangguo@chromium.org, kozyatinskiy@chromium.org

Review-Url: https://codereview.chromium.org/2491133003
Cr-Commit-Position: refs/heads/master@{#41044}
2016-11-16 16:39:27 +00:00
titzer
72c3732f0f [wasm] Use more precise types for some WASM objects.
R=clemensh@chromium.org,mtrofin@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2510673002
Cr-Commit-Position: refs/heads/master@{#41043}
2016-11-16 16:18:10 +00:00
hpayer
124e77f02b [heap] Synchronize concurrent chunk map modifications.
BUG=chromium:664793

Review-Url: https://codereview.chromium.org/2510733002
Cr-Commit-Position: refs/heads/master@{#41042}
2016-11-16 16:04:34 +00:00
mvstanton
1006bd7172 Turn off shared function info-based optimization.
In order to address a performance issue.

BUG=v8:5512, chromium:664937

Review-Url: https://codereview.chromium.org/2506003002
Cr-Commit-Position: refs/heads/master@{#41041}
2016-11-16 15:26:49 +00:00
tebbi
d2a64c817e [turbofan] track source positions in EffectControlLinearizer
R=jarin@chromium.org

BUG=

Review-Url: https://codereview.chromium.org/2504913003
Cr-Commit-Position: refs/heads/master@{#41040}
2016-11-16 15:06:58 +00:00