Commit Graph

6483 Commits

Author SHA1 Message Date
adamk
6768456db5 Use Variable::binding_needs_init() to determine hole initialization
The old code was using VariableMode, but that signal is both
over-pessimistic (some CONST and LET variables need no hole-initialization)
and inconsistent with other uses of the InitializationFlag enum (such
as %LoadLookupSlot).

This changes no observable behavior, but removes unnecessary hole
initialization and hole checks in a few places, including
block-scoped function declarations, super property lookups,
and new.target.

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

Review-Url: https://codereview.chromium.org/2201193004
Cr-Commit-Position: refs/heads/master@{#38395}
2016-08-05 17:51:17 +00:00
klaasb
4732c219b0 [interpreter] Remove redundant code in ForInPrepare
ForInPrepare checked whether the receiver object was null, undefined or
converted to a JSObject. This is already done by the generated bytecode.

BUG=v8:4820
LOG=n

Review-Url: https://codereview.chromium.org/2208043002
Cr-Commit-Position: refs/heads/master@{#38394}
2016-08-05 17:36:00 +00:00
verwaest
ff1c3cdb18 Separate Scope into DeclarationScope and Scope
This reduces peak zone memory usage by ~10% on codeload and ~5% on mandreel.

BUG=v8:5209

Committed: https://crrev.com/2648162dcfff622f8587cea2faa8c3af56456968
Review-Url: https://codereview.chromium.org/2209573002
Cr-Original-Commit-Position: refs/heads/master@{#38367}
Cr-Commit-Position: refs/heads/master@{#38390}
2016-08-05 14:34:04 +00:00
machenbach
55a4344f41 [test] Activate ignition_staging variant
BUG=v8:5238
NOTREECHECKS=true

Review-Url: https://codereview.chromium.org/2214283003
Cr-Commit-Position: refs/heads/master@{#38381}
2016-08-05 12:48:36 +00:00
machenbach
2b6675c350 Revert of Separate Scope into DeclarationScope and Scope (patchset #13 id:240001 of https://codereview.chromium.org/2209573002/ )
Reason for revert:
[Sheriff] Make leak checker unhappy:
https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20-%20debug/builds/10959

Original issue's description:
> Separate Scope into DeclarationScope and Scope
>
> This reduces peak zone memory usage by ~10% on codeload and ~5% on mandreel.
>
> BUG=v8:5209
>
> Committed: https://crrev.com/2648162dcfff622f8587cea2faa8c3af56456968
> Cr-Commit-Position: refs/heads/master@{#38367}

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

Review-Url: https://codereview.chromium.org/2212383003
Cr-Commit-Position: refs/heads/master@{#38380}
2016-08-05 12:37:23 +00:00
hpayer
04fda1f686 [heap] Temporarily do not use size to iterate live object to investigate Win 10 memory regression.
BUG=chromium:633537

Review-Url: https://codereview.chromium.org/2211893002
Cr-Commit-Position: refs/heads/master@{#38369}
2016-08-05 10:58:38 +00:00
machenbach
dea16c9a42 Revert of [Interpreter] Collect type feedback for 'new' in the bytecode handler (patchset #6 id:100001 of https://codereview.chromium.org/2190293003/ )
Reason for revert:
[Sheriff] Fails on nosnap debug:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap%20-%20debug/builds/8403

Original issue's description:
> [Interpreter] Collect type feedback for 'new' in the bytecode handler
>
> Collect type feedback in the bytecode handler for 'new' bytecode. The
> earlier cl (https://codereview.chromium.org/2153433002/) was reverted
> because that implementation did not collect allocation site feedback.
> This regressed delta blue by an order of magnitude. This implementation
> includes collection of allocation site feedback.
>
> BUG=v8:4280, v8:4780
> LOG=N
>
> Committed: https://crrev.com/9d5e6129c4c7f9cbfe81a5fad2a470f219fe137c
> Cr-Commit-Position: refs/heads/master@{#38364}

TBR=bmeurer@chromium.org,rmcilroy@chromium.org,balazs.kilvady@imgtec.com,mythria@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4280, v8:4780

Review-Url: https://codereview.chromium.org/2212343002
Cr-Commit-Position: refs/heads/master@{#38368}
2016-08-05 10:36:20 +00:00
verwaest
2648162dcf Separate Scope into DeclarationScope and Scope
This reduces peak zone memory usage by ~10% on codeload and ~5% on mandreel.

BUG=v8:5209

Review-Url: https://codereview.chromium.org/2209573002
Cr-Commit-Position: refs/heads/master@{#38367}
2016-08-05 10:17:54 +00:00
rmcilroy
297f2d831a [Interpreter] Avoid dereferencing handles in ConstantPoolArrayBuilder.
Changes ConstantPoolArrayBuilder to do object lookups using the location
of the handles, rather than dereferencing the handles and comparing the
objects. This also updates CanonicalHandleScope when internalizing AST
nodes to ensure that duplicate objects share the same handles and so are
only added to the constant pool once.

BUG=v8:5203

Review-Url: https://codereview.chromium.org/2204243003
Cr-Commit-Position: refs/heads/master@{#38366}
2016-08-05 10:10:04 +00:00
mythria
9d5e6129c4 [Interpreter] Collect type feedback for 'new' in the bytecode handler
Collect type feedback in the bytecode handler for 'new' bytecode. The
earlier cl (https://codereview.chromium.org/2153433002/) was reverted
because that implementation did not collect allocation site feedback.
This regressed delta blue by an order of magnitude. This implementation
includes collection of allocation site feedback.

BUG=v8:4280, v8:4780
LOG=N

Review-Url: https://codereview.chromium.org/2190293003
Cr-Commit-Position: refs/heads/master@{#38364}
2016-08-05 09:58:39 +00:00
clarkchenwang
dfd8db8bec Add signature checking when directly import a foreign function
Review-Url: https://codereview.chromium.org/2204703002
Cr-Commit-Position: refs/heads/master@{#38349}
2016-08-04 20:34:02 +00:00
machenbach
03f5124822 [test] Enable test status filtering by variant
This adds the possibility to address test cases in the
status file with the variant under which the test is running.
This is only allowed in top-level sections.

Example:
[{
  'test-case': [PASS, SLOW],
}]

['variant == foo', {
  'test-case': [FAIL],
}]

The test case "test-case" is marked as slow in all variants.
Additionally, in variant foo, it'll be expected to fail.

This CL also exemplifies the new feature with test cases
running under the ignition_turbofan variant. The
corresponding legacy flag is deprecated.

BUG=v8:5238

Review-Url: https://codereview.chromium.org/2203013002
Cr-Commit-Position: refs/heads/master@{#38342}
2016-08-04 14:42:16 +00:00
epertoso
7eee144480 [turbofan] Basic reductions of 64-bit machine operators.
Only basic things for now, but enough, for example, to emit

mov rax, [rax+0xc]

instead of

mov rax, 0x3
mov rdx, [rdx+rax*4]

on x64.

BUG=

Review-Url: https://codereview.chromium.org/2211633003
Cr-Commit-Position: refs/heads/master@{#38338}
2016-08-04 12:37:08 +00:00
ahaas
7a1deffbd1 [serializer][heap] Record references in deserialized code objects.
References in code objects to new-space embedded objects have to be
recorded in a remembered set so that they get updated by the garbage
collector.

TEST=cctest/test-serialize/CodeSerializerEmbeddedObject

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

Review-Url: https://codereview.chromium.org/2200333004
Cr-Commit-Position: refs/heads/master@{#38335}
2016-08-04 09:39:57 +00:00
rskang
94ad974df8 [Tracing] V8 Tracing Controller - Fix async trace event bug
Usage of hex IO manipulator for async event IDs corrupts future decimal number
outputs.

BUG=v8:5261

Review-Url: https://codereview.chromium.org/2200113003
Cr-Commit-Position: refs/heads/master@{#38331}
2016-08-04 08:49:22 +00:00
hpayer
62f2e7e8b0 Revert "[heap] Temporarily use old live object iterator to investigate Win 10 memory regression."
This reverts commit d2cf6e2956.

BUG=chromium:633537

Review-Url: https://codereview.chromium.org/2207383002
Cr-Commit-Position: refs/heads/master@{#38328}
2016-08-04 08:26:21 +00:00
ahaas
c088aea922 [heap] Record references in the new code objects in heap::CopyCode.
R=mlippautz@chromium.org
BUG=chromium:633539
TEST=cctest/test-heap/TestNewSpaceRefsInCopiedCode

Review-Url: https://codereview.chromium.org/2203783002
Cr-Commit-Position: refs/heads/master@{#38326}
2016-08-04 08:14:29 +00:00
jgruber
a53d468747 Properly handle exceptions in cctests
Thrown exceptions must be handled before another exception is thrown.
This fixes all remaining test failures exposed by not clearing pending
exceptions in JSEntryStub.

BUG=v8:5259

Review-Url: https://codereview.chromium.org/2207923002
Cr-Commit-Position: refs/heads/master@{#38324}
2016-08-04 07:22:11 +00:00
hpayer
d2cf6e2956 [heap] Temporarily use old live object iterator to investigate Win 10 memory regression.
BUG=chromium:633537

Review-Url: https://codereview.chromium.org/2205373002
Cr-Commit-Position: refs/heads/master@{#38311}
2016-08-03 18:11:43 +00:00
weiliang.lin
0872d08b00 [x64]: add cmpps/cmppd instructions
BUG=

Review-Url: https://codereview.chromium.org/2170323002
Cr-Commit-Position: refs/heads/master@{#38307}
2016-08-03 15:25:28 +00:00
haraken
c8241635f1 Change an output parameter of Maybe<T>::To() from a reference to a pointer
This is a follow-up fix for https://codereview.chromium.org/2194793003/

BUG=

Review-Url: https://codereview.chromium.org/2205203002
Cr-Commit-Position: refs/heads/master@{#38305}
2016-08-03 15:10:23 +00:00
klaasb
8097eeb9f2 [interpreter] Add CreateFunctionContext bytecode
Add a new bytecode to create a function context. The handler inlines
FastNewFunctionContextStub.

BUG=v8:4280
LOG=n

Review-Url: https://codereview.chromium.org/2187523002
Cr-Commit-Position: refs/heads/master@{#38301}
2016-08-03 14:43:26 +00:00
cbruni
ce49c32973 [api] Add v8::Object::SetAlignedPointerInInternalFields
This new API function allows for setting several internal fields at once.
By avoiding crossing the API each time for setting an internal property we
can speed up the wrapper creation which has to set two fields for every new
object.

BUG=chromium:630217

Review-Url: https://codereview.chromium.org/2185963002
Cr-Commit-Position: refs/heads/master@{#38299}
2016-08-03 14:39:34 +00:00
jochen
7036d96b57 Add a mode to completely deserialize scope chains
This will allow for the background parser to parse inner functions

BUG=v8:5215
R=marja@chromium.org,verwaest@chromium.org

Review-Url: https://codereview.chromium.org/2198043002
Cr-Commit-Position: refs/heads/master@{#38291}
2016-08-03 13:31:04 +00:00
bmeurer
cf4b9307ad [turbofan] Consume SignedSmall feedback for number operations.
So far we treated SignedSmall and Signed32 feedback the same for number
operations. However it would be beneficial to generate (a lot) less code
if we only do a Smi check on the inputs instead of doing the full Smi +
HeapNumber + conversion check that we need to do for Signed32 feedback.

R=epertoso@chromium.org
BUG=v8:4583

Review-Url: https://codereview.chromium.org/2207893002
Cr-Commit-Position: refs/heads/master@{#38290}
2016-08-03 12:47:53 +00:00
jgruber
d48170dbf5 Move NoSideEffectToString to C++
BUG=

Review-Url: https://codereview.chromium.org/2206573002
Cr-Commit-Position: refs/heads/master@{#38289}
2016-08-03 12:22:23 +00:00
bmeurer
66e96fc9d7 [turbofan] Unify number operation typing rules.
Move all the typing rules for unary and binary number operations to the
OperationTyper and use them for both the regular Typer as well as the
retyper that runs as part of SimplifiedLowering.

R=epertoso@chromium.org

Review-Url: https://codereview.chromium.org/2202883005
Cr-Commit-Position: refs/heads/master@{#38283}
2016-08-03 10:43:01 +00:00
mstarzinger
cc1e84b96c [turbofan] Remove eager frame state from all nodes.
This completely removes the ability from nodes to point directly to the
frame state representing their eager bailout point. All nodes now either
have zero or one frame state inputs. These frame states can by now be
found via checkpoints in the graph.

R=bmeurer@chromium.org
BUG=v8:5021

Review-Url: https://codereview.chromium.org/2020323004
Cr-Commit-Position: refs/heads/master@{#38282}
2016-08-03 10:39:09 +00:00
mstarzinger
0c8e3cea4b [turbofan] Remove eager frame state from bitwise ops.
This removes the frame state input representing the before-state from
nodes having any int32 bitwise operator. Lowering that inserts number
conversions of the inputs has to be disabled when deoptimization is
enabled, because the frame state layout is no longer known.

R=epertoso@chromium.org
BUG=v8:5021,v8:4746

Review-Url: https://codereview.chromium.org/2194383004
Cr-Commit-Position: refs/heads/master@{#38280}
2016-08-03 08:38:51 +00:00
jochen
2f8d4f4425 Do an access check before compiling code via eval()
Similarly to how we check whether the entered context has access to the target
context when invoking the function constructor, we should check the involved
contexts before invoking eval().

I forgot to add this in the initial CL that adds the check for the function
constructor. Move the code to a common location, and use it for the GlobalEval
builtin as well.

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

Review-Url: https://codereview.chromium.org/2199343002
Cr-Commit-Position: refs/heads/master@{#38277}
2016-08-03 07:42:53 +00:00
titzer
d4392107fa [wasm] Make LoadGlobal/StoreGlobal opcodes match what is coming in binary 0xC.
R=ahaas@chromium.org,bradnelson@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2209433002
Cr-Commit-Position: refs/heads/master@{#38262}
2016-08-02 22:40:50 +00:00
adamk
56f9754387 Remove --harmony-exponentiation-operator flag
It's shipped in M52.

R=caitp@igalia.com, littledan@chromium.org

Review-Url: https://codereview.chromium.org/2203843002
Cr-Commit-Position: refs/heads/master@{#38256}
2016-08-02 17:17:35 +00:00
rskang
9a6a56d21f Add args and copy support to V8 tracing controller.
BUG=v8:4561

Review-Url: https://codereview.chromium.org/2190973003
Cr-Commit-Position: refs/heads/master@{#38255}
2016-08-02 17:13:13 +00:00
alph
f7249cd9f4 Do not mark dependent_code arrays as weak in heap snapshot.
Review-Url: https://codereview.chromium.org/2197393003
Cr-Commit-Position: refs/heads/master@{#38251}
2016-08-02 15:20:44 +00:00
alph
aba8a8151e Add WeakCell support to heap profiler.
Review-Url: https://codereview.chromium.org/2204873003
Cr-Commit-Position: refs/heads/master@{#38245}
2016-08-02 13:43:57 +00:00
alph
0a920f607f Add Map::weak_cell_cache internal link to heap snapshot.
Review-Url: https://codereview.chromium.org/2204893002
Cr-Commit-Position: refs/heads/master@{#38244}
2016-08-02 13:06:19 +00:00
machenbach
8552e68223 [test] Fix joining FAIL expectations in status files
Without this fix, two rules [PASS, MODIFIER] and [FAIL]
would be joined as [PASS, MODIFIER, FAIL], undermining the
intention of the second rule to mark a test as failing.

BUG=v8:4680,v8:4900

Review-Url: https://codereview.chromium.org/2201033002
Cr-Commit-Position: refs/heads/master@{#38238}
2016-08-02 11:52:03 +00:00
mstarzinger
f4316f1604 [interpreter] Enable test that no longer fails.
R=machenbach@chromium.org

Review-Url: https://codereview.chromium.org/2207503002
Cr-Commit-Position: refs/heads/master@{#38237}
2016-08-02 10:26:10 +00:00
mstarzinger
962fd4ae4b [interpreter] Elide OSR polling from fake loops.
This makes sure we are not inserting {OsrPoll} instructions for any
statements that are not actually loops and have no back edges. Without
back edges the {BytecodeGraphBuilder} is unable to deduce loop ranges
and hence cannot construct a graph for OSR entry.

R=neis@chromium.org
TEST=mjsunit/regress/regress-5252
BUG=v8:5252

Review-Url: https://codereview.chromium.org/2200733002
Cr-Commit-Position: refs/heads/master@{#38233}
2016-08-02 09:16:59 +00:00
alph
1fe8207071 [heap profiler] Use internal type links for bound this and target function.
These are internal fields of the JSBoundFunction class.

Review-Url: https://codereview.chromium.org/2193993002
Cr-Commit-Position: refs/heads/master@{#38222}
2016-08-01 22:16:01 +00:00
hpayer
c1ea41645b [heap] Add more left and right trimming test cases for black areas.
BUG=

Review-Url: https://codereview.chromium.org/2185383002
Cr-Commit-Position: refs/heads/master@{#38218}
2016-08-01 17:10:31 +00:00
jgruber
6c53efc7c4 Move FormatStackTrace to C++
BUG=

Review-Url: https://codereview.chromium.org/2191293002
Cr-Commit-Position: refs/heads/master@{#38212}
2016-08-01 14:28:33 +00:00
ulan
ea45a210a6 Fix performance regression of heap snapshot generator that was
introduced in https://crrev.com/72f884a19fa4434bba6fc0e013ec4ea0a2366893

The regression comes from adding the next weak field of AllocationSite
as a hidden reference into the snapshot.

Before 72f884 the reference was implicitly ignored because the body
descriptor of AllocationSite did not include it.

This patch explicitly skip the next weak field of AllocationSite.

BUG=chromium:630027

Review-Url: https://codereview.chromium.org/2189643004
Cr-Commit-Position: refs/heads/master@{#38211}
2016-08-01 13:34:26 +00:00
mstarzinger
9ee6ca75d3 [turbofan] Switch inlining tests to global scope.
This switches our inlining tests (i.e. cctest/test-run-inlining) to rely
on global object instead of function context specialization, which is
more in sync with what we are actually shipping. It will also allow us
to test inlining with the BytecodeGraphBuilder without having to add
support for function context specialization just for testing purposes.

R=bmeurer@chromium.org
TEST=cctest/test-run-inlining
BUG=v8:5251

Review-Url: https://codereview.chromium.org/2200673002
Cr-Commit-Position: refs/heads/master@{#38209}
2016-08-01 12:59:58 +00:00
machenbach
a23a74a7be [test] Remove deprecated --ignition test-runner flag
The flag was introduced for ignition development. It can only
be used when running ignition tests in isolation on the bots.

The bots only use ignition_turbo in isolation since a while
and don't pass the --ignition flag anymore.

BUG=v8:5238

Review-Url: https://codereview.chromium.org/2197123002
Cr-Commit-Position: refs/heads/master@{#38206}
2016-08-01 12:11:43 +00:00
jochen
95cae2eb35 Move ContextSlotCache to its own file
Also remove unnecessary includes of scopeinfo.h all over the place

R=marja@chromium.org
TBR=verwaest@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2197973002
Cr-Commit-Position: refs/heads/master@{#38204}
2016-08-01 11:33:46 +00:00
hpayer
205457b1aa [heap] Reland "Remove black pages and use black areas instead."
BUG=chromium:630969,chromium:630386

Review-Url: https://codereview.chromium.org/2186863005
Cr-Commit-Position: refs/heads/master@{#38195}
2016-08-01 09:05:04 +00:00
jyan
77c9cb8341 [compiler] [wasm] Introduce Word32/64ReverseBytes as TF Optional Opcode
This commit fixes wasm little-endian load issue on big-endian platform
by introducing reverse byte operation immediately after a load.

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

Review-Url: https://codereview.chromium.org/2045943002
Cr-Commit-Position: refs/heads/master@{#38183}
2016-07-29 19:33:28 +00:00
klaasb
26c1755242 [interpreter] Put object in register for ToObject/ForInPrepare
This gets rid of the Star bytecodes that were always dispatched to from
ToObject.
ToObject now outputs to register instead of to the accumulator and
ForInPrepare gets the receiver object from an input register.

BUG=v8:4820
LOG=n

Review-Url: https://codereview.chromium.org/2189463006
Cr-Commit-Position: refs/heads/master@{#38177}
2016-07-29 11:18:06 +00:00
haraken
cf1779495d Introduce Maybe::To/ToChecked
Per discussion in https://groups.google.com/a/chromium.org/d/topic/platform-architecture-dev/vGLGCaMqhCU/discussion

BUG=

Review-Url: https://codereview.chromium.org/2194793003
Cr-Commit-Position: refs/heads/master@{#38173}
2016-07-29 10:56:57 +00:00