Commit Graph

26175 Commits

Author SHA1 Message Date
rmcilroy
6173d504ee [Interpreter] Add wide varients of bytecodes with feedback and constant pool indexes.
Adds wide bytecode varients, which take 16-bit feedback slot and constant
pool entry indexes for the following bytecodes:
  - LoadICSloppyWide
  - LoadICStrictWide
  - KeyedLoadICSloppyWide
  - KeyedLoadICStrictWide
  - StoreICSloppyWide
  - StoreICStrictWide
  - KeyedStoreICSloppyWide
  - KeyedStoreICStrictWide
  - LdaGlobalSloppyWide
  - LdaGlobalStrictWide
  - StaGlobalSloppyWide
  - StaGlobalStrictWide
  - LdaConstantWide

BUG=v8:4280
LOG=N

Review URL: https://codereview.chromium.org/1413863010

Cr-Commit-Position: refs/heads/master@{#31683}
2015-10-30 11:17:29 +00:00
machenbach
b1f00106c2 [Swarming] Set up sanitizer environment in v8 test runner.
This is currently hardcoded in the infra-side test runner
setup, but will be removed there, so that swarming triggers
don't need a custom environment.

BUG=chromium:535160
LOG=n

Review URL: https://codereview.chromium.org/1411733008

Cr-Commit-Position: refs/heads/master@{#31682}
2015-10-30 11:08:34 +00:00
mstarzinger
d1805edada Move interpreter cctests into v8::internal::interpreter namespace.
This moves the cctest file for the interpreter to live in the same
namespace as the components it is testing. Hence we can avoid the
forbidden using directives pulling in entire namespaces.

From the Google C++ style guide: "You may not use a using-directive to
make all names from a namespace available". This would be covered by
presubmit linter checks if build/namespaces were not blacklisted.

R=rmcilroy@chromium.org

Review URL: https://codereview.chromium.org/1410993009

Cr-Commit-Position: refs/heads/master@{#31681}
2015-10-30 11:05:47 +00:00
ishell
cd5f48302a [es6] Better support for built-ins subclassing.
Create proper initial map for original constructor (new.target) instead of doing prototype transition on the base constructor's initial map. This approach fixes in-object slack tracking for subclass instances.
This CL also fixes subclassing from String.

BUG=v8:3101, v8:3330
LOG=Y

Review URL: https://codereview.chromium.org/1427483002

Cr-Commit-Position: refs/heads/master@{#31680}
2015-10-30 10:58:29 +00:00
machenbach
8a2618a986 Revert of Remove RegExp.multiline accessors. (patchset #3 id:40001 of https://codereview.chromium.org/1410993008/ )
Reason for revert:
[Sheriff] Causes layout test failures.

Original issue's description:
> Remove RegExp.multiline accessors.
>
> This is non-standard and not even documented on MDN.
>
> On Firefox, setting RegExp.multiline to true adds the multiline flag to all
> newly created RegExp objects (both from constructor and from literal).
>
> In V8 this has no effect.
>
> Source archaelogy shows that this is from the initial commit.
>
> R=bmeurer@chromium.org
>
> Committed: https://crrev.com/e8f752ce0c2a488e88cd87fe75f3907b4303d0a0
> Cr-Commit-Position: refs/heads/master@{#31673}

TBR=bmeurer@chromium.org,yangguo@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1431433004

Cr-Commit-Position: refs/heads/master@{#31679}
2015-10-30 10:47:17 +00:00
neis
127366112c Refactor Object::SetSuperProperty and others.
This is in preparation of implementing Reflect.set.

Besides making SetSuperProperty and others return Maybe<bool>, this CL
also fixes some parts of my previous refactoring of SetProperty and
others: It doesn't make sense to take both a language_mode and a
should_throw argument.  A strict language_mode should imply
THROW_ON_ERROR.

R=rossberg, verwaest@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1431443003

Cr-Commit-Position: refs/heads/master@{#31678}
2015-10-30 10:46:11 +00:00
jkummerow
70a2f537f6 Fix cached EnumLength retrieval in JSObject::NumberOfOwnProperties
BUG=chromium:549162
LOG=n
R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/1424293002

Cr-Commit-Position: refs/heads/master@{#31677}
2015-10-30 10:35:43 +00:00
bmeurer
47c0cb1d14 [turbofan] Optimize inlining and direct function calls.
This adds optimized lowering for JSConvertReceiver (in the general case)
and JSToObject in typed lowering. It also uses JSConvertReceiver for
direct calls in typed lowering.

R=mstarzinger@chromium.org
BUG=v8:4493
LOG=n

Review URL: https://codereview.chromium.org/1431543002

Cr-Commit-Position: refs/heads/master@{#31676}
2015-10-30 10:25:12 +00:00
bmeurer
0df0e254a3 [turbofan] Add support for storing to double fields.
Adds new Guard[Type] common operator, which takes value and control
inputs and records a guaranty that a certain value has a certain type
in that control path.  This is some kind of ad-hoc SSI similar to what
we have to do in Crankshaft in some places.

Also introduces an ObjectIsNumber simplified operator, which checks
whether a certain value is a number (either a Smi or a HeapNumber).

This doesn't yet support transitioning stores to double fields, which
require support for allocating mutable heap numbers.

R=jarin@chromium.org
BUG=v8:4470
LOG=n

Review URL: https://codereview.chromium.org/1420283009

Cr-Commit-Position: refs/heads/master@{#31675}
2015-10-30 10:19:47 +00:00
neis
98dfe024ca [es6] Partially implement Reflect.getOwnPropertyDescriptor.
Proxies are not properly supported yet.

R=rossberg, jkummerow@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1408163005

Cr-Commit-Position: refs/heads/master@{#31674}
2015-10-30 10:05:03 +00:00
yangguo
e8f752ce0c Remove RegExp.multiline accessors.
This is non-standard and not even documented on MDN.

On Firefox, setting RegExp.multiline to true adds the multiline flag to all
newly created RegExp objects (both from constructor and from literal).

In V8 this has no effect.

Source archaelogy shows that this is from the initial commit.

R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/1410993008

Cr-Commit-Position: refs/heads/master@{#31673}
2015-10-30 09:46:21 +00:00
ulan
897a5844cc Remove the remaining parts of background idle notification.
BUG=chromium:490559
LOG=NO

Review URL: https://codereview.chromium.org/1425143002

Cr-Commit-Position: refs/heads/master@{#31672}
2015-10-30 09:19:50 +00:00
mstarzinger
16f133001f Move compiler cctests into v8::internal::compiler namespace.
This moves all cctest files for the compiler to live in the same
namespace as the components they are testing. Hence we can avoid the
forbidden using directives pulling in entire namespaces.

From the Google C++ style guide: "You may not use a using-directive to
make all names from a namespace available". This would be covered by
presubmit linter checks if build/namespaces were not blacklisted.

R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/1424943004

Cr-Commit-Position: refs/heads/master@{#31671}
2015-10-30 09:16:39 +00:00
hablich
86c27e01e9 [Release] More information on how to close auto-roller
If you are not logged in with your Google account you are
faced with a blank screen. In order to make it more
clear for the Chromium sheriffs on how to close the
auto-roller I want to add this information.

R=machenbach@chromium.org
LOG=N
NOTRY=true

Review URL: https://codereview.chromium.org/1392823004

Cr-Commit-Position: refs/heads/master@{#31670}
2015-10-30 09:09:45 +00:00
landell
a57ef11af4 Include stdio.h for fwrite support
BUG=

Review URL: https://codereview.chromium.org/1418213007

Cr-Commit-Position: refs/heads/master@{#31669}
2015-10-30 08:03:44 +00:00
bmeurer
6040d5c0db [turbofan] Fix missing bailout point before calls.
In order to properly (lazy) bailout when converting the receiver for
sloppy mode functions (using the newly added JSConvertReceiver
operator), we need to have a bailout location right before every call
(also right before every %_Call and %_CallFunction), otherwise if the
JSConvertReceiver just reuses the lazy bailout frame state from the
JSCallFunction node, it will skip the whole function in case of lazy
bailout.

Note it should be impossible to trigger this currently because we do not
yet support AllocationSite code dependencies in TurboFan, which can
trigger this kind of lazy bailout; therefore it's not possible to write
a regression test (yet).

R=yangguo@chromium.org
BUG=v8:4493
LOG=n

Review URL: https://codereview.chromium.org/1425883004

Cr-Commit-Position: refs/heads/master@{#31668}
2015-10-30 06:59:07 +00:00
v8-autoroll
a8cddabf04 Update V8 DEPS.
Rolling v8/buildtools to acafdaa4e81adae617177d57e3c1261cc3565469

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

Review URL: https://codereview.chromium.org/1420973008

Cr-Commit-Position: refs/heads/master@{#31667}
2015-10-30 03:40:56 +00:00
mvstanton
25d48ec37f Vector ICs: Allow for more IC kinds.
We have plans to create more ICs, and we are out of bits to represent the Kind
in the flags field of the code object. The InlineCacheState can lose a bit
because it no longer needs the DEFAULT state. That state existed as a way to
detect errors where code incorrectly looked at a vector IC stub's
InlineCacheState instead of correctly determining said state from a glance at
the vector. This really isn't a danger anymore.

So, with the horse trading, we could now represent up to 32 code kinds.

BUG=

Review URL: https://codereview.chromium.org/1427803003

Cr-Commit-Position: refs/heads/master@{#31666}
2015-10-29 20:32:57 +00:00
yangguo
798ce4e463 Debugger: correctly break in default constructor.
R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/1423673003

Cr-Commit-Position: refs/heads/master@{#31665}
2015-10-29 17:22:50 +00:00
mstarzinger
26f90c95cc [turbofan] Fix super property calls to act as method calls.
This fixes [NAMED|KEYED]_SUPER_PROPERTY_CALL to perform a method call
instead of a function call. The difference is visible for sloppy mode
targets that convert primitive receivers.

R=rossberg@chromium.org
TEST=mjsunit/regress/regress-4525
BUG=v8:4525
LOG=n

Review URL: https://codereview.chromium.org/1419173004

Cr-Commit-Position: refs/heads/master@{#31664}
2015-10-29 17:19:39 +00:00
mstarzinger
5cc4ba59d3 Distinguish Call::CallType::PROPERTY_CALL further.
Most use sites of Call::GetCallType already distinguish the property
call case (i.e. formerly known as Call::PROPERTY_CALL) further. This
introduces this distinction to simplify use sites.

R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/1414413004

Cr-Commit-Position: refs/heads/master@{#31663}
2015-10-29 17:16:22 +00:00
mtrofin
46878c1da1 When we split above an instruction (for example because of splintering),
we may introduce moves that are redundant in the context of
moves on subsequent instructions. Currently, we only detect such
redundancies by allowing moves to skip over Nop instructions (true
nops, with no input/output). We can also skip over other cases, for
example over constant definitions (nop with an output), since whatever
moves happen above it do not influence the instruction's outcome.

We may be able to handle other cases, too - in subsequent CLs.

BUG=

Review URL: https://codereview.chromium.org/1422333003

Cr-Commit-Position: refs/heads/master@{#31662}
2015-10-29 16:12:54 +00:00
neis
8e35d8ebec [es6] Partially implement Reflect.defineProperty.
Proxies are not properly supported yet.

R=rossberg,jkummerow@chromium.org
BUG=v8:3931
LOG=n

Review URL: https://codereview.chromium.org/1421033002

Cr-Commit-Position: refs/heads/master@{#31661}
2015-10-29 15:39:49 +00:00
adamk
0bdaa4d877 Fix eval calls in initializers of arrow function parameters
This requires copying usage flags from the outer scope to the
arrow scope upon encountering the arrow token.

In order to properly pass-on the calls_eval bit, now record
that bit on script scopes just like everywhere else, and add
necessary code to scopes.cc to handle that change in behavior.

Also factored out scope flag propagation to its own method to
make the call site simple (though note that only the eval
bit makes any difference for arrows).

BUG=v8:4395
LOG=n

Review URL: https://codereview.chromium.org/1423613002

Cr-Commit-Position: refs/heads/master@{#31660}
2015-10-29 15:16:40 +00:00
adamk
4c3c89c1de Properly handle direct evals referencing super in arrow functions
The fix is to broaden the set of cases for when NeedsHomeObject()
returns true. Note that this is broader than it needs to be (since,
e.g., non-arrow function scopes inside a method can't reference
super). But we don't track the types of inner scopes at the moment,
so this is the best we can do.

R=rossberg@chromium.org
BUG=v8:4522
LOG=n

Review URL: https://codereview.chromium.org/1411093008

Cr-Commit-Position: refs/heads/master@{#31659}
2015-10-29 15:09:51 +00:00
jochen
e04d313d9f Reland v8::Private and related APIs
Also deprecate hidden values

BUG=none
LOG=y
R=rossberg@chromium.org,yangguo@chromium.org

Review URL: https://codereview.chromium.org/1428793002

Cr-Commit-Position: refs/heads/master@{#31658}
2015-10-29 14:17:33 +00:00
hpayer
9f95702ec0 Reland of [heap] Decrease incremental marking finalization retry limit. (patchset #1 id:1 of https://codereview.chromium.org/1428783004/ )
Reason for revert:
Unnecessary revert.

Original issue's description:
> Revert of [heap] Decrease incremental marking finalization retry limit. (patchset #1 id:1 of https://codereview.chromium.org/1408183006/ )
>
> Reason for revert:
> crashes on webkit_unit_tests V8-Blink Linux 32
>
> Original issue's description:
> > [heap] Decrease incremental marking finalization retry limit.
> >
> > BUG=chromium:548562
> > LOG=n
> >
> > Committed: https://crrev.com/c689f5759b46506c38c84f404ebd8dc326dcb76f
> > Cr-Commit-Position: refs/heads/master@{#31647}
>
> TBR=ulan@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=chromium:548562
>
> Committed: https://crrev.com/f555708c5ee583dafbc803b0917c9cd87f1c9ac3
> Cr-Commit-Position: refs/heads/master@{#31648}

TBR=ulan@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:548562

Review URL: https://codereview.chromium.org/1412683010

Cr-Commit-Position: refs/heads/master@{#31657}
2015-10-29 14:15:51 +00:00
yangguo
0ceca58771 Rename shadow variable in SearchRegExpMultiple.
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/1407213005

Cr-Commit-Position: refs/heads/master@{#31656}
2015-10-29 14:11:11 +00:00
ulan
27d23eee12 Add the rate of js invocations from the api as a signal of idleness
for starting major GC in the memory reducer.

BUG=

Review URL: https://codereview.chromium.org/1414483004

Cr-Commit-Position: refs/heads/master@{#31655}
2015-10-29 14:00:04 +00:00
mstarzinger
5fc75b26b3 [turbofan] Disable general purpose inlining with asm.js code.
This adapts the general purpose inlining heuristic to not inline within
or across the boundary of asm.js code. Note that this only affects the
heuristics, from a functional point of view it is still supported.

R=bmeurer@chromium.org
BUG=chromium:549000
LOG=n

Review URL: https://codereview.chromium.org/1418823005

Cr-Commit-Position: refs/heads/master@{#31654}
2015-10-29 13:38:56 +00:00
mstarzinger
747ff0ebf8 [turbofan] Add unit tests for ReduceJSCreateArguments.
R=jarin@chromium.org
TEST=unittests/JSTypedLoweringTest.JSCreateArguments

Review URL: https://codereview.chromium.org/1417983004

Cr-Commit-Position: refs/heads/master@{#31653}
2015-10-29 13:37:49 +00:00
mstarzinger
d3c4adfd78 [turbofan] Fix and rework deopt in call to super property.
This refactors the handling of calls of type Call::PROPERTY_CALL to
super properties in AstGraphBuilder::VisitCall. It ensures that the
operand stack is kept in sync with full-codegen so that deopts while
evaluating sub-expressions behave as expected.

R=rossberg@chromium.org
TEST=mjsunit/regress/regress-4521
BUG=v8:4521
LOG=n

Review URL: https://codereview.chromium.org/1426893003

Cr-Commit-Position: refs/heads/master@{#31652}
2015-10-29 12:32:49 +00:00
oth
dcf757a16f [Interpreter] Add support for for..in.
For..in introduces 3 new bytecodes ForInPrepare, ForInNext, and
ForInDone to start a for..in loop, get the next element, and check if
the loop is done.

For..in builds upon new LoopBuilder constructs for conditionally
breaking and continuing during iteration: BreakIf{Null|Undefined}
and ContinueIf{Null|Undefined}. New conditional jump bytecodes
support this succinctly: JumpIfNull and JumpIfUndefined.

Add missing check to BytecodeLabel that could allow multiple
forward referencess to the same label which is not supported.

BUG=v8:4280
LOG=N

Review URL: https://codereview.chromium.org/1422033002

Cr-Commit-Position: refs/heads/master@{#31651}
2015-10-29 12:06:24 +00:00
rmcilroy
76d730b9b2 [Interpreter] Ensure we save the BytecodeArray register properly in InterpreterEntryTrampoline builtin.
Ensure that we save the BytecodeArray register in the InterpreterEntryTrampoline
before calling out to the kStackGuard runtime function.

BUG=v8:4280
LOG=N

Review URL: https://codereview.chromium.org/1426863005

Cr-Commit-Position: refs/heads/master@{#31650}
2015-10-29 11:47:31 +00:00
hpayer
ce84bb2d3d [heap] Add histogram timers for incremental marking start and finalization event.
Review URL: https://codereview.chromium.org/1431443002

Cr-Commit-Position: refs/heads/master@{#31649}
2015-10-29 11:46:20 +00:00
hpayer
f555708c5e Revert of [heap] Decrease incremental marking finalization retry limit. (patchset #1 id:1 of https://codereview.chromium.org/1408183006/ )
Reason for revert:
crashes on webkit_unit_tests V8-Blink Linux 32

Original issue's description:
> [heap] Decrease incremental marking finalization retry limit.
>
> BUG=chromium:548562
> LOG=n
>
> Committed: https://crrev.com/c689f5759b46506c38c84f404ebd8dc326dcb76f
> Cr-Commit-Position: refs/heads/master@{#31647}

TBR=ulan@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:548562

Review URL: https://codereview.chromium.org/1428783004

Cr-Commit-Position: refs/heads/master@{#31648}
2015-10-29 11:45:11 +00:00
hpayer
c689f5759b [heap] Decrease incremental marking finalization retry limit.
BUG=chromium:548562
LOG=n

Review URL: https://codereview.chromium.org/1408183006

Cr-Commit-Position: refs/heads/master@{#31647}
2015-10-29 09:42:40 +00:00
mstarzinger
26fc85aae3 [turbofan] Cleanup RawMachineAssembler::Store interface.
R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/1424983003

Cr-Commit-Position: refs/heads/master@{#31646}
2015-10-29 09:22:25 +00:00
bmeurer
a0b8650e65 [turbofan] Initial support for transitioning stores.
Add support for stores that transition to writable data fields,
based on the BeginRegion/FinishRegion mechanism for atomic regions
in the scheduler.

This is early work and still a bit rough around the edges, and similar
to regular stores, we don't support transitioning stores to double
fields yet.

R=jarin@chromium.org
BUG=v8:4470
LOG=n

Review URL: https://codereview.chromium.org/1406153010

Cr-Commit-Position: refs/heads/master@{#31645}
2015-10-29 09:06:25 +00:00
adamk
40f43c91a5 Inline single test-only call of Scope::LookupThis method
R=littledan@chromium.org

Review URL: https://codereview.chromium.org/1430643003

Cr-Commit-Position: refs/heads/master@{#31644}
2015-10-29 06:39:51 +00:00
yangguo
6812883494 Introduce string/regexp related public symbols.
R=littledan@chromium.org
BUG=v8:4305, v8:4343, v8:4344, v8:4345
LOG=N

Review URL: https://codereview.chromium.org/1424113003

Cr-Commit-Position: refs/heads/master@{#31643}
2015-10-29 05:24:55 +00:00
bmeurer
e933b091df [runtime] Refactor Object::Equals to make exception cases explicit.
R=littledan@chromium.org
BUG=v8:3593
LOG=n

Review URL: https://codereview.chromium.org/1407233013

Cr-Commit-Position: refs/heads/master@{#31642}
2015-10-29 04:41:22 +00:00
littledan
7736f47460 Stage ES2015 ToLength semantics
Many places in the JavaScript standard library are changed in ES2015 from
getting an integer using ToUint32 to using ToLength. This patch stages
the flag turning on those new semantics.

BUG=v8:3087,v8:4244
LOG=Y
R=adamk

Review URL: https://codereview.chromium.org/1426673003

Cr-Commit-Position: refs/heads/master@{#31641}
2015-10-28 21:15:01 +00:00
littledan
700bbdc673 Avoid calling %AddElement with a number out of array index range
This patch wraps callsites to %AddElement to fall back to adding a
named property in case it is given an argument of 2**32 or greater.
The change is needed because %AddElement is called by Array functions
in various places, and ES2015 changes these Array functions to use
ToLength rather than ToUint32, so several callsites of %AddElement
which used to be reliable array indices may be larger numbers. While
the proper long-term solution may be to call out to
Object.defineProperty, this fix should allow the ToLength semantics
to be shipped while preserving correctness and not requiring a
rewrite.

BUG=v8:4516
LOG=Y
R=adamk
TEST=Interactively ran Array.prototype.slice on an Array-like which
exceeded array bounds, and found that this did not check-fail at
runtime as it did before.
Microbenchmarked this technique against the previous version on a
simple reverse implementation and found at most a 1% slowdown, as
opposed to other techniques, like calling %DefineDataPropertyUnchecked,
which had a 20% slowdown or Object.defineProperty with a 80% slowdown.

Review URL: https://codereview.chromium.org/1420663003

Cr-Commit-Position: refs/heads/master@{#31640}
2015-10-28 20:37:15 +00:00
hpayer
1243ce0bb5 [heap] Clean-up incrementally finalize marking.
Review URL: https://codereview.chromium.org/1424233002

Cr-Commit-Position: refs/heads/master@{#31639}
2015-10-28 18:27:53 +00:00
dusan.m.milosavljevic
4cd3c16967 MIPS64: Fix missing DIVU,MODU,MULU,MUHU r6 instructions in simulator.
TEST=cctest/test-run-machops/RunUint32MulHighP,RunUint32DivP
BUG=

Review URL: https://codereview.chromium.org/1425003003

Cr-Commit-Position: refs/heads/master@{#31638}
2015-10-28 17:32:26 +00:00
jkummerow
406f557721 API: Let v8::Object::DefineOwnProperty use new C++ implementation
Now that we have a C++ implementation, calling into JS builtins is needlessly inefficient.

Review URL: https://codereview.chromium.org/1410553006

Cr-Commit-Position: refs/heads/master@{#31637}
2015-10-28 16:49:17 +00:00
adamk
720c531a70 Remove --harmony-new-target flag
It was shipped in M46 without incident.

Review URL: https://codereview.chromium.org/1411723007

Cr-Commit-Position: refs/heads/master@{#31636}
2015-10-28 16:47:08 +00:00
adamk
a4689fc21f Remove flags for spread calls and arrays
These features shipped in M46 without issue.

Review URL: https://codereview.chromium.org/1429653006

Cr-Commit-Position: refs/heads/master@{#31635}
2015-10-28 15:57:27 +00:00
mstarzinger
161a0462fb [turbofan] Enable general purpose inlining.
R=bmeurer@chromium.org,hablich@chromium.org
BUG=v8:4493
LOG=n

Review URL: https://codereview.chromium.org/1416873007

Cr-Commit-Position: refs/heads/master@{#31634}
2015-10-28 15:43:33 +00:00