Commit Graph

416 Commits

Author SHA1 Message Date
littledan
b436635ac4 Update to ES2015 == semantics for Symbol/SIMD wrappers
When == is invoked on a Symbol or SIMD vector and an object, the object should
be converted to a primitive with ToPrimitive and then compared again. This means,
for example, that for a Symbol or SIMD vector s, s == Object(s). This patch makes
that change in the implementation of ==. Only the runtime function needed to be
changed, as the code stubs and compiler specializations don't operate on Symbols
or SIMD vectors, and on these types, a fallback to the runtime function is always
used.

BUG=v8:3593
LOG=Y
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#31614}
2015-10-27 20:20:24 +00:00
neis
8e89e8203b Adapt tests in preparation of shipping --harmony-completion.
R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31507}
2015-10-23 10:26:01 +00:00
yangguo
8be20eee3b Debugger: correctly report uncaught rejections in Promise.all and Promise.race.
The debugger calls PromiseHasUserDefinedRejectHandler to recursively search the
tree of dependent promises for user-defined reject handlers. If no such reject
handler exists, rejecting the promise is considered an uncaught exception.

Promise.race and Promise.all interupt the link of promise dependency wrt the
search. This change fixes that link.

R=rossberg@chromium.org
BUG=chromium:439585
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31392}
2015-10-20 05:40:08 +00:00
hablich
fb8a97eed9 Switch on unit test regarding -Infinity and TypedArrays
Should already work according to issue.

BUG=chromium:424619
LOG=N
R=adamk@chromium.org, littledan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31379}
2015-10-19 14:26:38 +00:00
bmeurer
e1088b27b5 [turbofan] Initial support for monomorphic/polymorphic property loads.
Native context specialization now lowers monomorphic and
polymorphic accesses to data and constant data properties on
object and/or prototype chain. We don't deal with accessors
yet, and we also completely ignore proxies (which is compatible
with what Crankshaft does).

The code is more or less the straightforward implementation. We
will need to refactor that and extract common patterns once the
remaining bits for full load/store support is in.

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

Committed: https://crrev.com/3a0bf860b7177f7abef01ff308a53603389d958e
Cr-Commit-Position: refs/heads/master@{#31340}

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

Cr-Commit-Position: refs/heads/master@{#31352}
2015-10-19 05:24:51 +00:00
jarin
5c53481233 Revert of [turbofan] Initial support for monomorphic/polymorphic property loads. (patchset #3 id:100001 of https://codereview.chromium.org/1396333010/ )
Reason for revert:
Waterfall redness.

Original issue's description:
> [turbofan] Initial support for monomorphic/polymorphic property loads.
>
> Native context specialization now lowers monomorphic and
> polymorphic accesses to data and constant data properties on
> object and/or prototype chain. We don't deal with accessors
> yet, and we also completely ignore proxies (which is compatible
> with what Crankshaft does).
>
> The code is more or less the straightforward implementation. We
> will need to refactor that and extract common patterns once the
> remaining bits for full load/store support is in.
>
> CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_nosnap_rel
> R=jarin@chromium.org
> BUG=v8:4470
> LOG=n
>
> Committed: https://crrev.com/3a0bf860b7177f7abef01ff308a53603389d958e
> Cr-Commit-Position: refs/heads/master@{#31340}

TBR=bmeurer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4470

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

Cr-Commit-Position: refs/heads/master@{#31341}
2015-10-16 14:56:25 +00:00
bmeurer
3a0bf860b7 [turbofan] Initial support for monomorphic/polymorphic property loads.
Native context specialization now lowers monomorphic and
polymorphic accesses to data and constant data properties on
object and/or prototype chain. We don't deal with accessors
yet, and we also completely ignore proxies (which is compatible
with what Crankshaft does).

The code is more or less the straightforward implementation. We
will need to refactor that and extract common patterns once the
remaining bits for full load/store support is in.

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

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

Cr-Commit-Position: refs/heads/master@{#31340}
2015-10-16 14:09:17 +00:00
yangguo
47c9e1c904 Implement Math.tanh using fdlibm port.
Contributed by Raymond Toy: http://rtoy.github.io/fdlibm-js/

R=jkummerow@chromium.org
BUG=v8:3495
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31335}
2015-10-16 12:56:37 +00:00
yangguo
f2bfa12654 Do not coerce lastIndex of a global RegExp in @@match and @@replace.
R=rossberg@chromium.org
BUG=v8:4471
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31330}
2015-10-16 11:25:37 +00:00
adamk
e5db1d58e5 Remove stale references to --harmony-arrays flag in mjsunit tests
Also move those tests from mjsunit/harmony to mjsunit/es6.

R=littledan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31314}
2015-10-15 17:39:42 +00:00
yangguo
73c9be9b31 Debugger: allow stepping into resolver from Promise constructor.
R=rossberg@chromium.org
BUG=chromium:451967
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31296}
2015-10-15 12:27:40 +00:00
caitpotter88
e2be5ce542 [parser] fix token end position for regexp literals
Make the end position of a regexp literal the first character following the regexp. This matches the behaviour of number literals and string literals, as well as single-character tokens.

This change corrects the lazy-parsing of arrow functions with concise bodies, whose last token is a regular expression literal.

BUG=v8:4474
LOG=N
R=wingo@igalia.com, adamk@chromium.org, rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31189}
2015-10-09 01:02:02 +00:00
neis
7a0a682083 [es6] Implement completion value reform (--harmony-completion).
This CL depends on #1362363002.

R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31180}
2015-10-08 13:57:04 +00:00
adamk
24565b8598 Use Scope::function_kind_ to distinguish arrow function scopes
Previously, arrow function scopes had a separate ScopeType. However,
Scope::DeserializeScopeChain() erroneously deserialized ARROW_SCOPE
ScopeInfos as FUNCTION_SCOPE. This could lead to bugs such as the
attached one, where "super" was disallowed where it should have
been allowed.

This patch utilizes the Scope's FunctionKind to distinguish arrow
functions from others. Besides fixing the above bug, this also
simplifies code in various places that had to deal with two different
ScopeTypes both of which meant "function".

BUG=v8:4466
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31154}
2015-10-07 14:55:45 +00:00
stefan.penner
dcbab0f5fb [es6] Align Promise.resolve with the spec
* Promise.resolve is now works with subclasses
* Spec removed [[PromiseConstructor]] now can simply use constructor
* Promise.resolve ignores species

R=littledan@chromium.org,domenic@chromium.org
BUG=v8:4161,v8:4341
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#31116}
2015-10-05 22:21:25 +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
bmeurer
ff2c9eace4 [es6] Remove left-overs from Function.prototype.toMethod.
The actual Function.prototype.toMethod was removed some time already,
but there were some stuff (esp. %ToMethod) left in the tree, including
tests for %ToMethod.  This code (and esp. the tests) cause trouble in
the process of moving bound functions away from JSFunction; so since
the code is unused anyway, we can as well remove it.

The original removal of Function.prototype.toMethod was in February
2015 in 68e4897586.

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

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

Cr-Commit-Position: refs/heads/master@{#30925}
2015-09-25 04:04:36 +00:00
stefan.penner
ab9898980e Don’t smash globals used by the test helper itself.
Since https://codereview.chromium.org/366103005 the promise tests null out
various globals, to ensure the promise implementation doesn’t itself rely
on functions patchable by monkeys.

Unfortunately, doing so breaks test assertion failures which rely on
those globals.

This isn’t the ideal solution, but does improve the current state.

R=littledan@chromium.org,domenic@chromium.org
LOG=N
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30922}
2015-09-24 21:47:17 +00:00
adamk
7462e99667 Remove on-by-default flag --harmony-object
It's been enabled since M45, which is now well into its stable period,
with no problems reported.

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

Cr-Commit-Position: refs/heads/master@{#30835}
2015-09-18 18:37:57 +00:00
caitpotter88
b444da41ad [es6] support get and set in shorthand properties
Add support for `get` and `set` as shorthand properties. Also
supports them for CoverInitializedName in BindingPatterns and (once implemented)
AssignmentPatterns.

BUG=v8:4412, v8:3584
LOG=N
R=adamk, aperez, wingo, rossberg

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

Cr-Commit-Position: refs/heads/master@{#30769}
2015-09-16 16:02:05 +00:00
cbruni
2f1df49a6c Fixing Sloppy Symbol.iterator setter
In certiain cases the ArgumentsIteratorSetter would trigger an invalid
state in the LookupIterator when being overridden. This is now solved
by bypassing the SetDataProperty and directly using
DefinePropertyOrElementIgnoringAttributes since we know exactly which
property we're going to install

LOG=N
BUG=chromium:521484

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

Cr-Commit-Position: refs/heads/master@{#30705}
2015-09-14 07:22:35 +00:00
adamk
233d62f8e3 [es6] Fix computed property names in nested literals
Make ObjectLiteral::is_simple() false for literals containing computed
property names, which causes IsCompileTimeValue() to return false and
thus force code to be generated for setting up such properties. This
mirrors the handling of '__proto__' in literals.

BUG=v8:4387
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#30362}
2015-08-25 21:10:44 +00:00
yangguo
e8ce7acf53 Debugger: use correct position for for-next expression statement.
R=rossberg@chromium.org
BUG=chromium:523543
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30328}
2015-08-24 13:08:22 +00:00
ejcaruso
df999c9790 Only evaluate length once in %TypedArray%.prototype.set
The ES6 spec for this function declares that ToLength
should only be called once. We were evaluating it multiple
times, so if length was an object with a valueOf method,
we could see effects take place multiple times.

R=littledan@chromium.org
LOG=N
BUG=v8:4218

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

Cr-Commit-Position: refs/heads/master@{#30240}
2015-08-19 01:33:06 +00:00
littledan
e261540b9e Add class to existing lexical scoping tests
This patch strengthens testing of classes by verifying that the binding
that they export externally follows block scoping, as opposed to var-style
scoping. The tests are based on existing tests for let and const.

R=adamk
LOG=N
BUG=v8:3305

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

Cr-Commit-Position: refs/heads/master@{#30140}
2015-08-12 18:43:06 +00:00
adamk
b7726c447a Delete --harmony-computed-property-names flag
It was shipped in V8 4.4.

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

Cr-Commit-Position: refs/heads/master@{#30038}
2015-08-05 21:32:38 +00:00
adamk
cd455055a0 Delete --harmony-unicode flag
It was shipped in V8 4.4.

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

Cr-Commit-Position: refs/heads/master@{#30035}
2015-08-05 19:08:42 +00:00
adamk
2e4efcfac2 Add a --harmony-object-observe runtime flag (on by default)
To avoid tanking context startup performance, only the actual installation of the
JS-exposed API is flag-guarded. The remainder of the implementation still
resides in the snapshot.

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

Cr-Commit-Position: refs/heads/master@{#30017}
2015-08-04 20:53:32 +00:00
yangguo
1667c15e37 Debugger: move implementation to a separate folder.
R=cbruni@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29951}
2015-07-31 11:08:15 +00:00
rossberg
9ab8bfba7f [es6] Make sure temporaries are not allocated in block scope
While at it, remove the notion of INTERNAL variables.

@caitp: Took some parts from your CL, since I was blocked on the temp scope bug.

R=mstarzinger@chromium.org
BUG=512574
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29812}
2015-07-23 13:51:35 +00:00
adamk
3a74348e09 [es6] Array.prototype[Symbol.iterator].name should be 'values'
R=littledan@chromium.org
BUG=v8:4311
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29794}
2015-07-23 05:50:47 +00:00
adamk
4b8200078a Remove unnecessary coupling between Promise tests and Object.observe
Many mjsunit tests (as well as the promises-aplus adapter scripts) were
using Object.observe simply for microtask-enqueueing purposes. Replaced
such uses with %EnqueueMicrotask.

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

Cr-Commit-Position: refs/heads/master@{#29779}
2015-07-21 17:17:07 +00:00
yangguo
01902e4eab Debugger: use FrameInspector in ScopeIterator to find context.
In optimized code, it's not guaranteed that the current context
is stored in its frame slot.

R=bmeurer@chromium.org
BUG=v8:4309
LOG=N

Committed: https://crrev.com/3a0ee39cbde6a9778cfc4e2a6a0a8ff68933ff38
Cr-Commit-Position: refs/heads/master@{#29697}

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

Cr-Commit-Position: refs/heads/master@{#29744}
2015-07-20 08:53:39 +00:00
yangguo
c062b28aeb Revert of Debugger: use FrameInspector in ScopeIterator to find context. (patchset #3 id:40001 of https://codereview.chromium.org/1239033002/)
Reason for revert:
breaks roll: http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/87292/steps/browser_tests%20%28with%20patch%29/logs/DevToolsSanityTest.TestPauseWhenScriptIsRunning

Original issue's description:
> Debugger: use FrameInspector in ScopeIterator to find context.
>
> In optimized code, it's not guaranteed that the current context
> is stored in its frame slot.
>
> R=bmeurer@chromium.org
> BUG=v8:4309
> LOG=N
>
> Committed: https://crrev.com/3a0ee39cbde6a9778cfc4e2a6a0a8ff68933ff38
> Cr-Commit-Position: refs/heads/master@{#29697}

TBR=bmeurer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4309

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

Cr-Commit-Position: refs/heads/master@{#29722}
2015-07-17 09:53:49 +00:00
littledan
8068b91d15 Additional TypedArray tests
- Test that TypedArray properties cannot be set in strict mode
  Properties like %TypedArray%.prototype.length have a getter and no
  setter. This test verifies that property, which was apparently not
  true in the past or had no test ensuring throwing in this case.
- Test that TypedArray integer indexed properties (array elements)
  are not configurable

Both of these have passed for some time, but there are open bugs against
them and apparently no tests verifying that they are fixed.

BUG=v8:3048, v8:3799
LOG=N
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#29717}
2015-07-17 00:21:31 +00:00
littledan
f76dfee9df Array.prototype.reverse should call [[HasProperty]] on elements before [[Get]]
This is a change from ES5 to ES6: When reversing an array, first it is checked
whether the element exists, before the element is looked up. The order in ES6
is

[[HasElement]] lower
[[Get]] lower (if present)
[[HasElement]] upper
[[Get]] upper (if present)

In ES5, on the other hand, the order was

[[Get]] lower
[[Get]] upper
[[HasElement]] lower
[[HasElement]] upper

To mitigate the performance impact, this patch implements a new, third copy
of reversing arrays if %_HasPackedElements. This allows us to skip all
membership tests, and a quick and dirty benchmark shows that the new version
is faster:

Over 4 runs, the slowest for the new version:
d8> var start = Date.now(); for (var i = 0; i < 100000000; i++) [1, 2, 3, 4, 5].reverse(); Date.now() - start
4658

Over 3 runs, the fastest for the old version:
d8> var start = Date.now(); for (var i = 0; i < 100000000; i++) [1, 2, 3, 4, 5].reverse(); Date.now() - start
5176

BUG=v8:4223
R=adamk
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#29716}
2015-07-16 23:12:23 +00:00
yangguo
3a0ee39cbd Debugger: use FrameInspector in ScopeIterator to find context.
In optimized code, it's not guaranteed that the current context
is stored in its frame slot.

R=bmeurer@chromium.org
BUG=v8:4309
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29697}
2015-07-16 09:28:20 +00:00
arv
a73338ba9e [es6] Enforce TDZ checks for let/const in StoreLookupSlot
With --harmony-sloppy we can get to a runtime store in the presence of
an eval. We therefor need to check that the value is not the hole which
is used to enforce TDZ.

BUG=v8:4284
LOG=N
R=rossberg@chromium.org, littledan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29577}
2015-07-10 16:20:52 +00:00
arv
3b1aabc960 [es6] Initial support for let/const bindings in sloppy mode
Allow let in sloppy mode with --harmony-sloppy

Allow ES'15 const in sloppy mode with --harmony-sloppy --no-legacy-const

Functions in block are not done yet. They are only let bound in the block
at this point.

BUG=v8:3305, v8:2198
LOG=N
R=littledan@chromium.org, rossberg@chromium.org, adamk@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29536}
2015-07-08 15:04:13 +00:00
adamk
a1f20f0928 Add debug-stepnext test for for-let loops
Review URL: https://codereview.chromium.org/1215383002

Cr-Commit-Position: refs/heads/master@{#29523}
2015-07-07 19:11:38 +00:00
yangguo
a8a4c364c2 Debugger: use debug break slots instead of ICs (except for calls).
BUG=v8:3147,v8:4269
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29487}
2015-07-06 11:16:02 +00:00
littledan
a1dcac3df7 Include Harmony Array/TypedArray methods unconditionally
Conditionally including Array and TypedArray methods seems to cause
a slowdown in V8 context creation, possibly due to the new code added.

BUG=chromium:504629
R=adamk@chromium.org
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#29430}
2015-07-01 23:10:21 +00:00
adamk
62572e011e [es6] Ensure that for-in/of loops have a proper TDZ for their lexically-bound variables
The enumerable expression in a for-in/of loop is supposed to have a TDZ for any
lexically bound names in that loop (there can be more than one with destructuring).

This patch accomplishes this with an almost-correct desugaring. The only thing missing
is proper debugger support (the let declarations added by the desugaring, while invisible
to code due to shadowing, are visible to the debugger).

BUG=v8:4210
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29396}
2015-07-01 00:27:30 +00:00
arv
473badf5fa [es6] Make sure we do not invoke setter when calling Promise.all
We were calling the setter for Object.prototype.promise if it existed
when calling PromiseAll.

BUG=v9:4232
LOG=N
R=rossberg@chromium.org, adamk@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29357}
2015-06-29 18:14:37 +00:00
arv
353b40e980 [es6] Remove harmony-classes flag
Move class tests to es6 directory

BUG=v8:3330
LOG=N
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#29336}
2015-06-26 21:16:58 +00:00
arv
47dd45c0ab [es6] Remove harmony-object-literal flag
And move tests to es6 directory

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

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

Cr-Commit-Position: refs/heads/master@{#29334}
2015-06-26 19:49:53 +00:00
arv
81f2c44047 Fix HTML string methods to not depend on replace method
Before this we were using String.prototype.replace. Now
we call the internal StringReplace instead.

BUG=v8:4221
LOG=N
R=adamk, littledan
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#29206}
2015-06-22 21:55:56 +00:00
arv
6b268bce6a Fix string HTML methods to call ToString
Before this we were using + which calls valueOf which is not correct
for these methods.

BUG=v8:4222
LOG=N
R=adamk, littledan
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#29202}
2015-06-22 19:07:24 +00:00
verwaest
49495ace70 Cleanup INTEGER_INDEXED_EXOTIC handling a bit
BUG=v8:4137
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29116}
2015-06-18 14:39:11 +00:00
conradw
1bb051b8a4 [es6] Fix completion values of for loops with lexical variables
Currently, the desugaring of for loops of the form for
(let/const ...; bla; bla) causes them to always have a
completion value of 1, regardless of whether the loop body
is executed or not. This CL fixes this, realigning
initializer blocks as a more general purpose way to avoid
the completion value rewriter (since that's all they really
do anyway).

BUG=

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

Cr-Commit-Position: refs/heads/master@{#29108}
2015-06-18 11:54:16 +00:00
machenbach
b4d3e1ceba Revert of Add %TypedArray% to proto chain (patchset #6 id:100001 of https://codereview.chromium.org/1186733002/)
Reason for revert:
[Sheriff] Changes layout tests:
http://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2032/builds/429

See e.g.:
https://storage.googleapis.com/chromium-layout-test-archives/V8-Blink_Linux_32/429/layout-test-results/inspector/console/console-big-array-pretty-diff.html

Please upload a blink side needsmanualrebaseline change first for these tests if the change is intended. Please also add a blink trybot on a reland of this CL.

Original issue's description:
> Add %TypedArray% to proto chain
>
> According to the ES6 spec, the main methods and getters shouldn't
> be properties of the individual TypedArray objects and prototypes
> but instead on %TypedArray% and %TypedArray%.prototype. This
> difference is observable through introspection. This patch moves
> some methods and getters to the proper place, with the exception
> of %TypedArray%.prototype.subarray and harmony methods. These will
> be moved in follow-on patches.
>
> BUG=v8:4085
> LOG=Y
> R=adamk
>
> Committed: https://crrev.com/a10590158260737b256fac3254b4939f48f90095
> Cr-Commit-Position: refs/heads/master@{#29057}

TBR=adamk@chromium.org,arv@chromium.org,littledan@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4085

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

Cr-Commit-Position: refs/heads/master@{#29070}
2015-06-17 09:05:51 +00:00
littledan
a105901582 Add %TypedArray% to proto chain
According to the ES6 spec, the main methods and getters shouldn't
be properties of the individual TypedArray objects and prototypes
but instead on %TypedArray% and %TypedArray%.prototype. This
difference is observable through introspection. This patch moves
some methods and getters to the proper place, with the exception
of %TypedArray%.prototype.subarray and harmony methods. These will
be moved in follow-on patches.

BUG=v8:4085
LOG=Y
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#29057}
2015-06-16 23:39:10 +00:00
caitpotter88
6d22f7a794 [parser] parse CalllExpression TemplateLiteral production
BUG=v8:4183
R=arv@chromium.org, rossberg@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29055}
2015-06-16 18:08:28 +00:00
yangguo
75350f1ef0 Debugger: require debugger to be active when dealing with breaks.
This invariant will save us some head ache.
The changes to test-debug/DebugStub is due to the fact that it abuses
the ability to set break points in code that has no debug break slots.
This is now no longer possible.

R=ulan@chromium.org
BUG=v8:4132
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29038}
2015-06-16 07:11:21 +00:00
arv
5f72593d16 [es6] Make sure we call add property when adding a new property
When setting a property using `super.prop = val` we need to use
add property if we are adding a new property and not set property.

BUG=493566
LOG=N
R=verwaest@chromium.org, dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28971}
2015-06-11 21:24:41 +00:00
machenbach
4e7990d394 Revert of Revert of Revert of Promise assimilation fix. (patchset #1 id:1 of https://codereview.chromium.org/1181533006/)
Reason for revert:
[Sheriff] Changes/breaks layout tests. Please land upstream needsmanualrebaseline requests first or fix the tests.

E.g.
http://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Win/builds/400
One test fails, one times out. See e.g. expectations changes:
https://storage.googleapis.com/chromium-layout-test-archives/V8-Blink_Win/400/layout-test-results/inspector/sources/debugger-async/async-callstack-promises-diff.txt

On linux debug theses tests crash:
http://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064%20%28dbg%29/builds/346
https://storage.googleapis.com/chromium-layout-test-archives/V8-Blink_Linux_64__dbg_/346/layout-test-results/results.html

Original issue's description:
> Revert of Revert of Promise assimilation fix. (patchset #1 id:1 of https://codereview.chromium.org/1176163004/)
>
> Reason for revert:
> Test failures are bogus. Snapshot blob and natives blob are out of sync due to build being weird.
>
> Original issue's description:
> > Revert of Promise assimilation fix. (patchset #8 id:160001 of https://codereview.chromium.org/1098663002/)
> >
> > Reason for revert:
> > Test failures: https://chromegw.corp.google.com/i/client.v8/builders/V8%20Linux64/builds/3829
> >
> > Original issue's description:
> > > Promise assimilation fix.
> > >
> > > Let x be a fulfilled promise and y be another promise. |x.then(() => y)|
> > > should call |y.then|, but the current implementation calls PromiseChain.
> > > We can see the difference when we set a custom function to |y.then|.
> > >
> > > This CL fixes the spec violation, but as a result |then| is no longer
> > > a wrapper of |chain| and in some cases it does not work well with
> > > |accept| or |chain|. That is not a problem for ES6 promise users because
> > > ES6 promise doesn't have them.
> > >
> > > LOG=N
> > > BUG=477921
> > >
> > > Committed: https://crrev.com/2f57dff3ea0c45e1a61b334fda962460f89d71bc
> > > Cr-Commit-Position: refs/heads/master@{#28926}
> >
> > TBR=arv@chromium.org,caitpotter88@gmail.com,rossberg@chromium.org,yhirano@chromium.org
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=477921
> >
> > Committed: https://crrev.com/5bb75f514027f79303396dba823c2d78c6add83b
> > Cr-Commit-Position: refs/heads/master@{#28927}
>
> TBR=arv@chromium.org,caitpotter88@gmail.com,rossberg@chromium.org,yhirano@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=477921
>
> Committed: https://crrev.com/6f214bdd8bcdc76d48bd85c3bd897f0e2427ff95
> Cr-Commit-Position: refs/heads/master@{#28928}

TBR=arv@chromium.org,caitpotter88@gmail.com,rossberg@chromium.org,yhirano@chromium.org,yangguo@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=477921

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

Cr-Commit-Position: refs/heads/master@{#28931}
2015-06-11 09:09:18 +00:00
yangguo
6f214bdd8b Revert of Revert of Promise assimilation fix. (patchset #1 id:1 of https://codereview.chromium.org/1176163004/)
Reason for revert:
Test failures are bogus. Snapshot blob and natives blob are out of sync due to build being weird.

Original issue's description:
> Revert of Promise assimilation fix. (patchset #8 id:160001 of https://codereview.chromium.org/1098663002/)
>
> Reason for revert:
> Test failures: https://chromegw.corp.google.com/i/client.v8/builders/V8%20Linux64/builds/3829
>
> Original issue's description:
> > Promise assimilation fix.
> >
> > Let x be a fulfilled promise and y be another promise. |x.then(() => y)|
> > should call |y.then|, but the current implementation calls PromiseChain.
> > We can see the difference when we set a custom function to |y.then|.
> >
> > This CL fixes the spec violation, but as a result |then| is no longer
> > a wrapper of |chain| and in some cases it does not work well with
> > |accept| or |chain|. That is not a problem for ES6 promise users because
> > ES6 promise doesn't have them.
> >
> > LOG=N
> > BUG=477921
> >
> > Committed: https://crrev.com/2f57dff3ea0c45e1a61b334fda962460f89d71bc
> > Cr-Commit-Position: refs/heads/master@{#28926}
>
> TBR=arv@chromium.org,caitpotter88@gmail.com,rossberg@chromium.org,yhirano@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=477921
>
> Committed: https://crrev.com/5bb75f514027f79303396dba823c2d78c6add83b
> Cr-Commit-Position: refs/heads/master@{#28927}

TBR=arv@chromium.org,caitpotter88@gmail.com,rossberg@chromium.org,yhirano@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=477921

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

Cr-Commit-Position: refs/heads/master@{#28928}
2015-06-11 08:15:32 +00:00
yangguo
5bb75f5140 Revert of Promise assimilation fix. (patchset #8 id:160001 of https://codereview.chromium.org/1098663002/)
Reason for revert:
Test failures: https://chromegw.corp.google.com/i/client.v8/builders/V8%20Linux64/builds/3829

Original issue's description:
> Promise assimilation fix.
>
> Let x be a fulfilled promise and y be another promise. |x.then(() => y)|
> should call |y.then|, but the current implementation calls PromiseChain.
> We can see the difference when we set a custom function to |y.then|.
>
> This CL fixes the spec violation, but as a result |then| is no longer
> a wrapper of |chain| and in some cases it does not work well with
> |accept| or |chain|. That is not a problem for ES6 promise users because
> ES6 promise doesn't have them.
>
> LOG=N
> BUG=477921
>
> Committed: https://crrev.com/2f57dff3ea0c45e1a61b334fda962460f89d71bc
> Cr-Commit-Position: refs/heads/master@{#28926}

TBR=arv@chromium.org,caitpotter88@gmail.com,rossberg@chromium.org,yhirano@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=477921

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

Cr-Commit-Position: refs/heads/master@{#28927}
2015-06-11 08:01:15 +00:00
yhirano
2f57dff3ea Promise assimilation fix.
Let x be a fulfilled promise and y be another promise. |x.then(() => y)|
should call |y.then|, but the current implementation calls PromiseChain.
We can see the difference when we set a custom function to |y.then|.

This CL fixes the spec violation, but as a result |then| is no longer
a wrapper of |chain| and in some cases it does not work well with
|accept| or |chain|. That is not a problem for ES6 promise users because
ES6 promise doesn't have them.

LOG=N
BUG=477921

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

Cr-Commit-Position: refs/heads/master@{#28926}
2015-06-11 07:42:42 +00:00
arv
07c1f277bd Unship harmony tostring
Blink's DOM bindings are not yet ready.

BUG=493137, 239915
LOG=N
R=rossberg, adamk
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#28804}
2015-06-04 17:33:33 +00:00
verwaest
2fb894fa58 Use GetProperty for getting elements.
This also fixes issues with
- kMaxUint32 being a valid length but not index cornercases
- exotic integer objects masking "exotic indexes" even though its in the prototype chain
- concating of holey sloppy arguments

BUG=v8:4137
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#28754}
2015-06-02 10:42:29 +00:00
mike
f7b5912276 [es6] Define generator prototype as writable prop
The April 14 2015 final draft of the ES6 specification states that the
`prototype` property of generator function instances should be writable.

BUG=v8:4140, v8:4140
LOG=N
R=arv@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28641}
2015-05-26 18:31:49 +00:00
dslomov
7ffdb5194d [destructuring] Grand for statement parsing unification.
Also support patterns in ``for (var p in/of ...)``

This CL extends the rewriting we used to do for ``for (let p in/of...)`` to
``for (var p in/of ...)``. For all for..in/of loop declaring variable,
we rewrite
   for (var/let/const pattern in/of e) b
into
   for (x' in/of e) { var/let/const pattern = e; b }

This adds a small complication for debugger: for a statement
   for (var v in/of e) ...
we used to have
   var v;
   for (v in/of e) ...
and there was a separate breakpoint on ``var v`` line.
This breakpoint is actually useless since it is immediately followed by
a breakpoint on evaluation of ``e``, so this CL removes that breakpoint
location.

Similiraly, for let, it used to be that
  for (let v in/of e) ...
became
  for (x' in/of e) { let v; v  = x'; ... }
``let v``generetaed a useless breakpoint (with the location at the
loop's head. This CL removes that breakpoint as well.

R=arv@chromium.org,rossberg@chromium.org
BUG=v8:811
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28565}
2015-05-21 17:46:45 +00:00
verwaest
4268141ca6 Reland "Mark internal AccessorInfo properties as 'special data properties'"
This reverts commit ac5336baca.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#28442}
2015-05-18 12:36:40 +00:00
machenbach
ac5336baca Revert of Mark internal AccessorInfo properties as "special data properties" (patchset #2 id:20001 of https://codereview.chromium.org/1123163005/)
Reason for revert:
[Sheriff] Blocks current roll:
https://codereview.chromium.org/1124403007/

Bisection (https://codereview.chromium.org/1142753002/) points to this CL.

Original issue's description:
> Mark internal AccessorInfo properties as "special data properties" to ensure correct strict-mode handling.
>
> BUG=
>
> Committed: https://crrev.com/188297160d2b82a4e2a206ebbddfc21dd99a9d8d
> Cr-Commit-Position: refs/heads/master@{#28369}

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

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

Cr-Commit-Position: refs/heads/master@{#28437}
2015-05-17 16:50:17 +00:00
arv
834a8e9f63 [es6] Iterators and generators should "extend" %IteratorPrototype%
All the builtin iterators as well as the generator objects have an
object called %IteratorPrototype% in the spec between them and
%ObjectPrototype%.

BUG=v8:3568
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28426}
2015-05-15 15:09:38 +00:00
dslomov
0b620ad5e5 Fix test formatting
TBR=arv@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28380}
2015-05-12 18:12:54 +00:00
dslomov
30b771a662 Fix the behavior of 'super.foo' assignment when receiver is not an object.
R=arv@chromium.org,verwaest@chromium.org
BUG=v8:4097
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28377}
2015-05-12 17:13:07 +00:00
verwaest
188297160d Mark internal AccessorInfo properties as "special data properties" to ensure correct strict-mode handling.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28369}
2015-05-12 15:11:13 +00:00
conradw
382435480d [es6] Fix symbol comparison on some architectures
https://codereview.chromium.org/1125783002 did not handle all cases for some
architectures. These cases are now covered, and tests have been extended to
check them.

BUG=v8:4073
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28266}
2015-05-06 15:04:47 +00:00
dslomov
cf53fed972 Handle the case when derived constructor is [[Call]]ed with 0 args.
ArgumentsAdaptorStub for derived constructor (the one that needs
new.target) works in this way:
 - If the constructor is invoked via the Construct stub, we know that
   actual arguments always include new.target. ``arguments`` object
   however should not include a new.target, therefore we remove it.
   We achieve this by decrementing the argument count.
 - If the constructor is invoked as a call, we do not care for a correct
   ``arguments`` array since the constructor will immediately throw on
   entrance.
The bug is that the call could actually pass 0 actual arguments, but I
decrement unconditionally :(. The fix is to detect this case and avoid
decrementing. ``arguments`` is bogus, but it is ok as constructor
throws.

Long-term we should just remove mucking about with arguments for
new.target and just get it from the stack.

R=arv@chromium.org,rossberg@chromium.org
BUG=chromium:474783
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#28242}
2015-05-05 19:57:04 +00:00
arv
d26f5d3923 [es6] When comparing two symbols we may need to throw a TypeError
When comparing a symbol to istself using <, <=, > or >= we need to
throw a TypeError. This is correctly handled in the runtime function
so if we are comparing a symbol fall back to use the runtime.

BUG=v8:4073
LOG=Y
R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28226}
2015-05-05 14:17:46 +00:00
arv
2279dfe789 [es6] Map/Set size getter should have "get size" name
This reverts commit d5565c1f68.

Getter and setter function names in ES6 are defined as "get foo" and
"set foo".

This also moves the logic for handling symbols from runtime-function.cc
to v8natives.js.

BUG=None
LOG=N
R=adamk@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28050}
2015-04-24 18:15:59 +00:00
arv
d5565c1f68 Revert of [es6] Map/Set size getter should have "get size" name (patchset #4 id:80001 of https://codereview.chromium.org/1094323005/)
Reason for revert:
Breaks GCMole ia32

http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20gcmole/builds/1685/steps/GCMole%20ia32/logs/stdio

src/runtime/runtime-function.cc:96:3: warning: Possible problem with evaluation order.
  f->shared()->set_name(*NameToFunctionName(name));
  ^
src/runtime/runtime-function.cc:96:3: warning: Possible problem with evaluation order.
2 warnings generated.

Original issue's description:
> [es6] Map/Set size getter should have "get size" name
>
> Getter and setter function names in ES6 are defined as "get foo" and
> "set foo".
>
> BUG=None
> LOG=N
> R=adamk@chromium.org
>
> Committed: https://crrev.com/83c89a2e71a363afb35595f903423e650d788e42
> Cr-Commit-Position: refs/heads/master@{#28034}

TBR=adamk@chromium.org,caitpotter88@gmail.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=None

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

Cr-Commit-Position: refs/heads/master@{#28035}
2015-04-23 22:06:27 +00:00
arv
83c89a2e71 [es6] Map/Set size getter should have "get size" name
Getter and setter function names in ES6 are defined as "get foo" and
"set foo".

BUG=None
LOG=N
R=adamk@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28034}
2015-04-23 21:56:10 +00:00
arv
d0db1c39ca [es6] Function.prototype.name should be the empty string
ES6 specifies the function name property (it was not part of ES5) and
it specifies the name of Function.prototype to the empty string ("" and
not "Empty"). This makes us match Firefox, Safari and IE developer
preview.

BUG=v8:4033
LOG=N
R=adamk@chromium.org
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#28021}
2015-04-23 00:29:27 +00:00
dslomov
aec46ca54a Stack allocate lexical locals + hoist stack slots
Review URL: https://codereview.chromium.org/981203003

Cr-Commit-Position: refs/heads/master@{#28008}
2015-04-22 13:22:18 +00:00
arv
79be74364a Fix issues with name and length on poison pill function
In ES6 function name and length are configurable. However, the length
and name properties of the poison pill function must not be
configurable.

BUG=v8:4011
LOG=N
R=adamk@chromium.org, rossberg@chromium.org
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#27855}
2015-04-15 17:15:26 +00:00
jkummerow
3eb277f270 %GetOptimizationStatus(): Unconditionally return a sentinel when --always-opt is present
Review URL: https://codereview.chromium.org/1086923002

Cr-Commit-Position: refs/heads/master@{#27822}
2015-04-14 14:57:48 +00:00
yangguo
2c01bd34b0 Fix Math.log10 implementation for 1 - Number.EPSILON.
R=svenpanne@chromium.org
BUG=v8:4025
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27815}
2015-04-14 11:56:02 +00:00
arv
186dd69b3a [es6] Fix length property of collection constructors
{Map, Set, WeakMap, WeakSet}.length should be 0.

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

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

Cr-Commit-Position: refs/heads/master@{#27798}
2015-04-13 18:59:39 +00:00
arv
0e539d1ca9 Revert "ES6: Number and Boolean prototype should be ordinary objects"
This reverts commit e965a1f84a.

The reason is that it breaks jsfiddle.com

BUG=476437, v8:4001
LOG=N
R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27791}
2015-04-13 16:21:00 +00:00
ben
80b7a962b2 Use correct property descriptor in generators test
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27771}
2015-04-12 21:18:31 +00:00
mike
0a4881600d Correct property descriptors on GeneratorPrototype
The ES6 specification does not explicitly state the attributes for the
'next' and 'throw' property descriptors, so their values are defined by
Section 17 [1]:

> Every other data property described in clauses 18 through 26 and in
> Annex B.2 has the attributes
> { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
> unless otherwise specified.

[1]
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ecmascript-standard-built-in-objects

BUG=v8:3986
LOG=N
R=wingo,arv

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

Cr-Commit-Position: refs/heads/master@{#27770}
2015-04-11 21:14:20 +00:00
caitpotter88
9836c34dba [es6] do not add caller/arguments to ES6 function definitions
BUG=v8:3946, v8:3982
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel
LOG=N
R=arv@chromium.org, rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27729}
2015-04-09 22:40:28 +00:00
caitpotter88
48eff34c32 [es6] don't "replace" Object.prototype.toString for --harmony-tostring
When ObjectToString is installed on Object.prototype twice (once in v8natives.js, and once in harmony-tostring.js), this pollutes old code spaces on some devices. To prevent this, the function is only installed once, preventing test failures when the --harmony-tostring flag is flipped on by default.

BUG=v8:3502
LOG=N
R=arv@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27720}
2015-04-09 20:53:46 +00:00
arv
e965a1f84a ES6: Number and Boolean prototype should be ordinary objects
BUG=v8:4001
LOG=N
R=adamk@chromium.org, rossberg@chromium.org
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#27680}
2015-04-08 21:18:40 +00:00
mvstanton
af293729ad Tests that carefully checks opt/deopt status shouldn't --always-opt.
If we optimize a function before gathering feedback it may be
peppered with soft deoptimizations. So it can't help but deoptimize.
A judicious reading of the code isn't enough to determine what the
optimization state should be in the face of such chaotic gyrations.

BUG=
R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27671}
2015-04-08 15:56:01 +00:00
mike
3b624a1796 Re-implement %Generator% intrinsic as an object
From ES6 25.2.3 ("Properties of the GeneratorFunction Prototype
Object"):

> The GeneratorFunction prototype object is an ordinary object. It is
> not a function object and does not have an [[ECMAScriptCode]] internal
> slot or any other of the internal slots listed in Table 27 or Table
> 56.

Introduce one assertion for the value's type and additional tests for its
properties. Remove an invalid assertion that fails as a result of this
fix.

BUG=v8:3991
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27603}
2015-04-06 21:04:51 +00:00
mike
30ea626886 Remove invalid assertion
The removed assertion consistently passes not because the invoked
`close` method internally throws a `TypeError` but because the `close`
method does not exist. The ES6 specification does not define a `close`
method on the GeneratorPrototype, so this test is a tautology.

BUG=None
LOG=N
R=arv

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

Cr-Commit-Position: refs/heads/master@{#27567}
2015-04-01 15:22:19 +00:00
mike
3badfdcd50 Re-write duplicated assertions
The modified assertions targeted the property descriptor for the
template object's first "cooked" value. The code immediately preceeding
these statements asserts these values.

Update the assertions to instead target the property descriptor for the
template object's first "raw" value (which are otherwise untested).

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27566}
2015-04-01 15:13:21 +00:00
arv
bb21979adf ES6: Unscopable should use ToBoolean
The spec settled on ToBoolean instead of only using not undefined.

BUG=v8:3827
LOG=N
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#27548}
2015-03-31 15:14:20 +00:00
arv
a373b089e9 Remove --harmony-numeric-literal flag
We have been shipping harmony numeric literals since M41

R=rossberg@chromium.org
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27545}
2015-03-31 14:24:30 +00:00
dslomov
15ef61d468 Make sure debugger is ready for breakpoins when we process 'debugger' statement.
On 'debugger' statement, if anything in debugger calls 'EnsureDebugInfo'
on a function, EnsureDebugInfo would compile and substitute code without
debug break slots. This causes weird behavior later when stepping fails
to work (see added test as an example).
This fix is to make sure the debugger is prepared for breakpoints in
that case as well.

Also adds extra testing for bug 468661.

R=yangguo@chromium.org,yurys@chromium.orh
BUG=v8:3990,chromium:468661
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27502}
2015-03-27 18:33:17 +00:00
dcarney
d76526032f fix reconfigure of indexed integer exotic objects
R=verwaest@chromium.org
BUG=466084
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27498}
2015-03-27 10:12:55 +00:00
yangguo
46cc8740a9 Debugger: remove unused JS Debugger API.
R=ulan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27464}
2015-03-26 08:15:45 +00:00
dslomov
49c3a60651 Do not assign positions to parser-generated desugarings.
The root cause for the bug is that the positions assigned to desugared
code was inconsistent with the source ranges of block scopes.
Since the fact that the position is assigned causes the debugger to
break at the parser-generated statement, the fix is to remove positions
from those nodes that we do not want to break on.

The CL also teaches Hydrogen to tolerate these cases.

R=adamk@chromium.org,rossberg@chromium.org
BUG=chromium:468661
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27424}
2015-03-24 17:16:53 +00:00
aandrey
fc1689392e Make debugger step into bound callbacks passed to Array.forEach.
BUG=chromium:450004
R=yangguo@chromium.org, kozyatinskiy@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27419}
2015-03-24 16:02:12 +00:00
caitpotter88
6fcc22dce1 [es6] call ToString() on template substitutions
BUG=v8:3980
R=arv@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27402}
2015-03-24 12:44:01 +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
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
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
arv
e625844648 [es6] Function length property should be configurable
ES6 specs the function length property (it was not part of ES5) and
it makes it configurable.

BUG=v8:3045
LOG=N
R=mstarzinger@chromium.org, adamk@chromium.org
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#27190}
2015-03-13 17:19:53 +00:00
dslomov
a8289230a3 Fix test for function declarations syntax error.
Also fix parsing of declarations after case labels.

R=waldron.rick@gmail.com,rossberg@chromium.org
BUG=v8:3939
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27189}
2015-03-13 16:57:35 +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
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
yangguo
9dedcc3dfc Simplify promise event on throw handling.
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27074}
2015-03-09 13:41:55 +00:00
arv
f6cd009efd ES6: Make function name configurable
Function name property is now standardized in ES6. It was a Mozilla proprietary
extension before. With ES6, the property was made configurable, so that it can
be used instead of another proprietary property, displayName.

This is a revert of revert c791d84112.

Last time this broke a Chrome browser test which has since been updated:

5f75a3be4c

BUG=v8:3333
LOG=N
R=mstarzinger@chromium.org,verwaest@chromium.org
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#26996}
2015-03-04 16:57:10 +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
arv
c791d84112 Revert of ES6: Make function name configurable (patchset #10 id:220001 of https://codereview.chromium.org/960343002/)
Reason for revert:
Breaks Chrome browser test that checks Object.name

[16509:16509:0228/030150:INFO:CONSOLE(43)] "Uncaught Error: Clobbered Object.name getter", source: http://www.chromium.org:33611/assertions.js (43)

http://build.chromium.org/p/client.v8/builders/Linux%20Tests%20%28dbg%29%281%29/builds/2328/steps/browser_tests/logs/stdio

Original issue's description:
> ES6: Make function name configurable
>
> This is partially based on r21609 but that CL was incomplete.
>
> Function name is still non writable so one has to use defineProperty
> to change the actual value.
>
> BUG=v8:3333
> LOG=N
> R=adamk, mstarzinger@chromium.org
>
> Committed: https://crrev.com/f7790f7670c8d859455a98fcb90ff1b66af1eca7
> Cr-Commit-Position: refs/heads/master@{#26924}

TBR=adamk@chromium.org,mstarzinger@chromium.org,verwaest@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3333

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

Cr-Commit-Position: refs/heads/master@{#26933}
2015-03-02 00:19:01 +00:00
arv
f7790f7670 ES6: Make function name configurable
This is partially based on r21609 but that CL was incomplete.

Function name is still non writable so one has to use defineProperty
to change the actual value.

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

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

Cr-Commit-Position: refs/heads/master@{#26924}
2015-02-27 19:29:01 +00:00
arv
87f77d6aba for-of should throw if result object is not an object
This is done using desugaring. Before this we had:

  result = iterator.next()

with this we instead do:

  !%_IsSpecObject(result = iterator.next()) &&
      %ThrowIteratorResultNotAnObject(result)

BUG=v8:3916
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26805}
2015-02-23 23:34:38 +00:00
arv
36e72aedf0 ES6 collections: Fix order of constructor logic
The adder should be gotten before the iterator.

Motivation: Once this is done we should be able to use a for-of loop
instead which leads to cleaner code and correct behavior once the
for-of loop correctly supports abrupt completion.

BUG=None
LOG=N
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#26803}
2015-02-23 18:55:46 +00:00
arv
3a8e496fa4 Promise.all and race should work with iterables
BUG=v8:3705
LOG=N
R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26801}
2015-02-23 18:10:14 +00:00
arv
925364f5b4 Fix issue with -0 in Maps
Because we generated a different hash code for 0 and -0 we ended up
not even getting to the SameValueZero check.

BUG=v8:3906
LOG=N
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#26787}
2015-02-20 21:02:55 +00:00
arv
fa1523ea6e ES6: Fix GetIterator
After further spec reading it turns out that we should not do ToObject
on the iterable.

BUG=None
LOG=N
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#26786}
2015-02-20 20:07:21 +00:00
arv
b9f006a404 Align GetIterator with ES6 spec
BUG=None
LOG=N
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#26759}
2015-02-19 21:38:18 +00:00
rossberg
4c082b570d Make generator constructors configurable
R=mstarzinger@chromium.org
BUG=v8:3902
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26744}
2015-02-19 11:30:33 +00:00
caitpotter88
b5c43674f9 Update harmony ObjectProtoToString() to 2/2/2015 spec
Applies to API implementation of O.p.toString

- Removes special handling of non-string @@toStringTag values (use builtinTag)
- Removes special handling of @@toStringTags which match [[Class]] names (remove ~ prefix)
- Add tests for non-string @@toStringTag values in test-api.cc

BUG=v8:3502
R=arv@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26415}
2015-02-03 21:05:25 +00:00
caitpotter88
858b9b6a7e Update harmony Object.prototype.toString to 2/2/2015 spec
- Removes special handling of non-string @@toStringTag values (use builtinTag)
- Removes special handling of @@toStringTags which match [[Class]] names (remove ~ prefix)

BUG=v8:3502
R=arv@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26411}
2015-02-03 17:45:20 +00:00
caitpotter88
12af28309a ES6 Array.prototype.toString falls back on Object.prototype.toString if method "join" is not callable.
BUG=v8:3793
LOG=Y
R=dslomov@chromium.org, arv@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26253}
2015-01-23 15:21:44 +00:00
yangguo
a4a62c129b Extend and fix tests for custom heap snapshot.
R=vogelheim@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26110}
2015-01-16 22:18:27 +00:00
arv
2639bfe993 ES6: Update unscopables to match spec
The spec ended up using Get(unscopables, propertyName) and
comparing the result to undefined instead of using Has.

BUG=v8:3632
LOG=Y
R=adamk, dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25854}
2014-12-16 20:07:41 +00:00
yangguo
dae6dfe08b Implement Math.log2 via ported extract from fdlibm.
Adapted from Raymond Toy's (rtoy@chromium.org) port, extracted from fdlibm's pow implementation.

R=rtoy@chromium.org
BUG=v8:3579
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#25768}
2014-12-11 11:23:37 +00:00
aandrey
cec0acad38 Expose generator object internal properties via mirrors.
BUG=v8:3292
R=yangguo@chromium.org, wingo@igalia.com
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#25571}
2014-11-28 14:49:08 +00:00
dslomov
34702e9d59 Set @@toStringTag on GeneratorFunction prototype.
R=caitpotter88@gmail.com
BUG=v8:3502
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#25550}
2014-11-27 16:09:43 +00:00
yangguo
529ff0cfbf Implement log10 via fdlibm port.
R=rtoy@chromium.org
BUG=v8:3579
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#25433}
2014-11-20 09:37:27 +00:00
dslomov
69990745f7 Remove Weak{Map,Set}.prototype.clear.
Per Nov 2014 TC39 decision.

R=adamk@chromium.org
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#25429}
2014-11-19 21:53:01 +00:00
aandrey
f07b0f214b Allow stepping into Object.observe handlers.
BUG=chromium:432468
R=yangguo@chromium.org, adamk@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#25423}
2014-11-19 15:16:40 +00:00
aandrey
407d1dfb87 Allow stepping into Promise handlers.
BUG=chromium:432468
R=yangguo@chromium.org, adamk@chromium.org, arv@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#25389}
2014-11-18 09:50:32 +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
Andrey Adaikin
685bc04a01 Expose internal properties of map/set iterators via mirrors.
R=yangguo@chromium.org, vsevik
LOG=Y

Committed: https://code.google.com/p/v8/source/detail?r=d5f5d38f73f43eba9658d91ffbe511af8c340d78

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

Cr-Commit-Position: refs/heads/master@{#25380}
2014-11-17 12:48:29 +00:00
wingo@igalia.com
757f400246 Leaving a generator via an exception causes it to close
R=rossberg@chromium.org
BUG=v8:3096
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#25297}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25297 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-12 14:29:22 +00:00
yangguo@chromium.org
4fd9ba9042 Reland "Fix stepping in for-loops."
BUG=v8:3634
LOG=N
R=ulan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25279}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25279 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-12 08:26:42 +00:00
aandrey@chromium.org
4984224af2 Add optional max elements limit for Map/Set mirror iterator preview.
R=yangguo@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#25257}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-11 09:47:19 +00:00
yangguo@chromium.org
4a6d092fdf Revert "Fix stepping in for-loops."
TBR=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25233}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25233 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-10 09:36:16 +00:00
yangguo@chromium.org
3bed0a171a Fix stepping in for-loops.
R=ulan@chromium.org
BUG=v8:3634
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#25231}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-10 09:08:11 +00:00
aandrey@chromium.org
35eaced208 Add debug mirror support for ES6 Map/Set iterators.
This is to show values preview of an iterator in DevTools console.

API=v8::Value::IsMapIterator, v8::Value::IsSetIterator
BUG=chromium:427868
R=arv@chromium.org, yangguo@chromium.org, adamk@chromium.org
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#25100}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25100 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-04 10:02:43 +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
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
adamk@chromium.org
730c3fa3e0 Don't expose Array.prototype.values as it breaks webcompat
Some versions of Outlook Web Access test for the existence of a 'values'
property on Array instances, so adding the 'values' iterator to the prototype
(even with @@unscopeables) causes breakage.

This matches Gecko: they ship Array.prototype.{keys,entries} but not 'values'.

BUG=409858
LOG=Y
R=arv@chromium.org, danno@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24706 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-17 20:11:47 +00:00
dslomov@chromium.org
461a2f403e Convert argument toObject() in Object.getOwnPropertyNames/Descriptors
BUG=v8:3443
LOG=Y
R=arv@chromium.org, dslomov@chromium.org

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

Patch from Caitlin Potter <caitpotter88@gmail.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24638 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-15 14:01:20 +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
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
wingo@igalia.com
3117f6b358 Implement generator mirror
R=yangguo@chromium.org, aandrey@chromium.org

BUG=v8:3292
LOG=N

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24043 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-18 13:30:15 +00:00
yangguo@chromium.org
1cc4b0b95e Support stepping into generator function.
R=aandrey@chromium.org, wingo@igalia.com
BUG=v8:3572
LOG=Y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-17 12:27:16 +00:00
wingo@igalia.com
a76fe0a2cf Enable ES6 generators
R=rossberg@chromium.org

BUG=v8:2355
LOG=Y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23974 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-16 12:30: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
jarin@chromium.org
5fe360b9cd Fix typo in math-hyperbolic test.
TBR=jarin@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23549 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-01 10:23:07 +00:00
yangguo@chromium.org
fa1bf00e6a Port fdlibm implementation for Math.cosh.
R=rtoy@chromium.org
BUG=v8:3494
LOG=N

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23548 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-01 09:36:00 +00:00
yangguo@chromium.org
8938126d1b Port fdlibm implementation for Math.sinh.
R=rtoy@chromium.org
BUG=v8:3493
LOG=N

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23512 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-29 09:32:51 +00:00
wingo@igalia.com
32d9aea9d8 Arguments object has @@iterator
R=arv@chromium.org, verwaest@chromium.org, rossberg@chromium.org
BUG=v8:3391
LOG=N
TEST=mjsunit/harmony/arguments-iterator.js

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23341 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-25 09:12:22 +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
wingo@igalia.com
8239897e5d Simplify array iterator tests
R=arv@chromium.org, rossberg@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-21 09:04:24 +00:00
yangguo@chromium.org
930e5ccc3e Implement Math.expm1 using port from fdlibm.
R=rtoy@chromium.org
BUG=v8:3479
LOG=N

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23238 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-20 14:24:07 +00:00
arv@chromium.org
8d189e84b4 ES6: Make sure we do not store -0 as the key in Map/Set
BUG=v8:3515
LOG=Y
R=adamk@chromium.org, dslomov@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23204 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-19 15:15:41 +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
yangguo@chromium.org
cf75a0b6e6 Fix PromiseHasRejectHandler.
The odd-numbered items in the queue are deferred objects, not promises.

R=aandrey@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-18 08:43:11 +00:00
yangguo@chromium.org
efde48fb30 Fix test expectations.
TBR=jochen@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23113 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-14 07:11:44 +00:00
yangguo@chromium.org
0ae0b81cdb Ignore default reject handler when looking for reject handlers.
LOG=N
BUG=v8:3093
R=aandrey@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23112 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-14 06:57:48 +00:00
arv@chromium.org
fdd094abcf ES6: Make Map/Set constructors support iterable values
Same for WeakMap/WeakSet

https://bugs.ecmascript.org/show_bug.cgi?id=3111

The change from the reverted version is that LoadIC_Miss now uses Name
instead of String.

BUG=v8:3508
LOG=Y
R=adamk@chromium.org, dslomov@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23108 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-13 14:34:15 +00:00
arv@chromium.org
0a35d53f7d Revert "ES6: Make Map/Set constructors support iterable values"
Reason for revert:
TestSetConstructorIterableValue(WeakSet) fails on x64.debug

TBR=adamk@chromium.org,dslomov@chromium.org
LOG=Y
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-12 21:42:27 +00:00
arv@chromium.org
f95b81a6ef ES6: Make Map/Set constructors support iterable values
Same for WeakMap/WeakSet

https://bugs.ecmascript.org/show_bug.cgi?id=3111

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

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23091 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-12 20:09:40 +00:00
arv@chromium.org
6c209206f5 WeakMap/WeakSet: Add test for non object keys
Add test for non object keys in the iterable passed to the constructor.

BUG=v8:3399
LOG=Y
R=rossberg@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23090 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-12 19:54:52 +00:00
yangguo@chromium.org
0f81d7698a Implement Math.log1p using port from fdlibm.
Port contributed by Raymond Toy <rtoy@google.com>.

R=rtoy@chromium.org
LOG=N
BUG=v8:3481

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-12 13:36:33 +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
f7c49bafb0 ES6: Implement WeakMap and WeakSet constructor logic
Now that iterators are enabled by default we need to correctly
handle the parameter for WeakMap and WeakSet. If provided then the
argument is iterated over to add entries to the WeakMap and WeakSet.

BUG=v8:3399
LOG=Y
R=adamk@chromium.org, rossberg@chromium.org

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

Patch from Erik Arvidsson <arv@chromium.org>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22999 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-08 13:39:13 +00:00
yangguo@chromium.org
0c32d8c5cb Fix debug-promises tests.
Using assertEquals on two Promises always passes. Use assertSame instead.

R=rossberg@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22995 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-08 11:57:51 +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
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
yangguo@chromium.org
2ec32f346d Only escape U+0022 in argument values of String.prototype HTML methods
Contributed by Mathias Bynens <mathiasb@opera.com>.

TEST=mjsunit/es6/string-html
BUG=v8:2217
LOG=Y
R=arv@chromium.org, yangguo@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22955 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-07 07:45:33 +00:00
yangguo@chromium.org
c29b0a962d Add CheckObjectCoercible for the String.prototype HTML methods
Contributed by Mathias Bynens <mathiasb@opera.com>.

TEST=mjsunit/es6/string-html
BUG=v8:2218
LOG=Y
R=yangguo@chromium.org

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

Patch from Mathias Bynens <mathias@qiwi.be>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22938 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-06 14:58:46 +00:00
yangguo@chromium.org
3b54f89ffa Trigger exception debug events on Promise reject.
R=rossberg@chromium.org, aandrey@chromium.org
BUG=393913
LOG=Y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22913 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-06 09:41:52 +00:00
rossberg@chromium.org
6f4aea9512 Remove @@create and don't expose unimplemented symbols
Also, add some bits missing from turn-on-symbols CL

R=adamk@chromium.org, dslomov@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22910 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-06 09:31:21 +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
yangguo@chromium.org
01560f9ccd Do not include native Javascript in ExecutionState frames.
When a debug event is triggered, the ExecutionState object should not
expose native JS code.

R=aandrey@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22849 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-05 08:16:02 +00:00
yangguo@chromium.org
90bbdacbf8 Merge three PromiseEvent's into one.
This also adds missing instrumentation and removes resolver tracking.

BUG=v8:3093
LOG=N
R=aandrey@chromium.org, yangguo@chromium.org

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

Patch from Alexandra Mikhaylova <amikhaylova@google.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22846 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-05 07:42:06 +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
a8a02a51f1 Inline Math.fround in optimized code.
R=svenpanne@chromium.org
BUG=v8:3469
LOG=N

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22665 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-29 11:34:08 +00:00
yangguo@chromium.org
63fb538128 Introduce more debug events for promises.
BUG=v8:3093
LOG=Y
R=yangguo@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22591 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-24 10:43:41 +00:00
yangguo@chromium.org
d1333142e2 Ship ES6 Math functions.
R=rossberg@chromium.org
BUG=v8:2938
LOG=Y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-16 14:00:15 +00:00
rossberg@chromium.org
96dd1c7831 Make ToPrimitive throw on symbol wrappers
R=mstarzinger@chromium.org
BUG=v8:3442
LOG=Y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-16 09:26:11 +00:00
rossberg@chromium.org
942fe1914f Reland "Include symbol properties in Object.{create,defineProperties}"
Second try; implementation that doesn't rely on external arrays.

R=mstarzinger@chromium.org
BUG=v8:3440

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22378 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-14 14:00:33 +00:00
rossberg@chromium.org
f2536bf7af Revert "Include symbol properties in Object.{create,defineProperties}"
TBR=mstarzinger@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-14 12:27:08 +00:00
rossberg@chromium.org
5c8d0d18f0 Include symbol properties in Object.{create,defineProperties}
R=mstarzinger@chromium.org
BUG=v8:3440
LOG=Y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22370 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-14 10:59:29 +00:00
aandrey@chromium.org
6872ad5c46 Change some names in Promise instrumentation events.
TBR=yangguo@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22284 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-08 14:45:57 +00:00
rossberg@chromium.org
7aff3023ae Avoid brittle use of .bind in Promise.all
R=yangguo@chromium.org
BUG=v8:3420
LOG=Y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-07 09:47:43 +00:00
aandrey@chromium.org
952a986dd1 Introduce debug events for Microtask queue.
R=yangguo@chromium.org, adamk@chromium.org, rafaelw@chromium.org, rossberg@chromium.org
BUG=chromium:272416
LOG=Y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22204 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-03 15:56:01 +00:00
rossberg@chromium.org
28eda86ae7 Make Map.set() and Set.add() chainable
From the Harmony draft:

https://people.mozilla.org/~jorendorff/es6-draft.html#sec-map.prototype.set
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-weakmap.prototype.set
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-set.prototype.add
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-weakset.prototype.add

BUG=v8:3410
R=arv@chromium.org, rossberg@chromium.org

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

Patch from caitp <caitpotter88@gmail.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22111 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-01 09:49:25 +00:00
yangguo@chromium.org
f6c4178aa7 Introduce debug events for promises.
R=aandrey@chromium.org, rossberg@chromium.org
BUG=v8:3093
LOG=Y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22086 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-30 11:12:42 +00:00
mstarzinger@chromium.org
5eb7ce9040 Remove obsolete --harmony-promises flag from tests.
R=yangguo@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21898 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-20 10:47:50 +00:00
yangguo@chromium.org
d9736047b7 Implement Mirror object for Symbols.
R=rossberg@chromium.org, yurys@chromium.org
BUG=v8:3290
LOG=Y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21414 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-21 15:13:50 +00:00
rossberg@chromium.org
417610e24a Stage ES6 symbols
R=yangguo@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-16 14:42:02 +00:00
yangguo@chromium.org
75a7a3157f Use %DebugGetProperty in debug mirror to check for Promise.
R=aandrey@chromium.org, amikhaylova@google.com

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21339 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-16 13:06:20 +00:00
rossberg@chromium.org
98849dd1ce Drop thenable coercion cache
R=dslomov@chromium.org
BUG=372788
LOG=Y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21301 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-14 10:44:34 +00:00
yangguo@chromium.org
df296a2be0 Revert "Read internal properties [[PromiseStatus]] and [[PromiseValue]] of the promise."
This reverts r21266.

TBR=danno@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-12 13:38:39 +00:00
yangguo@chromium.org
b785aeda44 Read internal properties [[PromiseStatus]] and [[PromiseValue]] of the promise.
BUG=v8:3093
LOG=N
R=aandrey@chromium.org, yangguo@chromium.org

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

Patch from Alexandra Mikhaylova <amikhaylova@google.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21266 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-12 12:42:35 +00:00
rossberg@chromium.org
ae0a36ee32 Re^3-land "Ship promises and weak collections"
R=jochen@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-06 14:48:34 +00:00
yangguo@chromium.org
7e367ae0ed Reland "Trigger exception debug event for promises at the throw site."
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21097 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-30 15:17:51 +00:00
yangguo@chromium.org
792af58115 Revert "Trigger exception debug event for promises at the throw site."
This reverts r21092.

R=ishell@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21094 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-30 14:51:41 +00:00
yangguo@chromium.org
eed0e7e7a3 Trigger exception debug event for promises at the throw site.
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-30 14:17:40 +00:00
rossberg@chromium.org
cf3a3a8844 Revert "PromiseThen should ignore non-function parameters."
Wrong Blink test expectations, need to fix later.

TBR=machenbach@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21028 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-28 15:57:25 +00:00
rossberg@chromium.org
f40feecb4d PromiseThen should ignore non-function parameters.
When non-function parameters are given, PromiseThen should work as if
undefined parameters were given.

BUG=347455
LOG=Y
R=rossberg@chromium.org

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

Patch from Yutaka Hirano <yhirano@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21025 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-28 15:19:15 +00:00
yangguo@chromium.org
da0ca2afc2 Expose promise value through promise mirror.
R=rossberg@chromium.org, yurys@chromium.org
BUG=v8:3093
LOG=Y

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21003 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-28 08:33:23 +00:00
yangguo@chromium.org
81a101678f Expose promise status through promise mirror.
R=aandrey@chromium.org, rossberg@chromium.org, yurys@chromium.org
BUG=v8:3093
LOG=Y

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20988 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-25 14:01:01 +00:00
yangguo@chromium.org
28f5cf398e Trigger debug event on not yet caught exception in promises.
R=aandrey@chromium.org, rossberg@chromium.org, yurys@chromium.org
BUG=v8:3093
LOG=Y

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20956 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-25 07:03:05 +00:00
jochen@chromium.org
b7039334ae Revert 20313 - "Ship promises and weak collections"
> R=mstarzinger@chromium.org
> BUG=
>
> Committed: https://code.google.com/p/v8/source/detail?r=20211
>
> Review URL: https://codereview.chromium.org/206163004

R=rossberg@chromium.org
TBR=rossberg@chromium.org
LOG=y
BUG=n

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20353 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-31 12:40:32 +00:00
rossberg@chromium.org
826cf64fd3 Ship promises and weak collections
R=mstarzinger@chromium.org
BUG=

Committed: https://code.google.com/p/v8/source/detail?r=20211

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20313 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-27 16:42:34 +00:00
rossberg@chromium.org
ddedf5c309 Harden internal uses of .chain
R=yangguo@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20309 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-27 16:11:23 +00:00
rossberg@chromium.org
2e1b16de2a Revert "Ship promises and weak collections"
Reason: breaks Blink layout tests.

R=machenbach@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20233 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-25 10:57:52 +00:00
rossberg@chromium.org
33be68c2fa Ship promises and weak collections
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20211 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-24 16:59:04 +00:00
rossberg@chromium.org
b7b40e2b84 Remove Promise.cast
...as per January meeting. Renames 'cast' to 'resolve'. We rename the prior 'resolve' to 'accept', to keep the chain API usable.

R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20040 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-18 15:03:35 +00:00
rossberg@chromium.org
aa250ea41a Promises: make null a legal argument for .then
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20037 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-18 14:55:43 +00:00
rossberg@chromium.org
58d623f228 Stage ES6 promises and weak collections
Split collections flag into weak and non-weak.

R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20019 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-18 09:57:14 +00:00
yangguo@chromium.org
4e390c64f1 Harmony: move math features to es-staging.
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19886 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-13 09:51:59 +00:00