Commit Graph

35601 Commits

Author SHA1 Message Date
ulan
b9f8ad002e [heap] Reland "Add a guard for restarting the memory reducer after mark-compact."
This reverts commit 3c96c5e232.

The CL was reverted to see its impact on UMA memory counters.
There was no impact, so we can safely reland the CL.

BUG=

Review-Url: https://codereview.chromium.org/2507293004
Cr-Commit-Position: refs/heads/master@{#41109}
2016-11-18 13:50:22 +00:00
bmeurer
d4f01b8a65 [x86] Also deal with holey arrays in the Apply builtin.
Add fast paths for holey smi and object arrays to
Function.prototype.apply, Reflect.apply and Reflect.construct.

R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2510043004
Cr-Commit-Position: refs/heads/master@{#41108}
2016-11-18 13:31:25 +00:00
mlippautz
80339771e3 [heap] ExternalStringTable: Separate Iterate and CleanUp methods
This way we can just process new space strings when needed.

BUG=chromium:651354

Review-Url: https://codereview.chromium.org/2515643002
Cr-Commit-Position: refs/heads/master@{#41107}
2016-11-18 13:01:31 +00:00
ishell
cfd1dd2f95 [ic] Pass globals' names to Runtime::kDeclareGlobals.
This is a next step towards removing names table from type feedback metadata.

BUG=chromium:576312, v8:5561

Review-Url: https://codereview.chromium.org/2507143003
Cr-Commit-Position: refs/heads/master@{#41106}
2016-11-18 12:58:36 +00:00
verwaest
0c70f3729e [crankshaft] Don't inline the fast path for instanceof if the function has a non-instance .prototype
BUG=chromium:666308

Review-Url: https://codereview.chromium.org/2516603002
Cr-Commit-Position: refs/heads/master@{#41105}
2016-11-18 12:57:37 +00:00
mlippautz
7e5755cbc5 [heap] Minor MC: Add marking
Adds the marking logic to mark the young generation.

BUG=chromium:651354

Review-Url: https://codereview.chromium.org/2498583002
Cr-Commit-Position: refs/heads/master@{#41104}
2016-11-18 12:56:16 +00:00
ulan
46a4156a8b [heap] Remove AdjustBytes test introduced in r41097.
The test is too fragile.

NOTREECHECKS=true

Review-Url: https://codereview.chromium.org/2510403002
Cr-Commit-Position: refs/heads/master@{#41103}
2016-11-18 12:54:52 +00:00
clemensh
18084f17bb [wasm] Implement frame printing for debug
This makes wasm frames show up nicely in stack traces generated e.g. by
Isolate::PrintStack() and Isolate::PrintCurrentStackTrace().
With this CL, we print the script name, function index, function name,
pc and source position.

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

Review-Url: https://codereview.chromium.org/2509323002
Cr-Commit-Position: refs/heads/master@{#41102}
2016-11-18 12:18:16 +00:00
franzih
f7795cbf6e [interpreter] Bytecode for StaDataPropertyInLiteral.
Add bytecode for defining data properties, which initially just calls the runtime function.

BUG=v8:5624

Review-Url: https://codereview.chromium.org/2510743002
Cr-Commit-Position: refs/heads/master@{#41101}
2016-11-18 12:13:47 +00:00
machenbach
572b643b47 Revert of [interpreter] Properly collect rhs feedback for comparisons with oddballs. (patchset #1 id:1 of https://codereview.chromium.org/2513903002/ )
Reason for revert:
Seems to break layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/11452

Original issue's description:
> [interpreter] Properly collect rhs feedback for comparisons with oddballs.
>
> Ignition skipped collecting NumberOrOddball feedback if the right hand
> side of a relational comparison is undefined, thus leading to a
> deoptimization loop, because it reported Number feedback to TurboFan.
>
> This was caught on 3d-raytrace test of SunSpider.
>
> R=rmcilroy@chromium.org
>
> Committed: https://crrev.com/d240ffec32ae034e50c006f7d5715171b32bbbc4
> Cr-Commit-Position: refs/heads/master@{#41094}

TBR=rmcilroy@chromium.org,bmeurer@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/2511243004
Cr-Commit-Position: refs/heads/master@{#41100}
2016-11-18 12:02:31 +00:00
clemensh
a00e1a5733 Refactor StringStream Add methods
Instead of having functions for 0 to 5 arguments, we now have a
variadic template, allowing for an arbitrary number of arguments.
I also refactored the internal FmtElm class to only include the type
field if building for debug, because it is only used in this setting.

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

Review-Url: https://codereview.chromium.org/2507093004
Cr-Commit-Position: refs/heads/master@{#41099}
2016-11-18 12:01:33 +00:00
Miran.Karic
0ffe4fc390 Add icu libraries to fuzzer dependencies
In component build, fuzzer did not link with icu libraries, causing
errors. By adding icu libraries to dependencies fuzzer links correctly.

BUG=
TEST=fuzzer/*

Review-Url: https://codereview.chromium.org/2510063002
Cr-Commit-Position: refs/heads/master@{#41098}
2016-11-18 11:14:30 +00:00
ulan
d3f2213b61 [heap] Simplify adjusting of live bytes.
We never increment live bytes concurrent to the sweeper.

BUG=

Review-Url: https://codereview.chromium.org/2504193002
Cr-Commit-Position: refs/heads/master@{#41097}
2016-11-18 11:11:52 +00:00
bmeurer
30db83a3b5 [crankshaft] The array protector is a PropertyCell, not a Cell.
There's a typo in a couple of lithium backends, where we assume that the
array protector on the Isolate is a Cell instead of a PropertyCell. This
could lead to unnecessary deoptimizations.

R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2512943002
Cr-Commit-Position: refs/heads/master@{#41096}
2016-11-18 11:10:02 +00:00
ulan
0283d550c9 [heap] Add a flag guard for concurrent store buffer processing.
BUG=v8:5580

Review-Url: https://codereview.chromium.org/2460873003
Cr-Commit-Position: refs/heads/master@{#41095}
2016-11-18 10:08:46 +00:00
bmeurer
d240ffec32 [interpreter] Properly collect rhs feedback for comparisons with oddballs.
Ignition skipped collecting NumberOrOddball feedback if the right hand
side of a relational comparison is undefined, thus leading to a
deoptimization loop, because it reported Number feedback to TurboFan.

This was caught on 3d-raytrace test of SunSpider.

R=rmcilroy@chromium.org

Review-Url: https://codereview.chromium.org/2513903002
Cr-Commit-Position: refs/heads/master@{#41094}
2016-11-18 10:04:17 +00:00
mstarzinger
28d7c1fb4a [ast] Fix typo in {Scope::set_asm_function} method.
This fixes the bogus implementation of the function in question and adds
test coverage for the deserialization of the corresponding flags from
the serialized scope info. Note that the tests so far only cover cases
where the module and the function contain context-allocated variables.

R=verwaest@chromium.org
TEST=cctest/test-parsing/AsmFunctionFlag
BUG=v8:5653

Review-Url: https://codereview.chromium.org/2507063004
Cr-Commit-Position: refs/heads/master@{#41093}
2016-11-18 09:26:51 +00:00
bmeurer
241c024c10 [turbofan] Properly optimize instanceof (even in the presence of @@hasInstance).
This is the TurboFan counterpart of http://crrev.com/2504263004, but it
is a bit more involved, since in TurboFan we always inline the appropriate
call to the @@hasInstance handler, and by that we can optimize a lot more
patterns of instanceof than Crankshaft, and even yield fast instanceof
for custom @@hasInstance handlers (which we can now properly inline as
well).

Also we now properly optimize Function.prototype[@@hasInstance], even if
the right hand side of an instanceof doesn't have the Function.prototype
as its direct prototype.

For the baseline case, we still rely on the global protector cell, but
we can address that in a follow-up as well, and make it more robust in
general.

TEST=mjsunit/compiler/instanceof
BUG=v8:5640
R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2511223003
Cr-Commit-Position: refs/heads/master@{#41092}
2016-11-18 06:31:42 +00:00
yangguo
5beb5ee7e6 [regexp] implement latest spec draft for property class.
See https://github.com/mathiasbynens/es-regexp-unicode-property-escapes

Changes:
- only allow General Category, binary properties, Script, and Script_Extensions.
- implement Script_Extensions.

R=littledan@chromium.org
BUG=v8:4743

Review-Url: https://codereview.chromium.org/2502933002
Cr-Commit-Position: refs/heads/master@{#41091}
2016-11-18 06:10:14 +00:00
qyearsley
4a70104a9d Reland of Update usage of linux blink try bot to use linux_trusty_blink_rel. (patchset #1 id:1 of https://codereview.chromium.org/2507853002/ )
Reason for revert:
linux_trusty_blink_rel is now working, with more capacity

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

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

Review-Url: https://codereview.chromium.org/2505403002
Cr-Commit-Position: refs/heads/master@{#41090}
2016-11-18 06:00:04 +00:00
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