Commit Graph

3823 Commits

Author SHA1 Message Date
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