Commit Graph

4391 Commits

Author SHA1 Message Date
erikcorry
b3d4bce593 Only record one in n line endings to save space.
R=yangguo@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28837}
2015-06-08 12:01:02 +00:00
ishell
050e8880f5 A couple of other "stack overflow" vs. "has_pending_exception()" issues fixed.
BUG=chromium:471659, chromium:494158
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28816}
2015-06-05 15:52:20 +00:00
arv
d269e22de9 [es6] Array.prototype.find and findIndex should include holes
We should not skip holes for these 2 functions.

BUG=v8:3895
LOG=N
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#28814}
2015-06-05 14:18:20 +00:00
danno
74f9d8c901 Add %GetCallerJSFunction intrinsic
Only optimized for TF

R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28812}
2015-06-05 12:29:04 +00:00
arv
8c06568186 [es6] super.prop, eval and lazy functions
We used to only store the uses_super_property in the preparse data
logger. Let the logger use NeedsHomeObject instead.

BUG=v8:3768
LOG=N
R=wingo, adamk

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

Cr-Commit-Position: refs/heads/master@{#28806}
2015-06-04 21:16:32 +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
dehrenberg
c1e3e3018e Implement %TypedArray%.prototype.{reduce,reduceRight}
This patch re-commits a previous commit after fixing a test to not
run into another known bug.
This reverts commit b104a67ef0.

This patch implements the last two methods on TypedArrays. These
were previously committed and led to a test failure.

BUG=v8:3578
LOG=Y
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#28803}
2015-06-04 16:36:49 +00:00
binji
e59e40a354 Implement Atomics API
This is behind the flag "--harmony-atomics", and it only works on
SharedArrayBuffers. This implementation only includes the runtime functions.
The TurboFan implementation will be next.

The draft spec for Atomics can be found here:
https://docs.google.com/document/d/1NDGA_gZJ7M7w1Bh8S0AoDyEqwDdRh4uSoTPSNn77PFk

BUG=
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#28796}
2015-06-03 17:58:42 +00:00
ishell
5606fefe12 Fixed noi18n build.
Review URL: https://codereview.chromium.org/1159553011

Cr-Commit-Position: refs/heads/master@{#28792}
2015-06-03 16:23:08 +00:00
ishell
405844b5f2 Fixed memory-leak in d8. It did not clean evaluation context used for executing shell commands.
BUG=chromium:493284
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28790}
2015-06-03 14:34:58 +00:00
mstarzinger
68beef53c3 Fix arrow functions requiring context without slots.
This fixes a corner-case where arrow functions that require a context
allocate none, because there are no additional slots allocated. Note
that this didn't happen with true function scopes because they always
had at least the receiver slot.

The outcome was a context chain that no longer was in sync with the
scope chain, hence context slot loads were bogus. This is observable
using the DYNAMIC_LOCAL optimization in all compilers.

R=rossberg@chromium.org,wingo@igalia.com
TEST=mjsunit/harmony/regress/regress-4160
BUG=v8:4160
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28788}
2015-06-03 11:32:31 +00:00
bmeurer
b104a67ef0 Revert of Implement %TypedArray%.prototype.{reduce,reduceRight} (patchset #3 id:40001 of https://codereview.chromium.org/1154423014/)
Reason for revert:
Breaks Win32 mjsunit/harmony/typedarray-reduce, see http://build.chromium.org/p/client.v8/builders/V8%20Win32%20-%20nosnap%20-%20shared/builds/7121/steps/Check/logs/typedarray-reduce for details.

Original issue's description:
> Implement %TypedArray%.prototype.{reduce,reduceRight}
>
> This patch implements the last two methods on TypedArrays. These
> were previously committed and led to a test failure.
>
> BUG=v8:3578
> LOG=Y
> R=adamk
>
> Committed: https://crrev.com/95d779ecc9816ac20c1565bebeeac6a1ef29f1c7
> Cr-Commit-Position: refs/heads/master@{#28773}

TBR=adamk@chromium.org,dehrenberg@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3578

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

Cr-Commit-Position: refs/heads/master@{#28777}
2015-06-03 05:29:42 +00:00
dehrenberg
95d779ecc9 Implement %TypedArray%.prototype.{reduce,reduceRight}
This patch implements the last two methods on TypedArrays. These
were previously committed and led to a test failure.

BUG=v8:3578
LOG=Y
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#28773}
2015-06-03 05:01:41 +00:00
arv
4b8051a02a [es6] Super call in arrows and eval
This splits the SuperReference AST node into SuperPropertyReference and
SuperCallReference. The super call reference node consists of three
unresolved vars to this, new.target and this_function. These gets
declared when the right function is entered and if it is in use. The
variables gets assigned in FullCodeGenerator::Generate.

This is a revert of the revert 88b1c9170a

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

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

Cr-Commit-Position: refs/heads/master@{#28769}
2015-06-02 22:04:33 +00:00
dehrenberg
4f9df26b09 Implement %TypedArray%.prototype.{toString,toLocaleString,join}
Implementations factored out from Array. Tests are derived from
normal array toString tests.

BUG=v8:3578
LOG=Y
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#28766}
2015-06-02 18:58:24 +00:00
conradw
3f5cd321f1 [strong] create strong array literals
Copied, with permission, from https://codereview.chromium.org/1151853003/

Initial patch set is an unmodified copy, rebased on top of related fixes from
https://codereview.chromium.org/1158933002/

Subsequent patch sets contain fixes for remaining bugs in the CL.

BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28760}
2015-06-02 11:46:15 +00:00
ishell
65ada9fa0b Mark proxy map as unstable during proxy fixing (freezing, sealing or preventing extensions).
BUG=chromium:493568
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28759}
2015-06-02 11:29:27 +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
caitpotter88
904fbc303a Revert of [es6] implement default parameters via desugaring (patchset #19 id:380001 of https://codereview.chromium.org/1127063003/)
Reason for revert:
Broken on arm64

Original issue's description:
> [es6] implement default parameters via desugaring
>
> Stage 1 implementation:
>
> - Parameters can't be referenced before initialized (from left-to-right)
> - SingleNameBindings only, no support for BindingPatterns
>
> Known issues:
>
> - Incorrect scoping (parameter expressions may reference variables declared in function body)
> - Function arity is untouched
> - Hole-checking needs work
> - Rest parameters are broken when mixed with optional arguments
>
> BUG=v8:2160
> LOG=N
> R=arv@chromium.org, rossberg@chromium.org
>
> Committed: https://crrev.com/892c85485881f8be2f17bd83238980f858126576
> Cr-Commit-Position: refs/heads/master@{#28739}

TBR=rossberg@chromium.org,wingo@igalia.com,arv@chromium.org,dslomov@chromium.org,adamk@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:2160

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

Cr-Commit-Position: refs/heads/master@{#28740}
2015-06-01 18:35:03 +00:00
caitpotter88
892c854858 [es6] implement default parameters via desugaring
Stage 1 implementation:

- Parameters can't be referenced before initialized (from left-to-right)
- SingleNameBindings only, no support for BindingPatterns

Known issues:

- Incorrect scoping (parameter expressions may reference variables declared in function body)
- Function arity is untouched
- Hole-checking needs work
- Rest parameters are broken when mixed with optional arguments

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

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

Cr-Commit-Position: refs/heads/master@{#28739}
2015-06-01 17:10:50 +00:00
arv
88b1c9170a Revert of [es6] Super call in arrows and eval (patchset #5 id:100001 of https://codereview.chromium.org/1146863007/)
Reason for revert:
Fails

http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap%20-%20debug%20-%201/builds/579/steps/Check/logs/super

Original issue's description:
> [es6] Super call in arrows and eval
>
> This splits the SuperReference AST node into SuperPropertyReference and
> SuperCallReference. The super call reference node consists of three
> unresolved vars to this, new.target and this_function. These gets
> declared when the right function is entered and if it is in use. The
> variables gets assigned in FullCodeGenerator::Generate.
>
> BUG=v8:3768
> LOG=N
> R=wingo@igalia.com, adamk@chromium.org
>
> Committed: https://crrev.com/673c0516ab96f24343bbb26e0afc2846b5a679df
> Cr-Commit-Position: refs/heads/master@{#28731}

TBR=wingo@igalia.com,adamk@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3768

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

Cr-Commit-Position: refs/heads/master@{#28735}
2015-06-01 16:10:17 +00:00
arv
673c0516ab [es6] Super call in arrows and eval
This splits the SuperReference AST node into SuperPropertyReference and
SuperCallReference. The super call reference node consists of three
unresolved vars to this, new.target and this_function. These gets
declared when the right function is entered and if it is in use. The
variables gets assigned in FullCodeGenerator::Generate.

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

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

Cr-Commit-Position: refs/heads/master@{#28731}
2015-06-01 15:02:38 +00:00
mstarzinger
d207fcef66 Fix bogus insertion of filler in LO-space by String#replace.
R=hpayer@chromium.org
TEST=mjsunit/regress/regress-crbug-493779
BUG=chromium:493779
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28727}
2015-06-01 13:36:11 +00:00
conradw
b14305c161 [strong] Implement per-object restrictions behaviour of delete operator
Implements the strong mode proposal's restrictions on the behaviour of the
delete operator for strong objects.

Setting the strong bit is still wip, so this change will only affect those
objects that have the bit correctly set. The tests reflect this, and will be
expanded as more objects can be marked as strong.

Attempt 2, last version did not work with API.

BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28724}
2015-06-01 11:39:16 +00:00
yangguo
3f223ee69b Debugger: PreservePositionScope should clear positions inside the scope.
The point of this change is so that when emitting code for a call in
FullCodegen::VisitCall, the statement position is not associated to
any code that loads the function, but to the actual CallIC.

R=mvstanton@chromium.org
BUG=chromium:481896
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28701}
2015-05-29 12:56:40 +00:00
ishell
c984efe6e3 Reland "Fixed a couple of failing DCHECK(has_pending_exception()). (patchset #1 id:1 of https://codereview.chromium.org/1151373002/ )"
BUG=chromium:491062
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28699}
2015-05-29 11:37:23 +00:00
conradw
6edc3e3179 [strong] Implement per-object restrictions behaviour of property freezing
Implements the strong mode proposal's restrictions on changing a strong object's
writable, non-configurable property to non-writable.

Setting the strong bit is still wip, so this change will only affect those
objects that have the bit correctly set. The tests reflect this, and will be
expanded as more objects can be marked as strong.

BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28698}
2015-05-29 11:33:29 +00:00
yangguo
dc9f0d4642 Throw illegal exception when formatting with invalid template index.
R=arv@chromium.org
BUG=chromium:492526
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28671}
2015-05-28 07:05:12 +00:00
yangguo
36d8363c1c Do not eagerly convert exception to string when creating a message object
R=mstarzinger@chromium.org
BUG=chromium:490680
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#28670}
2015-05-28 06:30:14 +00:00
conradw
629d275073 [strong] Implement per-object restrictions behaviour for prototype setting
Implements the strong mode proposal's restrictions on the ability of user code
to modify the prototype of strong objects.

Setting the strong bit is still wip, so this change will only affect those
objects that have the bit correctly set. The tests reflect this, and will be
expanded as more objects can be marked as strong.

BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28664}
2015-05-27 17:06:43 +00:00
conradw
092acb2b96 [strong] fix strong array, object prototypes
Strong Object/Array literals are currently being created with incorrect
internal prototypes. This CL fixes this and extends the test suite to check.

BUG=
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28655}
2015-05-27 13:55:14 +00:00
arv
44e9810345 [es6] Support super.property in eval and arrow functions
When we enter a method that needs access to the [[HomeObject]]
we allocate a local variable `.home_object` and assign it the
value from the [[HomeObject]] private symbol. Something along
the lines of:

  method() {
    var .home_object = %ThisFunction()[home_object_symbol];
    ...
  }

BUG=v8:3867, v8:4031
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28644}
2015-05-26 20:29:54 +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
yangguo
0837b43720 Correctly hook up materialized receiver into the evaluation context chain.
R=ulan@chromium.org
BUG=chromium:491943
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#28628}
2015-05-26 13:06:41 +00:00
erikcorry
eca5b5d7ab Move hash code from hidden string to a private symbol
* Hash code is now just done with a private own symbol instead of the hidden string, which predates symbols.
* In the long run we should do all hidden properties this way and get rid of the
hidden magic 0-length string with the zero hash code.  The advantages include
less complexity and being able to do things from JS in a natural way.
* Initially, the performance of weak set regressed, because it's a little harder
to do the lookup in C++.  Instead of heroics in C++ to make things faster I
moved some functionality into JS and got the performance back. JS is supposed to be good at looking up named properties on objects.
* This also changes hash codes of Smis so that they are always Smis.

Performance figures are in the comments to the code review.  Summary: Most of js-perf-test/Collections is neutral.  Set and Map with object keys are 40-50% better.  WeakMap is -5% and WeakSet is +9%.  After the measurements, I fixed global proxies, which cost 1% on most tests and 5% on the weak ones :-(.

In the code review comments is a patch with an example of the heroics we could do in C++ to make lookup faster (I hope we don't have to do this.  Instead of checking for the property, then doing a new lookup to insert it, we could do one lookup and handle the addition immediately).  With the current benchmarks above this buys us nothing, but if we go back to doing more lookups in C++ instead of in stubs and JS then it's a win.

In a similar vein we could give the magic zero hash code to the hash code
symbol.  Then when we look up the hash code we would sometimes see the table
with all the hidden properties.  This dual use of the field for either the hash
code or the table with all hidden properties and the hash code is rather ugly,
and this CL gets rid of it.  I'd be loath to bring it back.  On the benchmarks quoted above it's slightly slower than moving the hash code lookup to JS like in this CL.

One worry is that the benchmark results above are more monomorphic than real
world code, so may be overstating the performance benefits of moving to JS.  I
think this is part of a general issue we have with handling polymorphic code in
JS and any solutions there will benefit this solution, which boils down to
regular property access. Any improvement there will lift all boats.

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

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

Cr-Commit-Position: refs/heads/master@{#28622}
2015-05-26 11:26:36 +00:00
bmeurer
b53c35a797 [turbofan] Properly kill Terminate nodes when removing loops.
BUG=chromium:491578
LOG=n
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28621}
2015-05-26 10:48:07 +00:00
ishell
d2334e901c Revert of Fixed a couple of failing DCHECK(has_pending_exception()). (patchset #1 id:1 of https://codereview.chromium.org/1151373002/)
Reason for revert:
Broke V8 Linux - nosnap.

Original issue's description:
> Fixed a couple of failing DCHECK(has_pending_exception()).
>
> BUG=chromium:491062
> LOG=N
>
> Committed: https://crrev.com/62b56507cce3c57a2e1aebce6d34f29b3b64e762
> Cr-Commit-Position: refs/heads/master@{#28617}

TBR=yangguo@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:491062

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

Cr-Commit-Position: refs/heads/master@{#28619}
2015-05-26 10:28:35 +00:00
ishell
62b56507cc Fixed a couple of failing DCHECK(has_pending_exception()).
BUG=chromium:491062
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28617}
2015-05-26 10:06:54 +00:00
jarin
a893a5e59a Exclude non-optimizable functions from OptimizeFunctionOnNextCall.
BUG=chromium:491481
R=mstarzinger@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#28614}
2015-05-26 08:47:04 +00:00
mstarzinger
ce551f91fd [turbofan] Fix known issue about computed property names.
This fixes a corner-case where deoptimization while evaluating the
value to a __proto__ property after computed property names appeared
in an object literal, lead to environments not being in sync with
unoptimized code.

R=arv@chromium.org
TEST=mjsunit/harmony/computed-property-names-deopt

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

Cr-Commit-Position: refs/heads/master@{#28613}
2015-05-26 08:45:16 +00:00
yangguo
5cb925e448 Revert of Revert of Hook up more import/exports in natives. (patchset #1 id:1 of https://codereview.chromium.org/1154743003/)
Reason for revert:
Unrelated failure that was uncovered by this CL has been fixed (https://codereview.chromium.org/1152243002/)

Original issue's description:
> Revert of Hook up more import/exports in natives. (patchset #3 id:40001 of https://codereview.chromium.org/1154483002/)
>
> Reason for revert:
> [Sheriff] Speculative revert for gc stress failures:
> http://build.chromium.org/p/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/builds/481
>
> Original issue's description:
> > Hook up more import/exports in natives.
> >
> > R=jkummerow@chromium.org
> >
> > Committed: https://crrev.com/7a918ac9658d11778f39593bfcc19d7c506defd9
> > Cr-Commit-Position: refs/heads/master@{#28573}
> >
> > Committed: https://crrev.com/e13a39dd7f4062898709d7c68900677df0513995
> > Cr-Commit-Position: refs/heads/master@{#28578}
>
> TBR=jkummerow@chromium.org,erik.corry@gmail.com,yangguo@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://crrev.com/eb0024d1dbdda5f51b006dd54887404ee6c5cbfc
> Cr-Commit-Position: refs/heads/master@{#28584}

TBR=jkummerow@chromium.org,erik.corry@gmail.com,machenbach@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28608}
2015-05-26 07:24:21 +00:00
binji
aff8ebb0eb Implement SharedArrayBuffer.
This adds a new external type (v8::SharedArrayBuffer) that uses a JSArrayBuffer
under the hood. It can be distinguished from an ArrayBuffer by the newly-added
is_shared() bit.

Currently there is no difference in functionality between a SharedArrayBuffer
and an ArrayBuffer. However, a future CL will add the Atomics API, which is
only available on an SharedArrayBuffer. All non-atomic accesses are identical
to ArrayBuffer accesses.

LOG=N
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28594}
2015-05-22 13:43:17 +00:00
yangguo
57ee3c0f6e Revert of Implement SharedArrayBuffer (patchset #7 id:120001 of https://codereview.chromium.org/1136553006/)
Reason for revert:
breaks build

Original issue's description:
> Implement SharedArrayBuffer.
>
> This adds a new external type (v8::SharedArrayBuffer) that uses a JSArrayBuffer under the hood. It can be distinguished from an ArrayBuffer by the newly-added is_shared() bit.
>
> Currently there is no difference in functionality between a SharedArrayBuffer and an ArrayBuffer. However, a future CL will add the Atomics API, which is only available on an SharedArrayBuffer. All non-atomic accesses are identical to ArrayBuffer accesses.
>
> BUG=
>
> Committed: https://crrev.com/57170bff7baf341c666252a7f6a49e9c08d51263
> Cr-Commit-Position: refs/heads/master@{#28588}

TBR=jarin@chromium.org,jochen@chromium.org,binji@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28589}
2015-05-22 12:17:49 +00:00
binji
57170bff7b Implement SharedArrayBuffer.
This adds a new external type (v8::SharedArrayBuffer) that uses a JSArrayBuffer under the hood. It can be distinguished from an ArrayBuffer by the newly-added is_shared() bit.

Currently there is no difference in functionality between a SharedArrayBuffer and an ArrayBuffer. However, a future CL will add the Atomics API, which is only available on an SharedArrayBuffer. All non-atomic accesses are identical to ArrayBuffer accesses.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#28588}
2015-05-22 12:06:44 +00:00
machenbach
eb0024d1db Revert of Hook up more import/exports in natives. (patchset #3 id:40001 of https://codereview.chromium.org/1154483002/)
Reason for revert:
[Sheriff] Speculative revert for gc stress failures:
http://build.chromium.org/p/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/builds/481

Original issue's description:
> Hook up more import/exports in natives.
>
> R=jkummerow@chromium.org
>
> Committed: https://crrev.com/7a918ac9658d11778f39593bfcc19d7c506defd9
> Cr-Commit-Position: refs/heads/master@{#28573}
>
> Committed: https://crrev.com/e13a39dd7f4062898709d7c68900677df0513995
> Cr-Commit-Position: refs/heads/master@{#28578}

TBR=jkummerow@chromium.org,erik.corry@gmail.com,yangguo@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28584}
2015-05-22 11:21:17 +00:00
svenpanne
a326691c75 JavaScript stubs have access to their calling convention and minor key now.
First steps only, the TurboFan compilation is still triggered from C++ land.

Includes some simplifications/cleanups, too.

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

Cr-Commit-Position: refs/heads/master@{#28581}
2015-05-22 11:01:31 +00:00
verwaest
eeb2d17b7a Fix ToNameArray
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28580}
2015-05-22 10:57:20 +00:00
rossberg
65bea197ee [strong] cache strong object literal maps
Also, add more literal tests.

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

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

Cr-Commit-Position: refs/heads/master@{#28579}
2015-05-22 10:51:29 +00:00
yangguo
e13a39dd7f Hook up more import/exports in natives.
R=jkummerow@chromium.org

Committed: https://crrev.com/7a918ac9658d11778f39593bfcc19d7c506defd9
Cr-Commit-Position: refs/heads/master@{#28573}

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

Cr-Commit-Position: refs/heads/master@{#28578}
2015-05-22 10:32:37 +00:00
machenbach
4c2690a475 Revert of Hook up more import/exports in natives. (patchset #2 id:20001 of https://codereview.chromium.org/1154483002/)
Reason for revert:
[Sheriff] Breaks nosnap:
http://build.chromium.org/p/client.v8/builders/V8%20Win32%20-%20nosnap%20-%20shared/builds/6943

Original issue's description:
> Hook up more import/exports in natives.
>
> R=jkummerow@chromium.org
>
> Committed: https://crrev.com/7a918ac9658d11778f39593bfcc19d7c506defd9
> Cr-Commit-Position: refs/heads/master@{#28573}

TBR=jkummerow@chromium.org,erik.corry@gmail.com,yangguo@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28574}
2015-05-22 08:53:05 +00:00
yangguo
7a918ac965 Hook up more import/exports in natives.
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28573}
2015-05-22 08:32:28 +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
dslomov
8925b848ee [destructuring] Implement pattern matching in lexcal for-of/for-in.
R=arv@chromium.org,rossberg@chromium.org
BUG=v8:811
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28547}
2015-05-21 12:35:54 +00:00
jarin
d2ca18d849 [turbofan] Fix variable liveness control structure creation.
R=bmeurer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28536}
2015-05-21 09:57:11 +00:00
arv
9502e91adb [es6] Spread in array literals
This allows you to put iterables into your array literals
and the will get spread into the array.

  let x = [0, ...range(1, 3)];  // [0, 1, 2]

This is done by treating the array literal up to the first
spread element as usual, including using a boiler plate
array, and then appending the remaining expressions and rest
expressions.

BUG=v8:3018
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28534}
2015-05-21 08:08:55 +00:00
yangguo
e56585077b Use shared container to manage imports/exports.
Also changed string.js and math.js to adapt this change.

R=jkummerow@chromium.org

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

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

Cr-Commit-Position: refs/heads/master@{#28533}
2015-05-21 06:15:19 +00:00
dehrenberg
f6af3a492d Re-land %TypedArray%.prototype.{map,filter,some}
Previously this patch was attempted with reduce and reduceRight included;
however, some of those tests crashed in the trybots. This version has
just map, fiter and some, together with their tests.

R=arv@chromium.org
BUG=v8:3578
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#28529}
2015-05-21 01:38:04 +00:00
verwaest
de23dd2809 Fix for-in for large indexes and indexes on proxies
BUG=v8:4130
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#28526}
2015-05-20 17:03:03 +00:00
jkummerow
1ec5561685 Revert of Use shared container to manage imports/exports. (patchset #2 id:20001 of https://codereview.chromium.org/1143993003/)
Reason for revert:
Breaks nosnap bots

Original issue's description:
> Use shared container to manage imports/exports.
>
> Also changed string.js and math.js to adapt this change.
>
> R=jkummerow@chromium.org
>
> Committed: https://crrev.com/e25058b0b7b9831162579564fc8935d568c1ecdd
> Cr-Commit-Position: refs/heads/master@{#28521}

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

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

Cr-Commit-Position: refs/heads/master@{#28523}
2015-05-20 15:59:37 +00:00
dslomov
aca4735bec [destructuring] Implement spread binding patterns.
R=arv@chromium.org,rossberg@chromium.org
BUG=v8:811
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28522}
2015-05-20 15:05:43 +00:00
yangguo
e25058b0b7 Use shared container to manage imports/exports.
Also changed string.js and math.js to adapt this change.

R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28521}
2015-05-20 14:58:43 +00:00
ishell
1c673a56c1 Fixed DCHECK in StoreIC::CompileHandler().
BUG=chromium:489597
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28518}
2015-05-20 13:36:27 +00:00
dslomov
a38e3a4518 [destructuring] Implement BindingArrayPattern
(everything except Spread is implemeneted)

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

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

Cr-Commit-Position: refs/heads/master@{#28500}
2015-05-20 08:08:14 +00:00
rossberg
2fa664fbe2 Reland "[strong] Object literals create strong objects"
(patchset #4 id:60001 of https://codereview.chromium.org/1134333005/)"

This reverts commit 81c080ef8e.
Patchset #1 is the original CL.
Patchset #2 fixes a handlification bug that caused the crash.

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

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

Cr-Commit-Position: refs/heads/master@{#28497}
2015-05-20 07:07:42 +00:00
Daniel Ehrenberg
31fb502474 Implement %TypedArray%.{lastI,i}ndexOf
This patch adds the two TypedArray methods indexOf and lastIndexOf,
which are similar to the methods on Arrays. Tests are ported from
arrays as well.

BUG=v8:3578
LOG=Y
R=arv@chromium.org

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

Patch from Daniel Ehrenberg <dehrenberg@chromium.org>.

Cr-Commit-Position: refs/heads/master@{#28495}
2015-05-20 01:09:05 +00:00
Daniel Ehrenberg
540bb0c80b Implement %TypedArray%.prototype.sort
The sort method of TypedArrays sorts in numerical order by default.
This patch implements sorting based on Arrays and adds a test.
The length of %TypedArray%.prototype.sort, like Array.prototype.sort,
seems to be unspecified in ES6, so this patch lets it have the value
1, to match our interpretation for Array.prototype.sort (though 0
would also be a sensible length).

R=arv@chromium.org
BUG=v8:3578
LOG=Y

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

Patch from Daniel Ehrenberg <dehrenberg@chromium.org>.

Cr-Commit-Position: refs/heads/master@{#28494}
2015-05-20 00:56:06 +00:00
Daniel Ehrenberg
cc74268d30 Implement %TypedArray%.reverse
This patch adds the reverse method to TypedArrays, together with a
test. The test also runs for normal Arrays, since I didn't see a
test for reversing dense arrays.

BUG=v8:3578
LOG=Y
R=arv@chromium.org

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

Patch from Daniel Ehrenberg <dehrenberg@chromium.org>.

Cr-Commit-Position: refs/heads/master@{#28493}
2015-05-20 00:38:49 +00:00
arv
78f0452d31 [strong] Function arity check should be based on required parameters
Also check whether the arguments count is smaller than the number of
required parameters which is the same as the SharedFunctionInfo length.

BUG=v8:4102
LOG=N
R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28491}
2015-05-19 18:44:05 +00:00
machenbach
6f58ffa140 Revert of Implement %TypedArray%.prototype.{map,filter,some,reduce,reduceRight} (patchset #2 id:20001 of https://codereview.chromium.org/1139663005/)
Reason for revert:
[Sheriff] Breaks win nosnap:
http://build.chromium.org/p/client.v8/builders/V8%20Win32%20-%20nosnap%20-%20shared/builds/6872

Original issue's description:
> Implement %TypedArray%.prototype.{map,filter,some,reduce,reduceRight}
>
> This patch adds implementations for additional TypedArray methods
> from the ES6 spec, together with tests adapted from array code.
>
> R=arv@chromium.org
> BUG=v8:3578
> LOG=Y
>
> Committed: https://crrev.com/59ef8c5f3282f01b5990b3a46a2a3a829b699a13
> Cr-Commit-Position: refs/heads/master@{#28488}

TBR=arv@chromium.org,dehrenberg@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3578

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

Cr-Commit-Position: refs/heads/master@{#28489}
2015-05-19 16:55:45 +00:00
dehrenberg
59ef8c5f32 Implement %TypedArray%.prototype.{map,filter,some,reduce,reduceRight}
This patch adds implementations for additional TypedArray methods
from the ES6 spec, together with tests adapted from array code.

R=arv@chromium.org
BUG=v8:3578
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#28488}
2015-05-19 16:32:44 +00:00
dslomov
3199077791 [destructuring] Support computed property names in patterns.
R=arv@chromium.org,rossberg@chromium.org
BUG=v8:811
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28487}
2015-05-19 16:27:02 +00:00
mstarzinger
7bd2d3e32e [turbofan] Fix over-restictive assertion in code generator.
R=titzer@chromium.org
TEST=mjsunit/regress/regress-crbug-489293
BUG=chromium:489293
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#28486}
2015-05-19 16:14:28 +00:00
wingo
66665ae727 Reapply "Resolve references to "this" the same way as normal variables""
This reapplies https://codereview.chromium.org/1136073002, along with
the followups:

  Remove Scope::scope_uses_this_ flag
  https://codereview.chromium.org/1128963005

and

  PPC: Resolve references to "this" the same way as normal variables
  https://codereview.chromium.org/1134073003

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

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

Cr-Commit-Position: refs/heads/master@{#28458}

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

Cr-Commit-Position: refs/heads/master@{#28484}
2015-05-19 14:50:59 +00:00
dslomov
5cdaa3e6e5 [destructuring] Implement initializers in patterns.
R=arv@chromium.org,rossberg@chromium.org,wingo@igalia.com
BUG=v8:811
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28482}
2015-05-19 14:29:38 +00:00
ishell
18b60594c4 Another regression test for resolving references to "this" in strict mode.
BUG=chromium:487105
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28480}
2015-05-19 12:51:42 +00:00
machenbach
8c15e5bdc3 [test] Make test as flaky
BUG=v8:4127
LOG=n
TBR=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28479}
2015-05-19 11:50:51 +00:00
wingo
24768fe200 Revert of Reapply "Resolve references to "this" the same way as normal variables"" (patchset #2 id:20001 of https://codereview.chromium.org/1136883006/)
Reason for revert:
Something is deserializing "this" declarations as Variable::NORMAL and not Variable::THIS https://codereview.chromium.org/1136123010/

Original issue's description:
> Reapply "Resolve references to "this" the same way as normal variables""
>
> This reapplies https://codereview.chromium.org/1136073002, along with
> the followups:
>
>   Remove Scope::scope_uses_this_ flag
>   https://codereview.chromium.org/1128963005
>
> and
>
>   PPC: Resolve references to "this" the same way as normal variables
>   https://codereview.chromium.org/1134073003
>
> R=yangguo@chromium.org, rossberg@chromium.org
> LOG=N
> BUG=
>
> Committed: https://crrev.com/1efc1e4f7a3d30d5225e9d5cb2585cad7cb17099
> Cr-Commit-Position: refs/heads/master@{#28458}

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

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

Cr-Commit-Position: refs/heads/master@{#28473}
2015-05-19 10:57:51 +00:00
titzer
f659ae4c89 [turbofan] Support vector IC feedback in the JSTypeFeedbackTable.
R=mvstanton@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28465}
2015-05-19 08:58:29 +00:00
machenbach
81c080ef8e Revert of [strong] Object literals create strong objects (patchset #4 id:60001 of https://codereview.chromium.org/1134333005/)
Reason for revert:
[Sheriff] Segmentation fault on arm64 with nosnap:
http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20nosnap%20-%20debug%20-%201/builds/1990

Original issue's description:
> [strong] Object literals create strong objects
>
> R=dslomov@chromium.org
> BUG=v8:3956
> LOG=N
>
> Committed: https://crrev.com/fe6598cffb82ec4180dcc2e2310e77d07a803f96
> Cr-Commit-Position: refs/heads/master@{#28444}

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

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

Cr-Commit-Position: refs/heads/master@{#28464}
2015-05-19 07:35:54 +00:00
jkummerow
f8175201da Fix harmless HGraph verification failure after hoisting inlined bounds checks
BUG=chromium:487608
LOG=y
R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28463}
2015-05-19 07:32:48 +00:00
yangguo
19312c1631 Do not clear stepping after DebugEvaluate.
Clearing stepping was originally introduced in http://codereview.chromium.org/7889039
But DebugEvaluate now also uses a DisableBreak scope, which makes sure we don't step
inside the evaluated code.

R=yurys@chromium.org
BUG=chromium:467180
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28461}
2015-05-19 04:56:08 +00:00
wingo
1efc1e4f7a Reapply "Resolve references to "this" the same way as normal variables""
This reapplies https://codereview.chromium.org/1136073002, along with
the followups:

  Remove Scope::scope_uses_this_ flag
  https://codereview.chromium.org/1128963005

and

  PPC: Resolve references to "this" the same way as normal variables
  https://codereview.chromium.org/1134073003

R=yangguo@chromium.org, rossberg@chromium.org
LOG=N
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28458}
2015-05-18 20:16:12 +00:00
dslomov
cf9492ddd8 [destructuring] More tests for object literal pattern
R=arv@chromium.org,rossberg@chromium.org
BUG=v8:811
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28457}
2015-05-18 20:14:51 +00:00
dehrenberg
cc3f59db55 Add TypedArray.from method
This function creates a new way to make TypedArrays based on existing
iterable or Array-like objects, analogous to Array.from. The patch
implements the function and adds tests.

R=arv@chromium.org
BUG=v8:3578
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#28456}
2015-05-18 20:13:47 +00:00
arv
55a7500343 [strong] Fix super in strong classes
The functions of strong classes are born non extensible. But, when
the class is created we need to add an own private symbol representing
the [[HomeObject]] slot in the spec.

Like for the hidden_string property, we allow adding private own
symbols to non extensible objects.

BUG=v8:4077
LOG=N
R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28447}
2015-05-18 14:18:38 +00:00
rossberg
fe6598cffb [strong] Object literals create strong objects
R=dslomov@chromium.org
BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28444}
2015-05-18 13:23:17 +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
machenbach
f453416b7f Revert of Debugger: preserve stepping state after evaluating breakpoint condition. (patchset #1 id:1 of https://codereview.chromium.org/1132643004/)
Reason for revert:
[Sheriff] This breaks TSAN (makes some tests marked as flaky permanently fail):
http://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/3882

Original issue's description:
> Debugger: preserve stepping state after evaluating breakpoint condition.
>
> R=ulan@chromium.org, yurys@chromium.org
> BUG=chromium:467180
> LOG=N

TBR=ulan@chromium.org,yurys@chromium.org,yangguo@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:467180

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

Cr-Commit-Position: refs/heads/master@{#28436}
2015-05-17 06:21:39 +00:00
yangguo
ee6666a55a Debugger: preserve stepping state after evaluating breakpoint condition.
R=ulan@chromium.org, yurys@chromium.org
BUG=chromium:467180
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28432}
2015-05-15 22:50:55 +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
yangguo
d8e9f3a484 Add regression test for resolving "this" in debug evaluate.
R=hablich@chromium.org
BUG=chromium:487289
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28424}
2015-05-15 13:57:31 +00:00
yangguo
f3f0b2724b Migrate error messages, part 11.
R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28423}
2015-05-15 13:32:26 +00:00
mvstanton
de3a1ca02e Bug: Runtime_GrowArrayElements provoked unnecessary lazy deopt.
Unnecessary, and unhandled as well.

BUG=488398
R=jarin@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28421}
2015-05-15 13:05:00 +00:00
ishell
3c1487db60 Map::ReconfigureProperty() should mark map as unstable when there is an element kind transition somewhere in the middle of the transition tree.
BUG=chromium:485548
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28418}
2015-05-15 10:39:51 +00:00
dslomov
7f6ae2300b [destructuring] Adapting PatternRewriter to work in C-style for-statements.
BUG=v8:811
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28417}
2015-05-15 09:56:24 +00:00
dehrenberg
85c91f639e Test that TypedArray methods don't read length
ES6 specifies that methods on TypedArrays reference an internal length
slot, rather than their length property. This patch tests that for the
TypedArray methods that exist currently.

R=arv@chromium.org
BUG=v8:3578
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#28409}
2015-05-15 02:03:44 +00:00
caitpotter88
3a18b9b71b [es6] support spread-calling Super-accessing properties
BUG=v8:4105, v8:3018
LOG=N
R=arv@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28405}
2015-05-14 22:59:14 +00:00
rossberg
9be59492f9 [strong] Introduce strong bit
Only set on strong functions so far to test basic operation.

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

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

Cr-Commit-Position: refs/heads/master@{#28396}
2015-05-13 13:31:12 +00:00
yangguo
e24b31f003 Revert "Resolve references to "this" the same way as normal variables"
... and the following two
"PPC: Resolve references to "this" the same way as normal variables"
"Remove Scope::scope_uses_this_ flag"

R=hablich@chromium.org
BUG=chromium:487289
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28395}
2015-05-13 13:30:01 +00:00
wingo
e73594c7fb Use ExpressionClassifier to identify valid arrow function formals
R=dslomov@chromium.org
LOG=N
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28391}
2015-05-13 11:45:02 +00:00
bmeurer
5494920a18 [turbofan] Use frame state before for shift operations as well.
This was already done for other binary operations, so it's basically
copying the existing functionality to shift left and shift right
logical/arithmetic.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28389}
2015-05-13 11:17:28 +00:00
bmeurer
2111d18dba [turbofan] Add frame state before JavaScript comparisons.
Use these check points to optimize comparisons where we already know
that one side cannot be a String (or turn into a string via
ToPrimitive).

Also remove bunch of useless DoNotCrash tests for the scheduler that are
painful to maintain and add almost no value.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28383}
2015-05-13 07:38:35 +00:00
dehrenberg
b57428e9ef Implement %TypedArray%.{fill,find,findIndex}
This patch adds three methods to TypedArrays which are already
implemented for arrays. The implementations are made by calling
out to the underlying code used by Arrays.

R=adamk@chromium.org
BUG=v8:3578
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#28382}
2015-05-13 04:32:08 +00:00
dehrenberg
a863c4d3d8 TypedArray.prototype.copyWithin method
This patch adds the copyWithin method to TypedArrays. For the first
pass, the internals of Array.copyWithin are used. Eventually, a more
efficient form based on memcpy could be used instead.

BUG=v8:3578
LOG=Y
R=adamk@chromium.org, arv@chromium.org, caitpotter88@gmail.com

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

Cr-Commit-Position: refs/heads/master@{#28381}
2015-05-12 19:20:56 +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
arv
547a641e2c [strong] Add more function arity tests
This is a follow up to https://codereview.chromium.org/1115263004/

BUG=v8:3956
LOG=N
R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28379}
2015-05-12 17:37:25 +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
conradw
03ef40b46c [strong] Disallow implicit conversions for comparison
Implements the strong mode proposal's restrictions on implicit conversions
for the binary >, >=, <, and <= operators.

BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28370}
2015-05-12 15:23:50 +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
yangguo
46f992ddd0 Reland "Use function wrapper argument to expose internal arrays to native scripts."
Review URL: https://codereview.chromium.org/1138173002

Cr-Commit-Position: refs/heads/master@{#28367}
2015-05-12 14:00:45 +00:00
yangguo
0bbe787448 Migrate error messages, part 10.
R=mvstanton@chromium.org

Committed: https://crrev.com/8608e619afe2b4514b0577bfb73a153b1550d41f
Cr-Commit-Position: refs/heads/master@{#28357}

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

Cr-Commit-Position: refs/heads/master@{#28366}
2015-05-12 13:52:23 +00:00
yangguo
26cb29b891 Revert of Migrate error messages, part 10. (patchset #2 id:20001 of https://codereview.chromium.org/1126043004/)
Reason for revert:
patch didn't apply correctly.

Original issue's description:
> Migrate error messages, part 10.
>
> R=mvstanton@chromium.org
>
> Committed: https://crrev.com/8608e619afe2b4514b0577bfb73a153b1550d41f
> Cr-Commit-Position: refs/heads/master@{#28357}

TBR=mvstanton@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28358}
2015-05-12 08:33:28 +00:00
yangguo
8608e619af Migrate error messages, part 10.
R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28357}
2015-05-12 08:16:57 +00:00
yurys
cf07add227 Don't create debug context if debug listener is not set
If there had been no debug listener v8::Debug::GetDebugContext would have created new context and wouln't have kept reference to it. This way we may well end up with several debug contexts and disabled debugger.

As a side effect this change allows to efficiently distinguish debug context from blink contexts by simply comparing handles.

BUG=chromium:482290
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#28356}
2015-05-12 07:33:18 +00:00
yangguo
c39a0a75ad Revert of Use function wrapper argument to expose internal arrays to native scripts. (patchset #2 id:20001 of https://codereview.chromium.org/1127983003/)
Reason for revert:
custom snapshot builder failing.

Original issue's description:
> Use function wrapper argument to expose internal arrays to native scripts.
>
> R=jkummerow@chromium.org
>
> Committed: https://crrev.com/a9b5a1795449d94387218d25baed2c2b3c4fbadc
> Cr-Commit-Position: refs/heads/master@{#28354}

TBR=jkummerow@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28355}
2015-05-12 07:26:01 +00:00
yangguo
a9b5a17954 Use function wrapper argument to expose internal arrays to native scripts.
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28354}
2015-05-12 06:14:18 +00:00
dehrenberg
1ebbaaa036 Factor out core of Array.forEach and .every, for use in TypedArrays
The idea is to make this the model for future TypedArray methods.
A possible downside could be lower array method performance
if everything gets polymorhpic (but if enough inlining happens, it
should still be fast), but on the upside, this change means that
the TypedArray methods won't create as much code size bloat.

BUG=v8:3578
LOG=Y
R=adamk@chromium.org
CC=arv@chromium.org, caitpotter88@gmail.com

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

Cr-Commit-Position: refs/heads/master@{#28351}
2015-05-12 01:32:20 +00:00
arv
3226e98020 [strong] Check arity of functions
In strong mode it is an error to call a function with too few
arguments.

This is enforced inside the ArgumentsAdaptorTrampoline.

This does not yet handle rest parameters

BUG=v8:3956
LOG=N
R=rossberg@chromium.org, dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28346}
2015-05-11 17:20:45 +00:00
dslomov
5bbe7992db [destructuring] Implement basic binding destructuring infrastructure
This patch:
  - Refactors Parser::ParseVariableDeclarations
  - Introduces Parser::PatternMatcher class
  - Implements matching a single variable pattern
  - Implements rudimentary matching against object literal pattern
    as a proof of concept

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

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

Cr-Commit-Position: refs/heads/master@{#28345}
2015-05-11 16:28:22 +00:00
wingo
bd56d279b6 Resolve references to "this" the same way as normal variables
Make the parser handle references to "this" as unresolved variables, so the
same logic as for the rest of function parameters is used for the receiver.
Minor additions to the code generation handle copying the receiver to the
context, along with the rest of the function parameters.

Based on work by Adrian Perez de Castro <aperez@igalia.com>.

This is a reapplication of https://codereview.chromium.org/1130733003.

R=rossberg@chromium.org
BUG=v8:2700
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28340}
2015-05-11 11:49:46 +00:00
danno
abc35080b3 Add a MathFloor stub generated with TurboFan
This stub will be used as the basis of a Math.floor-specific CallIC to
detect and track calls to floor that return -0.

Along the way:
- Create a TurboFanCodeStub super class from which the StringLength and
MathRound TF stubs derive.
- Fix the ugly hack that passes the first stub parameter as the "this"
pointer in the the TF-compiled JS function.
- Fix bugs in the ia32/x64 disassembler.

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

Cr-Commit-Position: refs/heads/master@{#28339}
2015-05-11 11:45:02 +00:00
titzer
f750cc09be Add %GetUndetectable() test intrinsic and add tests for undetectables.
R=verwaest@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28338}
2015-05-11 11:28:56 +00:00
machenbach
19a28dcefd Revert of Add the concept of a V8 extras exports object (patchset #5 id:80001 of https://codereview.chromium.org/1128113006/)
Reason for revert:
[Sheriff] Causes gc stress failures:
http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20gc%20stress/builds/2167

Original issue's description:
> Add the concept of a V8 extras exports object
>
> Exposed to the extras as extrasExports (on the builtins object), on
> which they can put things that should be accessible from C++. Exposed
> to C++ through the V8 API as v8::Context::GetExtrasExportsObject().
>
> Adding a test (in test-api.cc) required adding a simple extra,
> test-extra.js, which we build into the standalone builds.
>
> R=yangguo@chromium.org, jochen@chromium.org
> BUG=
>
> Committed: https://crrev.com/ad547cea05f3e02c67243b682e933fc53ac763d9
> Cr-Commit-Position: refs/heads/master@{#28317}

TBR=jochen@chromium.org,yangguo@chromium.org,domenic@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28332}
2015-05-11 08:19:58 +00:00
jkummerow
f10b992dab Let Runtime_GrowArrayElements accept non-Smi numbers as |key|.
BUG=chromium:485410
LOG=y
R=mvstanton@chromium.org,danno@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28327}
2015-05-09 10:30:49 +00:00
dehrenberg
ca9d499f75 Make one copy for all TypedArray methods
This is the first step of converting TypedArrays to the proper
proto chain. There is one copy for each of the Harmony TypedArray
methods, rather than a version for each TypedArray type. This
form prevents accidentally baking in knowledge about a particular
array type into the method definition.

R=adamk@chromium.org, arv@chromium.org, caitpotter88@gmail.com, dslomov@chromium.org, jochen@chromium.org
BUG=v8:4085
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#28325}
2015-05-09 01:20:07 +00:00
titzer
318c1f770c [turbofan] Fix handling of OsrLoopEntry in ControlReducer::ConnectNTL()
R=jarin@chromium.org
LOG=Y
BUG=chromium:485908

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

Cr-Commit-Position: refs/heads/master@{#28323}
2015-05-08 15:44:27 +00:00
domenic
ad547cea05 Add the concept of a V8 extras exports object
Exposed to the extras as extrasExports (on the builtins object), on
which they can put things that should be accessible from C++. Exposed
to C++ through the V8 API as v8::Context::GetExtrasExportsObject().

Adding a test (in test-api.cc) required adding a simple extra,
test-extra.js, which we build into the standalone builds.

R=yangguo@chromium.org, jochen@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28317}
2015-05-08 12:06:35 +00:00
hpayer
c80d730c71 Initialize sub-array literals first before pointing to it.
BUG=484544
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#28313}
2015-05-08 09:24:31 +00:00
dehrenberg
60e674c11e TypedArray.prototype.every method
BUG=v8:3578
LOG=Y
R=adamk@chromium.org, dslomov@chromium.org, svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28301}
2015-05-07 15:54:19 +00:00
yangguo
f8db4327ad Migrate error messages, part 9.
R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28291}
2015-05-07 10:00:23 +00:00
yangguo
2f9411df89 Revert of Revert of Wrap runtime.js in a function. (patchset #1 id:1 of https://codereview.chromium.org/1123353004/)
Reason for revert:
Failing test has been fixed.

Original issue's description:
> Revert of Wrap runtime.js in a function. (patchset #2 id:20001 of https://codereview.chromium.org/1126213002/)
>
> Reason for revert:
> [Sheriff] Breaks nosnap:
> http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap/builds/2872
>
> Original issue's description:
> > Wrap runtime.js in a function.
> >
> > R=jkummerow@chromium.org
> >
> > Committed: https://crrev.com/65c56d49b2d671ac9e379de726bff3eb03a508c1
> > Cr-Commit-Position: refs/heads/master@{#28275}
>
> TBR=jkummerow@chromium.org,yangguo@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://crrev.com/62bd294f909ff448d0f876a3d745966a24cdc3f7
> Cr-Commit-Position: refs/heads/master@{#28277}

TBR=jkummerow@chromium.org,machenbach@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28287}
2015-05-07 08:39:53 +00:00
machenbach
5cab6be83a Revert of Resolve references to "this" the same way as normal variables (patchset #2 id:20001 of https://codereview.chromium.org/1130733003/)
Reason for revert:
[Sheriff] Breaks jetstream benchmark with errors like this:

>>> Running suite: JetStream/bigfib.cpp
>>> Stdout (#1):
undefined:93: ReferenceError: this is not defined
  this['Module'] = Module;
  ^
ReferenceError: this is not defined
    at eval (eval at __run (runner.js:13:3), <anonymous>:93:3)
    at eval (native)
    at __run (runner.js:13:3)
    at Object.runSimpleBenchmark (runner.js:44:31)
    at runner.js:97:13

Original issue's description:
> Resolve references to "this" the same way as normal variables
>
> Make the parser handle references to "this" as unresolved variables, so the
> same logic as for the rest of function parameters is used for the receiver.
> Minor additions to the code generation handle copying the receiver to the
> context, along with the rest of the function parameters.
>
> Based on work by Adrian Perez de Castro <aperez@igalia.com>.
>
> BUG=v8:2700
> LOG=N
>
> Committed: https://crrev.com/06a792b7cc2db33ffce7244c044a9c05afbb6116
> Cr-Commit-Position: refs/heads/master@{#28263}

TBR=rossberg@chromium.org,arv@chromium.org,wingo@igalia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:2700

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

Cr-Commit-Position: refs/heads/master@{#28283}
2015-05-07 07:20:49 +00:00
machenbach
62bd294f90 Revert of Wrap runtime.js in a function. (patchset #2 id:20001 of https://codereview.chromium.org/1126213002/)
Reason for revert:
[Sheriff] Breaks nosnap:
http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap/builds/2872

Original issue's description:
> Wrap runtime.js in a function.
>
> R=jkummerow@chromium.org
>
> Committed: https://crrev.com/65c56d49b2d671ac9e379de726bff3eb03a508c1
> Cr-Commit-Position: refs/heads/master@{#28275}

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

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

Cr-Commit-Position: refs/heads/master@{#28277}
2015-05-06 20:03:11 +00:00
yangguo
65c56d49b2 Wrap runtime.js in a function.
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28275}
2015-05-06 19:25:00 +00:00
caitpotter88
fda20efb2f [es6] implement Object.assign
BUG=v8:4007
LOG=N
R=arv@chromium.org, rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28270}
2015-05-06 16:17:50 +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
wingo
06a792b7cc Resolve references to "this" the same way as normal variables
Make the parser handle references to "this" as unresolved variables, so the
same logic as for the rest of function parameters is used for the receiver.
Minor additions to the code generation handle copying the receiver to the
context, along with the rest of the function parameters.

Based on work by Adrian Perez de Castro <aperez@igalia.com>.

BUG=v8:2700
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28263}
2015-05-06 14:18:08 +00:00
conradw
97bee8e964 [strong] Fix inlining issue
The Hydrogen representation for binops was never changed to care about the
language mode. We thought this was ok, but it turns out we need to keep track
of it to make sure inlining doesn't mess with the "strongness" of binops.

Also added more rigorous inlining testing.

BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28253}
2015-05-06 10:40:38 +00:00
yangguo
a5de69f4f8 Migrate error messages, part 8.
R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28250}
2015-05-06 07:52:05 +00:00
yangguo
8b6c2a805d Mark mjsunit/allocation-site-info.js as NO_VARIANTS.
NOTRY=true
TBR=machenbach@chromium.org
BUG=4078
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28248}
2015-05-06 07:20:57 +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
wingo
1e4173d93a Revert of Resolve references to "this" the same way as normal variables (patchset #11 id:240001 of https://codereview.chromium.org/1097283003/)
Reason for revert:
nosnap failures

Original issue's description:
> Resolve references to "this" the same way as normal variables
>
> Make the parser handle references to "this" as unresolved variables, so the
> same logic as for the rest of function parameters is used for the receiver.
> Minor additions to the code generation handle copying the receiver to the
> context, along with the rest of the function parameters.
>
> Based on work by Adrian Perez de Castro <aperez@igalia.com>.
>
> BUG=
> LOG=N
>
> Committed: https://crrev.com/18619d355192e2699203d12d9ebb9caea107b693
> Cr-Commit-Position: refs/heads/master@{#28236}

TBR=rossberg@chromium.org,mstarzinger@chromium.org,dslomov@chromium.org,adamk@chromium.org,arv@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28238}
2015-05-05 17:24:25 +00:00
danno
a988d5f261 Revert of Collect type feedback on result of Math.[round|ceil|floor] (patchset #13 id:230001 of https://codereview.chromium.org/1053143005/)
Reason for revert:
All sorts of performance regressions

Original issue's description:
> Collect type feedback on result of Math.[round|ceil|floor]
>
> By recording invocations of these builtins that can return -0, we now learn to not emit Crankshaft code that only handles integer results, avoiding deopt loops.
>
> Committed: https://crrev.com/f36ecaf3a4d61568ca50a20718acce7dd5da9a5f
> Cr-Commit-Position: refs/heads/master@{#28215}

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

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

Cr-Commit-Position: refs/heads/master@{#28237}
2015-05-05 16:42:16 +00:00
wingo
18619d3551 Resolve references to "this" the same way as normal variables
Make the parser handle references to "this" as unresolved variables, so the
same logic as for the rest of function parameters is used for the receiver.
Minor additions to the code generation handle copying the receiver to the
context, along with the rest of the function parameters.

Based on work by Adrian Perez de Castro <aperez@igalia.com>.

BUG=
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28236}
2015-05-05 16:38:22 +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
yangguo
7546302b67 Move more parts of stack trace formatting to runtime.
R=ishell@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28223}
2015-05-05 14:17:43 +00:00
yangguo
b0eb920fe2 Reland #2 "Wrap v8natives.js into a function."
TBR=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28217}
2015-05-05 09:16:01 +00:00
yangguo
a3ddb1bc42 Migrate error messages, part 7.
R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28216}
2015-05-05 07:57:36 +00:00
danno
f36ecaf3a4 Collect type feedback on result of Math.[round|ceil|floor]
By recording invocations of these builtins that can return -0, we now learn to not emit Crankshaft code that only handles integer results, avoiding deopt loops.

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

Cr-Commit-Position: refs/heads/master@{#28215}
2015-05-05 07:55:58 +00:00
machenbach
6afc0dcbfc Revert of Reland "Wrap v8natives.js into a function." (patchset #2 id:20001 of https://codereview.chromium.org/1123703002/)
Reason for revert:
[Sheriff] Speculative revert for braking arm64 nosnap:
http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20nosnap%20-%20debug%20-%202/builds/2314

(reverted already titzer's CL which didn't help)

Original issue's description:
> Reland "Wrap v8natives.js into a function."
>
> Committed: https://crrev.com/72ab42172979b60a1b784ea0c6a495d7ee2bba67
> Cr-Commit-Position: refs/heads/master@{#28193}

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

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

Cr-Commit-Position: refs/heads/master@{#28208}
2015-05-04 16:49:58 +00:00
jarin
b5b47e1f88 Remove materialized objects on stack unwind.
BUG=v8:3985
LOG=n
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28206}
2015-05-04 16:44:01 +00:00
verwaest
f21ea065b3 Fix smi scanning
BUG=chromium:483176
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#28202}
2015-05-04 15:02:30 +00:00
yangguo
72ab421729 Reland "Wrap v8natives.js into a function."
Review URL: https://codereview.chromium.org/1123703002

Cr-Commit-Position: refs/heads/master@{#28193}
2015-05-04 11:17:01 +00:00
yangguo
f42544b768 Set inferred name of bound function to empty string.
Otherwise it's whatever the js minifier assigns it to.

R=jkummerow@chromium.org
BUG=chromium:484077
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28190}
2015-05-04 09:55:43 +00:00
machenbach
b0b82fa89d Revert of Wrap v8natives.js into a function. (patchset #2 id:20001 of https://codereview.chromium.org/1109343004/)
Reason for revert:
[Sheriff] Speculative revert for breaking layout tests, e.g.:
http://build.chromium.org/p/client.v8/builders/V8-Blink%20Linux%2064%20%28dbg%29/builds/2682

See. e.g.:
https://storage.googleapis.com/chromium-layout-test-archives/V8-Blink_Win/3130/layout-test-results/http/tests/websocket/workers/worker-reload-diff.txt

Original issue's description:
> Wrap v8natives.js into a function.
>
> R=jkummerow@chromium.org
>
> Committed: https://crrev.com/ee1b39b4303829e6c6805fe8b2f2602b13f6463a
> Cr-Commit-Position: refs/heads/master@{#28174}

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

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

Cr-Commit-Position: refs/heads/master@{#28182}
2015-04-30 17:33:19 +00:00
yangguo
ac50edfee0 Migrate error messages, part 6. (string.js and date.js)
R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28180}
2015-04-30 16:22:05 +00:00
yangguo
ee1b39b430 Wrap v8natives.js into a function.
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28174}
2015-04-30 14:59:09 +00:00
titzer
b0dcf6abf2 Allow TurboFan to compile more methods.
Reorganize some bailout conditions to be after the decision to use TurboFan.

R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28172}
2015-04-30 14:50:45 +00:00
machenbach
1621dbf370 [test] Mark test as flaky.
BUG=v8:3803
LOG=n
TBR=mstarzinger@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28166}
2015-04-30 13:25:09 +00:00
mvstanton
fb8e613638 Use a stub in crankshaft for grow store arrays.
We were deopting without learning anything.

This is a rebase/reland of https://codereview.chromium.org/368263003

BUG=v8:3417
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28163}
2015-04-30 12:34:10 +00:00
conradw
dea0d9b59e [strong] Disallow implicit conversions for add
Implements the strong mode proposal's restrictions on implicit conversions
for the binary + operator. Test suite is also cleaned up/refactored to allow
easier testing of the comparison operators in the future.

BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28159}
2015-04-30 11:46:08 +00:00
yangguo
7681432dbf JSON serializer should fail gracefully for special value wrappers.
R=mstarzinger@chromium.org
BUG=chromium:471702
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28154}
2015-04-30 10:02:21 +00:00
machenbach
38a8d369b7 [test] Skip tests on msan.
NOTRY=true
BUG=chromium:425187
LOG=n
TBR=Sven Panne, titzer

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

Cr-Commit-Position: refs/heads/master@{#28122}
2015-04-29 07:19:59 +00:00
arv
baddc25eb2 [es6] Fix return checking in derived constructors
In a derived class constructor in case undefined is returned, we
should return the receiver. If the return is any other value type
we should throw a TypeError.

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

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

Cr-Commit-Position: refs/heads/master@{#28114}
2015-04-28 16:09:30 +00:00
conradw
6988aec61f [strong] Disallow implicit conversions for bitwise ops, shifts
See https://codereview.chromium.org/1092353002/

Due to parser rewrites, also implements restrictions for unary ~.

Still to come, implementing restrictions for binary + and comparison.

BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28104}
2015-04-28 11:19:49 +00:00
machenbach
b3000dda14 [test] Skip unsuitable tests for msan.
NOTRY=true
BUG=chromium:425187
LOG=n
TBR=Sven Panne, titzer

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

Cr-Commit-Position: refs/heads/master@{#28103}
2015-04-28 11:18:12 +00:00
yangguo
4d12e94801 Port CallSite methods to C++.
The goal is to port all of error stack trace formatting to C++.
We will do this bottom up, by first porting helper functions.

Eventually, CallSite methods will only be used when a custom
error stack trace formatter is defined via Error.prepareStackTrace.

R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28095}
2015-04-28 08:52:47 +00:00
jkummerow
f6187fb3b5 Reland "Lazily register prototype users..."
...when handing out validity cells to handlers; because invalidating said cells is
the only time we'll need the user registrations.
Along the way, fix a corner case in WeakFixedArray, which can now be empty after
the recently introduced compaction support.

This reverts commit 968715c653.

Original review: https://codereview.chromium.org/1104813004/

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

Cr-Commit-Position: refs/heads/master@{#28076}
2015-04-27 12:59:36 +00:00
titzer
6e82fbfbaf [turbofan] Reland: Optimize loads from the global object in JSTypeFeedbackSpecializer.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28073}
2015-04-27 12:15:06 +00:00
machenbach
fbf300802f Revert of [turbofan] Optimize loads from the global object in JSTypeFeedbackSpecializer. (patchset #10 id:180001 of https://codereview.chromium.org/1063513003/)
Reason for revert:
[sheriff] Breaks nosnap debug:
http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap%20-%20debug%20-%201/builds/156

Original issue's description:
> [turbofan] Optimize loads from the global object in JSTypeFeedbackSpecializer.
>
> Uses lazy deoptimization and code dependencies to introduce loads
> from property cells and also to promote globals to constants.
>
> R=mstarzinger@chromium.org
> BUG=
>
> Committed: https://crrev.com/aae4a62d07e839455b1d0ad4fa512cc5d48a1a68
> Cr-Commit-Position: refs/heads/master@{#28057}

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

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

Cr-Commit-Position: refs/heads/master@{#28063}
2015-04-27 10:07:08 +00:00
titzer
aae4a62d07 [turbofan] Optimize loads from the global object in JSTypeFeedbackSpecializer.
Uses lazy deoptimization and code dependencies to introduce loads
from property cells and also to promote globals to constants.

R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28057}
2015-04-27 09:06:41 +00:00
mvstanton
caeb9004f0 Don't MISS if you read the hole from certain FastHoley arrays.
If the array's map is the initial FastHoley array map, and the array prototype
chain is undisturbed and empty of elements, then keyed loads can convert the
load of a hole to undefined.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#28056}
2015-04-27 08:46:38 +00:00
jarin
ae0bc41635 Fix stack layout of full code arm64 for object literal.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28055}
2015-04-27 08:31:33 +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
jkummerow
968715c653 Revert of Lazily register prototype users (patchset #2 id:20001 of https://codereview.chromium.org/1104813004/)
Reason for revert:
Suspected of causing GC stress failures.

Original issue's description:
> Lazily register prototype users
>
> when handing out validity cells to handles; because invalidating said cells is the only time we'll need the user registrations.
> Along the way, fix a corner case in WeakFixedArray, which can now be empty after the recently introduced compaction support.
>
> Committed: https://crrev.com/a4bb7643c076b014816431a9b85af3e2edf828e7
> Cr-Commit-Position: refs/heads/master@{#28047}

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

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

Cr-Commit-Position: refs/heads/master@{#28049}
2015-04-24 14:09:48 +00:00
jkummerow
a4bb7643c0 Lazily register prototype users
when handing out validity cells to handles; because invalidating said cells is the only time we'll need the user registrations.
Along the way, fix a corner case in WeakFixedArray, which can now be empty after the recently introduced compaction support.

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

Cr-Commit-Position: refs/heads/master@{#28047}
2015-04-24 12:51:37 +00:00
conradw
ae7ce701ae [strong] Disallow implicit conversions for binary arithmetic operations
Implements the strong mode proposal's restrictions on
implicit conversions for binary arithmetic operations, not
including the + special case. Adds some infrastructure
for future implementation of the restrictions for other
operators.

BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28045}
2015-04-24 12:32:41 +00:00
mstarzinger
6b60f19168 [turbofan] Fix frame state for class literal definition.
This introduces a bailout point for class literals right after the
%DefineClass function has been called. Otherwise the FrameState after
class literal evaluation might contain the literal itself.

R=jarin@chromium.org
TEST=mjsunit/regress/regress-crbug-480819
BUG=chromium:480819
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28043}
2015-04-24 11:12:57 +00:00
bmeurer
4f9bc2d1c3 [turbofan] Ignore dead cached nodes in the JSGraph.
BUG=chromium:480807
LOG=n
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28041}
2015-04-24 10:51:32 +00:00
yangguo
cadf96da90 Migrate error messages, part 5 (array.js and i18n.js).
R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28040}
2015-04-24 10:21:43 +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
marja
ddd3f318c7 [strong] Stricter check for referring to other classes inside methods.
Add the restriction that both classes must be declared inside the same
consectutive class declaration batch.

Dependency analysis not implemented yet.

BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28032}
2015-04-23 14:04:47 +00:00
wingo
d5fd58165c Function scopes only must have a context if they call sloppy eval
A strict arrow function with no parameters and no variable bindings
won't need a context object because it will never have any
locals.  (This is unlike strict normal functions, which do have
"arguments" and "this" locals.)

R=rossberg@chromium.org
BUG=v8:4056
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28031}
2015-04-23 13:19:54 +00:00
jarin
aaddea11b2 Materialize booleans in the turbofan deoptimizer.
BUG=
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28022}
2015-04-23 08:06:55 +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
paul.lind
bf06d5c9f5 Skip poppler and sqlite tests on big-endian platforms.
Emscripten use of typed-arrays is little-endian only.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#28020}
2015-04-22 22:31:27 +00:00
machenbach
8244686f6d [mjsunit] Fix bad test expectations.
BUG=v8:3924,v8:3969,chromium:478788
NOTRY=true
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#28019}
2015-04-22 21:22:17 +00:00
arv
3f06291b3a [es6] Class extends may not be a generator function
BUG=v8:4009
LOG=N
R=dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28016}
2015-04-22 16:07:21 +00:00
titzer
5b6111edff Add test for deoptimization bug.
R=jarin@chromium.org,mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28013}
2015-04-22 14:32:49 +00:00
yangguo
9146ae720c Blacklist mjsunit/es6/generators-debug-scopes.js from turbofan.
TBR=mstarzinger@chromium.org
NOTRY=true
BUG=v8:4055
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28012}
2015-04-22 14:16:17 +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
svenpanne
9bb8b58549 Add an --omit-quit flag to d8 for Emscripten's sake.
Review URL: https://codereview.chromium.org/1101683002

Cr-Commit-Position: refs/heads/master@{#28004}
2015-04-22 12:24:15 +00:00
machenbach
1ea118d592 Revert of Revert of [strong] checking of this & super in constructors (patchset #1 id:1 of https://codereview.chromium.org/1105453002/)
Reason for revert:
Was an infrastructure problem.

Original issue's description:
> Revert of [strong] checking of this & super in constructors (patchset #7 id:110001 of https://codereview.chromium.org/1024063002/)
>
> Reason for revert:
> [Sheriff] Breaks mac gc stress:
> http://build.chromium.org/p/client.v8/builders/V8%20Mac%20GC%20Stress/builds/1024
>
> Original issue's description:
> > [strong] checking of this & super in constructors
> >
> > R=dslomov@chromium.org, marja@chromium.org
> > BUG=v8:3956
> > LOG=N
> >
> > Enforces for constructors that
> > - the only use of 'super' is the super constructor call
> > - the only use of 'this' is a property assignment
> > - both of these must happen at the top-level of the body
> > - 'this' may only be assigned after the 'super' call
> > - 'return' may only be used after the last assignment to 'this'
> >
> > Not yet working for arrow functions (there might be deeper bugs with those).
> >
> > Committed: https://crrev.com/580d66bcda66220d2f3062ac58daf925436df74c
> > Cr-Commit-Position: refs/heads/master@{#27977}
>
> TBR=dslomov@chromium.org,marja@chromium.org,conradw@chromium.org,rossberg@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=v8:3956

TBR=dslomov@chromium.org,marja@chromium.org,conradw@chromium.org,rossberg@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3956

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

Cr-Commit-Position: refs/heads/master@{#28001}
2015-04-22 11:04:13 +00:00
machenbach
2631c9f5e3 Revert of Revert of Protect the emptiness of Array prototype elements with a PropertyCell. (patchset #1 id:1 of https://codereview.chromium.org/1099203004/)
Reason for revert:
This was probably an infrastructure problem caused by the mac ninja/goma switch.

Original issue's description:
> Revert of Protect the emptiness of Array prototype elements with a PropertyCell. (patchset #7 id:120001 of https://codereview.chromium.org/1092043002/)
>
> Reason for revert:
> MAC GCSTRESS failure on new test.
>
> Original issue's description:
> > Protect the emptiness of Array prototype elements with a PropertyCell.
> >
> > Not just emptiness, but also a particular structure.
> >
> > BUG=v8:4044
> > LOG=N
>
> TBR=jkummerow@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=v8:4044

TBR=jkummerow@chromium.org,mvstanton@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4044

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

Cr-Commit-Position: refs/heads/master@{#28000}
2015-04-22 10:35:09 +00:00
machenbach
6911943e0b Revert of Revert of [es6] don't throw if argument is non-object (O.freeze, O.seal, O.preventExtensions) (patchset #1 id:1 of https://codereview.chromium.org/1103473003/)
Reason for revert:
This was probably an infrastructure problem caused by the mac ninja/goma switch.

Original issue's description:
> Revert of [es6] don't throw if argument is non-object (O.freeze, O.seal, O.preventExtensions) (patchset #7 id:140001 of https://codereview.chromium.org/1011823003/)
>
> Reason for revert:
> [Sheriff] breaks mac gc stress:
> http://build.chromium.org/p/client.v8/builders/V8%20Mac%20GC%20Stress/builds/1029
>
> Original issue's description:
> > [es6] don't throw if argument is non-object (O.freeze, O.seal, O.preventExtensions)
> >
> > BUG=v8:3965, v8:3966
> > R=arv@chromium.org
> > LOG=N
> >
> > Committed: https://crrev.com/b09c048f693d280052ac63c7d6b3baf27b3bf271
> > Cr-Commit-Position: refs/heads/master@{#27985}
>
> TBR=arv@chromium.org,caitpotter88@gmail.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=v8:3965, v8:3966

TBR=arv@chromium.org,caitpotter88@gmail.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3965, v8:3966

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

Cr-Commit-Position: refs/heads/master@{#27999}
2015-04-22 10:33:33 +00:00
mvstanton
15b98a3328 Revert of Protect the emptiness of Array prototype elements with a PropertyCell. (patchset #7 id:120001 of https://codereview.chromium.org/1092043002/)
Reason for revert:
MAC GCSTRESS failure on new test.

Original issue's description:
> Protect the emptiness of Array prototype elements with a PropertyCell.
>
> Not just emptiness, but also a particular structure.
>
> BUG=v8:4044
> LOG=N

TBR=jkummerow@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4044

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

Cr-Commit-Position: refs/heads/master@{#27998}
2015-04-22 09:56:28 +00:00
machenbach
27397421f8 Revert of Revert of [es6] implement Array.prototype.copyWithin() (patchset #1 id:1 of https://codereview.chromium.org/1084183004/)
Reason for revert:
Check if this CL fails independently of 580d66bcda

Original issue's description:
> Revert of [es6] implement Array.prototype.copyWithin() (patchset #7 id:120001 of https://codereview.chromium.org/376623004/)
>
> Reason for revert:
> [Sheriff] This causes test failures on mac gc stress:
> http://build.chromium.org/p/client.v8/builders/V8%20Mac%20GC%20Stress/builds/1027
>
> Original issue's description:
> > [es6] implement Array.prototype.copyWithin()
> >
> > https://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.copywithin
> >
> > BUG=v8:4039
> > R=adamk@chromium.org
> > LOG=N
>
> TBR=dslomov@chromium.org,rossberg@chromium.org,adamk@chromium.org,caitpotter88@gmail.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=v8:4039
>
> Committed: https://crrev.com/9283fc89710e59445bdc4479454fba97ab9ebdd7
> Cr-Commit-Position: refs/heads/master@{#27984}

TBR=dslomov@chromium.org,rossberg@chromium.org,adamk@chromium.org,caitpotter88@gmail.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4039

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

Cr-Commit-Position: refs/heads/master@{#27997}
2015-04-22 09:43:13 +00:00
Benedikt Meurer
556221a23e [mjsunit] Import asm.js test case for poppler.
R=hablich@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27996}
2015-04-22 09:33:43 +00:00
mvstanton
b6f075f001 Protect the emptiness of Array prototype elements with a PropertyCell.
Not just emptiness, but also a particular structure.

BUG=v8:4044
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27993}
2015-04-22 08:50:14 +00:00
machenbach
310d205c8f [mjsunit] Skip newly added tests under asan.
TBR=svenpanne@chromium.org, titzer@chromium.org, bmeurer@chromium.org,
NOTRY=true
NOTREECHECKS=true

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

Cr-Commit-Position: refs/heads/master@{#27992}
2015-04-22 08:35:17 +00:00
machenbach
b3875aacbb Revert of [strong] checking of this & super in constructors (patchset #7 id:110001 of https://codereview.chromium.org/1024063002/)
Reason for revert:
[Sheriff] Breaks mac gc stress:
http://build.chromium.org/p/client.v8/builders/V8%20Mac%20GC%20Stress/builds/1024

Original issue's description:
> [strong] checking of this & super in constructors
>
> R=dslomov@chromium.org, marja@chromium.org
> BUG=v8:3956
> LOG=N
>
> Enforces for constructors that
> - the only use of 'super' is the super constructor call
> - the only use of 'this' is a property assignment
> - both of these must happen at the top-level of the body
> - 'this' may only be assigned after the 'super' call
> - 'return' may only be used after the last assignment to 'this'
>
> Not yet working for arrow functions (there might be deeper bugs with those).
>
> Committed: https://crrev.com/580d66bcda66220d2f3062ac58daf925436df74c
> Cr-Commit-Position: refs/heads/master@{#27977}

TBR=dslomov@chromium.org,marja@chromium.org,conradw@chromium.org,rossberg@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3956

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

Cr-Commit-Position: refs/heads/master@{#27991}
2015-04-22 08:00:27 +00:00
machenbach
2b97a0e3bc Revert of [es6] don't throw if argument is non-object (O.freeze, O.seal, O.preventExtensions) (patchset #7 id:140001 of https://codereview.chromium.org/1011823003/)
Reason for revert:
[Sheriff] breaks mac gc stress:
http://build.chromium.org/p/client.v8/builders/V8%20Mac%20GC%20Stress/builds/1029

Original issue's description:
> [es6] don't throw if argument is non-object (O.freeze, O.seal, O.preventExtensions)
>
> BUG=v8:3965, v8:3966
> R=arv@chromium.org
> LOG=N
>
> Committed: https://crrev.com/b09c048f693d280052ac63c7d6b3baf27b3bf271
> Cr-Commit-Position: refs/heads/master@{#27985}

TBR=arv@chromium.org,caitpotter88@gmail.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3965, v8:3966

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

Cr-Commit-Position: refs/heads/master@{#27990}
2015-04-22 07:57:49 +00:00
Benedikt Meurer
78f2efe0e4 [mjsunit] Add custom tests based on SQLite 3.8.9.
Also adjust the test runner to remove --always-opt for FAST_VARIANTS.

R=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27989}
2015-04-22 07:44:50 +00:00
caitpotter88
b09c048f69 [es6] don't throw if argument is non-object (O.freeze, O.seal, O.preventExtensions)
BUG=v8:3965, v8:3966
R=arv@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27985}
2015-04-21 21:45:57 +00:00
machenbach
9283fc8971 Revert of [es6] implement Array.prototype.copyWithin() (patchset #7 id:120001 of https://codereview.chromium.org/376623004/)
Reason for revert:
[Sheriff] This causes test failures on mac gc stress:
http://build.chromium.org/p/client.v8/builders/V8%20Mac%20GC%20Stress/builds/1027

Original issue's description:
> [es6] implement Array.prototype.copyWithin()
>
> https://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.copywithin
>
> BUG=v8:4039
> R=adamk@chromium.org
> LOG=N

TBR=dslomov@chromium.org,rossberg@chromium.org,adamk@chromium.org,caitpotter88@gmail.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4039

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

Cr-Commit-Position: refs/heads/master@{#27984}
2015-04-21 21:11:31 +00:00
caitpotter88
6d00703e5e [es6] implement Array.prototype.copyWithin()
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.copywithin

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

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

Cr-Commit-Position: refs/heads/master@{#27983}
2015-04-21 19:05:37 +00:00
rossberg
580d66bcda [strong] checking of this & super in constructors
R=dslomov@chromium.org, marja@chromium.org
BUG=v8:3956
LOG=N

Enforces for constructors that
- the only use of 'super' is the super constructor call
- the only use of 'this' is a property assignment
- both of these must happen at the top-level of the body
- 'this' may only be assigned after the 'super' call
- 'return' may only be used after the last assignment to 'this'

Not yet working for arrow functions (there might be deeper bugs with those).

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

Cr-Commit-Position: refs/heads/master@{#27977}
2015-04-21 16:34:29 +00:00
titzer
1850803d56 [turbofan] Fix reduction of LoadProperty/StoreProperty to LoadNamed/StoreNamed.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27972}
2015-04-21 15:12:58 +00:00
yangguo
9b2fe70d93 Migrate error messages, part 4 (v8natives.js).
Goal is to reduce native context size.

R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27953}
2015-04-21 09:03:09 +00:00
Daniel Vogelheim
abb23b5284 Disable mjsunit/es7/object-observe on gc-stress, due to flakiness.
TBR=machenbach@chromium.org
CC=adamk@chromium.org
BUG=478788
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27948}
2015-04-20 18:14:40 +00:00
mvstanton
9987221c02 Make sure builtins preserve guarantees about empty element array prototypes.
We have a bottleneck around storing elements in the array and object prototypes,
but the Push() and Unshift() builtins don't respect them.

Fix this exactly to the level of existing support for stores.

BUG=v8:4043
LOG=N
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#27943}
2015-04-20 15:16:34 +00:00
yangguo
8cf289ca4f Throw when attaching a stack trace to an object fails.
R=jarin@chromium.org
BUG=chromium:478011
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27941}
2015-04-20 14:40:45 +00:00
machenbach
fde66e2a72 Temporarily skip slow test.
TBR=bmeurer@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#27936}
2015-04-20 12:23:14 +00:00
Benedikt Meurer
7eb7141fc4 [mjsunit] Import test case based on the Massive/SQLite benchmark.
This adds a stripped down version of the SQLite benchmark (running with
--size 1) to the mjsunit suite. We might want to move that to a
dedicated slow/stress/whatever test suite once an appropriate decision
is made.

R=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27930}
2015-04-20 07:58:31 +00:00
yangguo
5a9a0b20e7 Migrate error messages, part 3 (runtime.js).
Motivation for this is reducing the size of the native context.

R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27917}
2015-04-17 13:27:28 +00:00
jkummerow
4204c72739 Don't use normalized map cache for prototype maps
BUG=chromium:477924
LOG=n
R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27916}
2015-04-17 12:16:07 +00:00
verwaest
c153a8437e [crankshaft] Fix property access with proxies in prototype chain
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27911}
2015-04-17 09:25:13 +00:00
yangguo
ae2057e81a Reland "Migrate error messages, part 2."
Review URL: https://codereview.chromium.org/1083083004

Cr-Commit-Position: refs/heads/master@{#27907}
2015-04-17 08:35:47 +00:00
verwaest
8098253562 Reland "Add basic crankshaft support for slow-mode for-in to avoid disabling optimizations"
BUG=chromium:476592
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27898}
2015-04-16 17:32:00 +00:00
machenbach
d881baaced Revert of Migrate error messages, part 2. (patchset #1 id:1 of https://codereview.chromium.org/1086313003/)
Reason for revert:
[Sheriff]: This changes layout test expectations e.g.
http://build.chromium.org/p/client.v8/builders/V8-Blink%20Win/builds/2964

Original issue's description:
> Migrate error messages, part 2.
>
> Motivation for this is reducing the size of the native context.
>
> Committed: https://crrev.com/d3b788df0a4ccfedbe6e1df5e214cb6ba2792a65
> Cr-Commit-Position: refs/heads/master@{#27878}

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

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

Cr-Commit-Position: refs/heads/master@{#27889}
2015-04-16 14:33:26 +00:00
marja
2dc0f2ec01 [strong] Allow mutually recursive classes.
The previous restrictions were overshooting (didn't allow a class to refer to a
later class under any circumstances); after this CL we're undershooting (allow
referring to any class from inside a method).

Implementing the correct checks (allow referring only if the class declarations
are in a consecutive block and if there's no dependency cycle) will be
implemented as a follow up.

BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27888}
2015-04-16 14:12:52 +00:00
conradw
d8bccfe974 [strong] Implement static restrictions on switch statement
Implements the strong mode proposal's restrictions on the syntax of the
switch statement. Also fixes a minor bug with empty statements in strong
mode and improves StrongUndefinedArrow parser synch tests.

BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27885}
2015-04-16 13:29:20 +00:00
mstarzinger
54cb7b6ea3 Disable more failing tests after f3338dd3b0.
TBR=jkummerow@chromium.org
TEST=mjsunit/debug-ignore-breakpoints
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#27881}
2015-04-16 12:46:28 +00:00
yangguo
d3b788df0a Migrate error messages, part 2.
Motivation for this is reducing the size of the native context.

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

Cr-Commit-Position: refs/heads/master@{#27878}
2015-04-16 11:34:47 +00:00
adamk
b054ff4620 Revert "Add basic crankshaft support for slow-mode for-in to avoid disabling optimizations"
This reverts commit 8c98cc074e
because it causes flaky failures in the dromaeo.jslibeventprototype
benchmark on Linux/Windows and consistent failures on Android.

Also reverts the followup "Remove kForInStatementIsNotFastCase bailout reason"
(commit ba24e67696) to avoid breaking the build.

BUG=chromium:476592
TBR=verwaest@chromium.org
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#27859}
2015-04-15 21:28:22 +00:00
mvstanton
13459c1ae3 Array() in optimized code can create with wrong ElementsKind in corner cases.
Calling new Array(JSObject::kInitialMaxFastElementArray) in optimized code
makes a stub call that bails out due to the length. Currently, the bailout
code a) doesn't have the allocation site, and b) wouldn't use it if it did
because the length is perceived to be too high.

This CL passes the allocation site to the stub call (rather than undefined),
and alters the bailout code to utilize the feedback.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27857}
2015-04-15 21:02:13 +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
erikcorry
e0be05036f Reduce regexp compiler stack size when not optimizing regexps
R=jkummerow@chromium.org
BUG=chromium:475705
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#27851}
2015-04-15 15:15:52 +00:00
mstarzinger
b807d112d7 [turbofan] Fix ForInStatement that deopts during filter.
This adds a missing bailout id to a ForInStatement for when retrieving
and filtering a property name deoptimizes. This can happen with proxies
that have a getPropertyDescriptor trap.

R=jarin@chromium.org
TEST=mjsunit/for-in-opt

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

Cr-Commit-Position: refs/heads/master@{#27846}
2015-04-15 13:12:05 +00:00
ulan
68a7773e0f Correctly handle clearing of deprecated field types.
BUG=v8:4027
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#27837}
2015-04-15 09:55:33 +00:00
jkummerow
2ff768b206 Put --noalways-opt flag back into regress-crbug-245480
This is a partial revert of 3eb277f270.

R=machenbach@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#27835}
2015-04-15 09:31:39 +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
mvstanton
2ebb794b4f VectorICs: recreate feedback vector if scoping changes on recompile.
BUG=476488
LOG=N
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27817}
2015-04-14 12:31:31 +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
dslomov
3c5218f6fa Add a test for subclass maps.
R=arv@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27812}
2015-04-14 09:59:02 +00:00
dslomov
219f4a9eb4 Avoid modifying the real context chain for debug evaluation.
Instead of modifying a context chain and then modifying it back, causing
potential mismatches, we clone the inner context chain and evaluate
the expression in this cloned context. We then copy all local variable
values back if needed.

R=yangguo@chromium.org,yurys@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27809}
2015-04-14 09:07:55 +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
conradw
c983689d39 [strong] Implement static restrictions on direct eval
Does not entirely disallow the use of 'eval' as an identifier in strong mode,
as originally proposed.

BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27796}
2015-04-13 17:25:15 +00:00
verwaest
434b456b51 Fix indirect push
BUG=chromium:388665
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27795}
2015-04-13 16:25:33 +00:00
titzer
069e6b2f5f [turbofan] Optimize loads of global constants in JSTypedLowering.
R=mstarzinger@chromium.org,verwaest@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27792}
2015-04-13 16:22:05 +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
vegorov
021f738127 Treat HArgumentsObject as a safe use during Uint32 analysis phase.
Deoptimization infrastructure already handles it correctly.

This change fixes repetitive deoptimizations in the code like this:

    var u32 = new Uint32Array(1);
    u32[0] = -1;

    function tr(x) { return x|0; }
    function ld() { return tr(u32[0]); }

    while (true) ld();

Currently inlined tr will contain HArgumentsObject that is considered uint32-unsafe use and prevents u32[0] from becoming uint32 load - instead a speculative int32 load is generated which just deopts.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27781}
2015-04-13 10:47:15 +00:00
ulan
2f327a5cb4 Do not inline store if field map was cleared.
BUG=v8:4023
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#27779}
2015-04-13 09:43:52 +00:00
yangguo
ea5d68a6ef Blacklist more debugger tests (fail with --always-opt).
TBR=mstarzinger@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#27776}
2015-04-13 09:09:39 +00:00
mstarzinger
10dd9ce8be Make compilers agree on source position of thrown errors.
This makes the compilers agree on the source position of a message
generated by "throw new Error()", it points to the beginning of the
throw directive.

R=titzer@chromium.org
TEST=message/regress/regress-3995
BUG=v8:3995
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27775}
2015-04-13 09:02:48 +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
conradw
3d5717a71b [strong] Implement static restrictions on binding 'undefined' in arrow functions
Implements the strong mode proposal's static restrictions on the use of the
identifier 'undefined', for arrow functions. Assumes these restrictions are
intended to be identical to the restrictions on the use of 'eval and 'arguments'
in strict mode. In addition, Location variables inconsistantly named (e.g.
dupe_error_loc vs dupe_loc) are now consistently named the shorter way.

Baseline: https://codereview.chromium.org/1070633002

BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27756}
2015-04-10 18:27:05 +00:00
verwaest
8c98cc074e Add basic crankshaft support for slow-mode for-in to avoid disabling optimizations
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27748}
2015-04-10 13:15:31 +00:00
titzer
dee044d601 Add more exhaustive tests for Math.min and Math.max.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27747}
2015-04-10 12:35:16 +00:00
conradw
8ef7159582 [strong] Implement static restrictions on binding/assignment to 'undefined'
identifier. Delete unused (and now incorrect) function IsValidStrictVariable.

Implements the strong mode proposal's static restrictions on the use of the
identifier 'undefined'. Assumes these restrictions are intended to be identical
to the restrictions on the use of 'eval' and 'arguments' in strict mode. The
AllowEvalOrArgumentsAsIdentifier enum has been renamed to
AllowRestrictedIdentifiers as logic involving it is now also used for this case.

BUG=v8:3956

LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27744}
2015-04-10 12:04:55 +00:00
bmeurer
35f6c0fdbf [turbofan] Optimize silent hole checks on legacy const context slots.
Currently we always generate a diamond in the graph builder for every
legacy const context slot, which we cannot get rid of until late control
reduction, even if we know after context specialization that the slot is
already initialized.

Now we generate a select instead, which the CommonOperatorReducer
happily removes during typed lowering. This greatly speeds up asm.js
code generated by Emscripten with the new POINTER_MASKING mode.

R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27739}
2015-04-10 10:28:12 +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
mstarzinger
96ef78aa0b [turbofan] Fix FrameInspector when deoptimizer is disabled.
This is a workaround to make the debugger happy about TurboFan frames
when the debugger causes frame inspection. Note that this can happen
because the debugger can be activated while there still are optimized
TurboFan activations on the stack.

R=ishell@chromium.org
BUG=chromium:465298
TEST=mjsunit/regress/regress-crbug-465298
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27717}
2015-04-09 19:40:49 +00:00
arv
635b5fea98 Lexical arguments for arrow functions
Only allocate 'arguments' if the scope is not an arrow scope.

BUG=v8:2700
LOG=N
R=adamk@chromium.org, wingo@igalia.cmo

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

Cr-Commit-Position: refs/heads/master@{#27716}
2015-04-09 19:39:38 +00:00
caitpotter88
74c381221c [es6] implement spread calls
BUG=v8:3018
R=
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27714}
2015-04-09 19:37:19 +00:00
Adam Klein
9164e0b62c Skip another debug test that fails in always-opt/turbofan
TBR=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27710}
2015-04-09 17:46:14 +00:00
yangguo
fd8d0d1419 Blacklist tests due to optimizing toplevel with --always-opt.
Those two tests fail in gc-stress and custom snapshot (embedding mjsunit.js).
This is likely due to different GC timing with the custom snapshot.

R=mstarzinger@chromium.org
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#27688}
2015-04-09 08:47:34 +00:00
mstarzinger
dd3067a787 Disable more failing tests after f3338dd3b0.
TBR=machenbach@chromium.org
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#27687}
2015-04-09 08:21:45 +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
mstarzinger
4b5bf1e33c Disable more failing tests after f3338dd3b0.
TBR=machenbach@chromium.org
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#27675}
2015-04-08 17:28:58 +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
mstarzinger
515e483dd0 Disable more failing tests after f3338dd3b0.
TBR=machenbach@chromium.org
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#27670}
2015-04-08 14:16:58 +00:00
titzer
1b400a14cb Add more systematic tests for comparisons.
Because, well, JavaScript is tricky and compilers like folding.

R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27668}
2015-04-08 13:15:41 +00:00
titzer
a511c78999 Fix maybe_string_add for adds that have no type feedback where --always-opt is on.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27667}
2015-04-08 13:14:30 +00:00
yangguo
3a4d073f1d Create result array of %DebugGetLoadedScripts outside the debug context.
R=jarin@chromium.org
BUG=chromium:474297
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27659}
2015-04-08 11:15:02 +00:00
yangguo
5db360dd56 Blacklist failing test on arm64 (issue 4016).
TBR=jkummerow@chromium.org
BUG=v8:4016
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27656}
2015-04-08 11:11:37 +00:00
mstarzinger
ad94e145c3 Disable more failing tests after f3338dd3b0.
TBR=yangguo@chromium.org
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#27655}
2015-04-08 10:35:16 +00:00
mstarzinger
0716bc3f76 Disable more failing tests after f3338dd3b0.
TBR=yangguo@chromium.org
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#27652}
2015-04-08 09:51:18 +00:00
mstarzinger
52f1f1458e Disable failing test after f3338dd3b0.
R=yangguo@chromium.org
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#27651}
2015-04-08 09:25:01 +00:00
adamk
74ef072148 Disable another debug test under turbo always-opt
TBR=mstarzinger@chromium.org
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#27642}
2015-04-07 20:10:31 +00:00
mstarzinger
77e6efd870 Disabled failing tests after 2d281e71ac.
R=titzer@chromium.org
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#27636}
2015-04-07 17:06:22 +00:00
mstarzinger
2d281e71ac Make --always-opt also optimize top-level code.
This enables eager optimization of top-level code with TurboFan and
extends test coverage by triggering it with the --always-opt flag.
Script contexts are now also properly allocated in TurboFan.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27633}
2015-04-07 15:44:23 +00:00
jkummerow
90cbede588 Move prototype metadata from internal properties to prototype maps
The motivation is that we prefer to avoid creating internal properties, and we have a usable field on maps ("transitions", which is not used for prototype maps).
This CL also ensures the invariant that prototype maps are never shared, even if they are in dictionary mode.

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

Cr-Commit-Position: refs/heads/master@{#27617}
2015-04-07 10:42:57 +00:00
yangguo
c67cb287a9 Always update raw pointers when handling interrupts inside RegExp code.
R=mstarzinger@chromium.org
BUG=chromium:469480
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27615}
2015-04-07 09:44:57 +00:00
jkummerow
146598f44a JSEntryTrampoline: check for stack space before pushing arguments
Optimistically pushing a lot of arguments can run into the stack limit of the process, at least on operating systems where this limit is close to the limit that V8 sets for itself.

BUG=chromium:469768
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#27614}
2015-04-07 09:13:44 +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
arv
18cb17c924 ES6: Error functions should extend Error
The /NativeError/ functions should have Error as their [[Prototype]].

http://people.mozilla.org/~jorendorff/es6-draft.html#sec-properties-of-the-nativeerror-constructors

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

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

Cr-Commit-Position: refs/heads/master@{#27572}
2015-04-01 17:29:59 +00:00
erikcorry
5a93a3304c Reland: Fix JSON parser Handle leak (previous CL 1041483004)
R=mstarzinger@chromium.org
BUG=v8:3976
BUG=472504
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#27571}
2015-04-01 16:58:47 +00:00
arv
4374941837 [es6] Object.getOwnPropertyDescriptor should wrap primitives
In ES6 Object.getOwnPropertyDescriptor should call ToObject, which
means that primitive values will return descriptors from the wrapper.

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

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

Cr-Commit-Position: refs/heads/master@{#27569}
2015-04-01 15:45:08 +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
kozyatinskiy
66d5519f7e Revert of Correctly compute line numbers in functions from the function constructor. (patchset #5 id:80001 of https://codereview.chromium.org/701093003/)
Reason for revert:
Locations from New Function are broken in DevTools.

Original issue's description:
> Correctly compute line numbers in functions from the function constructor.
>
> R=aandrey@chromium.org
> BUG=chromium:109362
> LOG=Y
>
> Committed: https://code.google.com/p/v8/source/detail?r=25289

TBR=aandrey@chromium.org,yangguo@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:109362
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27564}
2015-04-01 10:11:26 +00:00
erikcorry
77dd1f347d Revert of Fix JSON parser Handle leak (patchset #3 id:40001 of https://codereview.chromium.org/1041483004/)
Reason for revert:
Reverting due to JSOn parser failures

Original issue's description:
> Fix JSON parser Handle leak
>
> R=verwaest@chromium.org
> BUG=v8:3976
> LOG=y
>
> Committed: https://crrev.com/1ec850383bb82f6d8bebc7416e5f50b649d1eeaa
> Cr-Commit-Position: refs/heads/master@{#27512}

TBR=verwaest@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3976

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

Cr-Commit-Position: refs/heads/master@{#27562}
2015-04-01 09:23:02 +00:00
arv
d4a314f9dc [es6] Object.getPrototypeOf should work with values
This reverts commit 992751d0dc.

The final spec for Object.getPrototypeOf calls ToObject on the
parameter, which means that it should only throw for null and
undefined. For other non object values the prototype of the wrapper
should be used.

Difference from last time: Updated .status and will disable Blink
side tests as needed.

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

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

Cr-Commit-Position: refs/heads/master@{#27558}
2015-04-01 00:22:39 +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
ishell
3cb9f132ba Layout descriptor must be trimmed when corresponding descriptors array is trimmed to stay in sync.
BUG=chromium:470804
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27528}
2015-03-30 17:03:50 +00:00
mstarzinger
6c19c79f59 [turbofan] Fix test of %_MathClz32 intrinsic.
This test will fail once we optimize top-level code, because the
aforementioned intrinsic doesn't perform a NumberToUint32 conversion.

R=titzer@chromium.org
TEST=mjsunit/asm/math-clz32

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

Cr-Commit-Position: refs/heads/master@{#27524}
2015-03-30 15:10:39 +00:00
verwaest
87eef73234 Fix speedup of typedarray-length loading in the ICs as well as Crankshaft
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27519}
2015-03-30 11:50:23 +00:00
dcarney
97981d9413 fix special index parsing
R=verwaest@chromium.org,dslomov@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27518}
2015-03-30 11:41:15 +00:00
erikcorry
1ec850383b Fix JSON parser Handle leak
R=verwaest@chromium.org
BUG=v8:3976
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#27512}
2015-03-30 09:55:30 +00:00
mvstanton
7c347c545e Ensure object literal element boilerplates aren't modified.
A bug allows JSObject literals with elements to have the elements in the
boilerplate modified.

BUG=466993
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27511}
2015-03-30 09:20:09 +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
erikcorry
56ac39757b Disable test on deopt fuzzer that uses a little too much memory
R=ulan@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27485}
2015-03-26 16:53:52 +00:00
mstarzinger
fced43a686 [debugger] Make Runtime_DebugEvaluate safe for reentry.
Only one FrameInspector can be active at a time on any given stack,
this ensures that it's lifetime is sufficiently scoped.

R=yangguo@chromium.org
TEST=mjsunit/regress/regress-crbug-259300

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

Cr-Commit-Position: refs/heads/master@{#27477}
2015-03-26 12:31:02 +00:00
verwaest
accbe2216e Remove CanRetainOtherContext since embedded objects are now weak.
Instead of CanRetainOtherContext, we now manually blacklist all access-checked objects.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27473}
2015-03-26 11:22:07 +00:00
yangguo
69383d6366 Revert of Revert of Debugger: deduplicate shared function info when setting script break points. (patchset #1 id:1 of https://codereview.chromium.org/999273003/)
Reason for revert:
Reland since the failure has been fixed in https://codereview.chromium.org/1035523005/

Original issue's description:
> Revert of Debugger: deduplicate shared function info when setting script break points. (patchset #4 id:60001 of https://codereview.chromium.org/998253005/)
>
> Reason for revert:
> Code caching failures.
>
> Original issue's description:
> > Debugger: deduplicate shared function info when setting script break points.
> >
> > Also fix Debug.showBreakPoints for multiple break points at the same location.
> >
> > BUG=v8:3960
> > LOG=N
> >
> > Committed: https://crrev.com/73b17a71a22564c0b66d9aa7c00948c748f5b290
> > Cr-Commit-Position: refs/heads/master@{#27444}
>
> TBR=mstarzinger@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=v8:3960
>
> Committed: https://crrev.com/9b29d008dfcc00bf56be8040add1d2c5e404673b
> Cr-Commit-Position: refs/heads/master@{#27448}

TBR=mstarzinger@chromium.org
BUG=v8:3960
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27472}
2015-03-26 10:43:51 +00:00
yangguo
ed9191221b Serializer: ensure unique script ids when deserializing.
R=jochen@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27471}
2015-03-26 09:50:51 +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
kozyatinskiy
aca928b7ad Reland [V8] Removed SourceLocationRestrict
This method uses in messages.js in GetSourceLine and GetPositionInLine. This methods uses in v8::Message API methods and there is no documentation about it.
Method looks obsolete.
One of the strange side effect is shown by attached issue.

BUG=chromium:468781
TBR=yangguo@chromium.org
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27458}
2015-03-25 23:11:12 +00:00
titzer
ebc5167476 [turbofan] Fix loading of JSFunction from activation in case of adapter frame.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27454}
2015-03-25 17:46:16 +00:00
machenbach
c74d168502 Mark test as flaky.
BUG=v8:3838
LOG=n
TBR=ulan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27450}
2015-03-25 15:55:57 +00:00
yangguo
9b29d008df Revert of Debugger: deduplicate shared function info when setting script break points. (patchset #4 id:60001 of https://codereview.chromium.org/998253005/)
Reason for revert:
Code caching failures.

Original issue's description:
> Debugger: deduplicate shared function info when setting script break points.
>
> Also fix Debug.showBreakPoints for multiple break points at the same location.
>
> BUG=v8:3960
> LOG=N
>
> Committed: https://crrev.com/73b17a71a22564c0b66d9aa7c00948c748f5b290
> Cr-Commit-Position: refs/heads/master@{#27444}

TBR=mstarzinger@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3960

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

Cr-Commit-Position: refs/heads/master@{#27448}
2015-03-25 15:19:20 +00:00
mstarzinger
7d0e5593e5 [turbofan] Support initial step-in through debugger statement.
This adapts the debugger so that the first break event starting the
stepping process can come from optimized code. TurboFan supports a
debugger statement and hence can be the top-most frame whenever the
Debug::HandleDebugBreak handler is triggered.

R=yangguo@chromium.org
TEST=mjsunit/debug,cctest/test-debug

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

Cr-Commit-Position: refs/heads/master@{#27447}
2015-03-25 15:02:43 +00:00
michael_dawson
5a91597383 PPC: Ensure predictable code size at map_check in LCodeGen::DoInstanceOfKnownGlobal.
R=mbrandy@us.ibm.com, svenpanne@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27446}
2015-03-25 14:59:21 +00:00
yangguo
73b17a71a2 Debugger: deduplicate shared function info when setting script break points.
Also fix Debug.showBreakPoints for multiple break points at the same location.

BUG=v8:3960
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27444}
2015-03-25 14:53:49 +00:00
mstarzinger
38a719f965 Switch full-codegen from StackHandlers to handler table.
This switches full-codegen to no longer push and pop StackHandler
markers onto the operand stack, but relies on a range-based handler
table instead. We only use StackHandlers in JSEntryStubs to mark the
transition from C to JS code.

Note that this makes deoptimization and OSR from within any try-block
work out of the box, makes the non-exception paths faster and should
overall be neutral on the memory footprint (pros).

On the other hand it makes the exception paths slower and actually
throwing and exception more expensive (cons).

R=yangguo@chromium.org
TEST=cctest/test-run-jsexceptions/DeoptTry

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

Cr-Commit-Position: refs/heads/master@{#27440}
2015-03-25 13:14:02 +00:00
titzer
006ae96dab Set test expectations prior to enabling --turbo-osr.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27425}
2015-03-24 19:02:55 +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
marja
cb7279da81 [strong] Check strong mode free variables against the global object.
Gather references to unbound variables where the reference (VariableProxy) is
inside strong mode. Check them against the global object when a script is bound
to a context (during compilation).

This CL only checks unbound variables which are not inside lazy functions - TBD
how do we solve that; alternatives: add developer mode which disables laziness /
do the check whenever lazy functions are really compiled.

BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27422}
2015-03-24 16:46:59 +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
erikcorry
4c806802b5 Fix OOM bug 3976.
Also introduce --trace-fragmentation-verbose, and fix --always-compact.

R=ulan@chromium.org
BUG=v8:3976
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#27414}
2015-03-24 15:02:28 +00:00
jarin
0f94c96cbc Test for wrong arguments object materialization.
The test demonstrates a bad interaction between arguments object
materialization, escape analysis and exception handling.

We can return a wrong arguments object if we materialize arguments
object (using f.arguments) and then throw around f's frame so that f
does not clean up the materialized frame information (see the
MaterializedObjectStore in deoptimizer.h/.cc). If we enter another
function that has the same frame pointer and request an arguments object
of (or lazily deoptimize) that function, we can get the materialized
object of the original function.

We should clean up the materialized object store when we unwind the
stack.

BUG=v8:3985
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27406}
2015-03-24 13:20:21 +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
machenbach
310d75218e Revert of [V8] Removed SourceLocationRestrict (patchset #3 id:40001 of https://codereview.chromium.org/1022333004/)
Reason for revert:
[Sheriff] This seems to change layout test expectations of some tests, e.g.:
http://build.chromium.org/p/client.v8/builders/V8-Blink%20Linux%2064%20%28dbg%29/builds/2317

Expectation example:
https://storage.googleapis.com/chromium-layout-test-archives/V8-Blink_Linux_64__dbg_/2317/layout-test-results/fast/events/window-onerror-11-pretty-diff.html

Please add a needsmanualrebaseline expectation to the tests affected by this change on the blink side first before relanding.

Original issue's description:
> [V8] Removed SourceLocationRestrict
>
> This method uses in messages.js in GetSourceLine and GetPositionInLine. This methods uses in v8::Message API methods and there is no documentation about it.
> Method looks obsolete.
> One of the strange side effect is shown by attached issue.
>
> BUG=chromium:468781
> R=yangguo@chromium.org
> LOG=Y
>
> Committed: https://crrev.com/b563ceac0f95551a128a1403cdbacc7aefcdabaf
> Cr-Commit-Position: refs/heads/master@{#27374}

TBR=yangguo@chromium.org,kozyatinskiy@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:468781

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

Cr-Commit-Position: refs/heads/master@{#27398}
2015-03-24 12:04:43 +00:00
yangguo
992751d0dc Revert of [es6] Object.getPrototypeOf should work with values (patchset #3 id:40001 of https://codereview.chromium.org/1014813003/)
Reason for revert:
Layout test failures. Please update layout test expectations before landing this, in order to not block the roll.

Original issue's description:
> [es6] Object.getPrototypeOf should work with values
>
> The final spec for Object.getPrototypeOf calls ToObject on the
> parameter, which means that it should only throw for null and
> undefined. For other non object values the prototype of the wrapper
> should be used.
>
> BUG=v8:3964
> LOG=N
> R=adamk, rossberg@chromium.org
>
> Committed: https://crrev.com/ea463a916bbe5994b0d2d04e8075058b373b2e2c
> Cr-Commit-Position: refs/heads/master@{#27354}

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

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

Cr-Commit-Position: refs/heads/master@{#27389}
2015-03-24 09:19:26 +00:00
verwaest
1b16678f25 Properly handle non-JSFunction constructors in CanRetainOtherContext
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27379}
2015-03-23 19:24:58 +00:00
mvstanton
6689cc27eb VectorICs: keyed element loads were kicking out non-smi keys unnecessarily
Handlers should be in charge of this work. The change uncovered a bug in
vector-ics related to keyed loads into strings. It's important for
StringCharCodeAtGenerator, a helper used in full code and in
LoadIndexedStringStub (a handler) to protect the vector and slot registers
when it makes a runtime call to convert a HeapNumber to a Smi.

It's still possible for the handler to MISS after this call, perhaps due
to out of bounds access. In that case, the vector and slot registers need
to be delivered safely to the MISS handler.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27377}
2015-03-23 18:50:23 +00:00
kozyatinskiy
b563ceac0f [V8] Removed SourceLocationRestrict
This method uses in messages.js in GetSourceLine and GetPositionInLine. This methods uses in v8::Message API methods and there is no documentation about it.
Method looks obsolete.
One of the strange side effect is shown by attached issue.

BUG=chromium:468781
R=yangguo@chromium.org
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27374}
2015-03-23 16:33:19 +00:00
caitpotter88
24a9b8815e [es5] call ToString() on argument in String.prototype.concat() fast case
15.5.4.6 5.b requires each part to be converted using ToString(). This also needs to occur in the single argument fast-case.

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

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

Cr-Commit-Position: refs/heads/master@{#27372}
2015-03-23 15:07:46 +00:00
kozyatinskiy
ed8394f1e3 [V8] Added debug-sourceinfo.js with LF endings back
Readded after https://codereview.chromium.org/1029063002/ with correct line endings.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27370}
2015-03-23 14:51:03 +00:00
kozyatinskiy
ec9f0a5307 [V8] Removed debug-sourceinfo.js with CRLF line endings
We can't simple delete and add one file in one CL. This is necessary for replacing this test with version with LF line endings.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27368}
2015-03-23 14:31:40 +00:00
titzer
d931700b81 [turbofan] Fix control reducer bug with walking non-control edges during ConnectNTL phase.
R=jarin@chromium.org
BUG=chromium:469605
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27366}
2015-03-23 14:08:25 +00:00
ulan
c56fa73699 Reland "Fix memory leak caused by field type in descriptor array."
BUG=v8:3877
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#27362}
2015-03-23 11:20:50 +00:00
arv
ea463a916b [es6] Object.getPrototypeOf should work with values
The final spec for Object.getPrototypeOf calls ToObject on the
parameter, which means that it should only throw for null and
undefined. For other non object values the prototype of the wrapper
should be used.

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

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

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

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

Cr-Commit-Position: refs/heads/master@{#27352}
2015-03-23 07:01:48 +00:00
Toon Verwaest
0f573464e6 Ensure we don't overflow in BCE
BUG=chromium:469148
LOG=y
R=dcarney@chromium.org

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

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

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

Cr-Commit-Position: refs/heads/master@{#27344}
2015-03-20 14:07:16 +00:00
bmeurer
ff89876bb9 [turbofan] Fix lowering of Math.max for integral inputs.
R=jarin@chromium.org
BUG=chromium:468162
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#27341}
2015-03-20 12:05:19 +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
bmeurer
d5893cad6b [turbofan] Work-around untagged result of CompareIC in pointer maps.
BUG=chromium:469089
LOG=n
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27333}
2015-03-20 09:45:12 +00:00
Benedikt Meurer
3aa206b865 [turbofan] Turn Math.clz32 into an inlinable builtin.
R=dcarney@chromium.org, yangguo@chromium.org
BUG=v8:3952
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27329}
2015-03-20 08:37:34 +00:00
aperez
3c3ce1bca8 Parser: Fix crash on stack overflow when lazy-parsing arrow functions
The problem manifests itself when parsing manages to return something
meaningful in the presence of a stack overflow. This happens because
calling ParserBase::Next() will still return one valid token on stack
overflow, before starting to return invalid tokens.

Take the following input as example:

        a.map(v => v + 1);
              | |
       already   next token
        parsed   (which will be an invalid token
  (identifier)   because of a stack overflow)

The "v" may have been already parsed into a VariableProxy, then if a
stack overflow occurs, next token will be an invalid token (instead
of Token::ARROW), but the parser will return the VariableProxy.

This always happens when lazy-parsing arrow functions, so the position
in the input stream where the the arrow function code ends is known.
This fix adds a check that ensures that parsing ended at the end
position of the arrow function.

BUG=465671
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27325}
2015-03-20 00:17:50 +00:00
rossberg
74cf8e0122 [strong] Check constructor returns
R=dslomov@chromium.org
BUG=v8:3956
LOG=N

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

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

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

Cr-Commit-Position: refs/heads/master@{#27316}
2015-03-19 14:47:27 +00:00
jarin
b7dc9c580a [turbofan] Remember types for deoptimization during simplified lowering.
With this change, we remember the types of frame state inputs (in a new
operator, called TypedStateValues). Instead of inferring the value types
when building translations, we used the recorded types.

The original approach was not reliable because the passes after
simplified lowering can change node types, and this in turn confuses
the translation builder.

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

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

Cr-Commit-Position: refs/heads/master@{#27310}
2015-03-19 14:00:33 +00:00
yangguo
5383257ecc Do not test debug-scripts-request with TurboFan.
This test has been failing flakily on gc-stress, only with --turbo-filter=*

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27294}
2015-03-19 10:07:12 +00:00
yangguo
f289311c8d Add regression test for dependency to field type tracked weak map.
TBR=jkummerow@chromium.org
BUG=v8:3969
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27291}
2015-03-19 08:51:29 +00:00
mvstanton
35c3d47e88 Vector ICs: Clear the vector ic slots appropriately during debugging.
When the debugger is active, a host of connected functions get an associated
DebugInfo structure, and their code is copied. The debugger uses the original
code to occasionally patch ICs with their initial value. Although IC learning
can occur, it's thrown away often, depending on the constellation of
breakpoints active or deactivating. Finally, feedback is discarded when the
debugger is turned off.

The type feedback vector needs to be brought into line with this behavior, so
now the debugger clears it's IC slots at appropriate bottlenecks in debug.cc.

R=yangguo@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27289}
2015-03-19 08:04:06 +00:00
michael_dawson
8849c00095 PPC: cleanup excludes
Updated excludes to remove SKIPs where possible. Either
removing if no longer needed or replacing with SLOW where
tests just need more time to run

	modified:   test/cctest/cctest.status
	modified:   test/mjsunit/mjsunit.status

R=danno@chromium.org, svenpanne@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27287}
2015-03-19 07:44:47 +00:00
yangguo
3f10f409c8 Revert of Reland of "Fix memory leak caused by field type in descriptor array."
TBR=ulan@chromium.org
BUG=v8:3969
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27286}
2015-03-19 07:43:37 +00:00
jarin
0cde253c9e [turbofan] Support lazy deopt for truncating store to a typed array.
The change introduces a second frame state (for the state before
the operation) for the StoreProperty nodes. If the store writes
into a typed array, the frame state is used for lazy deopt from
the to-number conversion that is performed by the store.

BUG=v8:3963
LOG=n
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27285}
2015-03-19 05:46:30 +00:00
ulan
68abc2263f Skip flaky mjsunit/debug-references in gc-stress.
BUG=v8:3969
LOG=NO
TBR=hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27279}
2015-03-18 19:52: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