caitpotter88
48054170e9
Implement ES6 @@isConcatSpreadable / Array.prototype.concat
...
Add support for Symbol.isConcatSpreadable in Array.prototype.concat. This enables spreading non-Array objects with the symbol.
LOG=N
R=dslomov@chromium.org
BUG=
Review URL: https://codereview.chromium.org/771483002
Cr-Commit-Position: refs/heads/master@{#25808}
2014-12-12 18:38:48 +00:00
caitpotter88
17ba366bb8
Implement Array.from()
...
A helpful utility which converts iterables and array-like objects into Arrays
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from
LOG=Y
BUG=v8:3336
R=arv@chromium.org , rossberg@chromium.org
Review URL: https://codereview.chromium.org/363833006
Cr-Commit-Position: refs/heads/master@{#25785}
2014-12-11 17:16:27 +00:00
mathiasb
33f0cf5acd
Implement the RegExp.prototype.flags
getter
...
TEST=mjsunit/harmony
BUG=v8:3751
LOG=N
Review URL: https://codereview.chromium.org/770333005
Cr-Commit-Position: refs/heads/master@{#25762}
2014-12-10 20:41:10 +00:00
Adam Klein
986e7cefe1
Ensure class prototype objects have the right Map::constructor field
...
The null constructor they had previously could be observed as crashes in
the V8 API's Object::CreationContext() method and in Object.observe.
BUG=v8:3750
LOG=n
R=arv@chromium.org , dslomov@chromium.org
Review URL: https://codereview.chromium.org/787763005
Cr-Commit-Position: refs/heads/master@{#25757}
2014-12-10 18:25:55 +00:00
d
4161b54d58
Add Array.prototype.includes
...
Requires adding a SameValueZero implementation.
LOG=Y
BUG=v8:3575
R=dslomov@chromium.org , arv@chromium.org
TEST=added to test262
Review URL: https://codereview.chromium.org/771863002
Cr-Commit-Position: refs/heads/master@{#25735}
2014-12-10 08:58:15 +00:00
dslomov
1954ad8bc1
Do not reflect uninitialized 'let' and 'const' in scope mirrors.
...
R=yangguo@chromium.org ,aandrey@chromium.org
BUG=v8:3743
LOG=N
Review URL: https://codereview.chromium.org/758603004
Cr-Commit-Position: refs/heads/master@{#25712}
2014-12-08 14:59:28 +00:00
dslomov
293f898a6f
Make sure that individual shipping features can be disabled.
...
R=rossberg@chromium.org
Review URL: https://codereview.chromium.org/779203005
Cr-Commit-Position: refs/heads/master@{#25690}
2014-12-05 15:35:37 +00:00
dslomov
bd04e6cdad
Fix the order of context binding/simulate insertion for BlockContexts.
...
R=jarin@chromium.org
BUG=v8:3741
LOG=N
Review URL: https://codereview.chromium.org/762393008
Cr-Commit-Position: refs/heads/master@{#25684}
2014-12-05 13:06:50 +00:00
arv
edf3dab466
ES6 template literals: Fix issue with template after rbrace
...
If we hade }` the right brace was always treated as part of the
template literal. We should only treat the right brace as part of
the literal when we continue to parse the template literal after a
placeholder.
BUG=v8:3734
LOG=Y
Review URL: https://codereview.chromium.org/778813003
Cr-Commit-Position: refs/heads/master@{#25661}
2014-12-04 14:50:17 +00:00
arv
d67e573dbe
Simplify template literal raw string creation
...
BUG=v8:3710
LOG=Y
R=dslomov@chromium.org , marja@chromium.org
Review URL: https://codereview.chromium.org/768203002
Cr-Commit-Position: refs/heads/master@{#25640}
2014-12-03 14:17:23 +00:00
marja
0a0e6c8c81
ES6 unicode extensions, part 1.
...
Allows \u{xxxxx} in variable names and string literals (not yet in regexps).
Everything's behind the --harmony-unicode flag.
BUG=
Review URL: https://codereview.chromium.org/716423002
Cr-Commit-Position: refs/heads/master@{#25603}
2014-12-02 10:58:19 +00:00
dslomov
573401a422
harmony-classes: Fix some issues with syntactic restriction on super(...).
...
R=arv@chromium.org
BUG=v8:3330
LOG=N
Review URL: https://codereview.chromium.org/770843002
Cr-Commit-Position: refs/heads/master@{#25589}
2014-12-01 20:13:54 +00:00
dslomov
65aa17b9c3
harmony-classes: Implement 'super(...)' call syntactic restriction.
...
R=rossberg@chromium.org ,arv@chromium.org
BUG=v8:3330
LOG=N
Review URL: https://codereview.chromium.org/766663003
Cr-Commit-Position: refs/heads/master@{#25555}
2014-11-28 04:08:58 +00:00
caitpotter88
0ea30611f3
Fix raw TemplateLiteral spans with non-ascii characters
...
BUG=v8:3710
Review URL: https://codereview.chromium.org/745233002
Cr-Commit-Position: refs/heads/master@{#25529}
2014-11-26 17:15:54 +00:00
dslomov
6ac4de87a8
harmony-scoping: make assignment to 'const' a late error.
...
Per TC39 Nov 2014 decision.
This patch also changes behavior for "legacy const": assignments to sloppy const in strict mode is now also a type error. This fixes v8:2243 and also brings us in compliance with other engines re assignment to function names (see updated webkit test), but might have bigger implications.
That change can easily be reverted by changing Variable::IsSignallingAssignmentToConst.
BUG=v8:3713,v8:2243
LOG=N
Review URL: https://codereview.chromium.org/749633002
Cr-Commit-Position: refs/heads/master@{#25516}
2014-11-26 11:21:23 +00:00
dslomov
f1d8668e38
harmony-scoping: Catch variable should be VAR, not LET
...
R=rossberg@chromium.org
BUG=v8:2858
LOG=N
Review URL: https://codereview.chromium.org/748113003
Cr-Commit-Position: refs/heads/master@{#25503}
2014-11-25 14:48:39 +00:00
caitpotter88
ad86a1a27a
Cache template literal callSiteObj
...
BUG=v8:3230
LOG=y
Review URL: https://codereview.chromium.org/742643003
Cr-Commit-Position: refs/heads/master@{#25450}
2014-11-20 22:37:55 +00:00
dslomov
5aed61cc38
Rename String.prototype.contains to 'includes'.
...
Per TC39 Nov 2014 decison.
R=arv@chromium.org ,yangguo@chromium.org
LOG=Y
Committed: b5379216e2
Review URL: https://codereview.chromium.org/742963002
Cr-Commit-Position: refs/heads/master@{#25448}
2014-11-20 19:21:36 +00:00
Andreas Rossberg
1808badc2d
Disable classes in sloppy mode unless --harmony-sloppy is set
...
Also clean up flag names a little.
Baseline: https://codereview.chromium.org/713413003/
R=arv@chromium.org , dslomov@chromium.org
BUG=
Review URL: https://codereview.chromium.org/722203006
Cr-Commit-Position: refs/heads/master@{#25435}
2014-11-20 10:52:03 +00:00
machenbach
b3acdf5347
Revert of Rename String.prototype.contains to 'includes'. (patchset #1 id:1 of https://codereview.chromium.org/742963002/ )
...
Reason for revert:
Breaks test262-es6:
http://build.chromium.org/p/client.v8/builders/V8%20Linux/builds/1289
Original issue's description:
> Rename String.prototype.contains to 'includes'.
>
> Per TC39 Nov 2014 decison.
>
> R=arv@chromium.org ,yangguo@chromium.org
> LOG=Y
>
> Committed: b5379216e2
TBR=arv@chromium.org ,yangguo@chromium.org,dslomov@chromium.org
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/745543002
Cr-Commit-Position: refs/heads/master@{#25432}
2014-11-20 09:03:54 +00:00
dslomov
2dae17fb87
Rename String.prototype.contains to 'includes'.
...
Per TC39 Nov 2014 decison.
R=arv@chromium.org ,yangguo@chromium.org
LOG=Y
Review URL: https://codereview.chromium.org/742963002
Cr-Commit-Position: refs/heads/master@{#25430}
2014-11-20 00:32:13 +00:00
caitpotter88
99a9d68d94
Implement ES6 String.raw behind --harmony-templates
...
BUG=
Review URL: https://codereview.chromium.org/731573004
Cr-Commit-Position: refs/heads/master@{#25410}
2014-11-19 04:44:44 +00:00
arv
d5d15253b8
Classes: Expand test to cover strict runtime behavior
...
This tests that the extends expression is treated as strict at
runtime and not just at parse time.
BUG=v8:3330
LOG=Y
R=dslomov@chromium.org
Review URL: https://codereview.chromium.org/729323003
Cr-Commit-Position: refs/heads/master@{#25407}
2014-11-18 19:00:15 +00:00
dslomov
ca8eaef638
harmony-scoping: better error messages for let declarations in sloppy mode.
...
R=rossberg@chromium.org
BUG=v8:2198
LOG=N
Review URL: https://codereview.chromium.org/713413003
Cr-Commit-Position: refs/heads/master@{#25406}
2014-11-18 18:51:26 +00:00
dslomov
d7e3697ddc
harmony-scoping: Implement debugger support for script scope.
...
We add a new ScopeType, ScopeType.Script. The scope with
ScopeType.Script is always present in the scope chain (ScopeIterator
fakes it if neededi - i.e. if ScriptContext for a script has not been
allocated since that script has no lexical declarations).
ScriptScope reflects ScriptContextTable.
R=yurys@chromium.org ,yangguo@chromium.org
BUG=v8:3690
LOG=N
Review URL: https://codereview.chromium.org/726643002
Cr-Commit-Position: refs/heads/master@{#25383}
2014-11-17 17:58:12 +00:00
arv
ef41de10db
Classes: Add support for stepping through default constructors
...
If a class extends another class and it doesn't provide a constructor,
one is created for them. We therefore need to ensure that stepping into
the constructor steps into the super class constructor.
BUG=v8:3674
LOG=Y
R=dslomov@chromium.org , aandrey , yurys
Review URL: https://codereview.chromium.org/725983002
Cr-Commit-Position: refs/heads/master@{#25366}
2014-11-15 19:48:39 +00:00
adamk
b17eaaa575
Fix desugaring of let bindings in for loops to handle continue properly
...
This requires putting the original loop's body inside an inner for loop (with
the same labels as the original loop) and re-binding the temp variables in its
"next" expression. A second flag is added to the desugared code to ensure the
loop body executes at most once per loop.
BUG=v8:3683
LOG=y
Review URL: https://codereview.chromium.org/720863002
Cr-Commit-Position: refs/heads/master@{#25363}
2014-11-14 19:33:23 +00:00
caitpotter88
353b696467
Implement ES6 Template Literals
...
BUG=v8:3230
Review URL: https://codereview.chromium.org/663683006
Cr-Commit-Position: refs/heads/master@{#25362}
2014-11-14 18:53:52 +00:00
arv
f3d5b13e04
Classes: Implement correct name binding
...
Named class declarations and class expression have a const binding for
the name that is in TDZ for the extends expression.
BUG=v8:3330
LOG=Y
R=dslomov@chromium.org , adamk
Review URL: https://codereview.chromium.org/722793005
Cr-Commit-Position: refs/heads/master@{#25360}
2014-11-14 15:05:20 +00:00
Dmitry Lomov
7e69b2f996
Implement 'setVariableValue' for debugger block scopes.
...
R=aandrey@chromium.org , rossberg@chromium.org , yurys@chromium.org
BUG=v8:3690
LOG=N
Review URL: https://codereview.chromium.org/732543002
Cr-Commit-Position: refs/heads/master@{#25358}
2014-11-14 13:39:20 +00:00
Adrian Perez
ddcd08b1d1
Implement .of() on typed arrays
...
BUG=v8:3578
LOG=Y
R=dslomov@chromium.org , wingo@igalia.com
Review URL: https://codereview.chromium.org/660863003
Patch from Adrian Perez <aperez@igalia.com>.
Cr-Commit-Position: refs/heads/master@{#25325}
2014-11-13 11:20:13 +00:00
arv@chromium.org
aa6815c79a
Classes: Add support for arguments in default constructor
...
This is currently done by generating a default constructor that looks
like this:
constructor() {
%DefaultConstructorSuperCall();
}
The a runtime function implements the logic which is pretty similar to
Runtime_Apply except that it uses the [[Prototype]] of the current
function.
This is the second try. The first failed because the test was using a
array that was too large for Function.prototype.apply.
Revert "Revert "Classes: Add support for arguments in default constructor""
This reverts commit 43aa7e541df56a132608b8b4217e9da84575e4f8.
BUG=v8:3672
LOG=Y
TBR=dslomov@chromium.org
Review URL: https://codereview.chromium.org/716853003
Cr-Commit-Position: refs/heads/master@{#25272}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25272 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-11 21:36:16 +00:00
arv@chromium.org
84741e76a3
ES6: Add support for super in object literals
...
This only available under --harmony-classes
BUG=v8:3571
LOG=Y
R=dslomov@chromium.org
Review URL: https://codereview.chromium.org/718473002
Cr-Commit-Position: refs/heads/master@{#25271}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25271 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-11 19:54:56 +00:00
arv@chromium.org
6a5cd94676
Revert "Classes: Add support for arguments in default constructor"
...
This reverts commit 3f4ea6c91a962a04407c79f08e5c86ce9ff2911a.
Broke tests on Mac64
http://build.chromium.org/p/client.v8/builders/V8%20Mac64/builds/923/steps/Check/logs/classes
BUG=v8:3672
TBR=dslomov@chromium.org
LOG=N
Review URL: https://codereview.chromium.org/712333003
Cr-Commit-Position: refs/heads/master@{#25269}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-11 16:22:47 +00:00
arv@chromium.org
3a91adaec8
Classes: Add support for arguments in default constructor
...
This is currently done by generating a default constructor that looks
like this:
constructor() {
%DefaultConstructorSuperCall();
}
The a runtime function implements the logic which is pretty similar to
Runtime_Apply except that it uses the [[Prototype]] of the current
function.
BUG=v8:3672
LOG=Y
R=dslomov@chromium.org
Review URL: https://codereview.chromium.org/692333011
Cr-Commit-Position: refs/heads/master@{#25268}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-11 15:55:30 +00:00
arv@chromium.org
b86c30a2b3
Classes: Partial fix for constructor not calling super
...
Introduce two new function kind, one for default constructor and one
for default constructor call super. Then when we are about to pares
these we just generate the correct AST in source.
BUG=v8:3661, v8:3672
LOG=Y
R=dslomov@chromium.org
Review URL: https://codereview.chromium.org/700523003
Cr-Commit-Position: refs/heads/master@{#25222}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25222 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-07 16:39:27 +00:00
rossberg@chromium.org
0b9a70ade3
Remove --harmony implications for incomplete features
...
This is in preparation for making --harmony and --es-staging synonyms.
The only remaining difference currently is block-scoping, which is still
implied by --harmony, to avoid regressing on a long-available feature.
Also removes the special-casing of --harmony-proxies.
R=adamk@chromium.org
BUG=
Review URL: https://codereview.chromium.org/693153004
Cr-Commit-Position: refs/heads/master@{#25115}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25115 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-04 16:05:44 +00:00
arv@chromium.org
5b3f9ec76d
Classes: Add super support in methods and accessors
...
This is done by installing the [[HomeObject]] on the method and the
accessor functions.
BUG=v8:3330
LOG=Y
R=dslomov@chromium.org
Review URL: https://codereview.chromium.org/683893002
Cr-Commit-Position: refs/heads/master@{#24976}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24976 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-29 11:46:18 +00:00
arv@chromium.org
013a29a2bc
Classes: Add more tests for prototype edge cases
...
BUG=3655
LOG=Y
R=dslomov@chromium.org
Review URL: https://codereview.chromium.org/687453004
Cr-Commit-Position: refs/heads/master@{#24943}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24943 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-28 14:12:44 +00:00
arv@chromium.org
5c2dffc380
Classes: Add test for method prototype
...
Methods should not have a prototype property
BUG=v8:3330
LOG=y
R=dslomov@chromium.org
Review URL: https://codereview.chromium.org/678103004
Cr-Commit-Position: refs/heads/master@{#24939}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24939 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-28 13:40:14 +00:00
arv@chromium.org
1881cee691
Classes: Add basic support for properties
...
This adds the properties to the prototype and the constructor.
BUG=v8:3330
LOG=Y
R=dslomov@chromium.org
Review URL: https://codereview.chromium.org/680993003
Cr-Commit-Position: refs/heads/master@{#24934}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24934 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-28 12:43:49 +00:00
jarin@chromium.org
23df66ee24
Add more missing deopts
...
BUG=
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/639883002
Cr-Commit-Position: refs/heads/master@{#24886}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24886 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-26 10:25:48 +00:00
dslomov@chromium.org
08ee4d3a5c
Add remaining @@toStringTag symbols to builtins
...
R=dslomov@chromium.org
Review URL: https://codereview.chromium.org/664333003
Patch from Caitlin Potter <caitpotter88@gmail.com>.
Cr-Commit-Position: refs/heads/master@{#24885}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24885 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-24 19:29:10 +00:00
dslomov@chromium.org
98c208447d
Classes: implement 'new super'.
...
R=ishell@chromium.org , arv@chromium.org
BUG=v8:3330
LOG=N
Committed: https://code.google.com/p/v8/source/detail?r=24822
Review URL: https://codereview.chromium.org/665773003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24825 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-23 08:32:23 +00:00
dslomov@chromium.org
6442348d6e
Revert "Classes: implement 'new super'."
...
This reverts commit r24822 for breaking debug compilation.
TBR=ishell@chromium.org
Review URL: https://codereview.chromium.org/662253003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24823 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-23 08:21:30 +00:00
dslomov@chromium.org
99cafa0d5a
Classes: implement 'new super'.
...
R=ishell@chromium.org , arv@chromium.org
BUG=v8:3330
LOG=N
Review URL: https://codereview.chromium.org/665773003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24822 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-23 08:11:51 +00:00
dslomov@chromium.org
37bd114925
Update ObjectToString to Harmony-draft algorithm
...
Updates Object.prototype.toString() to use algorithm described in harmony drafts.
Currently, the behaviour is essentially the same as ES262's version, however this changes when internal structures
such as Promise make use of symbolToStringTag (as they are supposed to, see v8:3241), and changes further once
Symbol.toStringTag is exposed publicly.
BUG=v8:3241, v8:3502
LOG=N
R=dslomov@chromium.org
Review URL: https://codereview.chromium.org/546803003
Patch from Caitlin Potter <caitpotter88@gmail.com>.
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24783 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-21 17:21:32 +00:00
dslomov@chromium.org
b830c2741c
Handle property name "-0" correctly for typed arrays.
...
R=rossberg@chromium.org
Review URL: https://codereview.chromium.org/670623003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24768 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-21 11:54:10 +00:00
dslomov@chromium.org
e3ad693020
Correct semantics for numerically indexed stores to typed arrays.
...
R=verwaest@chromium.org , ishell@chromium.org
Committed: https://code.google.com/p/v8/source/detail?r=24691
Review URL: https://codereview.chromium.org/652303002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24705 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-17 16:33:38 +00:00
dslomov@chromium.org
e149f81eba
Keyed stores to super with numeric keys.
...
R=verwaest@chromium.org , arv@chromium.org , ishell@chromium.org
BUG=v8:3330
LOG=N
Review URL: https://codereview.chromium.org/649603003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-17 13:19:45 +00:00
dslomov@chromium.org
8854589c79
Revert "Correct semantics for numerically indexed stores to typed arrays."
...
This reverts commit r24691 because win64 release build breaks.
TBR=verwaest@chromium.org
Review URL: https://codereview.chromium.org/659313002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24695 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-17 13:01:54 +00:00
dslomov@chromium.org
3154c4a5f2
Correct semantics for numerically indexed stores to typed arrays.
...
R=verwaest@chromium.org , ishell@chromium.org
Review URL: https://codereview.chromium.org/652303002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24691 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-17 11:40:40 +00:00
yangguo@chromium.org
d913faaf6d
Improve String.repeat.
...
Adapted from patch contributed by Isiah Meadows <impinball@gmail.com>.
R=jkummerow@chromium.org
Review URL: https://codereview.chromium.org/657863002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24687 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-17 10:01:38 +00:00
dslomov@chromium.org
d4cbcfce6e
Implement the new semantics for 'super(...)'
...
Per the latest ES6 draft, super(...) translates into a call
to function's prototype.
R=arv@chromium.org , ishell@chromium.org , verwaest@chromium.org
BUG=v8:3330
LOG=N
Review URL: https://codereview.chromium.org/661433002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24683 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-17 09:16:03 +00:00
wingo@igalia.com
ee64a14b24
Implement .forEach() on typed arrays
...
BUG=v8:3578
LOG=Y
R=dslomov@chromium.org , wingo@igalia.com
Review URL: https://codereview.chromium.org/583723002
Patch from Adrian Perez de Castro <aperez@igalia.com>.
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24657 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-16 10:55:26 +00:00
svenpanne@chromium.org
e216ab1d40
Array.prototype.{every, filter, find, findIndex, forEach, map, some}: Use fresh primitive wrapper for calls.
...
When the receiver is a primitive value, it's cast to an Object before entering the loop. Instead, it should be cast to an Object for each function call while in the loop.
BUG=v8:3536
LOG=Y
R=arv@chromium.org , svenpanne@chromium.org , wingo@igalia.com
Review URL: https://codereview.chromium.org/553413002
Patch from Diego Pino <dpino@igalia.com>.
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24620 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-15 09:11:32 +00:00
dslomov@chromium.org
952690a148
Support for super assignments in for..in.
...
R=ishell@chromium.org , arv@chromium.org
BUG=v8:3330
LOG=N
Review URL: https://codereview.chromium.org/639243003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24560 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-13 12:46:46 +00:00
dslomov@chromium.org
c0504eeffd
Fix typedarray tests.
...
1. Fixed typo. lenght -> length. Arbitary -> Arbitrary.
2. TypedArray DataView property getters should throw TypeError when called on
incompatible types.
3. Should not use integers as keys in the arbitrary-properties test.
R=dslomov@chromium.org , yangguo@chromium.org
Review URL: https://codereview.chromium.org/652603002
Patch from Xueqiao Xu <xuq@google.com>.
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24551 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-13 09:48:50 +00:00
dslomov@chromium.org
c9049c0325
Keyed loads from super with numeric keys.
...
R=ishell@chromium.org , arv@chromium.org
BUG=v8:3330
LOG=N
Review URL: https://codereview.chromium.org/638193004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24522 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-10 10:40:29 +00:00
dslomov@chromium.org
53c9f0bb3d
Keyed stores to super where key is a name.
...
R=arv@chromium.org , ishell@chromium.org
BUG=v:3330
LOG=N
Review URL: https://codereview.chromium.org/638623002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-09 11:36:22 +00:00
arv@chromium.org
c8b1c3e784
Classes: Add support for toString
...
BUG=v8:3330
LOG=Y
R=dslomov@chromium.org
Review URL: https://codereview.chromium.org/624013005
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24472 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-08 14:48:48 +00:00
arv@chromium.org
583868288a
This uses a runtime function to set up the the constructor and its
...
prototype.
This does not add the methods/accessors to the prototype or the
constructor.
BUG=v8:3330
LOG=Y
R=dslomov@chromium.org
Review URL: https://codereview.chromium.org/631433002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24442 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-07 16:24:59 +00:00
arv@chromium.org
6708f664a9
Stage ES6 numeric literals
...
BUG=
R=rossberg@chromium.org
Review URL: https://codereview.chromium.org/626153002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24421 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-06 15:40:55 +00:00
dslomov@chromium.org
da86ab5d23
Support for super keyed loads where key is a name.
...
R=arv@chromium.org , ishell@chromium.org
BUG=v8:3330
LOG=N
Review URL: https://codereview.chromium.org/622523004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24403 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-06 08:25:27 +00:00
dslomov@chromium.org
953af8bd9f
Desugar 'super(..)' into 'super.constructor(...)'
...
R=arv@chromium.org , marja@chromium.org
BUG=v8:3330
LOG=N
Review URL: https://codereview.chromium.org/615043002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24340 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-30 18:12:22 +00:00
dslomov@chromium.org
1f2ff657cd
Fix style nits in test
...
R=arv@chromium.org
Review URL: https://codereview.chromium.org/613253002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24336 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-30 15:30:10 +00:00
dslomov@chromium.org
b43ebcd800
Implement data property creation for assignments to super.x.
...
R=rossberg@chromium.org , arv@chromium.org
BUG=v8:3330
LOG=N
Review URL: https://codereview.chromium.org/618643003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24331 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-30 13:19:47 +00:00
dslomov@chromium.org
f08295753d
Clean-up tests for super getters and setters
...
R=arv@chromium.org
Review URL: https://codereview.chromium.org/617443003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24292 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-29 15:17:03 +00:00
arv@chromium.org
a36dee4d14
ES6: Implement object literal property shorthand
...
This allows the following:
var x = 1;
var o = {x};
This is under the --harmony-object-literals flag.
BUG=v8:3584
LOG=y
R=marja@chromium.org , rossberg@chromium.org
Review URL: https://codereview.chromium.org/584993002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24291 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-29 14:15:48 +00:00
dslomov@chromium.org
ec209c7721
Support count operations on super named properties.
...
R=ishell@chromium.org
BUG=v8:3330
LOG=N
Review URL: https://codereview.chromium.org/613673002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24290 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-29 13:56:32 +00:00
dslomov@chromium.org
7e44408fc6
Stores and compound assignments for named super properties.
...
R=ishell@chromium.org , arv@chromium.org , verwaest@chromium.org
BUG=v8:3330
LOG=N
Review URL: https://codereview.chromium.org/593073002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-29 08:16:24 +00:00
dslomov@chromium.org
e36aacdee2
Implement loads and calls from 'super'
...
R=verwaest@chromium.org , arv@chromium.org
BUG=v8:3330
LOG=N
Review URL: https://codereview.chromium.org/527963002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24078 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-19 11:08:04 +00:00
erik.corry@gmail.com
35eec7c7ca
Reland sticky regexps https://codereview.chromium.org/567313003/
...
R=svenpanne@chromium.org , yangguo@chromium.org
BUG=
Review URL: https://codereview.chromium.org/580383003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24065 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-19 07:36:05 +00:00
arv@chromium.org
714f5f401c
ES6: Implement generator method shorthand
...
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-method-definitions
BUG=v8:3516
LOG=Y
R=dslomov@chromium.org
Review URL: https://codereview.chromium.org/577973002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24048 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-18 17:14:13 +00:00
rossberg@chromium.org
cc960f8034
Revert "RegExp: Add support for the ES6-proposed sticky flag"
...
Causes a flaky failure on buildbots. Here is the (deterministic) repro step (thanks to Michael Stanton):
first go to flag-definitions.h and set this to false.
DEFINE_BOOL(enable_sse4_1, false,
"enable use of SSE4.1 instructions if available")
Run the following and it should fail:
tools/run-tests.py --arch=ia32 --mode=release cctest/test-api/Regress2107
R=yangguo@chromium.org
BUG=
Review URL: https://codereview.chromium.org/580123002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24045 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-18 14:53:00 +00:00
erik.corry@gmail.com
63b1c1900d
RegExp: Add support for the ES6-proposed sticky flag
...
R=yangguo@chromium.org , rossberg@chromium.org
BUG=
Review URL: https://codereview.chromium.org/567313003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-18 11:32:39 +00:00
arv@chromium.org
6b660f2812
ES6: String(symbol) should work like symbol.toString
...
Using String as a function and passing a symbol should return the
same value as if Symbol.prototype.toString was called.
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string-constructor-string-value
BUG=v8:3554
LOG=Y
R=rossberg@chromium.org , rossberg
Review URL: https://codereview.chromium.org/564863002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23923 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-12 16:17:27 +00:00
arv@chromium.org
477b75f1cb
Arrow functions: Cleanup handling of the prototype property
...
The old code did not work correctly in case of optimizations. I
found this out when implementing concise methods and we now plumb
through the function kind so we know what kind of Map to create for
the function.
BUG=v8:2700
LOG=y
R=rossberg@chromium.org
Review URL: https://codereview.chromium.org/562253002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23920 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-12 15:07:43 +00:00
arv@chromium.org
45d8e74cd6
ES6: Add support for method shorthand in object literals
...
This is governed by the harmony-object-literals flag.
BUG=v8:3516
LOG=Y
R=rossberg@chromium.org
Review URL: https://codereview.chromium.org/477263002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23846 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-10 16:39:42 +00:00
adamk@chromium.org
71fbe7d4ec
Ensure that JSProxy::Fix gives the generated JSObject map a constructor
...
All JSObjects in V8 either have a map()->constructor() field or are
JSFunctions. JSProxy::Fix, however, was not enforcing this, and
Object.observe's use of JSObject::GetCreationContext() exposed this.
Note that this is not Object.observe-specific: the API call
v8::Object::CreationContext() also would have revealed this bug.
This patch chooses Object as a reasonable constructor to put on the
newly-fixed object's map. Note that this has no effect on the "constructor"
property in JS. In doing so, I've also tightened up the code underlying
JSProxy::Fix to only support JSObject and JSFunction as possible output
types.
BUG=405844
LOG=N
R=rossberg@chromium.org , verwaest@chromium.org
Review URL: https://codereview.chromium.org/505303004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23466 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-27 15:54:23 +00:00
dslomov@chromium.org
22d5ceb1f2
Implement Function.prototype.toMethod.
...
R=arv@chromium.org , verwaest@chromium.org
BUG=v8:3330
LOG=N
Review URL: https://codereview.chromium.org/475423003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23274 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-21 12:39:33 +00:00
wingo@igalia.com
edfd4cdd33
Stage ES6 generators
...
R=dslomov@chromium.org
BUG=
Review URL: https://codereview.chromium.org/479543003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23272 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-21 12:06:25 +00:00
arv@chromium.org
eb7fcad7c5
Remove removed flags from tests
...
BUG=None
LOG=Y
R=rossberg@chromium.org
Review URL: https://codereview.chromium.org/454003002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23203 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-19 15:09:38 +00:00
rossberg@chromium.org
30af557955
Implement ES6 Array.of()
...
BUG=v8:3427
LOG=N
R=rossberg@chromium.org
Review URL: https://codereview.chromium.org/364853009
Patch from Diego Pino <dpino@igalia.com>.
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23194 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-19 11:38:38 +00:00
dslomov@chromium.org
cd30676052
ToNumber(Symbol) should throw TypeError
...
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tonumber
Based on patch from caitp <caitpotter88@gmail.com>
https://codereview.chromium.org/454233002/
BUG=v8:3499
LOG=Y
R=dslomov@chromium.org
Review URL: https://codereview.chromium.org/458753004
Patch from Erik Arvidsson <arv@chromium.org>.
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23057 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-11 19:24:05 +00:00
rossberg@chromium.org
d9d6a60973
Enable ES6 unscopables
...
R=yangguo@chromium.org
BUG=v8:3401
LOG=Y
Review URL: https://codereview.chromium.org/455743002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22994 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-08 11:42:59 +00:00
rossberg@chromium.org
5427ea5285
Remove proxies from --harmony switch for M38, because problems
...
They can still be activated separately using the --harmony-proxies switch,
but are no longer implied by Chrome's "Experimental JavaScript" option.
R=yangguo@chromium.org
BUG=
LOG=Y
Review URL: https://codereview.chromium.org/453903002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22990 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-08 09:58:19 +00:00
wingo@igalia.com
cebddb662e
Enable ES6 iteration by default
...
This enables for-of, as well as @@iterator implementations for strings
and arrays.
R=rossberg@chromium.org
BUG=v8:2214
LOG=Y
Review URL: https://codereview.chromium.org/446023002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22980 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-07 16:42:14 +00:00
rossberg@chromium.org
25b978cbf4
This implements unscopables
...
The unscobables allow us to black list properties from showing up in
with statements.
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object-environment-records-hasbinding-n
The spec draft is not fully up to date.
https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-07/jul-29.md#conclusionresolution
BUG=v8:3401
LOG=Y
R=rossberg@chromium.org , verwaest@chromium.org
Review URL: https://codereview.chromium.org/384963002
Patch from Erik Arvidsson <arv@chromium.org>.
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22942 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-06 15:50:40 +00:00
adamk@chromium.org
bcf8b05072
Enable ES6 Map and Set by default
...
In doing so also remove all references to the --harmony-collections flag.
Due to the way context snapshotting works, it's not possible to simply
enable the flag by default.
Depends on ES6 Symbols: https://codereview.chromium.org/421313004
BUG=v8:1622
LOG=Y
R=arv@chromium.org , rossberg@chromium.org
Review URL: https://codereview.chromium.org/427723002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22889 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-05 19:37:32 +00:00
wingo@igalia.com
6b7f9dba84
yield* calls @@iterator on iterable
...
R=rossberg@chromium.org
BUG=v8:3422
LOG=N
Review URL: https://codereview.chromium.org/430693003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-05 13:17:49 +00:00
adamk@chromium.org
d8c30bd8e7
Enable ES6 Symbols by default
...
In doing so also remove all references to the --harmony-symbols flag.
Due to the way context snapshotting works, it's not possible to simply enable
the flag by default.
BUG=v8:2158
LOG=Y
R=dslomov@chromium.org
Review URL: https://codereview.chromium.org/421313004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22831 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-04 18:17:54 +00:00
yangguo@chromium.org
029b8a2379
For-of on null or undefined is an error
...
The latest ES6 draft changed the behavior of for-of on null / undefined,
which for once is a simplification.
R=rossberg@chromium.org
BUG=
Review URL: https://codereview.chromium.org/416033002
Patch from Andy Wingo <wingo@igalia.com>.
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22602 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-24 13:40:08 +00:00
yangguo@chromium.org
c3edd49265
Expose the content of Sets and WeakSets through SetMirror.
...
BUG=v8:3093
LOG=Y
R=aandrey@chromium.org , arv@chromium.org , yangguo@chromium.org
Review URL: https://codereview.chromium.org/402423003
Patch from Alexandra Mikhaylova <amikhaylova@google.com>.
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-23 07:33:47 +00:00
rossberg@chromium.org
2dc3d0bdc6
Remove harmony-typeof
...
This was an early experiment in the Harmony era that turned out to
not be compatible with the web.
BUG=None
LOG=Y
R=rossberg@chromium.org
Review URL: https://codereview.chromium.org/408463003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22497 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-21 10:20:54 +00:00
rossberg@chromium.org
8023c9f564
Implement basic code generation for arrow functions
...
Implements code generation for arrow functions by desugaring them into
a FunctionLiteral. For the moment, a normal FUNCTION_SCOPE is used, so
"this" and "arguments" behave as in normal functions. Implementing the
correct scoping rules is to be done later on.
BUG=v8:2700
LOG=
R=rossberg@chromium.org
Review URL: https://codereview.chromium.org/382893003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22495 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-21 09:58:01 +00:00
yangguo@chromium.org
1eacdd55a0
Implement String.prototype.codePointAt and String.fromCodePoint.
...
Contributed by Mathias Bynens <mathiasb@opera.com>.
TBR=mathiasb@opera.com , rossberg@chromium.org
BUG=v8:2840
LOG=Y
Review URL: https://codereview.chromium.org/406863003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22493 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-21 08:45:32 +00:00
yangguo@chromium.org
219e763155
Expose the content of Maps and WeakMaps through MapMirror.
...
BUG=v8:3291
LOG=N
R=aandrey@chromium.org , yangguo@chromium.org
Committed: https://code.google.com/p/v8/source/detail?r=22452
Review URL: https://codereview.chromium.org/398513005
Patch from Alexandra Mikhaylova <amikhaylova@google.com>.
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-21 08:07:04 +00:00
yangguo@chromium.org
e3d9037121
Revert "Expose the content of Maps and WeakMaps through MapMirror."
...
This reverts r22452.
TBR=amikhaylova@google.com
Review URL: https://codereview.chromium.org/399963002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22454 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-17 16:43:52 +00:00
yangguo@chromium.org
4116944ced
Expose the content of Maps and WeakMaps through MapMirror.
...
BUG=v8:3291
LOG=N
R=aandrey@chromium.org , yangguo@chromium.org
Review URL: https://codereview.chromium.org/398513005
Patch from Alexandra Mikhaylova <amikhaylova@google.com>.
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22452 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-17 15:07:59 +00:00