Commit Graph

25729 Commits

Author SHA1 Message Date
littledan
76da493315 Extend Annex B 3.3 sloppy-mode block-scoped hoisting to scripts, eval
The ES2015 spec is missing an extension of sloppy-mode block-scoped function
behavior to the global scope in scripts, as well as to eval. This patch
brings that hoisting to those two areas. The behavior is not perfectly
spec-compliant since properties created on the global scope should be
set as enumerable even if they are non-enumerable previously, but the
attributes will not be modified if the property already exists under
this patch.

BUG=v8:4441
LOG=Y
R=adamk
TEST=reddit comment functionality seems to be fixed

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

Cr-Commit-Position: refs/heads/master@{#31037}
2015-09-30 23:48:34 +00:00
mbrandy
6fb3708d68 PPC: Full code shouldn't embed the type feedback vector.
Port c90c60ba26

Original commit message:
    Make sure to always reference it indirectly. This allows us to make the vector
    native-context dependent should we wish.

R=mvstanton@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31036}
2015-09-30 21:16:46 +00:00
mbrandy
aeefe1013d PPC: Introduce LiteralsArray to hide it's implementation.
Port d8cdd6956a

Original commit message:
    The LiteralsArray will soon hold a type feedback vector. Code treats it as an
    ordinary fixed array, and needs to stop that.

R=mvstanton@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31035}
2015-09-30 21:10:35 +00:00
mbrandy
96d6fcffa5 PPC: [es6] Fix invalid ToString in implementation of ToName.
Port 09626525fe

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31034}
2015-09-30 21:09:35 +00:00
mbrandy
8de7235caf PPC: [turbofan] Call ArgumentsAccessStub to materialize arguments.
Port 9b12ec9ac2

Original commit message:
    This lowers JSCreateArgument nodes to call the ArgumentsAccessStub for
    help with materializing arguments objects when possible. Along the way
    this changes the calling convention of said stub to take parameters in
    registers instead of on the stack.

R=mstarzinger@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31033}
2015-09-30 21:07:30 +00:00
adamk
c2c6323218 Two minor cleanups in pattern rewriter
- No need to call AsVariableProxy() on a VariableProxy
- Reduce AST visitor boilerplate using pre-existing macro
  (and re-alphabetize the list of non-patterns).

R=littledan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31032}
2015-09-30 20:22:46 +00:00
adamk
163419e8fa Remove --harmony-arrow-functions flag
Arrow functions have been enabled by default since the 4.5 branch.

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

Cr-Commit-Position: refs/heads/master@{#31031}
2015-09-30 19:50:40 +00:00
adamk
51d28914bd [es6] Function constructor-created functions should be named "anonymous"
Besides matching the spec, this matches the behavior of Firefox and Edge.

BUG=v8:3699
LOG=n
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#31030}
2015-09-30 19:20:04 +00:00
adamk
bab3b55082 Revert "Stage sloppy block-scoped functions (Annex B 3.3)"
The current implemention breaks sloppy mode code that uses function
declarations inside blocks at top-level. Work is ongoing on a patch
to fix this issue, but in the meantime it seems reasonable to move
the feature out of staging.

Manual revert of commit 6e07f5a75b.

R=littledan@chromium.org
BUG=chromium:535836
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#31029}
2015-09-30 19:17:41 +00:00
kozyatinskiy
ce54e16270 [V8] Add name of function for function's closure scope
Added ScopeDetails.name field for closure scopes. It contains function's debug name of current context of scope.

BUG=493156
LOG=Y
R=yurys@chromium.org,yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31028}
2015-09-30 17:24:33 +00:00
mbrandy
623e802132 PPC: [es6] Introduce spec compliant IsConstructor.
Port 8fe3ac0701

Original commit message:
    There was already a bit on the Map named "function with prototype",
    which basically meant that the Map was a map for a JSFunction that could
    be used as a constructor. Now this CL generalizes that bit to
    IsConstructor, which says that whatever (Heap)Object you are looking at
    can be used as a constructor (i.e. the bit is also set for bound
    functions that can be used as constructors and proxies that have a
    [[Construct]] internal method).

    This way we have a single chokepoint for IsConstructor checking, which
    allows us to get rid of the various ways in which we tried to guess
    whether something could be used as a constructor or not.

    Drive-by-fix: Renamed IsConstructor on FunctionKind to
    IsClassConstructor to resolve the weird name clash, and the
    IsClassConstructor name also matches the spec.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=v8:4413, v8:4430
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31027}
2015-09-30 17:01:21 +00:00
mbrandy
aa30d4e29d PPC: [runtime] Remove weird pushing of something on StackOverflow.
Port 556b522ac6

Original commit message:
    We somehow try to push some stuff on the stack when we detect a stack
    overflow, that we don't need. Even worse we might access outside the
    valid stack bounds. Since we don't need this, it's gone.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=chromium:534881
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31026}
2015-09-30 16:30:21 +00:00
mbrandy
ba79bd48c2 PPC: [builtin] Refactor Invoke to deal with any kind of callable.
Port 634d1d86d8

Original commit message:
    Now both Execution::Call and Execution::New can deal with any
    kind of target and will raise a proper exception if the target is not
    callable (which is not yet spec compliant for New, as we would
    have to check IsConstructor instead, which we don't have yet).

    Now we no longer need to do any of these weird call/construct
    delegate gymnastics in C++, and we finally have a single true
    bottleneck for Call/Construct abstract operations in the code
    base, with only a few special handlings left in the compilers to
    optimize the JSFunction case.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=v8:4430, v8:4413
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31025}
2015-09-30 16:28:55 +00:00
jkummerow
b4b69fd9c0 Teach JSReceiver::GetKeys() how to include symbols
No users of that functionality yet, those will come separately.

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

Cr-Commit-Position: refs/heads/master@{#31024}
2015-09-30 15:00:32 +00:00
jkummerow
e3833fdce2 Add LookupIterator constructor for arbitrary Object keys
Continuing unification of properties/elements handling, the new
LookupIterator::PropertyOrElement(..., Handle<Object> key, ...) takes
any Object and does the required ToPrimitive/ToName/ToArrayIndex
conversions on it.

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

Cr-Commit-Position: refs/heads/master@{#31023}
2015-09-30 14:51:56 +00:00
neis
66660ab02b Reland "Clean up rewriter" (issue 1362333002).
R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31022}
2015-09-30 14:43:30 +00:00
neis
4620029c4b Make AstPrinter print position information.
R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31021}
2015-09-30 14:23:06 +00:00
machenbach
9a03979dc9 [swarming] Only isolate d8 with target toolset.
BUG=chromium:535160,chromium:537247
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31020}
2015-09-30 13:48:26 +00:00
mstarzinger
6a769ac1df [presubmit] Enable readability/namespace linter checking.
This enables linter checking for "readability/namespace" violations
during presubmit and instead marks the few known exceptions that we
allow explicitly.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31019}
2015-09-30 13:47:11 +00:00
cbruni
4988e42ef7 JSObject::GetEnumProperty cleanup
BUG=

Committed: https://crrev.com/a00d47c802f93cf9835eafce4c9da2dd10b44f6a
Cr-Commit-Position: refs/heads/master@{#30946}

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

Cr-Commit-Position: refs/heads/master@{#31018}
2015-09-30 12:49:25 +00:00
mstarzinger
9e0e7273c6 [heap] Less aggressive inlining of IncrementalMarking code.
This moves some methods of IncrementalMarking from the inlined header
into the compilation unit. The methods in question are either not hot
or are being called through a non-inline function already.

R=hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31017}
2015-09-30 08:24:10 +00:00
ofrobots
759591dae7 remove unused Debug::has_break_points_
Previous debug refactoring changes removed uses of has_break_points_, but
omitted removing the field itself. This is not necessary anymore.

R=yangguo@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31016}
2015-09-30 06:02:35 +00:00
chunyang.dai
f059762e74 X87: Introduce LiteralsArray to hide it's implementation.
port d8cdd6956a (r31000).

original commit message:

    The LiteralsArray will soon hold a type feedback vector. Code treats it as an
    ordinary fixed array, and needs to stop that.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31015}
2015-09-30 05:37:36 +00:00
v8-autoroll
f3c89267db Update V8 DEPS.
Rolling v8/tools/clang to 0150e39a3112dbc7e4c7a3ab25276b8d7781f3b6

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

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

Cr-Commit-Position: refs/heads/master@{#31014}
2015-09-30 03:24:56 +00:00
akos.palfi
d7f813b4da GYP: Don't pass -Wno-format-pedantic to GCC.
This flag is not understood correctly by GCC and breaks the GCC ARM and MIPS optdebug builds.

Patch from Brendan Kirby <brendan.kirby@imgtec.com>

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31013}
2015-09-29 22:10:25 +00:00
mlippautz
5ff8a18979 [api] Avoid recursive GCs through reaching external allocation limit
See bug description.

BUG=chromium:536231
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31012}
2015-09-29 19:17:34 +00:00
dusan.m.milosavljevic
8bd431de92 MIPS64: Add big-endian support for mips64.
TEST=
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31011}
2015-09-29 17:23:55 +00:00
mstarzinger
ddafe2c494 [heap] No leakage of incremental-marking.h outside of heap.
This prevents the internal incremental-marking.h to be usable outisde
of the "heap" directory. The logic inside that component is only useful
within the GC and is now properly encapsulated.

R=hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31010}
2015-09-29 16:59:16 +00:00
mstarzinger
8dfe18559c [turbofan] Pass scope infos as static operator parameters.
This changes the operators for JSCreate[Block|Script]Context to take
their ScopeInfo as a static parameter as opposed to a value input and
in turn allows for easier access to that parameter during lowerings.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31009}
2015-09-29 15:53:28 +00:00
jacob.bramley
f20d646152 [arm] Fix a double-register push operation.
It is not safe to access memory below sp, and this is also forbidden by
the ABI. When pushing, we must either use an atomic operation (such as
vstm+db_w) or move sp before writing the data.

This patch fixes one stack access, and also adds vpush and vpop helpers
to simplify similar code.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31008}
2015-09-29 15:11:30 +00:00
mstarzinger
1d03fc17b4 [turbofan] Remove obsolete helpers from graph verifier.
The NodeProperties helpers are here to stay and won't go away anytime
soon. This removes a TODO from the graph verifier in that regard.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31007}
2015-09-29 14:42:51 +00:00
jarin
904ac0ae2c [turbofan] Make string comparisons effectful.
BUG=v8:4446
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31006}
2015-09-29 14:39:01 +00:00
jarin
d06930fc4b [turbofan] Make Strict(Not)Equal, TypeOf, ToBoolean, UnaryNot effectful.
This is necessary because these operators can read heap (equality can actually write heap when flattening strings).

BUG=v8:4446
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31005}
2015-09-29 13:51:33 +00:00
mlippautz
92a7012b8b [heap] Remove NewSpace::set_top and the corresponding hack
- Remove the hack the resets the new space top pointer from SeqString::Truncate.
- Remove NewSpace::set_top completely as there are no callers (and there should
  be no!)

R=hpayer@chromium.org
BUG=chromium:536163
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31004}
2015-09-29 13:07:39 +00:00
ishell
134180d494 AST pretty printer fix.
It was broken by https://codereview.chromium.org/1376443002.

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

Cr-Commit-Position: refs/heads/master@{#31003}
2015-09-29 12:23:03 +00:00
vogelheim
ed110a1715 Allow JavaScript accessors on API objects.
(This is somewhat experimental; hence protected by #ifdef.)

R=epertoso@chromium.org, jochen@chromium.org
BUG=chromium:508898
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31002}
2015-09-29 11:16:14 +00:00
hablich
46579c0b74 [Docs] Fix formatting errors in migrated content
NOTRY=true
NOPRESUBMIT=true
R=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31001}
2015-09-29 10:17:05 +00:00
mvstanton
d8cdd6956a Introduce LiteralsArray to hide it's implementation.
The LiteralsArray will soon hold a type feedback vector. Code treats it as an
ordinary fixed array, and needs to stop that.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31000}
2015-09-29 10:15:39 +00:00
hablich
02af9b8da6 [Docs] Adding information about general triaging
R=machenbach@chromium.org
NOPRESUBMIT=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#30999}
2015-09-29 09:38:20 +00:00
hpayer
ce28d019eb [heap] Reland Remove retry space from AllocateRaw.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30998}
2015-09-29 09:08:22 +00:00
cbruni
eecf6cbd97 [cctest] adding --help option to output basic information about cctest
[run-tests.py]
- adding more detailed information about the flags
- show more detailed error message on failing Popen commands

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30997}
2015-09-29 08:41:43 +00:00
yurys
4fd8c327de Tell MSAN that profiler doesn't expect sp to point at initialized memory
BUG=v8:4444,v8:4151
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30996}
2015-09-29 08:19:04 +00:00
mstarzinger
3bb0174330 [heap] Cleanup string factory methods a bit.
This is mostly removing dead code and also dropping MUST_USE_RESULT
annotations from methods that cannot throw an exception anyways.

R=hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30995}
2015-09-29 08:08:30 +00:00
jacob.bramley
0a844bc0dc Fix Frame::AlignSavedCalleeRegisterSlots
The return value is expected to be the number of padding slots added to the frame. However, the original logic would return -1 if padding was required, so insufficient stack space would be reserved.

This function now returns either 0 or 1, as the existing calling code expects.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30994}
2015-09-29 07:49:00 +00:00
bmeurer
93b2b2622b [es6] Introduce %ToInteger and %ToLength.
This adds ES6 compliant Object::ToInteger, Object::ToInt32,
Object::ToUint32 and Object::ToLength, and replaces the old
Execution wrappers of those abstract operations (which were
not using the correct ToPrimitive).

This also introduces proper %ToInteger and %ToLength runtime
entries, with a fast path %_ToInteger supported in fullcodegen
and Crankshaft (for now). Internal JavaScript code should use
TO_INTEGER and TO_LENGTH respectively.

CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_layout_dbg,v8_linux_nosnap_dbg
BUG=v8:4307
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30993}
2015-09-29 07:41:13 +00:00
machenbach
2839811584 Revert of Clean up rewriter. (patchset #3 id:40001 of https://codereview.chromium.org/1362333002/ )
Reason for revert:
[Sheriff] Seems to break layout tests:
http://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/2073

https://storage.googleapis.com/chromium-layout-test-archives/V8-Blink_Linux_64/2073/layout-test-results/results.html

Please request rebaseline upstream first.

Original issue's description:
> Clean up rewriter.
>
> The main changes are:
> - Fix treatment of loops, which was incorrect and sometimes resulted in
>   the wrong completion value.
> - Get rid of unnecessary variables.
>
> This is in preparation of implementing ES6 completion semantics.
>
> R=rossberg
> BUG=
>
> Committed: https://crrev.com/b466dc14791844b7ae6d1e9ebd00a778965c206d
> Cr-Commit-Position: refs/heads/master@{#30981}

TBR=rossberg@chromium.org,neis@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30992}
2015-09-29 04:53:13 +00:00
bmeurer
6529971a7f Revert of [heap] Remove retry space from AllocateRaw. (patchset #3 id:40001 of https://codereview.chromium.org/1370123002/ )
Reason for revert:
Breaks arm64 nosnap simulator (bogus cctest?): https://chromegw.corp.google.com/i/client.v8/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20nosnap%20-%20debug%20-%201/builds/2934/steps/Bisect%202786ceec.Retry/logs/IncrementalWriteBarri..

Original issue's description:
> [heap] Remove retry space from AllocateRaw.
>
> BUG=
>
> Committed: https://crrev.com/2786ceec1eb491494d24d29a59eefbe3b6704be2
> Cr-Commit-Position: refs/heads/master@{#30984}

TBR=mstarzinger@chromium.org,hpayer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30991}
2015-09-29 04:40:02 +00:00
mtrofin
d5a9dd6539 [turbofan] Greedy: smarter last resort splitting.
When all heuristics fail, we run a "last resort" heuristic. Before, it was
splitting at the first found splittable position either before or after a
use position. That turns out to be too naive: it may split in loops, when
alternative split positions exist outside loops.

This change chooses a "before" use case location that is outside the
loop.

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

Cr-Commit-Position: refs/heads/master@{#30990}
2015-09-29 03:47:35 +00:00
v8-autoroll
5a13102df9 Update V8 DEPS.
Rolling v8/buildtools to e7111440c07a883b82ffbbe6d26c744dfc6c9673

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

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

Cr-Commit-Position: refs/heads/master@{#30989}
2015-09-29 03:23:52 +00:00
chunyang.dai
22a38d7252 X87: [es6] Fix invalid ToString in implementation of ToName.
port 09626525fe (r30957).

original commit message:

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30988}
2015-09-29 02:21:08 +00:00