Commit Graph

37503 Commits

Author SHA1 Message Date
jochen
22858cb0d4 Only flush not yet started and finished compile jobs from gc
We shouldn't block during GC for arbitrarily long intervals.

BUG=chromium:686153,chromium:642532
R=verwaest@chromium.org,hpayer@chromium.org

Review-Url: https://codereview.chromium.org/2658313002
Cr-Commit-Position: refs/heads/master@{#42761}
2017-01-30 02:27:17 +00:00
caitp
82204eac7c [csa] fix CallRuntime() call in CSA::Print(Node* tagged_value)
emit %DebugPrint(tagged_value) instead of %GlobalPrint(tagged_value) to
avoid a CONVERT_ARG_CHECKED() failure when tagged value is not a string.

BUG=v8:5268
R=ishell@chromium.org, bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2663633002
Cr-Commit-Position: refs/heads/master@{#42760}
2017-01-29 22:26:43 +00:00
machenbach
a8638789c2 [test] Skip flaky test
BUG=v8:5906
NOTRY=true
TBR=binji@chromium.org

Review-Url: https://codereview.chromium.org/2659273002
Cr-Commit-Position: refs/heads/master@{#42759}
2017-01-29 12:52:05 +00:00
v8-autoroll
08cf9bd7c5 Update V8 DEPS.
Rolling v8/third_party/catapult: 9907db5..c3f2575

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org

Review-Url: https://codereview.chromium.org/2666443002
Cr-Commit-Position: refs/heads/master@{#42758}
2017-01-29 04:25:52 +00:00
bradnelson
437735ed34 [wasm][asm.js] Make asm.js->wasm return a regular object.
Return a regular JSObject in the asm.js -> wasm case.

BUG=v8:5877
R=mtrofin@chromium.org,aseemgarg@chromium.org,titzer@chromium.org

Review-Url: https://codereview.chromium.org/2664493002
Cr-Commit-Position: refs/heads/master@{#42757}
2017-01-28 23:15:58 +00:00
jarin
6cd2d4ba41 [turbofan] Only use Tagged machine representation for tagged state values.
This avoids using kTaggedSigned and kTaggedPointer because the
semantic information of those type could be invalid in unreachable
code.

For example, SmiCheck(0.1) has representation TaggedSigned, but it is
later compiled to DeoptimizeUnless(ObjectIsSmi(0.1)) with the constant
0.1 directly connected to the uses. If the use is state-values, which
recorded the TaggedSigned representation of CheckSmi, the code
generator will be confused because it will see constant 0.1 that
claims to be TaggedSigned value.

BUG=chromium:675704

Review-Url: https://codereview.chromium.org/2656243004
Cr-Commit-Position: refs/heads/master@{#42756}
2017-01-28 17:25:46 +00:00
jarin
e342ec90f0 Revert of [turbofan] Enable escape analysis. (patchset #1 id:1 of https://codereview.chromium.org/2626013002/ )
Reason for revert:
Temporarily turn off escape analysis to get a clean canary.

Original issue's description:
> [turbofan] Enable escape analysis.
>
> Review-Url: https://codereview.chromium.org/2626013002
> Cr-Commit-Position: refs/heads/master@{#42229}
> Committed: 30176976e8

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

Review-Url: https://codereview.chromium.org/2660063002
Cr-Commit-Position: refs/heads/master@{#42755}
2017-01-28 17:18:06 +00:00
machenbach
291d9a782f Revert of [stubs] KeyedLoadIC_Generic: prototype chain lookup support (patchset #2 id:20001 of https://codereview.chromium.org/2652213003/ )
Reason for revert:
Speculative revert for breaking a layout test:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/13113

Unfortunately, the test results archive is not giving much info this time.

Original issue's description:
> [stubs] KeyedLoadIC_Generic: prototype chain lookup support
>
> Performing lookups on the prototype chain in the stub avoids a
> bunch of slow-path runtime calls. For now, only receivers with
> dictionary-mode properties do this; fast-mode receivers will follow
> if it's beneficial.
>
> Review-Url: https://codereview.chromium.org/2652213003
> Cr-Commit-Position: refs/heads/master@{#42751}
> Committed: 82e10f5fba

TBR=ishell@chromium.org,jkummerow@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/2657393002
Cr-Commit-Position: refs/heads/master@{#42754}
2017-01-28 11:23:27 +00:00
jbroman
bf511b426e ValueSerializer: Support efficiently reading and writing one-byte strings.
memcpy is faster than UTF-8 encoding/decoding. This yields 10-20% wins on
serializing and deserializing long ASCII strings, according to
blink_perf.bindings -- and these are already in a fast path where the entire
string is known to be ASCII (but this has to be checked). The win may be
larger for strings in Latin-1 but not ASCII (though I suspect this is an
uncommon case).

A change is also made to make ValueSerializerTest.EncodeTwoByteStringUsesPadding
survive wire format version number changes.

This is the first of a series of wire format changes from the previous Blink
format. The deserializer continues to be able to read the old format, but
Chromium M56 will no longer be able to read the messages written by this, in M58.

BUG=chromium:686159

Review-Url: https://codereview.chromium.org/2658793004
Cr-Commit-Position: refs/heads/master@{#42753}
2017-01-28 05:52:05 +00:00
v8-autoroll
851ef4677a Update V8 DEPS.
Rolling v8/build: c3da457..3dada45

Rolling v8/buildtools: a7cc7a3..c302711

Rolling v8/third_party/catapult: 683b84f..9907db5

Rolling v8/tools/clang: dbc7572..0b3a445

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org

Review-Url: https://codereview.chromium.org/2659873003
Cr-Commit-Position: refs/heads/master@{#42752}
2017-01-28 04:27:18 +00:00
jkummerow
82e10f5fba [stubs] KeyedLoadIC_Generic: prototype chain lookup support
Performing lookups on the prototype chain in the stub avoids a
bunch of slow-path runtime calls. For now, only receivers with
dictionary-mode properties do this; fast-mode receivers will follow
if it's beneficial.

Review-Url: https://codereview.chromium.org/2652213003
Cr-Commit-Position: refs/heads/master@{#42751}
2017-01-28 03:08:07 +00:00
lukasza
01a93925c1 Adapt StringBuilder's append and toString methods via StringUtil helper.
This is needed to insulate generated code from blink::protocol namespace
from naming changes that we plan to do in the Great Blink Rename (which
in particular will change wtf::StringBuilder::toString into ToString,
and similarily will rename reserveCapacity and append methods).

This CL also includes roll of inspector_protocol which starts to
generate code that uses the new methods of StringUtil adapter:
rolling third_party/inspector to 1a131872167f0f7653629326891aa3ec94417f27.

BUG=683447

Review-Url: https://codereview.chromium.org/2660503002
Cr-Commit-Position: refs/heads/master@{#42750}
2017-01-27 21:11:15 +00:00
binji
966355585b [d8] Use ValueSerializer for postMessage (instead of ad-hoc serializer)
Review-Url: https://codereview.chromium.org/2643723010
Cr-Commit-Position: refs/heads/master@{#42749}
2017-01-27 20:15:37 +00:00
bjaideep
9515f7edf0 PPC/s390: [liveedit] reimplement frame restarting.
Port 3f47c63ded

Original Commit Message:

    Previously, when restarting a frame, we would rewrite all frames
    between the debugger activation and the frame to restart to squash
    them, and replace the return address with that of a builtin to
    leave that rewritten frame, and restart the function by calling it.

    We now simply remember the frame to drop to, and upon returning
    from the debugger, we check whether to drop the frame, load the
    new FP, and restart the function.

R=yangguo@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:5587
LOG=N

Review-Url: https://codereview.chromium.org/2663453004
Cr-Commit-Position: refs/heads/master@{#42748}
2017-01-27 19:43:59 +00:00
pfeldman
82ef9f75e3 V8 Inspector: complete migration to the standard message level enum.
BUG=chromium:682521

Review-Url: https://codereview.chromium.org/2659913002
Cr-Commit-Position: refs/heads/master@{#42747}
2017-01-27 18:49:09 +00:00
julien.gilli
cd96c7ccd5 add post-mortem metadata for frames type
Previously (and still currently for some of them), post-mortem debugging
tools were using StandardFrameConstants::kContextOffset as the offset to
get the value that represents a frame's type.

However since https://codereview.chromium.org/1696043002, a new, more
general offset was introduced:
CommonFrameConstants::kContextOrFrameTypeOffset.

In order for post-mortem debugging tools to use this constant, it is
included in the generated post-mortem metadata.

R=danno@chromium.org,bmeurer@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2655553006
Cr-Commit-Position: refs/heads/master@{#42746}
2017-01-27 18:19:08 +00:00
bjaideep
e668872857 PPC/s390: [turbofan] Introduce JSCallForwardVarargs operator.
Port 69747e2658

Original Commit Message:

    We turn a JSCallFunction node for

      f.apply(receiver, arguments)

    into a JSCallForwardVarargs node, when the arguments refers to the
    arguments of the outermost optimized code object, i.e. not an inlined
    arguments, and the apply method refers to Function.prototype.apply,
    and there's no other user of arguments except in frame states.

    We also replace the arguments node in the graph with a marker for
    the Deoptimizer similar to Crankshaft to make sure we don't materialize
    unused arguments just for the sake of deoptimization. We plan to replace
    this with a saner EscapeAnalysis based solution soon.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:5267,v8:5726
LOG=N

Review-Url: https://codereview.chromium.org/2656363002
Cr-Commit-Position: refs/heads/master@{#42745}
2017-01-27 17:48:34 +00:00
marja
53667c89b0 [parser] Skipping inner funcs: produce correct data for var redeclarations.
This unifies the behavior of Scope::DeclareVariableName with
Scope::DeclareVariable.

BUG=v8:5516

Review-Url: https://codereview.chromium.org/2658063005
Cr-Commit-Position: refs/heads/master@{#42744}
2017-01-27 16:33:36 +00:00
machenbach
aaaffd3758 [CQ] Make verify-csa bots block CQ
BUG=chromium:685561
NOTRY=true
TBR=danno@chromium.org, kjellander@chromium.org

Review-Url: https://codereview.chromium.org/2650383008
Cr-Commit-Position: refs/heads/master@{#42743}
2017-01-27 15:34:45 +00:00
marja
5f950698c0 [objects.h splitting] Move out ConstantElementsPair and BoileplateDescriptor.
BUG=v8:5402

Review-Url: https://codereview.chromium.org/2663513002
Cr-Commit-Position: refs/heads/master@{#42742}
2017-01-27 15:29:47 +00:00
ivica.bogosavljevic
2f728bd9a0 MIPS[64]: Prevent multiple instances of tests that require a lot of memory
Some tests require a lot of memory and they fail on buildbots if they run
in parallel with other tests of the same kind.
We try to limit this by disabling multiple vairants of the same tests,
assuming this would stop the failures in most of the cases.

BUG=

Review-Url: https://codereview.chromium.org/2653603002
Cr-Commit-Position: refs/heads/master@{#42741}
2017-01-27 14:15:59 +00:00
marja
92f36954bb [iwyu] Include handles.h less.
These headers only need forward declarations.

BUG=v8:5294

Review-Url: https://codereview.chromium.org/2654253002
Cr-Commit-Position: refs/heads/master@{#42740}
2017-01-27 13:53:13 +00:00
marja
2dac4588ee [parser] Skipping inner funcs: make basic variable declarations work.
BUG=v8:5516

Review-Url: https://codereview.chromium.org/2659053002
Cr-Commit-Position: refs/heads/master@{#42739}
2017-01-27 13:24:26 +00:00
mstarzinger
9ea3fe0bb3 Adapt use-site to new BoilerplateDescription.
This makes sure all use-site of {ObjectLiteral::constant_properties} are
adapted to use the correct {BoilerplateDescription} type instead of just
the {FixedArray} base type.

R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2659603003
Cr-Commit-Position: refs/heads/master@{#42738}
2017-01-27 13:02:45 +00:00
tebbi
c1a43ff996 [turbofan] No longer ignore FrameState input to Call
R=mstarzinger@chromium.org

BUG=chromium:683566

Review-Url: https://codereview.chromium.org/2653953010
Cr-Commit-Position: refs/heads/master@{#42737}
2017-01-27 12:40:05 +00:00
bmeurer
b975441e77 [turbofan] Introduce dedicated StringIndexOf operator.
The StringIndexOf operation is pure on the JS level, but the actual stub
call must be in the effect chain later so that the Scheduler doesn't
place it inside some allocation region (The %StringIndexOf runtime
function may trigger a GC for string flattening).

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

Review-Url: https://codereview.chromium.org/2657243002
Cr-Commit-Position: refs/heads/master@{#42736}
2017-01-27 12:02:42 +00:00
ishell
c5644146bc [tests] Fix assertUnoptimized() when --deopt-every-n-times flag is used.
Basically, with --deopt-every-n-times flag all bets are off since
the functions can be optimized and deoptimized at any time.

BUG=v8:5890

Review-Url: https://codereview.chromium.org/2655263004
Cr-Commit-Position: refs/heads/master@{#42735}
2017-01-27 11:58:47 +00:00
danno
5344571580 Make enabling of CSA verifier a build-time flag
BUG=chromium:685561

Review-Url: https://codereview.chromium.org/2650273006
Cr-Commit-Position: refs/heads/master@{#42734}
2017-01-27 11:32:27 +00:00
danno
7046c14d35 [csa] Make argc parameter to CodeStubArguments constructor use ParameterMode
Review-Url: https://codereview.chromium.org/2661483002
Cr-Commit-Position: refs/heads/master@{#42733}
2017-01-27 11:20:07 +00:00
predrag.rudic
dbbd2da128 MIPS: Workaround for bug in MIPS Android compiler
This patch fixes an issue with compilation with MIPS Android compiler
NDK r12b, gcc version mipsel-linux-android-g++ (GCC) 4.9.x 20150123
(prerelease).
The problem has been reported to the compiler team, the workaround
should be reverted when the issue with compiler is resolved.

BUG=

Review-Url: https://codereview.chromium.org/2652673002
Cr-Commit-Position: refs/heads/master@{#42732}
2017-01-27 11:17:36 +00:00
ishell
4a5446fb2b [tests] Make assertOptimized()/assertUnoptimized() great again.
The mentioned asserts did not work properly with interpreted and turbofanned functions.

To fix this issue %GetOptimizationStatus() now returns a set of flags instead of a single value.

This CL also adds more helper functions to mjsunit, like isNeverOptimize(), isAlwaysOptimize(),
isOptimized(fun), etc.

BUG=v8:5890

Review-Url: https://codereview.chromium.org/2654733004
Cr-Original-Commit-Position: refs/heads/master@{#42703}
Committed: d1ddec7857
Review-Url: https://codereview.chromium.org/2654733004
Cr-Commit-Position: refs/heads/master@{#42731}
2017-01-27 10:13:53 +00:00
clemensh
e29a2cd529 [wasm] Interpreter: Don't pause on invalid position
Always execute the implicit return if we fell off the function bytes.
This is not considered an additional "step" as it is not executing a
wasm instruction.
Otherwise, we might pause at an invalid position (one after the
function bytes).

R=titzer@chromium.org
BUG=v8:5822

Review-Url: https://codereview.chromium.org/2650293003
Cr-Commit-Position: refs/heads/master@{#42730}
2017-01-27 09:48:08 +00:00
clemensh
b7947f8cd7 [wasm] Add inspector test for stepping
This also fixes bugs found by the new test. It only tests stepping
inside of wasm code. Wasm to JS and vice versa will follow in another
CL.

R=yangguo@chromium.org, titzer@chromium.org, kozyatinskiy@chromium.org
BUG=v8:5822

Review-Url: https://codereview.chromium.org/2651043004
Cr-Commit-Position: refs/heads/master@{#42729}
2017-01-27 08:50:50 +00:00
machenbach
21340ded47 [foozzie] Improve mocking stack traces
BUG=chromium:685633
NOTRY=true

Review-Url: https://codereview.chromium.org/2654273004
Cr-Commit-Position: refs/heads/master@{#42728}
2017-01-27 08:49:39 +00:00
danno
fd918b595b [stubs] Fix bug in ArrayPush builtin that only surfaces on MIPS debug
The v8 waterfall currently doesn't run MIPS tests in the debug configuration,
so although there are tests that would have found them, they currently are
not running in the standard CI setup. A bug has been fixed to add the debug
configuration of MIPS & MIPS64, too.

Review-Url: https://codereview.chromium.org/2654263002
Cr-Commit-Position: refs/heads/master@{#42727}
2017-01-27 08:48:28 +00:00
machenbach
9be4934d6f [foozzie] Make Error immutable to prevent changes to stack-trace api
BUG=chromium:685633
NOTRY=true
TBR=yangguo@chromium.org, jarin@chromium.org

Review-Url: https://codereview.chromium.org/2658223002
Cr-Commit-Position: refs/heads/master@{#42726}
2017-01-27 08:35:30 +00:00
yangguo
3f47c63ded [liveedit] reimplement frame restarting.
Previously, when restarting a frame, we would rewrite all frames
between the debugger activation and the frame to restart to squash
them, and replace the return address with that of a builtin to
leave that rewritten frame, and restart the function by calling it.

We now simply remember the frame to drop to, and upon returning
from the debugger, we check whether to drop the frame, load the
new FP, and restart the function.

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

Review-Url: https://codereview.chromium.org/2636913002
Cr-Commit-Position: refs/heads/master@{#42725}
2017-01-27 07:31:03 +00:00
yukishiino
34bee46b0b Exposes Symbol.toPrimitive in C++ APIs as Symbol::GetToPrimitive.
As Blink needs to set Symbol.toPrimitive, exposes the symbol in C++ APIs
as Symbol::GetToPrimitive.

BUG=chromium:680409

Review-Url: https://codereview.chromium.org/2657933003
Cr-Commit-Position: refs/heads/master@{#42724}
2017-01-27 07:29:15 +00:00
danno
b362609efe [csa] Add some missing Smi* wrappers
Review-Url: https://codereview.chromium.org/2655243003
Cr-Commit-Position: refs/heads/master@{#42723}
2017-01-27 07:25:26 +00:00
clemensh
c6663ef1c1 [inspector] Expose GetPossibleBreakpoints for wasm
and add an inspector test for it. Also test that a breakpoint can be
set on each reported position, and that it is also hit during
execution.
This CL also fixes two little things which were uncovered by the new
test.

R=yangguo@chromium.org, titzer@chromium.org, kozyatinskiy@chromium.org
BUG=v8:5822

Review-Url: https://codereview.chromium.org/2655653003
Cr-Commit-Position: refs/heads/master@{#42722}
2017-01-27 07:20:09 +00:00
v8-autoroll
fec83a2a5a Update V8 DEPS.
Rolling v8/build: 6f17189..c3da457

Rolling v8/third_party/catapult: e1e778d..683b84f

Rolling v8/tools/clang: 017f4e5..dbc7572

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org

Review-Url: https://codereview.chromium.org/2650853009
Cr-Commit-Position: refs/heads/master@{#42721}
2017-01-27 04:25:56 +00:00
alph
c99c25a988 [profiler] Fix a memory leak of CodeEvent objects
BUG=v8:5753

Review-Url: https://codereview.chromium.org/2655963003
Cr-Commit-Position: refs/heads/master@{#42720}
2017-01-27 01:12:53 +00:00
ahaas
2a78f2980b [x64] Do not compact constants with attached reloc info.
Reloc info often means that the constant will be patched later, and for
this patching we have to make sure that there is enough space in the
code for the new value.

R=bmeurer@chromium.org, titzer@chromium.org, gdeepti@chromium.org
BUG=chromium:684407
TEST=cctest/test-assembler-x64/Regression684407

Review-Url: https://codereview.chromium.org/2655213003
Cr-Commit-Position: refs/heads/master@{#42719}
2017-01-27 00:34:42 +00:00
jbroman
78c0be52d2 ValueSerializer: Promote scheduled exceptions from wasm::ErrorThrower.
wasm::ErrorThrower doesn't actually throw exceptions, it just schedules them.
As a result, this exception isn't handled properly by code which expects
ValueDeserializer to actually throw. For instance, the unit tests use a
TryCatch to catch and handle expected exceptions in unit tests.

Before this patch, I see local unit test failures because a wasm decode test
schedules one, but it isn't caught (and instead causes Context::New to fail
at the beginning of the next test).

BUG=685713

Review-Url: https://codereview.chromium.org/2659483004
Cr-Commit-Position: refs/heads/master@{#42718}
2017-01-26 22:18:29 +00:00
gdeepti
e6d13999fd [wasm] Memory buffer should be detached after Memory.Grow
Memory.Grow should detach the ArrayBuffer associated with the Mem object after Grow. Currently, when guard pages are enabled protection is changed to make more of the buffer accessible. This does not work for when the buffer should be detached after grow, because the memory object has a reference to the same buffer befor/after grow.

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

Review-Url: https://codereview.chromium.org/2653183003
Cr-Commit-Position: refs/heads/master@{#42717}
2017-01-26 22:15:59 +00:00
mtrofin
373320aef9 [wasm] flag for asm-wasm investigations
This is a flag useful for testing/perf investigations for asm-wasm.

We can dump the internal representation of a asm.js module (when asm-wasm is
enabled with --validate-asm) using --dump-wasm-module. We can't pick that
module afterwards because it contains non-compliant opcodes - used as
implementation detail of our asm-wasm pipeline.

This flag forces asm.js origin on the decoder.

BUG=

Review-Url: https://codereview.chromium.org/2656103003
Cr-Commit-Position: refs/heads/master@{#42716}
2017-01-26 21:59:33 +00:00
kozyatinskiy
adc42c3a82 [inspector] take into account inlined frames in ::HasNonBlackboxedFrameOnStack
BUG=v8:5842, chromium:583193
R=yangguo@chromium.org,dgozman@chromium.org,alph@chromium.org

Review-Url: https://codereview.chromium.org/2656743003
Cr-Commit-Position: refs/heads/master@{#42715}
2017-01-26 21:32:53 +00:00
kozyatinskiy
0ac7970a60 [inspector] don't ignore uncaught exception if at least 1 frame isn't blackboxed
- and fixed test.

BUG=v8:5842, chromium:583193
R=yangguo@chromium.org,dgozman@chromium.org,alph@chromium.org

Review-Url: https://codereview.chromium.org/2651683005
Cr-Commit-Position: refs/heads/master@{#42714}
2017-01-26 20:57:03 +00:00
bmeurer
7be3b4c90f [turbofan] Don't try to optimize tail calls to .apply.
BUG=chromium:685634
R=ishell@chromium.org

Review-Url: https://codereview.chromium.org/2658853002
Cr-Commit-Position: refs/heads/master@{#42713}
2017-01-26 20:52:21 +00:00
brettw
9d9711a8eb Remove build_overrides/v8.gni.
Chrome now uses the default_args system for specifying its own definitions of
these variables so the separate file in build_overrides is no longer necessary.

BUG=684096

Review-Url: https://codereview.chromium.org/2652263003
Cr-Commit-Position: refs/heads/master@{#42712}
2017-01-26 20:18:58 +00:00