Commit Graph

35318 Commits

Author SHA1 Message Date
ishell
70d2b685ae [stubs] Fix allocation memento detection.
The old code does not work properly when the allocation memento object ends exactly at page boundary.

This CL addresses DBC mentioned in https://codereview.chromium.org/2313093002/

BUG=v8:5269

Review-Url: https://codereview.chromium.org/2466573002
Cr-Commit-Position: refs/heads/master@{#40676}
2016-10-31 15:51:03 +00:00
jbroman
fa33489ffd Remove DCHECK that transferred array buffers are neutered or shared.
While this seems like it should be true, the array buffer is not actually
neutered until the end of cloning. This is so that, if an exception is thrown
during serialization, the original array buffer is not left neutered. As a
result, Blink will not have neutered the buffer.

This fixes some DCHECK failures during layout tests.

BUG=chromium:148757

Review-Url: https://codereview.chromium.org/2466563002
Cr-Commit-Position: refs/heads/master@{#40675}
2016-10-31 15:23:30 +00:00
ishell
9dd638fe70 Minor fixes in objects printer.
BUG=

Review-Url: https://codereview.chromium.org/2468433002
Cr-Commit-Position: refs/heads/master@{#40674}
2016-10-31 15:16:51 +00:00
ishell
7c22a153e2 [ic] Simplify handling of primitive maps.
This CL adds support for primitive maps to
1) PrototypeIterator,
2) PropertyHandlerCompiler::CheckPrototypes(),
3) Map::GetOrCreatePrototypeChainValidityCell(),
4) Prototype checks in data-driven ICs.

BUG=v8:5561

Review-Url: https://codereview.chromium.org/2466553002
Cr-Commit-Position: refs/heads/master@{#40673}
2016-10-31 14:58:52 +00:00
jgruber
16310b2e39 [debugger] Ensure debug listeners do not throw
This exposes a couple of broken tests that used to silently throw within
the listener. Mark these as failing for now

BUG=v8:5330, v8:5581

Review-Url: https://codereview.chromium.org/2460833002
Cr-Commit-Position: refs/heads/master@{#40672}
2016-10-31 14:56:44 +00:00
vogelheim
36f3f90907 Speedup access to global_proxy.* attributes/accessors.
Using a global proxy (e.g. 'window.f', 'w.f' or 'this.f') is considerably slower than evaluating just 'f'. This CL aims to perform the necessary checks at compile time and inline the accesses.

This is a follow-on CL to crrev.com/2369933005:
- The initial upload is crrev.com/2369933005 + a rebase.
- The remaining issues are the fixes requested by the reviewers on that CL.

BUG=chromium:634276, chromium:654716, chromium:656959

Committed: https://crrev.com/8f43d748272536117008aa6a1b53ea52126261c1
Committed: https://crrev.com/041314524952a3c1bc71bd3beafbbb37319f1d22
Review-Url: https://codereview.chromium.org/2403003002
Cr-Original-Original-Commit-Position: refs/heads/master@{#40153}
Cr-Original-Commit-Position: refs/heads/master@{#40365}
Cr-Commit-Position: refs/heads/master@{#40671}
2016-10-31 14:28:27 +00:00
jochen
26547761ef Create internal fields on global proxy objects
BUG=v8:5588
R=verwaest@chromium.org

Review-Url: https://codereview.chromium.org/2467463002
Cr-Commit-Position: refs/heads/master@{#40670}
2016-10-31 14:16:24 +00:00
georgia.kouveli
70dfb5a0d6 [turbofan] Use an IntPtrConstant in WordEqual comparisons.
ZeroConstant is a NumberConstant, so does not get matched
in IntMatchers, which results in missing some opportunities
in instruction selection. Use IntPtrConstant instead, which
generates an Int32Constant or an Int64Constant depending on
the word size.

BUG=

Review-Url: https://codereview.chromium.org/2467473002
Cr-Commit-Position: refs/heads/master@{#40669}
2016-10-31 12:23:26 +00:00
neis
6442156635 [test] Skip the debug-liveedit-double-call mjsunit test.
It's marked as [PASS, FAIL] but keeps showing up as a test failure for me.

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

Review-Url: https://codereview.chromium.org/2461343002
Cr-Commit-Position: refs/heads/master@{#40668}
2016-10-31 12:22:33 +00:00
ahaas
c4119758d8 [wasm] Use correct parameter type in wasm-run-utils.h
Due to a typo wasm-run-utils used the type of the first parameter for
all parameters. This caused problems if not all parameters had the same
type.

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

Review-Url: https://codereview.chromium.org/2463743002
Cr-Commit-Position: refs/heads/master@{#40667}
2016-10-31 10:51:51 +00:00
cbruni
fde9039fed [stubs] Add FLAG_enable_slow_asserts check to CSA_SLOW_ASSERT
R=ishell@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2461463003
Cr-Commit-Position: refs/heads/master@{#40666}
2016-10-31 10:32:07 +00:00
bmeurer
639abf4fd4 [turbofan] Ship inlining into try blocks.
R=mstarzinger@chromium.org
BUG=v8:5267

Review-Url: https://codereview.chromium.org/2460333002
Cr-Commit-Position: refs/heads/master@{#40665}
2016-10-31 10:22:13 +00:00
epertoso
88366741fc [turbofan] Handle inlining of API getters/setters.
Similar to what crankshaft does, we introduce a mapcheck if necessary and a call to the CallApiCallbackStub.

BUG=

Review-Url: https://codereview.chromium.org/2458643002
Cr-Commit-Position: refs/heads/master@{#40664}
2016-10-31 10:10:25 +00:00
mstarzinger
b4b436de6a [compiler] Ship Ignition for all TurboFan code.
This enables Ignition unconditionally for all code that is destined for
optimization with TurboFan. This ensures all optimization attempts will
go through the BytecodeGraphBuilder and that the AstGraphBuilder pipe is
dried out in practice.

patch from issue 2427953002 at patchset 120001 (http://crrev.com/2427953002#ps120001)

R=mvstanton@chromium.org,rmcilroy@chromium.org

Review-Url: https://codereview.chromium.org/2453973004
Cr-Commit-Position: refs/heads/master@{#40663}
2016-10-31 09:43:43 +00:00
bmeurer
7201bad99d [turbofan] Properly deal with out-of-bounds fields in EscapeAnalysis.
Conflicting type feedback on Load/StoreICs can lead to out-of-bounds
field access, which is essentially dead code, but EscapeAnalysis was
confused about those. For now, mark the objects as escaping in these
cases, middle-term we want to deal better with this kind of compile-
time known dead code.

BUG=chromium:658185,v8:4586
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2459273002
Cr-Commit-Position: refs/heads/master@{#40662}
2016-10-31 06:43:25 +00:00
titzer
b7aff1ff64 [wasm] Support for restricted table imports.
This CL implements basic table import functionality.

Missing: growing of tables (WebAssembly.Grow) doesn't change dispatch tables
Missing: allowing larger table imports than minimum size

R=rossberg@chromium.org,bradnelson@chromium.org
BUG=v8:5507

Review-Url: https://codereview.chromium.org/2454503005
Cr-Commit-Position: refs/heads/master@{#40661}
2016-10-29 21:07:38 +00:00
kozyatinskiy
f7f591ab6b [inspector] migrate scriptParsed and getCompiledScripts to native
* Introduced DebugInterface::Script - native wrapper on internal::Script.
* Migrated getCompildScripts and scriptParsed to native wrapper.

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

Review-Url: https://codereview.chromium.org/2449213002
Cr-Commit-Position: refs/heads/master@{#40660}
2016-10-29 02:18:16 +00:00
lpy
6df8096a00 [Tracing] Implement TracingCategoryObserver.
This patch implements TracingCategoryObserver to set global flag when a V8
specific category is enabled. Previously, we set a global flag each time when we
encounter a top level trace event, and use it as a global check. With this
patch, we can set a group of flags when tracing is enabled; besides, we make
V8 tracing feature use V8 flags instead of defining its own flag in a messy way.

With this patch, whatever V8 flag we want to imply in tracing, we define another
integer flag, and the original V8 flag will set it to 0x01 when passing by
commandline, tracing will set it to 0x10 when we start tracing and reset the bit
when we stop tracing.

Review-Url: https://codereview.chromium.org/2436273002
Cr-Commit-Position: refs/heads/master@{#40659}
2016-10-28 20:44:04 +00:00
alph
aee3542fcf [profiler] Emit runtime call stats into sampling profile
These are added to the sampler stack trace when RCS are
enabled.
Resource name for a RCS frame is reported as "V8Runtime".
Counter names match ones from src/counters.h

BUG=chromium:660428

Review-Url: https://codereview.chromium.org/2461003002
Cr-Commit-Position: refs/heads/master@{#40658}
2016-10-28 20:18:12 +00:00
machenbach
9b25707b2a [test] Fix a few flag configurations to make fuzzer happy.
BUG=chromium:660457
TBR=mbarbella@chromium.org, yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2464453002
Cr-Commit-Position: refs/heads/master@{#40657}
2016-10-28 20:14:13 +00:00
machenbach
bc0ee727df Revert of [wasm] Support for restricted table imports. (patchset #7 id:120001 of https://codereview.chromium.org/2454503005/ )
Reason for revert:
GC stress failures:
https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/builds/8857

Original issue's description:
> [wasm] Support for restricted table imports.
>
> This CL implements basic table import functionality.
>
> Missing: growing of tables (WebAssembly.Grow) doesn't change dispatch tables
> Missing: allowing larger table imports than minimum size
>
> R=rossberg@chromium.org,bradnelson@chromium.org
> BUG=v8:5507

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

Review-Url: https://codereview.chromium.org/2456193006
Cr-Commit-Position: refs/heads/master@{#40656}
2016-10-28 18:58:54 +00:00
kozyatinskiy
d01dc6dc11 [inspector] use own copy of third_party/inspector_protocol
When Chromium and V8 use the same version of inspector_protocol, any protocol change takes at least 4 patches and 3 waiting for rolls.
To simplify this process we need to have two diffrent versions of inspector_protocol in Chromium and V8. Current state of inspector_protocol was extracted into separate repository [1]. This CL puts last version of inspector_protocol into third_party/inspector_protocol and removes dependency on inspector_protocol in Webkit.

[1] https://chromium.googlesource.com/deps/inspector_protocol/

BUG=chromium:637032
R=dgozman@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Review-Url: https://codereview.chromium.org/2447323002
Cr-Commit-Position: refs/heads/master@{#40655}
2016-10-28 18:20:47 +00:00
eholk
96d12ac6dd [wasm] make WebAssembly.Instance require a WebAssembly.Memory
BUG=

Review-Url: https://codereview.chromium.org/2460773003
Cr-Commit-Position: refs/heads/master@{#40654}
2016-10-28 18:13:28 +00:00
lpy
92d9a56a15 [Tracing] Fix inaccurate timer calculation in runtime statistics.
Previously we reset runtime counters and dump them when we enter, exit top level
trace events respectively. However, there is gap between two top level trace
events and runtime counters may be activated, resetting the counters makes the
accumulated time inaccurate, and we may end up with negative time due to the
nature of how we accumulate time.

This patch fixes this problem by only resetting counters when there's no
counters active, and before dump counters, we traverse current active counters
to calculate their time, and then restart their timer.

BUG=chromium:658145

Review-Url: https://codereview.chromium.org/2457523002
Cr-Commit-Position: refs/heads/master@{#40653}
2016-10-28 18:05:22 +00:00
titzer
404e215458 [wasm] Support for restricted table imports.
This CL implements basic table import functionality.

Missing: growing of tables (WebAssembly.Grow) doesn't change dispatch tables
Missing: allowing larger table imports than minimum size

R=rossberg@chromium.org,bradnelson@chromium.org
BUG=v8:5507

Review-Url: https://codereview.chromium.org/2454503005
Cr-Commit-Position: refs/heads/master@{#40652}
2016-10-28 18:03:50 +00:00
ulan
b0b1d7a9e6 [heap] Check that sweeping is completed when collecting evacuation
candidates.

BUG=chromium:650314

Review-Url: https://codereview.chromium.org/2459003002
Cr-Commit-Position: refs/heads/master@{#40651}
2016-10-28 16:54:00 +00:00
machenbach
d800644c0f Revert of [heap] Concurrent store buffer processing. (patchset #13 id:260001 of https://codereview.chromium.org/2453673003/ )
Reason for revert:
Seems to block rolling:
https://codereview.chromium.org/2447393005/

Original issue's description:
> [heap] Concurrent store buffer processing.
>
> BUG=chromium:648973, chromium:648568

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

Review-Url: https://codereview.chromium.org/2449853010
Cr-Commit-Position: refs/heads/master@{#40650}
2016-10-28 16:46:09 +00:00
neis
a017715d1d [modules] Remove outdated TODO.
R=gsathya@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2460883002
Cr-Commit-Position: refs/heads/master@{#40649}
2016-10-28 14:41:02 +00:00
jochen
f074215082 Add a native data property that replaces itself with a real data property
This is useful for things that don't ever change, but we don't want to
eagerly compute the result.

Doing this from the embedder is difficult, using DefineOwnProperty would
read the property to get the property descriptor, creating an endless
recursion.

R=verwaest@chromium.org,haraken@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2449783006
Cr-Commit-Position: refs/heads/master@{#40648}
2016-10-28 14:40:11 +00:00
ulan
e12f9a113a [heap] Do not wait for marking deque uncommit task on tear down.
Cancelable task already guarantees proper waiting.

BUG=

Review-Url: https://codereview.chromium.org/2462553002
Cr-Commit-Position: refs/heads/master@{#40647}
2016-10-28 13:53:00 +00:00
ahaas
aff3ef2108 [wasm] Start function must not have a return value.
R=titzer@chromium.org
TEST=mjsunit/wasm/start-function

Review-Url: https://codereview.chromium.org/2458983002
Cr-Commit-Position: refs/heads/master@{#40646}
2016-10-28 13:36:03 +00:00
jochen
e52020c789 Disable Api call optimizations for runtime call stats
Otherwise, we don't account for callbacks from optimized code anymore.

R=verwaest@chromium.org,cbruni@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2459573002
Cr-Commit-Position: refs/heads/master@{#40645}
2016-10-28 12:52:47 +00:00
ulan
f2b60e9af2 Fix flag implications for --predictable.
The order is important for DEFINE_IMPLICATION to ensure transitive
implication: predictable => single_threaded => !concurrent_sweeping.

BUG=5580

Review-Url: https://codereview.chromium.org/2456323002
Cr-Commit-Position: refs/heads/master@{#40644}
2016-10-28 12:50:46 +00:00
mstarzinger
99934ee270 [compiler] Remove dead kMustNotHaveEagerFrame flag.
R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2457763003
Cr-Commit-Position: refs/heads/master@{#40643}
2016-10-28 12:45:34 +00:00
hpayer
50a5853f0d [heap] Concurrent store buffer processing.
BUG=chromium:648973, chromium:648568

Review-Url: https://codereview.chromium.org/2453673003
Cr-Commit-Position: refs/heads/master@{#40642}
2016-10-28 10:40:27 +00:00
leszeks
d2caa302a7 [ignition] Add bytecodes for loads/stores in the current context
The majority of context slot accesses are to the local context (current context
register and depth 0), so this adds bytecodes to optimise for that case.

This cuts down bytecode size by roughly 1% (measured on Octane and Top25).

Review-Url: https://codereview.chromium.org/2459513002
Cr-Commit-Position: refs/heads/master@{#40641}
2016-10-28 10:11:06 +00:00
ishell
3c2e379750 [stubs] Remove CSA::AssertInstanceType() in favour of CSA_ASSERT(HasInstanceType()).
... because the latter unlike the former records meaningful position.

BUG=

Review-Url: https://codereview.chromium.org/2456193005
Cr-Commit-Position: refs/heads/master@{#40640}
2016-10-28 10:10:14 +00:00
mstarzinger
ae24992839 [turbofan] Remove deprecated --turbo-from-bytecode flag.
This flag is on by default for now. Whenever heuristics in the compiler
pipeline decide to use Ignition+TurboFan, then {BytecodeGraphBuilder} is
active. Removing the flag reduces maintenance overhead.

R=mvstanton@chromium.org

Review-Url: https://codereview.chromium.org/2437103002
Cr-Commit-Position: refs/heads/master@{#40639}
2016-10-28 09:54:04 +00:00
cbruni
feb96acecd [stubs] Add more assertions in the CodeStubAssembler
BUG=

Review-Url: https://codereview.chromium.org/2446073002
Cr-Commit-Position: refs/heads/master@{#40638}
2016-10-28 09:45:21 +00:00
predrag.rudic
bc43d6fe78 MIPS: Fix Utf16CharacterStream scanner crash due to missaligned access
TEST=ctest/test-scanner-streams/CharacterStreams
BUG=

Review-Url: https://codereview.chromium.org/2415093002
Cr-Commit-Position: refs/heads/master@{#40637}
2016-10-28 09:18:19 +00:00
jgruber
83b560b0e5 [debugger] Various break-related functionality in test wrapper
This CL adds simple implementation of break and stepping-related functionality
as required by the debug-step.js test. This includes

* stepOver, stepInto, stepOut
* setBreakPoint
* clearBreakPoint
* evaluate

Some of these, e.g. setBreakPoint are not fully implemented for all cases but
only for the ones we need right now.

One interesting result of this is that using the inspector protocol is roughly
14x slower for debug-step.js (14s instead of 0.5s). One cause of this seems to
be iteration over all object properties in toProtocolValue, which is used to
serialize JS objects before being sent over the wire (e.g. FrameMirrors).  This
is something that should be fixed at some point. In the meantime, the test now
runs 100 instead of 1000 iterations.

BUG=v8:5530

Review-Url: https://codereview.chromium.org/2447073007
Cr-Commit-Position: refs/heads/master@{#40636}
2016-10-28 08:18:34 +00:00
jgruber
c8d2a8cf16 [debugger] Add initial skeleton for debug test wrapper
This adds a wrapper class around the inspector protocol for use in
debugger tests. The interface is intended to stay similar to the
currently exposed DebuggerContext.

Right now, we support adding a listener, (partial) handling of the
AfterCompile event, and enabling/disabling the debugger.

BUG=v8:5530

Review-Url: https://codereview.chromium.org/2451153003
Cr-Commit-Position: refs/heads/master@{#40635}
2016-10-28 07:21:37 +00:00
jgruber
534222d117 [regexp] Use SameValue in @@search as specced
BUG=v8:5339

Review-Url: https://codereview.chromium.org/2452923002
Cr-Commit-Position: refs/heads/master@{#40634}
2016-10-28 07:14:42 +00:00
clemensh
1cac34ed6b Fix detection of BUILTIN functions
In the asm.js to wasm pipeline, we generate an entry function with
BUILTIN code, but still attached to a TYPE_NORMAL script.
This fix avoids trying to set a breakpoint there, resulting in a crash
on DCHECK(shared->HasDebugInfo()).

Also add two inspector tests to track regressions.

BUG=v8:5568
R=titzer@chromium.org,mstarzinger@chromium.org

Review-Url: https://codereview.chromium.org/2457433002
Cr-Commit-Position: refs/heads/master@{#40633}
2016-10-28 06:48:44 +00:00
zhengxing.li
77ae68846b X87: [crankshaft] Support all oddballs for truncating TaggedToI changes.
port 7d383be9da (r40608)

  original commit message:
  For inputs to truncating binary operations like <<, | or >>>, support
  all Oddballs not just undefined, true and false. This unifies treatment
  of these truncations in Crankshaft and TurboFan, and is very easy
  nowadays, since the memory layout of Oddball and HeapNumber is
  compatible.

BUG=

Review-Url: https://codereview.chromium.org/2450093007
Cr-Commit-Position: refs/heads/master@{#40632}
2016-10-28 02:03:50 +00:00
bjaideep
4d6df11f2c s390x: Fix the logic to detect INT_MIN in simulator
Converting INT_MIN to positive should cause overflow,
which was not being captured. Fixed the logic to detect
if value is equal to INT_MIN and set the overflow code
accordingly.

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

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2446113013
Cr-Commit-Position: refs/heads/master@{#40631}
2016-10-27 22:05:54 +00:00
yangguo
c29c6a294c [serializer] clean up root list items.
The first 32 root list items are a conscious choice in order for the
serializer to encode root references more efficiently.

R=hpayer@chromium.org

Review-Url: https://codereview.chromium.org/2458603002
Cr-Commit-Position: refs/heads/master@{#40630}
2016-10-27 17:32:40 +00:00
ulan
b7dae10e5b [heap] Add debug checks for linear allocation area top and limit.
BUG=chromium:659165

Review-Url: https://codereview.chromium.org/2455103002
Cr-Commit-Position: refs/heads/master@{#40629}
2016-10-27 16:08:35 +00:00
ahaas
0ddddcb862 [asmjs] Do constant folding for I32Asmjs(Div|Rem)S to avoid checks of constant divisors
This change makes the embenchen/copy benchmark a factor of 2 faster and
brings back the performance loss through graph trimming.

R=titzer@chromium.org
CC=bradnelson@chromium.org

Review-Url: https://codereview.chromium.org/2453343002
Cr-Commit-Position: refs/heads/master@{#40628}
2016-10-27 16:02:54 +00:00
ishell
8ba4af44ea [ic] Remove unnecessary access rights checks from the IC handlers.
The reasons are:
1) Type feedback vectors are not shared between different native contexts and
   therefore the IC handler created for one native context will not be reused
   in other native context.
2) Access rights revocation is not supported at all, therefore given (1) once
   we pass the access check we don't have to check access rights again.

BUG=v8:5561

Review-Url: https://codereview.chromium.org/2455953002
Cr-Commit-Position: refs/heads/master@{#40627}
2016-10-27 15:54:00 +00:00