Commit Graph

488 Commits

Author SHA1 Message Date
arv
ea463a916b [es6] Object.getPrototypeOf should work with values
The final spec for Object.getPrototypeOf calls ToObject on the
parameter, which means that it should only throw for null and
undefined. For other non object values the prototype of the wrapper
should be used.

BUG=v8:3964
LOG=N
R=adamk, rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27354}
2015-03-23 08:40:47 +00:00
caitpotter88
fd51f615eb [es6] remove --harmony-templates flag
BUG=v8:3230
R=dslomov@chromium.org, arv@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27352}
2015-03-23 07:01:48 +00:00
caitpotter88
bef80fcfd7 [es6] generate rest parameters correctly for subclass constructors
BUG=v8:3977
R=dslomov@chromium.org, arv@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27344}
2015-03-20 14:07:16 +00:00
rossberg
d0e20d8221 [harmony] Move some regression tests to the right place
TBR=dslomov@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27339}
2015-03-20 11:03:14 +00:00
dslomov
af04fdfec8 Remove harmony-strings flag.
String functions are shipping since 4.1/Chrome M41, it is time to unflag.

R=yanngguo@chromium.org,rossberg@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27337}
2015-03-20 10:43:38 +00:00
caitpotter88
d21fd15467 [es6] implement Reflect.apply() & Reflect.construct()
BUG=v8:3900
LOG=N
R=dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27316}
2015-03-19 14:47:27 +00:00
rossberg
7875a89122 Adjust key behaviour for weak collections
R=dslomov@chromium.org
BUG=460083,v8:3970,v8:3971
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27272}
2015-03-18 12:51:58 +00:00
dslomov
92138c73a7 Remove --harmony-scoping flag.
We have been shipping harmony scoping for 2 Chrome releases now (M41
and M42). Time to remove the flag.

R=rossberg@chromium.org
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27187}
2015-03-13 15:15:57 +00:00
caitpotter88
1aae3a1c89 [es6] support template literals after MemberExpression
BUG=v8:3958, 450942
LOG=N
R=arv@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27159}
2015-03-12 14:02:04 +00:00
dcarney
040225a315 handle the special snowflakes that are Integer Indexed Exotic objects
the implementation doesn't yet throw on strict mode assignment

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27121}
2015-03-10 19:11:20 +00:00
arv
8d946b9c3f [es6] Throw TypeError for computed static prototype property name
The prototype of a class constructor function is read only. When we set
computed property names we were ignoring this and we were overriding the
property.

Since the prototype is the only possible own read only property on the
constructor function object we special case this so we do not have to
check this for every property in the class literal.

BUG=v8:3945
LOG=N
R=mstarzinger@chromium.org, dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27106}
2015-03-10 14:14:38 +00:00
rossberg
2ecdf736cf Fix exception for assignment to uninitialised const
R=dslomov@chromium.org, mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27014}
2015-03-05 12:44:01 +00:00
dslomov
1604bd46bf Implement subclassing Arrays.
R=mvstanton@chromium.org,arv@chromium.org,rossberg@chromium.org
BUG=v8:3930
LOG=Y

Committed: https://crrev.com/6898da1a28d64d1fb2962804ba566f6d618ffc70
Cr-Commit-Position: refs/heads/master@{#26960}

Committed: https://crrev.com/8d29cc11a56e77297792fe100986a80b65de0051
Cr-Commit-Position: refs/heads/master@{#26963}

Committed: https://crrev.com/0705045b50a29cf1273e9e6b86fe6a627d8dcb43
Cr-Commit-Position: refs/heads/master@{#26966}

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

Cr-Commit-Position: refs/heads/master@{#26972}
2015-03-03 18:45:02 +00:00
rossberg
054989bd04 [es6] Fix for-const loops
R=dslomov@chromium.org
BUG=3983
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26971}
2015-03-03 18:34:40 +00:00
dslomov
9ff21de548 Revert of Implement subclassing Arrays. (patchset #8 id:130001 of https://codereview.chromium.org/975463002/)
Reason for revert:
Arm compilation again.

Aaaarrrrrghhhhhh!!!

Original issue's description:
> Implement subclassing Arrays.
>
> R=mvstanton@chromium.org,arv@chromium.org,rossberg@chromium.org
> BUG=v8:3930
> LOG=Y
>
> Committed: https://crrev.com/6898da1a28d64d1fb2962804ba566f6d618ffc70
> Cr-Commit-Position: refs/heads/master@{#26960}
>
> Committed: https://crrev.com/8d29cc11a56e77297792fe100986a80b65de0051
> Cr-Commit-Position: refs/heads/master@{#26963}
>
> Committed: https://crrev.com/0705045b50a29cf1273e9e6b86fe6a627d8dcb43
> Cr-Commit-Position: refs/heads/master@{#26966}

TBR=arv@chromium.org,mvstanton@chromium.org,rossberg@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3930

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

Cr-Commit-Position: refs/heads/master@{#26969}
2015-03-03 17:48:12 +00:00
dslomov
0705045b50 Implement subclassing Arrays.
R=mvstanton@chromium.org,arv@chromium.org,rossberg@chromium.org
BUG=v8:3930
LOG=Y

Committed: https://crrev.com/6898da1a28d64d1fb2962804ba566f6d618ffc70
Cr-Commit-Position: refs/heads/master@{#26960}

Committed: https://crrev.com/8d29cc11a56e77297792fe100986a80b65de0051
Cr-Commit-Position: refs/heads/master@{#26963}

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

Cr-Commit-Position: refs/heads/master@{#26966}
2015-03-03 17:14:14 +00:00
dslomov
7bf9ef1e39 Revert of Implement subclassing Arrays. (patchset #7 id:110001 of https://codereview.chromium.org/975463002/)
Reason for revert:
Arm buildre complains again (why v8_linux_arm_dbg does not complain?)

Original issue's description:
> Implement subclassing Arrays.
>
> R=mvstanton@chromium.org,arv@chromium.org,rossberg@chromium.org
> BUG=v8:3930
> LOG=Y
>
> Committed: https://crrev.com/6898da1a28d64d1fb2962804ba566f6d618ffc70
> Cr-Commit-Position: refs/heads/master@{#26960}
>
> Committed: https://crrev.com/8d29cc11a56e77297792fe100986a80b65de0051
> Cr-Commit-Position: refs/heads/master@{#26963}

TBR=arv@chromium.org,mvstanton@chromium.org,rossberg@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3930

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

Cr-Commit-Position: refs/heads/master@{#26965}
2015-03-03 16:41:52 +00:00
dslomov
8d29cc11a5 Implement subclassing Arrays.
R=mvstanton@chromium.org,arv@chromium.org,rossberg@chromium.org
BUG=v8:3930
LOG=Y

Committed: https://crrev.com/6898da1a28d64d1fb2962804ba566f6d618ffc70
Cr-Commit-Position: refs/heads/master@{#26960}

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

Cr-Commit-Position: refs/heads/master@{#26963}
2015-03-03 16:10:41 +00:00
mvstanton
01e2ba6e19 Revert of Implement subclassing Arrays. (patchset #6 id:90001 of https://codereview.chromium.org/975463002/)
Reason for revert:
ARM build failure...

Original issue's description:
> Implement subclassing Arrays.
>
> R=mvstanton@chromium.org,arv@chromium.org,rossberg@chromium.org
> BUG=v8:3930
> LOG=Y
>
> Committed: https://crrev.com/6898da1a28d64d1fb2962804ba566f6d618ffc70
> Cr-Commit-Position: refs/heads/master@{#26960}

TBR=arv@chromium.org,rossberg@chromium.org,dslomov@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3930

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

Cr-Commit-Position: refs/heads/master@{#26961}
2015-03-03 14:56:09 +00:00
dslomov
6898da1a28 Implement subclassing Arrays.
R=mvstanton@chromium.org,arv@chromium.org,rossberg@chromium.org
BUG=v8:3930
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26960}
2015-03-03 13:40:39 +00:00
dslomov
290ee378ea Disallow subclassing Arrays.
R=rossberg@chromium.org,arv@chromium.org
BUG=v8:3930
LOG=Y

Committed: https://crrev.com/87f3e08e72510ee5544e82bb7ad39b2b5f001ad3
Cr-Commit-Position: refs/heads/master@{#26925}

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

Cr-Commit-Position: refs/heads/master@{#26931}
2015-02-28 00:28:35 +00:00
dslomov
65abdb7e4e Revert of Regression test for v8:3930. (patchset #1 id:1 of https://codereview.chromium.org/961353002/)
Reason for revert:
Fails on nosnap builds

Original issue's description:
> Regression test for v8:3930.
>
> R=arv@chromium.org,rossberg@chromium.org
> BUG=v8:3930
> LOG=N
>
> Committed: https://crrev.com/48fb3e83c5882e9818bc1e0a035864b465602aca
> Cr-Commit-Position: refs/heads/master@{#26926}

TBR=arv@chromium.org,rossberg@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3930

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

Cr-Commit-Position: refs/heads/master@{#26929}
2015-02-27 22:24:41 +00:00
arv
4b830859b7 Fix block-for test
The test didn't call the test function.

BUG=v8:3932
LOG=N
TBR=ulan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26927}
2015-02-27 21:22:48 +00:00
dslomov
48fb3e83c5 Regression test for v8:3930.
R=arv@chromium.org,rossberg@chromium.org
BUG=v8:3930
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26926}
2015-02-27 21:21:43 +00:00
arv
392b591e0c Fix issue with class name TDZ in computed property names
BUG=v8:3923
LOG=N
R=marja,rossberg

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

Cr-Commit-Position: refs/heads/master@{#26892}
2015-02-26 18:37:19 +00:00
arv
75a2440982 Minor test fix to block binding
The test did not invoke the function

BUG=v8:3921
LOG=N
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#26869}
2015-02-25 23:27:14 +00:00
rossberg
68c8073a51 Remove effectful assertion
R=mstarzinger@chromium.org
BUG=461520
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26857}
2015-02-25 15:34:21 +00:00
arv
0cffc08b66 Super store
When the property is not found on the [[HomeObject]] prototype chain
then we should do a [[DefineOwnProperty]] on the instance.

BUG=v8:3330
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26754}
2015-02-19 16:15:35 +00:00
caitpotter88
ea3f39486c [tests]: fix exponentiation in harmony array-concat tests
BUG=
LOG=N
R=adamk@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26710}
2015-02-17 22:28:12 +00:00
caitpotter88
8bb2e39774 Implement ES6 rest parameters
LOG=Y
BUG=v8:2159
R=dslomov@chromium.org, arv@chromium.org, marja@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26645}
2015-02-14 00:15:12 +00:00
arv
765e002a4f Fix lazy parsing for functions that use super.
The preparser needs to log the usage of super properties and then update
the scope when we create the function later.

BUG=v8:3888
LOG=N
R=dslomov@chromium.org, marja

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

Cr-Commit-Position: refs/heads/master@{#26642}
2015-02-13 18:35:09 +00:00
Erik Arvidsson
1dcce1c8ef Make super() a syntax error in base class constructor
BUG=v8:3330
LOG=N
R=dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26633}
2015-02-12 23:04:54 +00:00
Dmitry Lomov
7866f00508 Remove --experimental-classes flag and related dead code.
R=arv@chromium.org
BUG=v8:3834
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26631}
2015-02-12 20:07:15 +00:00
Dmitry Lomov
2707d4c9f4 new classes: no longer experimental.
This CL fixes tests that no longer valid and also fixes two issues:
1. 'super()' in non derived constructors.
2. Failure to step into derived constructors.

R=arv@chromium.org, yurys@chromium.org
BUG=v8:3834
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26628}
2015-02-12 18:06:52 +00:00
dslomov
fdcf3e59ba new classes: implement correct check for uninitialized this in 'super()'
R=arv@chromium.org
BUG=v8:3834
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26599}
2015-02-11 20:47:32 +00:00
dslomov
9b158fa79a new classes: implement default constructors.
R=arv@chromium.org,rossberg@chromium.org
BUG=v8:3834
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26594}
2015-02-11 17:23:00 +00:00
arv
b5e235661f Fix issue with super and computed property names
We did not set up the [[HomeObject]] for properties created for
computed property names.

BUG=v8:3879
LOG=N
R=dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26586}
2015-02-11 15:13:12 +00:00
dslomov
bf49be39f3 new classes: implement new.target passing to superclass constructor.
R=arv@chromium.org,rossberg@chromium.org
BUG=v8:3834
LOG=N

Committed: https://crrev.com/8aed43e82c6d2742fe5988603cb8841324cc942b
Cr-Commit-Position: refs/heads/master@{#26560}

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

Cr-Commit-Position: refs/heads/master@{#26572}
2015-02-11 09:47:51 +00:00
dslomov
8e4ec9dd13 Revert of new classes: implement new.target passing to superclass constructor. (patchset #9 id:150001 of https://codereview.chromium.org/908883002/)
Reason for revert:
Breaks Linux64 release

Original issue's description:
> new classes: implement new.target passing to superclass constructor.
>
> R=arv@chromium.org,rossberg@chromium.org
> BUG=v8:3834
> LOG=N
>
> Committed: https://crrev.com/8aed43e82c6d2742fe5988603cb8841324cc942b
> Cr-Commit-Position: refs/heads/master@{#26560}

TBR=arv@chromium.org,rossberg@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3834

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

Cr-Commit-Position: refs/heads/master@{#26561}
2015-02-11 01:36:32 +00:00
dslomov
8aed43e82c new classes: implement new.target passing to superclass constructor.
R=arv@chromium.org,rossberg@chromium.org
BUG=v8:3834
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26560}
2015-02-11 01:23:11 +00:00
arv
68e4897586 Remove Function.prototype.toMethod
Function.prototype.toMethod was removed from ES6.

This removes the function and updates the tests to either
use %ToMethod or a dedicated syntax (using concise method
or a class).

BUG=v8:3330
LOG=N
R=dslomov@chromium.org, adamk

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

Cr-Commit-Position: refs/heads/master@{#26559}
2015-02-10 22:13:43 +00:00
arv
9acfd4fe08 super is only allowed in methods, accessors and constructor
super() is only allowed in a class constructor.
super.p is allowed in methods, accessors and constructors.

The parser now checks the FunctionState to see what kind of function
we are currently inside.

BUG=v8:3330
LOG=N
R=dslomov@chromium.org, marja@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26557}
2015-02-10 19:51:39 +00:00
adamk
a18b797fd9 Enable compiling mjsunit tests as ES6 modules
Adding the line "// MODULE" to an mjsunit file will now cause
run-tests.py to prefix the test case with "--module" in the
d8 commandline.

d8 has itself been updated to treat files preceded with "--module" as
modules (that is, it compiles them with ScriptCompiler::CompileModule,
and turns on --harmony-modules).

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

Cr-Commit-Position: refs/heads/master@{#26555}
2015-02-10 19:11:55 +00:00
dcarney
9896fab0df fix transition of typedarrays in ics
R=verwaest@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26518}
2015-02-09 09:50:15 +00:00
arv
64abe65210 Allow eval and arguments as property names
We incorrectly disallowed eval and arguments in accessor and method
names. This was because we checked the name inside the
ParseFunctionLiteral. We now flag accessors so that lazy parsing of
these functions are treated correctly.

BUG=v8:1984
R=adamk, dslomov@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26497}
2015-02-06 18:04:21 +00:00
dslomov
158a87659f new classes: assert that constructors are not callable and rewrite 'return;'
R=arv@chromium.org
BUG=v8:3834
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26483}
2015-02-06 10:35:13 +00:00
Erik Arvidsson
b67b3c5401 Accessor functions should have no prototype property
This also removes some convenience functions that were not used.

BUG=v8:3700
LOG=N
R=adamk@chromium.org, adamk

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

Cr-Commit-Position: refs/heads/master@{#26472}
2015-02-05 23:34:28 +00:00
marja
299b369cc9 Split --harmony-unicode and --harmony-unicode-regexps.
This way we can ship \u{..} escapes in strings / identifiers before shipping /u
regexps.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26461}
2015-02-05 14:17:09 +00:00
arv
176b68d11a Class methods should be non enumerable
Class methods and accessors (both prototype and static) should be
non enumerable.

BUG=v8:3330
LOG=Y
R=dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26437}
2015-02-04 17:23:17 +00:00
dslomov
275e088abe Fix assertion in full codegen for holed 'this'.
R=rossberg@chromium.org
BUG=chromium:455141
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26423}
2015-02-04 12:14:33 +00:00