Commit Graph

3880 Commits

Author SHA1 Message Date
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
titzer
434d1ad014 [turbofan] Fix bug in OSR deconstruction.
In constructing the transfer between loop copies, we need to merge the backedges from all the previous copies of the given loop. The control reduction will work out which ones are really reachable.

R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27246}
2015-03-17 17:55:29 +00:00
mstarzinger
86b391ecad Delegate throwing in RegExpExecStub to CEntryStub.
This ensures that there is only one stub that deals with unwinding the
stack. Having more than one place containing that logic is brittle and
error prone, especially when it is a corner case only for RangeErrors.

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

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

Cr-Commit-Position: refs/heads/master@{#27243}
2015-03-17 15:49:40 +00:00
ulan
683f43d31b Mark mjsunit/debug-references as flaky in gc-stress.
BUG=v8:3969
LOG=NO
TBR=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27242}
2015-03-17 15:37:30 +00:00
mstarzinger
7e8a62e34a [turbofan] Fix C++ evaluation order in AstGraphBuilder.
The evaluation order of receiver versus arguments is not properly
defined by C++. This caused issues with Clang where the environment
changed after the receiveing environment was already loaded.

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

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

Cr-Commit-Position: refs/heads/master@{#27238}
2015-03-17 12:37:07 +00:00
ishell
ddfca2b069 Bugfix in hydrogen GVN.
BUG=chromium:467481
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27223}
2015-03-16 13:46:20 +00:00
michael_dawson
8db09a363b PPC: Exclude mirror-object test until issue is resolved
modified:   test/mjsunit/mjsunit.status

R=danno@chromium.org, svenpanne@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27206}
2015-03-16 09:26:38 +00:00
yangguo
d2295635c4 Add more debug output for flaky debug-references test.
TBR=vogelheim@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27203}
2015-03-16 08:14:43 +00:00
arv
e625844648 [es6] Function length property should be configurable
ES6 specs the function length property (it was not part of ES5) and
it makes it configurable.

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

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

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

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

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

Cr-Commit-Position: refs/heads/master@{#27189}
2015-03-13 16:57:35 +00:00
rossberg
3fcb38f772 [strong] Check super constructor calls
R=marja@chromium.org
BUG=v8:3956
LOG=N

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

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

R=rossberg@chromium.org
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27187}
2015-03-13 15:15:57 +00:00
kozyatinskiy
ec73e08860 [V8] Use Function.name in Error.stack
Error.stack contains function.name if its type is string.
Otherwise if function have inferred name then .stack contains it.
For functions from eval .stack property contains "eval".

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

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

Cr-Commit-Position: refs/heads/master@{#27186}
2015-03-13 15:11:57 +00:00
yangguo
c13dda2519 Add more output to flaky debug-references test.
R=vogelheim@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27181}
2015-03-13 12:27:40 +00:00
adamk
0c305e0b1b Fix error message for Object.observe accept argument
BUG=chromium:464695
LOG=n

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

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

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

Cr-Commit-Position: refs/heads/master@{#27159}
2015-03-12 14:02:04 +00:00
ishell
0902b5f4df Incorrect handling of HTransitionElementsKind in hydrogen check elimination phase fixed.
BUG=chromium:460917
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27154}
2015-03-12 11:44:29 +00:00
marja
44c8c1bcfe [strong] Cleanup and fix test (declaration-after-use.js).
Cleanup: Better helpers, unified line splitting. Also asserting that without
strong mode, the snippets don't produce errors.

Fix: The eval related tests were wrong (we didn't make sure that the error
thrown comes from strong scoping and is not a normal runtime error).

BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27153}
2015-03-12 10:52:08 +00:00
michael_dawson
7cbdadd495 PPC: remove test excludes no longer required
The test/cctest/cctest.status and test/mjsunit/mjsunit.status
tests now pass under the simulator so removing these
excludes

	modified:   test/cctest/cctest.status
	modified:   test/mjsunit/mjsunit.status

R=danno@chromium.org, svenpanne@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27145}
2015-03-12 07:54:38 +00:00
michael_dawson
45e4a78911 Contribution of PowerPC port (continuation of 422063005) - uplevel
Contribution of PowerPC port (continuation of 422063005,
817143002,866843003, and 901083004). This patch updates
the ppc directories to make them current with changes in
common code as of today.

We had to exclude the test test-serialize/SerializeInternalReference
until we agree on the right way to add those changes for PPC as
outlined in the description in the google doc provided earlier.

We also had to exclude a couple of other tests due to new
failures seen since the last uplevel.  We excluded as opposed
to waiting until we could investigate to maximize the chance
of getting PPC compiling in the google repos before new
breaking changes are made.

I'll note that before applying any of our changes the
mozilla part of quickcheck was already broken when using
the lastest repo content so I had to run without that

	modified:   src/compiler/ppc/code-generator-ppc.cc
	modified:   src/compiler/ppc/instruction-codes-ppc.h
	modified:   src/compiler/ppc/instruction-selector-ppc.cc
	modified:   src/ic/ppc/handler-compiler-ppc.cc
	modified:   src/ic/ppc/ic-compiler-ppc.cc
	modified:   src/ppc/assembler-ppc-inl.h
	modified:   src/ppc/assembler-ppc.cc
	modified:   src/ppc/assembler-ppc.h
	modified:   src/ppc/builtins-ppc.cc
	modified:   src/ppc/code-stubs-ppc.cc
	modified:   src/ppc/codegen-ppc.cc
	modified:   src/ppc/full-codegen-ppc.cc
	modified:   src/ppc/lithium-codegen-ppc.cc
	modified:   src/ppc/macro-assembler-ppc.cc
	modified:   src/ppc/macro-assembler-ppc.h
	modified:   test/cctest/cctest.status

R=danno@chromium.org, svenpanne@chromium.org

BUG=

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

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

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27121}
2015-03-10 19:11:20 +00:00
marja
6ad87e4f86 [strong] More scoping related errors: object literal methods.
This CL adds errors for illegal references which occur inside object literal
methods inside computed properrty names.

BUG=v8:3948,v8:3956
LOG=N

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

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

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

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

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

Cr-Commit-Position: refs/heads/master@{#27106}
2015-03-10 14:14:38 +00:00
yangguo
3ed5dea6f7 Add test case for serializing external references to runtime functions.
R=svenpanne@chromium.org
BUG=chromium:465564
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27093}
2015-03-10 10:36:16 +00:00
titzer
0b3f4af12c [turbofan] Fix --turbo-osr for OSRing into inner loop inside for-in.
R=mstarzinger@chromium.org
BUG=chromium:462775
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27088}
2015-03-10 09:27:40 +00:00
marja
bb69648804 Debugger & classes: add debugger tests for classes.
R=dslomov@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27077}
2015-03-09 14:49:54 +00:00
marja
4a709dd658 [strong] Fix scoping related errors for methods.
Methods can refer to the class name.

BUG=v8:3927
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27075}
2015-03-09 14:30:40 +00:00
yangguo
9dedcc3dfc Simplify promise event on throw handling.
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27074}
2015-03-09 13:41:55 +00:00
jarin
6f559b7ec3 [turbofan] Fix lazy deopt for JSToNumber conversions in binary operations.
This slightly hacky change provides lazy deopt points for to-number conversions in binops: When we deopt from a to-number conversion, we create a frame state with the already-converted value(s) so that we do not repeat the side effect of the conversion.

Embenchen numbers are below. It is not quite clear what happened to fasta - the hot code looks nearly identical.

Current: EmbenchenBox2d(RunTime): 12746 ms.
d8-master: EmbenchenBox2d(RunTime): 13861 ms.
----------- bullet.js
Current: EmbenchenBullet(RunTime): 17680 ms.
d8-master: EmbenchenBullet(RunTime): 19170 ms.
----------- copy.js
Current: EmbenchenCopy(RunTime): 4939 ms.
d8-master: EmbenchenCopy(RunTime): 4943 ms.
----------- corrections.js
Current: EmbenchenCorrections(RunTime): 6639 ms.
d8-master: EmbenchenCorrections(RunTime): 6728 ms.
----------- fannkuch.js
Current: EmbenchenFannkuch(RunTime): 4630 ms.
d8-master: EmbenchenFannkuch(RunTime): 4872 ms.
----------- fasta.js
Current: EmbenchenFasta(RunTime): 10209 ms.
d8-master: EmbenchenFasta(RunTime): 9673 ms.
----------- lua_binarytrees.js
Current: EmbenchenLuaBinaryTrees(RunTime): 12936 ms.
d8-master: EmbenchenLuaBinaryTrees(RunTime): 15529 ms.
----------- memops.js
Current: EmbenchenMemOps(RunTime): 7357 ms.
d8-master: EmbenchenMemOps(RunTime): 7340 ms.
----------- primes.js
Current: EmbenchenPrimes(RunTime): 7530 ms.
d8-master: EmbenchenPrimes(RunTime): 7457 ms.
----------- skinning.js
Current: EmbenchenSkinning(RunTime): 15832 ms.
d8-master: EmbenchenSkinning(RunTime): 15630 ms.
----------- zlib.js
Current: EmbenchenZLib(RunTime): 11176 ms.
d8-master: EmbenchenZLib(RunTime): 11324 ms.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27071}
2015-03-09 13:24:42 +00:00
mstarzinger
dcb502a4ee [turbofan] Only reduce inline %DeoptimizeNow.
This makes sure only the %_DeoptimizeNow intrinsic is inlined, and
not the %DeoptimizeNow one. It hence re-establishes the invariant
that JSIntrinsicLowering only deals with inline intrinsics.

R=jarin@chromium.org
TEST=mjsunit/compiler/eager-deopt-simple

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

Cr-Commit-Position: refs/heads/master@{#27070}
2015-03-09 13:20:26 +00:00
Jaroslav Sevcik
82a28adf05 Do not set target in deoptimized code in keyed store IC.
BUG=chromium:460937
R=ishell@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27064}
2015-03-09 10:11:13 +00:00
svenpanne
d8416f5524 Intrinsics in the INLINE_FUNCTION_LIST are now avaliable without '_', too.
This involved renaming apart a few more intrinsics. In the long run,
we want to clean up redundant intrinsics which just delegate.

BUG=v8:3947
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27043}
2015-03-06 13:50:06 +00:00
jarin
9b40c5d0d2 [turbofan] Fix the deopt ids in assignment.
BUG=chromium:463028
LOG=n
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27041}
2015-03-06 12:50:47 +00:00
yangguo
ce45b00e4b Serializer: correctly deal with internal references.
Internal references are absolute addresses into the instruction
stream. Turn them into relative addresses when serializing and
back when deserializing to keep them valid.

R=bmeurer@chromium.org

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

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

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

Cr-Commit-Position: refs/heads/master@{#27014}
2015-03-05 12:44:01 +00:00
bmeurer
4436c2642a [turbofan] Support for %_DoubleHi, %_DoubleLo and %_ConstructDouble.
This adds support for the double bits intrinsics to TurboFan, and is
a first step towards fast Math functions inlined into TurboFan code
or even compiled by themselves with TurboFan.

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

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

This is a revert of revert c791d84112.

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

5f75a3be4c

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

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

Cr-Commit-Position: refs/heads/master@{#26996}
2015-03-04 16:57:10 +00:00
jarin
8d2e45669f [turbofan] First shot at eager deoptimization in Turbofan.
BUG=

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

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

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

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

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

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

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

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

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

Aaaarrrrrghhhhhh!!!

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

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

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

Cr-Commit-Position: refs/heads/master@{#26969}
2015-03-03 17:48:12 +00:00
mstarzinger
d016387e81 [turbofan] Add test coverage for deopt within try-catch.
This just contains test, no fixes. Note that some of the tests are
still disabled because they either fail or we don't want ClusterFuzz
to pick up the flag yet.

R=jarin@chromium.org
TEST=cctest/test-run-jsexceptions/Deopt,mjsunit/compiler/try-deopt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Cr-Commit-Position: refs/heads/master@{#26960}
2015-03-03 13:40:39 +00:00
jarin
d0b8839b35 [turbofan] Take type into account when determining Word32 phi representation.
BUG=
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26958}
2015-03-03 12:23:21 +00:00
mstarzinger
4acbc93dbf Move stack unwinding logic into the runtime.
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26957}
2015-03-03 12:03:14 +00:00
michael_dawson
a3465838bc Contribution of PowerPC port (continuation of 422063005) - currency
Contribution of PowerPC port (continuation of 422063005, 817143002,
866843003, and 901083004. This patch updates the ppc directories
to make them current with changes in common code, removes the
optimization to use the ool constant pool, and excludes tests that
don't pass under the ppc simulator given a 240s timeout.

Subsequent patches will cover:
   - remaining optimizations for PPC
   - remaining AIX changes not resolved by 4.8 compiler (4.8 is only recently available for AIX)
   - incremental updates required to ppc directories due to platform specific changes made
    in google repos while we complete the above steps.

	modified:   src/compiler/ppc/code-generator-ppc.cc
	modified:   src/ic/ppc/handler-compiler-ppc.cc
	modified:   src/ppc/assembler-ppc-inl.h
	modified:   src/ppc/assembler-ppc.cc
	modified:   src/ppc/assembler-ppc.h
	modified:   src/ppc/builtins-ppc.cc
	modified:   src/ppc/code-stubs-ppc.cc
	modified:   src/ppc/debug-ppc.cc
	modified:   src/ppc/deoptimizer-ppc.cc
	modified:   src/ppc/frames-ppc.cc
	modified:   src/ppc/frames-ppc.h
	modified:   src/ppc/full-codegen-ppc.cc
	modified:   src/ppc/lithium-codegen-ppc.cc
	modified:   src/ppc/lithium-ppc.cc
	modified:   src/ppc/lithium-ppc.h
	modified:   src/ppc/macro-assembler-ppc.cc
	modified:   src/ppc/macro-assembler-ppc.h
	modified:   test/cctest/cctest.status
	modified:   test/mjsunit/mjsunit.status

R=danno@chromium.org, svenpanne@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26951}
2015-03-03 07:05:00 +00:00
Jaroslav Sevcik
f0b11873a3 [turbofan] Fix deferred replacement in simplified lowering.
Deferred replacement must also replace in the pending node vector.

BUG=chromium:463056
LOG=n
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26938}
2015-03-02 12:49:49 +00:00
arv
c791d84112 Revert of ES6: Make function name configurable (patchset #10 id:220001 of https://codereview.chromium.org/960343002/)
Reason for revert:
Breaks Chrome browser test that checks Object.name

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Cr-Commit-Position: refs/heads/master@{#26924}
2015-02-27 19:29:01 +00:00
machenbach
885a88166d Revert of Invalidate the global property cell when converting from data to accessor. (patchset #1 id:1 of https://codereview.chromium.org/961003002/)
Reason for revert:
Breaks gc stress, e.g.: http://build.chromium.org/p/client.v8/builders/V8%20GC%20Stress%20-%201/builds/2322

Original issue's description:
> Invalidate the global property cell when converting from data to accessor.
>
> BUG=
> TBR=jkummerow@chromium.org,
>
> Committed: https://crrev.com/6a12dc240b1faffa500ff269077d832ecc74239d
> Cr-Commit-Position: refs/heads/master@{#26896}

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

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

Cr-Commit-Position: refs/heads/master@{#26899}
2015-02-26 21:03:18 +00:00
verwaest
6a12dc240b Invalidate the global property cell when converting from data to accessor.
BUG=
TBR=jkummerow@chromium.org,

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

Cr-Commit-Position: refs/heads/master@{#26896}
2015-02-26 18:48:59 +00:00
ulan
bbf8c0f23d Revert "Revert of Fix memory leak caused by field type in descriptor array."
This reverts commit b57be748b1 and
disables the test/mjsunit/debug-clearbreakpointgroup.js because
BreakLocationIterator::ClearBreakPoint is already broken for unrelated reasons (see v8:3924).

BUG=v8:3877
LOG=N
TEST=cctest/test-heap/Regress3877

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

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

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

Cr-Commit-Position: refs/heads/master@{#26892}
2015-02-26 18:37:19 +00:00
marja
1eddcf5b71 [strong] Declaration-after-use errors.
We cannot yet detect use-before-declaration in general, because for that we'd
need to analyze the context when compiling. But we can detect an error case
where we first see a use, then a declaration.

For this, I also added end position tracking (needed for error messages) to
VariableProxy.

Note: the position naming is completely inconsistent: start_position &
end_position, position & end_position, pos & end_pos, beg_pos & end_pos, to name
a few. This doesn't fix all of it, but tries to unify towards start_position &
end_position whenever possible w/ minimal changes.

BUG=

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

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

BUG=v8:3921
LOG=N
R=adamk

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

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

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

Cr-Commit-Position: refs/heads/master@{#26857}
2015-02-25 15:34:21 +00:00
rossberg
c094da9233 [strong] Make functions and generators non-extensible non-constructors
R=dslomov@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26854}
2015-02-25 14:52:51 +00:00
jkummerow
affcfaf428 Move Maps' back pointers from "transitions" to "constructor" field
Review URL: https://codereview.chromium.org/950283002

Cr-Commit-Position: refs/heads/master@{#26835}
2015-02-24 20:50:24 +00:00
rossberg
943dc63126 [strong] Deprecate ellisions
R=marja@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26820}
2015-02-24 12:51:08 +00:00
bmeurer
0882d3ff81 [turbofan] Initial version of branch cloning.
This implements a special case of block cloning to recognize constructs like

 if (a ? b : c) { ... }

that happen to be generated by Emscripten quite often.

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

Cr-Commit-Position: refs/heads/master@{#26808}
2015-02-24 07:41:36 +00:00
arv
87f77d6aba for-of should throw if result object is not an object
This is done using desugaring. Before this we had:

  result = iterator.next()

with this we instead do:

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

BUG=v8:3916
LOG=N

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

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

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

BUG=None
LOG=N
R=adamk

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

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

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

Cr-Commit-Position: refs/heads/master@{#26801}
2015-02-23 18:10:14 +00:00
verwaest
460187b563 Revert "The expected key is a valid identifier, which is already free of \\, <0x20, "."
The optimization is invalid as indicated by the test.

BUG=
TBR=yangguo@chromium.org

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

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

BUG=v8:3906
LOG=N
R=adamk

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

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

BUG=None
LOG=N
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#26786}
2015-02-20 20:07:21 +00:00
yangguo
0aa1d2af37 Fix GC-unsafe use of BreakLocationIterator.
R=svenpanne@chromium.org
BUG=v8:3776
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26779}
2015-02-20 14:47:35 +00:00
Yang Guo
c4d2234e79 Disable failing debug tests in gc-stress.
TBR=machenbach@chromium.org
BUG=v8:3776
LOG=N

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

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

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

Cr-Commit-Position: refs/heads/master@{#26759}
2015-02-19 21:38:18 +00:00
rossberg
7b49ed658c [strong] make function and class declarations lexical & immutable
R=arv@chromium.org
BUG=

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

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

BUG=v8:3330
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26754}
2015-02-19 16:15:35 +00:00
rossberg
0ebd870f72 [strong] Deprecate arguments
R=marja@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26753}
2015-02-19 14:58:42 +00:00
rossberg
7d089a5929 [strong] Deprecate for-in
R=marja@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26751}
2015-02-19 13:50:41 +00:00
titzer
d050c331eb [turbofan] Simplify context specialization and fix for OSR.
AstGraphBuilder puts a constant context in from the beginning.
Also fix bug in merging contexts in environment.

R=mstarzinger@chromium.org
BUG=

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

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

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

Cr-Commit-Position: refs/heads/master@{#26744}
2015-02-19 11:30:33 +00:00
jarin
9951e1e5f0 [turbofan] Fix typing of comparisons.
BUG=chromium:459955
LOG=n
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26743}
2015-02-19 10:56:23 +00:00
hpayer
206e9136bd Unlink pages from the space page list after evacuation.
BUG=430201
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26738}
2015-02-19 09:28:59 +00:00
marja
90501dd703 [strong] Remove a regression test for "use before var".
This case should break in strong mode (unlike previously thought).

R=rossberg@chromium.org
BUG=

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

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

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

Cr-Commit-Position: refs/heads/master@{#26710}
2015-02-17 22:28:12 +00:00
titzer
71765afff9 [turbofan] Rename context stack as part of the environment for OSR.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26705}
2015-02-17 18:10:11 +00:00
jarin
3f3558f365 Convert to immutable heap number when materializing arguments object.
BUG=chromium:457935
LOG=n
R=ishell@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26704}
2015-02-17 18:08:59 +00:00
mstarzinger
22dd6dc2a6 Fix representation for CompareIC in JSGenericLowering.
R=jarin@chromium.org
TEST=mjsunit/regress/regress-3884
BUG=v8:3884
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26702}
2015-02-17 16:37:36 +00:00
Andreas Rossberg
c503241945 [strong] deprecate empty sub-statements
R=marja@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26701}
2015-02-17 16:26:06 +00:00
Andreas Rossberg
f55242948e [strong] Deprecate delete
R=marja@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26698}
2015-02-17 16:08:11 +00:00
marja
34281c8322 [strong] Forbid var.
R=rossberg@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26697}
2015-02-17 15:41:25 +00:00
jarin
0a4047a69b During arguments materialization, do not store materialized objects without lazy deopt.
BUG=
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26695}
2015-02-17 15:24:34 +00:00
marja
7c15df8144 [strong] Remove mjsunit/strong/use-strong-flag.js
It would force us to make mjsunit.js strong-compatible, and that's too much for
now (for the upcoming features) and would have a ripple effect on other
tests. Especially debug-script.js which unships harmony features would break.

R=rossberg@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26694}
2015-02-17 15:11:08 +00:00
bmeurer
acd9c46ca7 [turbofan] Optimize certain chains of Branch into a Switch.
This adds a new ControlFlowOptimizer that - for now - recognizes chains
of Branches generated by the SwitchBuilder for a subset of javascript
switches into Switch nodes. Those Switch nodes are then lowered to
either table or lookup switches.

Also rename Case to IfValue (and introduce IfDefault) for consistency.

BUG=v8:3872
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26691}
2015-02-17 13:29:46 +00:00
rossberg
5c847d1f09 [strong] make --use-strong flag work in d8
This broke with the TSAN fix.

R=marja@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26687}
2015-02-17 12:08:02 +00:00
marja
868470ddc9 [strong] Adding regression cases which should always continue working.
1) Mutually recursive functions
2) Strong code using non-strong var before declaration.

These test cases ensure that we don't accidentally kill these wanted behaviors
when adding restrictions to strong mode.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26671}
2015-02-16 17:57:43 +00:00
titzer
c5f7d2bb82 [turbofan] Fix control reducer with re-reducing branches.
R=jarin@chromium.org
LOG=Y
BUG=chromium:458876

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

Cr-Commit-Position: refs/heads/master@{#26666}
2015-02-16 14:56:49 +00:00
jarin
d0758949e1 [turbofan] Clear pending exception from unsuccessful compilation.
BUG=chromium:458987
LOG=n
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26665}
2015-02-16 14:25:23 +00:00
jarin
0b8063cec8 [turbofan] Avoid ToNumber conversions if they could deoptimize.
BUG=chromium:454158
LOG=n
R=bmeurer@chromium.org

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

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

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

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

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

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

Cr-Commit-Position: refs/heads/master@{#26642}
2015-02-13 18:35:09 +00:00
arv
d273636e01 TF: Add support for [[HomeObject]]
BUG=None
LOG=N
R=mstarzinger@chromium.org, dslomov@chromium.org

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

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

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

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

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

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

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

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

Cr-Commit-Position: refs/heads/master@{#26628}
2015-02-12 18:06:52 +00:00
rossberg
dff690ec07 [strong] no sloppy equality
R=marja@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26619}
2015-02-12 15:10:04 +00:00
dcarney
01d7be28a6 fix typo in mjsunit expectations
TBR=machenbach@chromium.org

BUG=

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

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

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

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

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

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

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

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

Cr-Commit-Position: refs/heads/master@{#26586}
2015-02-11 15:13:12 +00:00