Commit Graph

1544 Commits

Author SHA1 Message Date
erikcorry
f14b93a508 Regexp: Improve the speed that we scan for an initial point where a non-anchored
regexp can match by using a Boyer-Moore-like table.  This is done by identifying
non-greedy non-capturing loops in the nodes that eat any character one at a time.
For example in the middle of the regexp /foo[\s\S]*?bar/ we find such a loop.
There is also such a loop implicitly inserted at the start of any non-anchored
regexp.

When we have found such a loop we look ahead in the nodes to find the set of
characters that can come at given distances.  For example for the regexp
/.?foo/ we know that there are at least 3 characters ahead of us, and the sets
of characters that can occur are [any, [f, o], [o]].  We find a range in the
lookahead info where the set of characters is reasonably constrained.  In our
example this is from index 1 to 2 (0 is not constrained).  We can now look 3
characters ahead and if we don't find one of [f, o] (the union of [f, o] and
[o]) then we can skip forwards by the range size (in this case 2).

For Unicode input strings we do the same, but modulo 128.

We also look at the first string fed to the regexp and use that to get a hint
of the character frequencies in the inputs.  This affects the assessment of
whether the set of characters is 'reasonably constrained'.

We still have the old lookahead mechanism, which uses a wide load of multiple
characters followed by a mask and compare to determine whether a match is
possible at this point.
Review URL: http://codereview.chromium.org/9965010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11204 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-02 09:38:07 +00:00
erik.corry@gmail.com
f00631b710 Reduce initial boot-up memory use. This is an other attempt at what
http://codereview.chromium.org/9179012 was trying to achieve.  This
time I am going for 80% of the benefit with around 5% of the complexity.

It works by reducing the size of the first page in each space.  Unlike the
previous change there is no attempt to grow pages, we just allocate more
full-sized pages when we need more memory.  For this reason the first pages are
not quite as small (compare
http://codereview.chromium.org/9179012/diff/1/src/snapshot.h with the changes
in spaces.cc in this cl):  We want to be able to do a little bit of allocation
before we have to add a full-sized page to the space.
Review URL: https://chromiumcodereview.appspot.com/9950048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11203 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-02 08:32:31 +00:00
loislo@chromium.org
0572806287 Fix presubmit check.
BUG=none
TEST=none
TBR=mnaganov

Review URL: https://chromiumcodereview.appspot.com/9921014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-29 14:50:26 +00:00
loislo@chromium.org
d857c994b6 Current schema of calculation max_snapshot_js_object_id is not always correct.
As the result the test is flaky.

BUG=v8/2042
TEST=HeapEntryIdsAndGC
R=mnaganov

Review URL: https://chromiumcodereview.appspot.com/9918005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11187 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-29 14:18:11 +00:00
loislo@chromium.org
6306283df9 fix for TestHeapEntryIdsAndGC
BUG=none
TEST=none

Review URL: https://chromiumcodereview.appspot.com/9864035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11163 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-27 12:25:05 +00:00
loislo@chromium.org
b84b44d86c This value is required for showing the heap snapshot delta in Summary view of DevTools.Profiler.
At the moment it is evaluating on the front-end side and this is cost us 2 * (load time + parse time + traverse via snapshot) because I need this value for two previous snapshots.

BUG=none
TEST=test-heap-profiler

Review URL: https://chromiumcodereview.appspot.com/9858016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11161 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-27 11:54:47 +00:00
loislo@chromium.org
9b9e458a43 Revert "This value is required for showing the heap snapshot delta in Summary view of DevTools.Profiler."
This reverts commit 634864d65ebe820a967f6162d8e226cf4a73e51a.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9861018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11158 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-27 11:12:31 +00:00
loislo@chromium.org
410f3a3375 This value is required for showing the heap snapshot delta in Summary view of DevTools.Profiler.
At the moment it is evaluating on the front-end side and this is cost us 2 * (load time + parse time + traverse via snapshot) because I need this value for two previous snapshots.

BUG=none
TEST=test-heap-profiler

Review URL: https://chromiumcodereview.appspot.com/9858016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-27 08:52:00 +00:00
loislo@chromium.org
b414adb1f3 Complete switch to SnapshotObjectId.
BUG=none
TEST=test-heap-profiler

Review URL: https://chromiumcodereview.appspot.com/9858010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-26 13:47:37 +00:00
erik.corry@gmail.com
bc1eb293cd Enable snapshots on MIPS. This is based on
http://codereview.chromium.org/9372063 by Daniel Kalmar.
Review URL: https://chromiumcodereview.appspot.com/9722020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-21 14:29:14 +00:00
erik.corry@gmail.com
25f84a48ce Speed up WriteUtf8 in the case where the output buffer is large enough.
Review URL: https://chromiumcodereview.appspot.com/9696032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11104 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-21 13:48:29 +00:00
fschneider@chromium.org
30a2f2c4ef When running with --always-opt, don't deoptimize named loads with uninitialized type feedback.
This avoids tests taking too long because of repeated deoptimizations.
Review URL: https://chromiumcodereview.appspot.com/9812004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11100 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-21 09:23:09 +00:00
loislo@chromium.org
64c96ad9c0 There is a trick for speed up array shift operation.
This trick is confusing a bit the heap snapshoting code.
Such a shiffted array will be interpreted as a new array in the second snapshot.

BUG=none
TEST=HeapEntryIdsAndArrayShift

Review URL: https://chromiumcodereview.appspot.com/9748007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11096 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-20 14:35:05 +00:00
fschneider@chromium.org
e081a3bfba Insert explicit deoptimization for named loads that have "uninitialized" type feedback.
We already do this for binary-ops, unary-ops and comparisons. Typefeedback for named loads can now also
be in "uninitialized" state which means that the corresponding load IC was never executed.
Review URL: https://chromiumcodereview.appspot.com/9722041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11087 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-19 15:54:37 +00:00
erik.corry@gmail.com
bcd0fd00e3 Add API call that identifies strings that are guaranteed
only to contain ASCII characters.
Review URL: https://chromiumcodereview.appspot.com/9724022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-19 09:51:36 +00:00
yangguo@chromium.org
754dc79066 MIPS: Added support for Loongson architectures.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9692048
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11032 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-13 16:18:30 +00:00
erik.corry@gmail.com
758638a53f Fix compile warning on 64 bit Windows.
Review URL: https://chromiumcodereview.appspot.com/9690019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11013 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-12 15:26:05 +00:00
erik.corry@gmail.com
03cfc4363b Fix input and output to handle UTF16 surrogate pairs.
Review URL: https://chromiumcodereview.appspot.com/9600009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11007 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-12 12:35:28 +00:00
ulan@chromium.org
1767fef60b Implement date library functions in C++.
Developed together with Andreas Rossberg based on:
  https://chromiumcodereview.appspot.com/9117034/
  https://chromiumcodereview.appspot.com/9307083/

R=rossberg@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9572008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10983 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-09 12:07:29 +00:00
yangguo@chromium.org
13689a4f13 Set debug break slot at init of loop variable in a for loop.
BUG=102153
TEST=regress-102153.js

Review URL: https://chromiumcodereview.appspot.com/9625011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-08 10:21:43 +00:00
jkummerow@chromium.org
16f8a9545e Un-braindead-ify test-debug/DebugBreakLoop
Review URL: https://chromiumcodereview.appspot.com/9623007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10962 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-08 08:09:27 +00:00
mstarzinger@chromium.org
4b4b3a4da7 Add kAbortIncrementalMarkingMask flag for GC.
This adds an additional flag to control whether incremental marking
should be aborted when requesting a GC, providing a finer granularity
between kNoGCFlags and kMakeHeapIterableMask.

R=ulan@chromium.org
BUG=v8:1608

Review URL: https://chromiumcodereview.appspot.com/9608006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10961 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-07 17:52:16 +00:00
vegorov@chromium.org
47b6027c37 Add HeapProfiler::GetPersistentHandleCount to be able to track the number of persistent handles
It turns out that an increasing number of persistent handles is a good signal for bugs in the bindings layer

BUG=none
TEST=cctest/test-heap-profiler/PersistentHandleCount

Review URL: https://chromiumcodereview.appspot.com/9620007
Patch from Jochen Eisinger <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10960 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-07 17:38:50 +00:00
yangguo@chromium.org
5440d43d42 Fix nosse2 tests.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9617004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10944 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-06 13:37:25 +00:00
yangguo@chromium.org
8f0ee36df3 Fix test-random test.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9616006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10942 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-06 12:21:42 +00:00
yangguo@chromium.org
20a6c9ba31 Inline Math.random in crankshaft (ia32).
BUG=
TEST=cctest/test-random.cc

Review URL: https://chromiumcodereview.appspot.com/9615008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10939 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-06 11:31:51 +00:00
yangguo@chromium.org
4279f87395 Revert r10913.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9602006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10914 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-05 07:55:27 +00:00
yangguo@chromium.org
df78fcc384 Set x86 FPU precision to 64-bit for MinGW. Original patch by Jonathan Liu <net147@gmail.com>.
BUG=v8:1062
TEST=test-strtod.cc

Review URL: https://chromiumcodereview.appspot.com/9599006
Patch from Jonathan Liu <net147@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10913 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-04 10:49:25 +00:00
danno@chromium.org
a6963cdf7e Rewrite test CHECK to work on all platforms, including MIPS
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9536005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-29 12:49:44 +00:00
erik.corry@gmail.com
9f375ea880 Fix secondary stub cache and add a test for the stub cache lookups.
Review URL: https://chromiumcodereview.appspot.com/9496010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10864 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-29 10:45:59 +00:00
mikhail.naganov@gmail.com
2350d11dac Remove now unused CalculateExactRetainedSize function & co.
This patch changes the signature of the v8::HeapGraphNode::GetRetainedSize method, but it's not used in Chromium, and it should be easy for other clients (if any) to adjust to this change.

BUG=none
TEST=none

Review URL: https://chromiumcodereview.appspot.com/9466014
Patch from Alexei Filippov <alexeif@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10846 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-27 15:42:36 +00:00
mikhail.naganov@gmail.com
2fe4af7135 Tune snapshot taking progress indicator.
As of dominators and retained sizes calculation take quite small time now
comparing to the main passes, it is worth to exclude these from progress
indicator. Now the indicator smoothly runs to 100%, while previously
it ran to 50% and then instantly jumped to 100%.

BUG=none
TEST=none

Review URL: https://chromiumcodereview.appspot.com/9465010
Patch from Alexei Filippov <alexeif@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10831 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-24 15:46:45 +00:00
fschneider@chromium.org
19d61a6981 Adjust limit for booted memory test.
a previous change decreased the size of a zone object and it seems
that sometimes the OS report more memory used even though there
is less zone allocation.
Review URL: https://chromiumcodereview.appspot.com/9443019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-23 14:36:11 +00:00
vegorov@chromium.org
fbc230e42b Ensure that executable pages are properly guarded.
Split executable memory chunks into two pieces: header with all metadata (protection: RW) and body (protection: RWX). Separate header from metadata with a guard page and add a guard page after the page body.

R=erik.corry@gmail.com
BUG=http://crbug.com/115151

Review URL: https://chromiumcodereview.appspot.com/9452002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10809 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-23 12:11:24 +00:00
mstarzinger@chromium.org
1a356cff3e Fix redefinition of aliased elements in arguments.
This refactors the way we (re)define elements to perform normalization
and attribute updating at a much deeper level, thereby removing some
bogus special cases in upper runtime layers.

Most element setters take an indicator flag that distinguishes between
setting and defining. Setting of an element causes attributes to remain
unchanged, writability to be checked and callbacks to be called.
Defining of an element causes attributes to be updated and callbacks to
be overridden. The same approach could be taken for properties.

R=svenpanne@chromium.org
BUG=v8:1772
TEST=test262,test262/15.2.3.6-4-333-11

Review URL: https://chromiumcodereview.appspot.com/9443014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10808 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-23 11:43:07 +00:00
fschneider@chromium.org
7de6be06cf Eliminate use of ZONE macro in BitVector class and pass a zone explicitly.
Review URL: https://chromiumcodereview.appspot.com/9416092

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-22 11:40:28 +00:00
mstarzinger@chromium.org
4f28e9a03e Fix regression test after r10770.
R=yangguo@chromium.org
TEST=cctest/test-regexp/CharacterClassEscapes

Review URL: https://chromiumcodereview.appspot.com/9425050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10771 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-20 18:01:21 +00:00
fschneider@chromium.org
b90a8ec851 Enable test-api/TurnOnAccessCheckAndRecompile and change it so it can't cause a GC.
A GC in the access check callbacks NamedSecurityCallback and IndexedSecurityCallback
violates the contract about these callbacks.

Added a EXTERNAL VMState scope around the call to FailedAccessCheckCallback to be
consistent with the other callback invocations.

BUG=v8:1952
TEST=cctest/test-api/TurnOnAccessCheckAndRecompile
Review URL: https://chromiumcodereview.appspot.com/9425048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10764 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-20 15:34:08 +00:00
rossberg@chromium.org
1336b913d0 Make built-ins strict mode conforming, and support a --use-strict flag.
* Turned all uses of 'const' into 'var'.
* Turned all uses of local 'function' into 'var'.
* Added a couple of missing toplevel 'var' declarations.

One consequence is that the properties on the builtin object  are no longer
non-writable, and I had to adapt one test. Is that a problem?

Unfortunately, we cannot actually switch the library scripts to strict mode
by default, because that makes observable things like poisoned .caller properties
for library functions.

Also removed dead flag code in Compiler::Compile.

R=yangguo@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9415010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10758 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-20 13:48:24 +00:00
fschneider@chromium.org
781427a110 Temporarily disable known failing test to make builder cycle green.
BUG=v8:1952
Review URL: https://chromiumcodereview.appspot.com/9414006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10727 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-16 15:20:13 +00:00
danno@chromium.org
2fa1cc03ac Prefix usage of kExternalFloatArray and kExternalDoubleArray with v8.
TBR=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9417002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10715 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-16 08:10:47 +00:00
danno@chromium.org
bd79e299e5 Uniformly handle 'undefined' store to Float64Array and Float32Array.
Previous behavior diverged in ICs and Crankshaft. When storing to a Float32Array or Float64Array, the ICs treated undefined as zero while Crankshaft treated it as NaN. Now both ICs and Crankshaft treat it as NaN, which is consistent with the WebGL & ECMAScript spec.

R=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9402008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10714 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-16 07:58:07 +00:00
mstarzinger@chromium.org
bc7e01534d Cleanup idle notification tests.
R=ulan@chromium.org
TEST=cctest/test-api/IdleNotification

Review URL: https://chromiumcodereview.appspot.com/9403014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10713 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-15 15:42:50 +00:00
svenpanne@chromium.org
8a7f1568c4 Ensure that we do a non-incremental GC before relying on weak handle callbacks.
Previously, some tests failed when being run with a low GC interval. This was
caused by a switch of the GC to incremental marking mode, which in turn did not
fire any callbacks for weak global handles. Now we make sure that we run in
non-incremental mode, although via a slightly misleading GC flag.

We should probably review the uses of PerformScavenge() and gc() in our tests to
see if they actually mean "make sure our callbacks fired".

Review URL: https://chromiumcodereview.appspot.com/9378007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-13 10:13:52 +00:00
yurys@chromium.org
97cbb319bd Provide user-friendly access to natively bound function parameters
For a closure created using native Function.prototype.bind() the most important information for the heap profiler user is bound function, receiver and arguments. This change adds shortcuts for those fields.
Review URL: https://chromiumcodereview.appspot.com/9382002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-10 13:54:20 +00:00
rossberg@chromium.org
a0b287a3b1 Extend scanner with new Harmony module keywords (under flag).
R=mstarzinger@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9352013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10638 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-08 10:53:58 +00:00
jkummerow@chromium.org
d795b7c620 Collect AstNode type information
Review URL: https://chromiumcodereview.appspot.com/9221011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10631 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-08 09:56:33 +00:00
yangguo@chromium.org
988d1269de When rethrowing an exception, print the stack trace of its original site instead of rethrow site.
BUG=60240

Review URL: https://chromiumcodereview.appspot.com/9310122

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10618 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-07 09:31:06 +00:00
erik.corry@gmail.com
79112684b5 Increase size of small stacks from 32k to 64k to avoid hitting
limits in Chromium.
http://code.google.com/p/chromium/issues/detail?id=112843
Review URL: https://chromiumcodereview.appspot.com/9353006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10615 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-07 08:00:36 +00:00
loislo@chromium.org
dc3f16a321 I will apply it to the nodes that can't be mapped to Heap object or Native object.
As example there are 'Detached DOM Tree' nodes in WebKit. It is very useful to be able to see all such
nodes grouped together. It can be done with help of some post processing but I did this explicitly
on v8 side because it is much faster. At the moment this kind of nodes has kNative type.
I'd like to hide these nodes from the Retainment View but I can filter them only by name.

BUG=none
TEST=HeapSnapshotRetainedObjectInfo

Review URL: https://chromiumcodereview.appspot.com/9323064

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10614 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-07 05:21:00 +00:00
yurys@chromium.org
a13ad53191 Heap profiler should report implicit references.
Implicit references reported to V8 with V8::AddImplicitReferences calls are now reported by heap profiler as 'native' references with type kInternal.

Original WebKit bug report: https://bugs.webkit.org/show_bug.cgi?id=77414
Review URL: https://chromiumcodereview.appspot.com/9316092

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10603 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-03 14:51:53 +00:00
yurys@chromium.org
882ede3053 Add a getter for value set with AllowCodeGenerationFromStrings
Review URL: https://chromiumcodereview.appspot.com/9223016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-01 12:58:34 +00:00
erik.corry@gmail.com
3cfac4da0a Revert memory saving change due to failures on multithreaded tests
on Windows.
Review URL: https://chromiumcodereview.appspot.com/9104039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10569 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-31 13:33:44 +00:00
erik.corry@gmail.com
f5feac9e98 Reduce memory use immediately after boot.
This is a recommit of https://chromiumcodereview.appspot.com/9289047
with changes noted in comments in the codereview tool.
Review URL: https://chromiumcodereview.appspot.com/9233050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10562 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-31 11:22:35 +00:00
svenpanne@chromium.org
96b590d95e Fix for an obscure ARM GCC bug
Removing 2 "static" modifiers which didn't really serve a purpose did
the trick...

Review URL: https://chromiumcodereview.appspot.com/9264033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10553 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-30 14:57:36 +00:00
yangguo@chromium.org
f7c09d99b7 Find correct source position in inlined functions on debug break.
BUG=110010
TEST=test-debug/DebugBreakInline

Review URL: https://chromiumcodereview.appspot.com/9295014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10551 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-30 13:07:01 +00:00
erik.corry@gmail.com
a9428d2bcc Revert 10542 (boot time memory reduction) due to map alignment
issues on 64 bit.
Review URL: https://chromiumcodereview.appspot.com/9295047

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10544 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-30 10:20:13 +00:00
erik.corry@gmail.com
419ea5fcc3 Reduce boot-up memory use of V8.
This is a recommit of http://codereview.chromium.org/9179012
after fixing what turned out to be unrelated out-of-memory
errors.
That was a rebase of http://codereview.chromium.org/9017009/
Review URL: https://chromiumcodereview.appspot.com/9289047

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-30 09:15:34 +00:00
loislo@chromium.org
07d720ec41 Detailed heap snapshot usability improvement.
The detailed heap snapshot has two groups of nodes. The first one
is the group for v8 heap nodes and the second one is the group for
native objects. At the moment we have two different sets of native
objects. There are 'Detached DOM trees' and 'Document DOM trees' type of objects.

I think it'd be nice to replace one group containing all native objects with
separate groups for different types of native objects.

BUG=none
TEST=HeapSnapshotRetainedObjectInfo

Review URL: https://chromiumcodereview.appspot.com/9223009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10528 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-27 12:02:57 +00:00
danno@chromium.org
57525ef893 Store transitioned JSArray maps in global context
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9073007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10523 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-26 21:47:57 +00:00
erik.corry@gmail.com
448b6bbc41 Flush number string cache on GC (bug 1605). Also start with a small
number string cache and only grow it if needed, which will be useful
for saving boot time memory use.
This is a second try for  https://chromiumcodereview.appspot.com/923502
after fixing an unrelated stack overflow issue.
Review URL: https://chromiumcodereview.appspot.com/9169080

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-26 11:32:01 +00:00
erik.corry@gmail.com
248adeb110 Revert 10502 (smaller number string cache) due to test failures.
Review URL: https://chromiumcodereview.appspot.com/9113060

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10504 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-25 15:17:26 +00:00
erik.corry@gmail.com
a49c8a19ee Flush number string cache on GC (bug 1605). Also start with a small
number string cache and only grow it if needed, which will be useful
for saving boot time memory use.
Review URL: https://chromiumcodereview.appspot.com/9235029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10502 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-25 14:27:58 +00:00
yurys@chromium.org
09ff5c4c44 Provide access to function inferred name in v8 public API
Review URL: https://chromiumcodereview.appspot.com/9146039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10499 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-25 12:45:54 +00:00
jkummerow@chromium.org
6c85119c6a Fix building with clang
BUG=v8:1912

Review URL: https://chromiumcodereview.appspot.com/9285013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-24 16:36:55 +00:00
erik.corry@gmail.com
be288cf2b4 Initially unmap one of the semispaces to reduce memory use at boot time.
Review URL: https://chromiumcodereview.appspot.com/9117035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-24 16:00:19 +00:00
erik.corry@gmail.com
ee1d0fc5c6 Reduce the space used by the stack for the profiling thread.
Review URL: https://chromiumcodereview.appspot.com/9117032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-24 15:48:16 +00:00
mstarzinger@chromium.org
5c92e4f1c3 Add regression test for r10451.
R=vegorov@chromium.org
TEST=cctest/test-heap/PrototypeTransitionClearing

Review URL: https://chromiumcodereview.appspot.com/9138016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10455 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-20 12:44:04 +00:00
mstarzinger@chromium.org
77f6a6fc31 Fix prototype transition clearing during full GC.
R=vegorov@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9195008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10439 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-19 13:38:37 +00:00
fschneider@chromium.org
01979c70a8 Fix handling of named interceptors in optimized code.
When calling a constant function property from optimized code,
we need to check that there is no interceptor on the receiver map.

TEST=cctest/InterceptorCallICConstantFunctionNotNeededWrapped
Review URL: http://codereview.chromium.org/9240006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10425 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-17 16:06:03 +00:00
yangguo@chromium.org
6d0d6a5695 Recursion limit for one-char string replace and retire String::kMinNonFlatLength.
TEST=mjsunit/string-replace-one-char.js

Review URL: https://chromiumcodereview.appspot.com/9231017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10422 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-17 14:29:17 +00:00
erik.corry@gmail.com
a02dbe4258 Revert 10413-10416 initial memory use reduction due to
test failures.
Review URL: http://codereview.chromium.org/9178014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-17 13:13:55 +00:00
erik.corry@gmail.com
fdc163bbbb Make from-space initially uncommitted for another 1Mbyte
improvement in boot time memory usage.
Review URL: http://codereview.chromium.org/9242008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-17 12:09:11 +00:00
erik.corry@gmail.com
3403e76682 Reduce boot-up memory use of V8.
Reduce signal sender thread stack size to 32k.
Commit partial old-space pages to reduce minimum memory use.
This is a rebase of http://codereview.chromium.org/9017009/
Review URL: http://codereview.chromium.org/9179012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10413 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-17 11:38:25 +00:00
danno@chromium.org
88d358b345 Fix GCC4.7 compilation warning introduced in r10400
Add some usages for string1 and string2 to avoid "assigned
but not used" warning.

Review URL: http://codereview.chromium.org/9163003
Patch from Yury Semikhatsky <yurys@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-16 11:04:58 +00:00
ulan@chromium.org
08d77cbde4 Fix flaky idle notification test.
Idle notification handler might not free more memory if there was a global GC before or incremental marking is not activated (and it's not worth activating).

BUG=
TEST=cctest/test-api/IdleNotificationWithHint

Review URL: http://codereview.chromium.org/9173007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-16 09:40:04 +00:00
yurys@chromium.org
ebb75c23a1 Provide a way for iterating through all external strings referenced from the JS heap
Review URL: http://codereview.chromium.org/9139018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10400 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-13 15:14:45 +00:00
erik.corry@gmail.com
b3e0761e38 Cosmetic changes ("set up" is a verb, "setup" is a noun).
Review URL: http://codereview.chromium.org/9139051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10399 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-13 13:09:52 +00:00
vegorov@chromium.org
006c867849 Fix cctest/test-heap/InstanceOfStubWriteBarrier when Crankshaft is disabled.
R=fschneider@chromium.org

Review URL: http://codereview.chromium.org/9188010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10394 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-11 17:28:23 +00:00
mstarzinger@chromium.org
6420887ff1 Fix Mac build boken in r10383.
R=vegorov@chromium.org
TEST=cctest/test-heap/TestSizeOfObjects

Review URL: http://codereview.chromium.org/9187004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10385 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-11 10:59:21 +00:00
mstarzinger@chromium.org
83d912f0e4 Make heap size estimation more accurate.
This improves the heap size estimation by not counting lazy swept pages
as completely allocated but use their live bytes counter instead.

R=vegorov@chromium.org
BUG=v8:1893
TEST=cctest/test-heap/TestSizeOfObjects

Review URL: http://codereview.chromium.org/9173001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10383 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-11 10:33:34 +00:00
vegorov@chromium.org
c92a3949ea Fix build failure introduced by r10380
TBR=mstarzinger@chromium.org

Review URL: http://codereview.chromium.org/9190002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10381 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-11 09:49:47 +00:00
vegorov@chromium.org
74ef753067 Change inlined cache of intanceof stub to use indirection through cell.
The stub was directly patching caller's code without issuing write barrier which violated incremental marking invariants.

R=mstarzinger@chromium.org
BUG=http://crbug.com/109448
TEST=cctest/test-heap/InstanceOfStubWriteBarrier

Review URL: http://codereview.chromium.org/9158015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10380 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-11 09:39:37 +00:00
erik.corry@gmail.com
dc9910f4a4 Minor cleanups of numeric seeded hashing patch.
Review URL: http://codereview.chromium.org/9155010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10367 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-10 13:24:18 +00:00
erik.corry@gmail.com
6178a8d42c Add seed to hash of numeric keyed properties. This is a commit of http://codereview.chromium.org/9148006/ for Fedor Indutny.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-10 12:58:41 +00:00
danno@chromium.org
df8b359f41 Fix handling of -0.0 in IsInt32/IsUInt32
R=ager@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/9169009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-10 10:05:45 +00:00
erik.corry@gmail.com
4bea3b5c54 Fix test-hashing after recent changes to string hashing.
Acriave test-hashing in SCons and buildbot runs.
Small cleanups in root register handling on ARM and MIPS.
Review URL: http://codereview.chromium.org/9110029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10351 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-06 11:33:20 +00:00
ulan@chromium.org
746ef93362 Move handlified functions from handles.cc to objects.cc
BUG=
TEST=

Review URL: http://codereview.chromium.org/9008012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-05 17:16:19 +00:00
erik.corry@gmail.com
9de3992837 Fix broken test that assumes that no GC can clear the regexp
cache (GC can happen at any time due to Crankshaft).
Review URL: http://codereview.chromium.org/9113012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10343 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-05 13:16:15 +00:00
yangguo@chromium.org
f953e7fcea Fix windows build.
Review URL: http://codereview.chromium.org/8983014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-04 09:58:21 +00:00
yangguo@chromium.org
d9f7cf819c Implement callback when script finishes running in V8 API.
TEST=test-api/LeaveScriptCallback

Review URL: http://codereview.chromium.org/8937003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10323 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-04 08:48:35 +00:00
mstarzinger@chromium.org
aae7033ba1 Fix JavaScript accessors on objects with interceptors.
This fixes how Object.defineProperty() defines JavaScript accessors on
objects with installed API interceptors. The definition itself does not
cause any interceptors to be called, whereas any subsequent accesses on
said object will still fire the interceptor. This behavior is in sync
with API accessors.

R=rossberg@chromium.org
BUG=v8:1651,chromium:94666
TEST=cctest/test-api

Review URL: http://codereview.chromium.org/9021019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10293 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-21 16:14:38 +00:00
fschneider@chromium.org
6c0a4f5d45 Fix bug with filtering of foreign context maps in the type feedback.
The first attempt did not properly handle keyed loads/stores and
did not check the constructors of the objects in the prototype
chain.

Added two more tests to handle the fixed cases.

BUG=v8:1823
TEST=LeakGlobalObjectViaMapKeyed,LeakGlobalContextViaMapProto
Review URL: http://codereview.chromium.org/8974009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10277 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-19 12:39:52 +00:00
yangguo@chromium.org
538fb2b8b4 Fix cctest/test-hashing on MIPS.
BUG=
TEST=

Review URL: http://codereview.chromium.org/8953016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10266 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-15 14:24:07 +00:00
fschneider@chromium.org
d1e762d782 Temporarily disable new test until no-snapshot version is fixed.
Review URL: http://codereview.chromium.org/8957004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10260 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-15 10:08:25 +00:00
fschneider@chromium.org
b6b4af9d89 Filter out maps from different global context when collecting type feedback.
This avoid leaking memory because optimized code may hold on to maps
from different tabs otherwise.

BUG=v8:1823, 102895
Review URL: http://codereview.chromium.org/8892002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-14 14:01:54 +00:00
vegorov@chromium.org
a2159a6bb9 Fix GCC 4.7 warnings, which are related to char being signed in GCC
("narrowing conversion ... inside { } is ill-formed in C++11").

* src/mksnapshot.cc: Cast "char" to "unsigned char" when outputting snapshot.
* test/cctest/test-regexp.cc: Use static_cast to uc16 as the char
literal is signed.

Review URL: http://codereview.chromium.org/8825003
Patch from Tobias Burnus <burnus@net-b.de>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10241 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-13 13:02:08 +00:00
ulan@chromium.org
0fd7350595 Relax test condition to make it less brittle.
BUG=
TEST=cctest/test-api/IdleNotificationWithHint

Review URL: http://codereview.chromium.org/8839007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10202 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-07 16:08:09 +00:00
keuchel@chromium.org
410219c8f3 Sync parser and preparser on do-while and return statements.
This CL fixes the preparser to have the same liberal automatic semicolon
insertion behaviour as the parser. In the case of a return statement in
global code we throw a syntax error at runtime rather than an early error
due to compatibility with KJS. However that hack allowed the following
syntactically incorrect program in global code in the parser but not in
the preparser:
  if (false) return else {}
while the slightly saner version with the obligatory semicolon
  if (false) return; else {}
was disallowed in the parser, but the preparser allowed it. This CL also
fixes that issue.

BUG=v8:1856
TEST=cctest/test-parsing.cc

Review URL: http://codereview.chromium.org/8844002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10201 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-07 16:03:29 +00:00
mikhail.naganov@gmail.com
dae713f0ad Reapply r10158: Distinguish weak references in heap snapshots, group GC roots.
[Fixed the bug revealed by the Win32 bot]

Several changes to better organize snapshot data:

1. Provide information about weak references.
2. Group (GC roots) children.
3. Prettify debug snapshot printing.

BUG=v8:1832
TEST=cctest/test-heap-profiler/*Weak*
TBR=vitalyr@chromium.org

Initial CL: http://codereview.chromium.org/8716009

Review URL: http://codereview.chromium.org/8822019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10182 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 17:41:47 +00:00
ulan@chromium.org
cda5b1a53f Use the old handler for low frequency idle notifications.
BUG=
TEST=

Review URL: http://codereview.chromium.org/8818005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10179 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 14:30:21 +00:00
erik.corry@gmail.com
c5c6cc5284 The memory size test makes no sense on the simulated platforms.
Review URL: http://codereview.chromium.org/8818007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 12:09:11 +00:00
mikhail.naganov@gmail.com
a0c8ea00db Revert r10158 "Distinguish weak references in heap snapshots, group GC roots."
Heap profiler tests fail on Win32, need to investigate.

This reverts commit b5374ebd92c11ac4aae16b4e31e54166d406e490.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-05 17:21:55 +00:00
mikhail.naganov@gmail.com
857aa09772 Distinguish weak references in heap snapshots, group GC roots.
Several changes to better organize snapshot data:

1. Provide information about weak references.
2. Group (GC roots) children.
3. Prettify debug snapshot printing.

BUG=v8:1832
TEST=cctest/test-heap-profiler/*Weak*

Review URL: http://codereview.chromium.org/8716009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10158 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-05 16:35:57 +00:00
mstarzinger@chromium.org
993d650f15 MIPS: updated test .status files based mostly on the ARM version.
BUG=
TEST=

Review URL: http://codereview.chromium.org/8572032
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10155 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-05 11:44:17 +00:00
erik.corry@gmail.com
b8691a78af Clean up multi byte nop support on x64 to more closely match IA32.
Fix missing instruction in disassembler.
Fix wrong disassembly of multi-byte NOP on x64
Add test of disassembler on 64 bit!
Review URL: http://codereview.chromium.org/8773039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10147 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-05 08:58:01 +00:00
erik.corry@gmail.com
090be8bf15 Reduce minimum memory use on 64 bit to one page per semispace.
Review URL: http://codereview.chromium.org/8774045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10144 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-02 14:19:53 +00:00
erik.corry@gmail.com
0d7380da55 Let store buffer start out small for a 1Mbyte saving in boot
memory use (2Mbyte on x64).
Review URL: http://codereview.chromium.org/8776032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-02 14:08:12 +00:00
danno@chromium.org
de55888842 Fix presubmit error.
TBR=sgjesse@chromium.org
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/8770042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10141 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-02 13:23:44 +00:00
danno@chromium.org
33615c614f Fix flaky debugger test
TBR=sgjesse@chromium.org
BUG=none
TEST=test/cctest/test-debug.cc

Review URL: http://codereview.chromium.org/8773037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10139 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-02 13:05:51 +00:00
erik.corry@gmail.com
701790fd34 Support multi-byte nop instructions as recommended by
the optimization guides from AMD and Intel.
Review URL: http://codereview.chromium.org/8776033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10134 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-02 10:01:50 +00:00
erik.corry@gmail.com
0ec9c63e59 Introduce a test of how much memory it takes to boot up V8.
Linux only at the moment, since it uses /proc.  Shows that
there is room for improvement, espcially on 64 bit.
Review URL: http://codereview.chromium.org/8750001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10122 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-01 12:32:38 +00:00
ulan@chromium.org
59897dbe44 Fix compile errors on Windows and Mac introduced by r10093.
BUG=
TEST=

Review URL: http://codereview.chromium.org/8746021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10099 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-30 16:55:55 +00:00
ulan@chromium.org
8dc728126e Start incremental marking on idle notification.
BUG=v8:1458
TEST=cctest/test-api/IdleNotification*

Review URL: http://codereview.chromium.org/8519002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-30 11:13:36 +00:00
erik.corry@gmail.com
e2f2c77e6f Be more willing to expand old space when evacuating new space at the end of
a mark-sweep.  We have a soft limit on old space size, which is designed to
trigger an old-space collection when we hit it.  Unfortunately although the
soft limit had already triggered an old space collection, the soft limit was
preventing objects from new space from being promoted.  For every promotion
candidate we were checking 3 different ways to allocate in old space before
giving up and putting the object in the other semispace.  This change allows
the promoted objects to go to old space and also makes us more eager to
sweep a page before trying other ways to find space for an object.
Review URL: http://codereview.chromium.org/8748005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-30 10:38:16 +00:00
keuchel@chromium.org
b3a2e242db Reapply "Fix the ScopeIterator reimplementation".
This reapplies a fixed version of r10076 that also works on arm. Patch set one is r10076 reapplied and patch set 2 contains the new fix.

Review URL: http://codereview.chromium.org/8725001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10080 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-29 08:43:14 +00:00
keuchel@chromium.org
9664e48e14 Revert r10076 due to arm build failures.
Review URL: http://codereview.chromium.org/8716005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10077 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-28 14:01:13 +00:00
keuchel@chromium.org
8866d63cc9 The ScopeIterator uses recorded scope position - as detailed in scopes.h - and
source code positions it gets from the program counter to recreate the scope
chain by reparsing the function or program.

This CL includes the following changes
* Adds source code positions for the assignment added by the rewriter.
* Run the preparser over global code first.
* Use the ScopeType from the ScopeInfo to determine if the code being debugged
  is eval, function or global code instead of looking up the '.result' symbol.

TEST=mjsunit/debug-stepout-scope.js

Review URL: http://codereview.chromium.org/8590027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10076 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-28 12:47:39 +00:00
lrn@chromium.org
ebccde15bc Don't preparse large files to find boundaries of lazy functions.
Instead use the preparser inline to parse only the lazy function
bodies.

This is still disabled for small files.
More measurements are needed to determine if lazy-compiling small
sources is worth it.

Review URL: http://codereview.chromium.org/8662037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10066 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-25 09:36:31 +00:00
keuchel@chromium.org
cbf08248f7 Make the parser track the language mode instead of keeping its own harmony flag.
So far the parser had its own harmony flag to disable the harmony scoping
feature when parsing native functions. With the introduction of the extended
language mode this becomes unnecessary because native functions will never enter
the extended mode. The parser can thus track FLAG_harmony_scoping and the
language mode of the current scope to see if harmony features are allowed. The
scanner and preparser have to keep their flag, because they can't use
FLAG_harmony_scoping as it is not available for the preparser-process
executable.

This depends on:
http://codereview.chromium.org/8417035/

Review URL: http://codereview.chromium.org/8562002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10063 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-24 15:58:09 +00:00
keuchel@chromium.org
1e9a7267ab Introduce extended mode.
This CL introduces a third mode next to the non-strict
(henceforth called 'classic mode') and 'strict mode'
which is called 'extended mode' as in the current
ES.next specification drafts. The extended mode is based on
the 'strict mode' and adds new functionality to it. This
means that most of the semantics of these two modes
coincide.

The 'extended mode' is entered instead of the 'strict mode'
during parsing when using the 'strict mode' directive
"use strict" and when the the harmony-scoping flag is
active. This should be changed once it is fully specified how the 'extended mode' is entered.

This change introduces a new 3 valued enum LanguageMode
(see globals.h) corresponding to the modes which is mostly
used by the frontend code. This includes the following
components:
* (Pre)Parser
* Compiler
* SharedFunctionInfo, Scope and ScopeInfo
* runtime functions: StoreContextSlot,
  ResolvePossiblyDirectEval, InitializeVarGlobal,
  DeclareGlobals

The old enum StrictModeFlag is still used in the backend
when the distinction between the 'strict mode' and the 'extended mode' does not matter. This includes:
* SetProperty runtime function, Delete builtin
* StoreIC and KeyedStoreIC
* StubCache

Review URL: http://codereview.chromium.org/8417035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10062 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-24 15:17:04 +00:00
yangguo@chromium.org
2055f4195e Recommit introducing short external strings.
Review URL: http://codereview.chromium.org/8677006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-23 13:08:28 +00:00
yangguo@chromium.org
922aee5a02 Rolling back r10049 due to webkit failures.
Review URL: http://codereview.chromium.org/8681007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10050 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-23 10:41:12 +00:00
yangguo@chromium.org
21edc7c30b Introduce short external strings without pointer cache.
BUG=
TEST=

Review URL: http://codereview.chromium.org/8635011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10049 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-23 09:58:58 +00:00
ricow@chromium.org
46f0a651cc MIPS: Reduced the number of threads in cctest test-lockers.
Some MIPS boards could not handle the large number of threads and failed these tests.

BUG=
TEST=
Review URL: http://codereview.chromium.org/8506008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10048 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-23 08:36:03 +00:00
ricow@chromium.org
b642b780c2 Decrease number of threads in ExtensionRegistration tests for mips, current number is causing OOMs.
This was fixed for arm in revision 10045
Review URL: http://codereview.chromium.org/8662003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10047 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-23 08:06:13 +00:00
dslomov@chromium.org
4cedd762e5 Fix ExtensionsRegistration cctest on ARM.
Reduced the number of created threads on ARM.

Review URL: http://codereview.chromium.org/8639007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10045 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-22 18:51:53 +00:00
mikhail.naganov@gmail.com
a0f3c5d451 Really fix missing HandleScope to prevent local handles to DOMWindow leaking.
A follow-up to r9994.

R=vitalyr@chromium.org
BUG=102895
TEST=cctests/test-heap-profiler/NoHandleLeaks

Review URL: http://codereview.chromium.org/8468016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10030 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-18 11:42:39 +00:00
yangguo@chromium.org
5a82d78948 Add pointer cache field to external string for access in generated code.
TEST=test/mjsunit/string-externalize.js

Review URL: http://codereview.chromium.org/8513010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-17 17:05:12 +00:00
dslomov@chromium.org
963ccfdaea Extension state made per-siolate in genesis
BUG=http://code.google.com/p/v8/issues/detail?id=1821

Review URL: http://codereview.chromium.org/8536042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10001 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-15 22:48:55 +00:00
keuchel@chromium.org
08c9629f80 Static resolution of outer variables in eval code.
So far free variables references in eval code are not statically
resolved. For example in
    function foo() { var x = 1; eval("y = x"); }
the variable x will get mode DYNAMIC and y will get mode DYNAMIC_GLOBAL,
i.e. free variable references trigger dynamic lookups with a fast case
handling for global variables.

The CL introduces static resolution of free variables references in eval
code. If possible variable references are resolved to bindings belonging to
outer scopes of the eval call site.

This is achieved by deserializing the outer scope chain using
Scope::DeserializeScopeChain prior to parsing the eval code similar to lazy
parsing of functions. The existing code for variable resolution is used,
however resolution starts at the first outer unresolved scope instead of
always starting at the root of the scope tree.

This is a prerequisite for statically checking validity of assignments in
the extended code as specified by the current ES.next draft which will be
introduced by a subsequent CL. More specifically section 11.13 of revision 4
of the ES.next draft reads:
* It is a Syntax Error if the AssignmentExpression is contained in extended
  code and the LeftHandSideExpression is an Identifier that does not
  statically resolve to a declarative environment record binding or if the
  resolved binding is an immutable binding.

TEST=existing tests in mjsunit

Review URL: http://codereview.chromium.org/8508052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9999 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-15 13:48:40 +00:00
mstarzinger@chromium.org
330cd2205c Remove hidden prototype for builtin functions.
This is a deliberate non-conformity introduced more than 2 years ago to
be compatible with JSC. The current state is that all other browsers
perform ES5 conform in that regard.

R=erik.corry@gmail.com
BUG=chromium:1717,chromium:39662
TEST=test262/15.2.3.6-4-6??,mjsunit/undeletable-functions

Review URL: http://codereview.chromium.org/8566009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-15 09:44:57 +00:00
mikhail.naganov@gmail.com
007ad200f8 Fix missing fast property accessors in heap snapshots.
Implementation for this case

var x = {};
x.__defineGetter__("y", function Y() { return 42; });

BUG=v8:1818
TEST=cctest/test-heap-profiler/FastCaseGetter

Review URL: http://codereview.chromium.org/8491041
Patch from Ilya Tikhonovsky <loislo@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9985 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-14 11:13:29 +00:00
yangguo@chromium.org
4b4d75f84e Fixing crash of StringHash test.
Review URL: http://codereview.chromium.org/8520010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9962 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 17:01:32 +00:00
yangguo@chromium.org
07ee3e6e5c Fixing generated hash function on all platforms.
BUG=v8:1808
TEST=cctest/test-hashing.cc

Review URL: http://codereview.chromium.org/8512004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9956 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 14:26:57 +00:00
yangguo@chromium.org
dbd3578e3e MIPS: Fix the cctest QuietSignalingNaNs for MIPS.
MIPS uses a different NAN bit pattern to represent quiet or
signalling NANs than does x86 or ARM.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8510007
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9948 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 08:25:23 +00:00
yurys@chromium.org
8b7bcc4e80 Add getters for column number and script id to v8::Function
Review URL: http://codereview.chromium.org/8508008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9935 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 14:18:30 +00:00
ulan@chromium.org
0d536dec26 Shrink the new space and uncommit marking deque on low memory notification.
BUG=v8:1669
TEST=cctest/test-heap/CollectingAllAvailableGarbageShrinksNewSpace

Review URL: http://codereview.chromium.org/8065003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9912 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 12:42:02 +00:00
keuchel@chromium.org
80d1b898fb Fix gcc-4.6 warnings.
BUG=v8:1806

Review URL: http://codereview.chromium.org/8386072

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 08:59:01 +00:00
lrn@chromium.org
65b9ab93af Merged Scanner and JavaScriptScanner.
JavaScriptScanner had become the only concrete subclass of Scanner, so there
was no longer a need for the distinction.

Also fixed up comments.

Review URL: http://codereview.chromium.org/8384003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9854 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-01 07:47:15 +00:00
lrn@chromium.org
30465596e6 Make eval consider anything on the form eval(args...) a potential direct cal
Previously we omitted all cases where the global eval property was shadowed,
even if by a variable holding the same value. ES5 requires us to treat these
as direct calls.

We still throw if calling indirect eval with a detached global object.

BUG=v8:994
TEST=mjsunit/eval.js

Review URL: http://codereview.chromium.org/8343054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 09:38:52 +00:00
mstarzinger@chromium.org
d0ce626477 Fix identity hash code function to respect flag.
The flag passed to JSObject::GetIdentityHash() was not respected so far
and an indentity hash code was generated even when the flag requested
not to do so. This could lead to a rare corner cases (for which a test
case was added) where a GC request would have been dropped.

R=rossberg@chromium.org
TEST=cctest/test-dictionary

Review URL: http://codereview.chromium.org/8390047

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9801 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 12:23:40 +00:00
mikhail.naganov@gmail.com
fa0d4ecf43 The detailed heap snapshot generator was slightly adjusted for tracking sliced strings.
BUG=v8:1779
TEST=cctest/test-heap-profiler/HeapSnapshotSlicedString

Review URL: http://codereview.chromium.org/8362028
Patch from Ilya Tikhonovsky <loislo@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9742 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 13:05:37 +00:00
keuchel@chromium.org
666c4be29f Reapply r9673 "Scope tree serialization and ScopeIterator cleanup."
This also includes the two fixes from r9674 and r9675. Here's the diff
to the previous CL.

 --- a/src/runtime.cc
 +++ b/src/runtime.cc
 @@ -11133,17 +11133,26 @@ class ScopeIterator {
        context_(Context::cast(frame->context())),
        nested_scope_chain_(4) {

 +    // Catch the case when the debugger stops in an internal function.
 +    Handle<SharedFunctionInfo> shared_info(function_->shared());
 +    if (shared_info->script() == isolate->heap()->undefined_value()) {
 +      if (shared_info->scope_info()->HasContext()) Next();
 +      return;
 +    }
 +
      // Check whether we are in global code or function code. If there is a stack
      // slot for .result then this function has been created for evaluating
      // global code and it is not a real function.
      // Checking for the existence of .result seems fragile, but the scope info
      // saved with the code object does not otherwise have that information.
 -    int index = function_->shared()->scope_info()->
 +    int index = shared_info->scope_info()->
          StackSlotIndex(isolate_->heap()->result_symbol());

      // Reparse the code and analyze the scopes.
      ZoneScope zone_scope(isolate, DELETE_ON_EXIT);
 -    Handle<SharedFunctionInfo> shared_info(function_->shared());
      Handle<Script> script(Script::cast(shared_info->script()));
      Scope* scope;
      if (index >= 0) {

Review URL: http://codereview.chromium.org/8344046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 10:26:59 +00:00
kmillikin@chromium.org
e3792a6830 Handlify the stub cache lookup and patching for CallIC and KeyedCallIC.
R=ulan@chromium.org,vegorov@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/8357010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9729 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 17:08:53 +00:00
erik.corry@gmail.com
8f9721bbbf Shave 39% from snapshot size.
Review URL: http://codereview.chromium.org/8344079

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9722 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 12:27:10 +00:00
keuchel@chromium.org
17cc6d313f Revert 9673, 9674 and 9675 because of failing webkit tests.
This reverts commits
r9673: "Scope tree serialization and ScopeIterator cleanup."
r9674: "Use OS::SNPrintF instead of snprintf."
r9675: "Use int instead of size_t, StrLength instead of strlen."

Review URL: http://codereview.chromium.org/8353003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9703 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 12:15:02 +00:00
keuchel@chromium.org
96a2c24a16 Use int instead of size_t, StrLength instead of strlen.
Review URL: http://codereview.chromium.org/8339013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 10:08:33 +00:00
keuchel@chromium.org
69afd18e56 Use OS::SNPrintF instead of snprintf.
Review URL: http://codereview.chromium.org/8339011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 09:48:13 +00:00
keuchel@chromium.org
4e5643a648 Scope tree serialization and ScopeIterator cleanup.
The intention is to store enough scope information for the debugger to
handle stack allocation of block scoped variables introduced by
http://codereview.chromium.org/7860045/ .

This CL is based on
http://codereview.chromium.org/7904008/ .

Review URL: http://codereview.chromium.org/7979001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 08:46:46 +00:00
erikcorry
dac0b853e1 Improve speed of Utf8Write by always flattening the string first and
detecting the ASCII case.  Also rewrite Utf8Length to work on an
unflattened string.  Bug: http://code.google.com/p/v8/issues/detail?id=1665
Review URL: http://codereview.chromium.org/8304021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9661 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 12:48:31 +00:00
lrn@chromium.org
2bbf3bbee7 Make native syntax an early error in the preparser.
Previously the preparser always accepted natives syntax and let the
real parser throw the syntax error. In ES5, it should be an early error,
so the preparser must catch the error.
The perparser library does not expose parsing for natives syntax, it's
only used internally.

Review URL: http://codereview.chromium.org/8306024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 12:45:52 +00:00
ricow@chromium.org
fe74726099 Remove timeout test expectation for OutOfMemoryNested
This has already been fixed, we not actually use the constraints.
Review URL: http://codereview.chromium.org/8276029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9620 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-14 09:10:29 +00:00
rossberg@chromium.org
1abf3ed0a4 Introduce collective --harmony flag.
Shorten --harmony-block-scoping to --harmony-scoping.

R=keuchel@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/8226017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9589 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-12 12:23:06 +00:00
erik.corry@gmail.com
338ab857b9 Remove a static initializer that could potentially slow down startup time.
BUG=1753
Review URL: http://codereview.chromium.org/8198005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9551 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-07 14:41:08 +00:00
kmillikin@chromium.org
1f12cc4099 Simplify calling generated code from the runtime.
Instead of expecting Object** arrays at the outermost level, expect
Handle<Object> arrays and reinterpret_cast them only just before invoking
the generated code.

R=rossberg@chromium.org,fschneider@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/8133020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9537 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-06 09:31:38 +00:00
lrn@chromium.org
ebc0f85e40 Revert "Added ability to lock strings to prevent their representation or encoding from changing."
This reverts r9424.

Review URL: http://codereview.chromium.org/8143018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9529 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-05 11:09:34 +00:00
mstarzinger@chromium.org
9f06a99592 Fix compilation error and add missing file to GYP.
R=ricow@chromium.org

Review URL: http://codereview.chromium.org/8136004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9518 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-04 16:32:34 +00:00
fschneider@chromium.org
976d5f3797 Clean list of external references from internal objects like the hole value.
Review URL: http://codereview.chromium.org/8114032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9511 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-04 09:07:50 +00:00
mikhail.naganov@gmail.com
3e4b4a6a86 Fix incorrect function name inference in case of assignment / global assignment.
R=kmillikin@chromium.org
BUG=v8:1732
TEST=test-func-name-inference/GlobalAssignmentAndCall,AssignmentAndCall

Review URL: http://codereview.chromium.org/8112007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-03 19:18:05 +00:00
kmillikin@chromium.org
a4e0103708 Clean up the x86 assembler API.
The API is inconsistent about when a register must be coerced to an operand
and when it can be used as a register.  Simplify usage by never requiring it
to be wrapped.

R=fschneider@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/8086021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-03 11:44:39 +00:00
vegorov@chromium.org
3e9891c1d0 Enable code flushing for full (non-incremental) collections.
This will ensure that we will flush code when we hit memory limits.

R=erik.corry@gmail.com
BUG=v8:1609

Review URL: http://codereview.chromium.org/8060053

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9484 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-29 13:51:47 +00:00
yangguo@chromium.org
589ce7561a Fixing test case from r9469.
Review URL: http://codereview.chromium.org/8038046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9473 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 14:26:23 +00:00
yangguo@chromium.org
fd575f7177 Fixed deadlock in the debugger agent in Windows.
BUG=v8:1723
TEST=cctest test-debug/DebuggerAgent

Review URL: http://codereview.chromium.org/8069002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 13:27:20 +00:00
jkummerow@chromium.org
8e5db73e7d Add /bigobj parameter to cctest to make MSVS happy.
TEST=MSVS 2008 compiles cctest without warnings/errors.

Review URL: http://codereview.chromium.org/8052031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9458 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 09:13:30 +00:00
ricow@chromium.org
7810ff70f6 Make sure that we can't access hidden properties by installing accessors on Object.prototype.
BUG:chromium:97784
TEST=cctest/test-api
Review URL: http://codereview.chromium.org/8041020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 16:54:50 +00:00
ulan@chromium.org
16ae2551ae Search prototypes for accessor setters if interceptor returns empty value.
Extract the part of SetPropertyForResult that searches the prototype chain
for accessor setters into a separate function SetPropertyInPrototypes.
Call this function in SetPropertyPostInterceptor.

This should fix both optimized and unoptimized cases because
the cache stub for storing with interceptor calls the runtime system.

BUG=v8:1636

TEST=cctest/test-api.cc/EmptyInterceptorDoesNotShadowAccessors

Review URL: http://codereview.chromium.org/7991007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 14:54:57 +00:00
mikhail.naganov@gmail.com
c05354ecc4 Add v8::HeapGraphNode::GetHeapValue method.
This allows getting a heap object by a heap snapshot node for further
inspection. Very useful for objects from bindings that mostly have
getter-provided fields.

R=vegorov@google.com
BUG=webkit/61179
TEST=test-heap-profiler/GetHeapValue,GetHeapValueForDeletedObject

Review URL: http://codereview.chromium.org/8046006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 14:38:29 +00:00
lrn@chromium.org
172c27a6ba Added ability to lock strings to prevent their representation or encoding from changing.
Use string locking to ensure consistent representation of source string during JSON parsing.

Review URL: http://codereview.chromium.org/7977001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9424 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 11:14:41 +00:00
mstarzinger@chromium.org
7414229602 Fix compilation of GrowAndShrinkNewSpace on Mac.
R=jkummerow@chromium.org
BUG=v8:1707
TEST=cctest/test-heap/GrowAndShrinkNewSpace

Review URL: http://codereview.chromium.org/7989009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 16:40:07 +00:00
mstarzinger@chromium.org
190d8d671d Cleanup and enable GrowAndShrinkNewSpace test case.
R=svenpanne@chromium.org
BUG=v8:1707
TEST=cctest/test-heap/GrowAndShrinkNewSpace

Review URL: http://codereview.chromium.org/7995004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 14:50:20 +00:00
fschneider@chromium.org
fd71ed8d36 Temporarily mark a test as timing out until the problem is found.
Review URL: http://codereview.chromium.org/7989003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9395 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 13:19:19 +00:00
danno@chromium.org
f48c9f6557 Basic support for tracking smi-only arrays on ia32.
Activated by the flag --smi-only-arrays

Currently not crankshaft support, using flag on non-ia32 platforms will lead to write barrier misses and crashes.

BUG=none
TEST=elements_kind.js

Review URL: http://codereview.chromium.org/7901016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 11:30:04 +00:00
fschneider@chromium.org
ad5ed43c13 Fix broken Windows build.
Review URL: http://codereview.chromium.org/7983033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9369 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 14:42:50 +00:00
fschneider@chromium.org
fdaadb78d6 Landing for miket@chromium.org: Add an optional source length field to the Extension constructor.
Original code review: http://codereview.chromium.org/7889046/
Review URL: http://codereview.chromium.org/7978028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 13:28:09 +00:00
erik.corry@gmail.com
14087f430d Disable some tests while we hunt for the reasons behind them.
Review URL: http://codereview.chromium.org/7978022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9350 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 07:25:33 +00:00
mstarzinger@chromium.org
bffbcefffb Fix new space shrinking to compute correct capacity.
R=vegorov@chromium.org
BUG=v8:1702
TEST=cctest/test-heap/GrowAndShrinkNewSpace

Review URL: http://codereview.chromium.org/7983001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 15:35:36 +00:00
mstarzinger@chromium.org
86832d5924 Fix new space shrinking to reset from-space.
R=lrn@chromium.org
BUG=v8:1702
TEST=cctest/test-heap/GrowAndShrinkNewSpace

Review URL: http://codereview.chromium.org/7976003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9346 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 13:37:40 +00:00
vegorov@chromium.org
ac36cb4504 Merge experimental/gc branch to the bleeding_edge.
Review URL: http://codereview.chromium.org/7945009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-19 18:36:47 +00:00
yangguo@chromium.org
3439ab60f7 Correcting a bogus assert outdated since r9295.
Review URL: http://codereview.chromium.org/7909002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-15 12:47:06 +00:00
jkummerow@chromium.org
fcc2e65aad Change global const handling to silently ignore redeclarations
and make window.{Infinity,NaN,undefined} read-only as per ES5

BUG=89490
TEST=mjsunit/const-redecl.js, mjsunit/undeletable-functions.js, es5conform, sputnik

Review URL: http://codereview.chromium.org/7811015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9299 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-15 12:00:30 +00:00
yangguo@chromium.org
327eb48ce6 Enable slices of external strings (in the tentative implementation).
TEST=cctest test-strings/SliceFromExternal, mjsunit/string-slices.js

Review URL: http://codereview.chromium.org/7832002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9295 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-15 11:10:01 +00:00
mikhail.naganov@gmail.com
b706cfce94 Eliminate the need for code delete events in CPU profiler.
Events are still generated for tick processor on performance testing
server to work, as soon as scripts will be updated, it will be safe
to remove code delete events emitting code.

R=erik.corry@gmail.com
BUG=v8:1466
TEST=existing tests in test-profile-generator,test-cpu-profiler and mjsunit/tools

Review URL: http://codereview.chromium.org/7864017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9275 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-14 11:47:03 +00:00
kmillikin@chromium.org
63bec78428 Revert "MIPS: port Remove in-loop tracking for call ICs."
Committed incorrectly.

TBR=ricow@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7890026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9270 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-14 08:08:16 +00:00
kmillikin@chromium.org
f9e2922b12 MIPS: port Remove in-loop tracking for call ICs.
port r9260 (af9cfd83).

Original commit message:
We passed this flag around in a lot of places and had differenc call
ICs based on it, but never did any real specialization based on its
value.

BUG=
TEST=

Review URL: http://codereview.chromium.org/7886028
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-14 08:04:47 +00:00
mikhail.naganov@gmail.com
f8e5c71e18 Rename SmartPointer to SmartArrayPointer.
As pointed out in: http://codereview.chromium.org/7754007/#msg5

"SmartPointer should have been named SmartArrayPointer as it expects an input
allocated using new[] and deallocates it using delete[]. Using it as a simple
scoped pointer for a single object is incorrect."

R=mnaganov@chromium.org

Review URL: http://codereview.chromium.org/7860011
Patch from Thiago Farina <tfarina@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-09 22:39:47 +00:00
ricow@chromium.org
b8cbe08fcc Fix presubmit errors caused by updated depot tools
This is all blank line before/after linting errors.
Review URL: http://codereview.chromium.org/7754022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9204 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-08 19:57:14 +00:00
lrn@chromium.org
c1dc429c02 Fix bug in collector.
Small cleanups in preparser.

TEST=cctest/test-utils/SequenceCollectorRegression

Review URL: http://codereview.chromium.org/7754014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9197 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-08 13:44:11 +00:00
lrn@chromium.org
689f3cb314 Rename scanner.* to scanner-character-streams.*. and scanner-base.* to scanner.*
R=lrn@chromium.org

Signed-off-by: Thiago Farina <tfarina@chromium.org>

Review URL: http://codereview.chromium.org/7739020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9195 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-08 13:06:44 +00:00
erik.corry@gmail.com
e9cc1804bd Make one-character strings into symbols more agressively.
Review URL: http://codereview.chromium.org/7840029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9175 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-07 13:13:56 +00:00
jkummerow@chromium.org
1db6be7f2b Fix a few clang warnings (which -Werror treats as errors)
Review URL: http://codereview.chromium.org/7779033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9141 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-06 07:41:45 +00:00
fschneider@chromium.org
d8cec510e4 Landing: MIPS: Fixed some mips32r1-specific test failures.
Original review: http://codereview.chromium.org/7737019/
Review URL: http://codereview.chromium.org/7739019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9137 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-05 11:50:36 +00:00
lrn@chromium.org
449fd357df Remove unused includes from scanner.h.
This file should also be renamed to something else, as after many refactors,
there isn't any Scanner class in there, just four CharacterStream classes.

R=lrn@chromium.org

Signed-off-by: Thiago Farina <tfarina@chromium.org>

Review URL: http://codereview.chromium.org/7835019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9124 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-05 07:39:47 +00:00
yangguo@chromium.org
1be99a9627 Generated code for substring slices in x64 and arm.
Review URL: http://codereview.chromium.org/7795018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9111 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 15:24:26 +00:00
jkummerow@chromium.org
f3fc54666a Add support for shared library builds to tools/test-wrapper-gypbuild.py
by setting LD_LIBRARY_PATH as required

Review URL: http://codereview.chromium.org/7811016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9085 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-31 14:15:42 +00:00
yangguo@chromium.org
ccb262ea3a Changed test expectations for ARM and MIPS.
Review URL: http://codereview.chromium.org/7778042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9084 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-31 14:12:25 +00:00
svenpanne@chromium.org
07c1c9ebc7 MIPS: small test-case fix for chaining of fixup position.
Add nops to the branch-delay slots of the 'beq' and 'bne' instructions
used in the test-case. Having a branch instruction in the branch-delay-slot
of another branch is undefined on mips.

In regular code we avoid this by using the Branch() macro-instruction which
fills the branch-delay-slot with nop() automatically, unless the programmer
asks to use it (via USE_BRANCH_DELAY).

There is more info about branch-delay-slots on this page, and in the ISA
reference also on the page:

https://github.com/paul99/v8m-rb/wiki/MIPS-instruction-set-and-v8

BUG=
TEST=
Review URL: http://codereview.chromium.org/7812019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-31 09:42:28 +00:00
mikhail.naganov@gmail.com
4f3a8bd137 Return v8::True or v8::False instead of using Boolean::New.
BUG=None
TEST=None

R=mnaganov@chromium.org

Signed-off-by: Thiago Farina <tfarina@chromium.org>

Review URL: http://codereview.chromium.org/7785001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9073 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-30 18:45:48 +00:00
svenpanne@chromium.org
4084e698c3 Fixed a bug in the chaining of fixup position
The ARM and MIPS assemblers had a bug where they did not handle the last element
in the list of code positions correctly during the fixup of offsets for forward
jumps. This happened when the first instruction contained a forward jump to a
label, and that label was used in a forward jump later, too.

Unified the code for Assembler::next on ARM and MIPS while we were there.

Added test cases, even for ia32/x64, which seem to be correct, even I don't
fully understand why... %-}

BUG=v8:1644
Review URL: http://codereview.chromium.org/7786001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9063 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-30 07:36:31 +00:00
lrn@chromium.org
cd3588d582 Make (some) functions called from builtin functions use the callback's global as receiver.
Changes GetGlobalReceiver() to GetDefaultReceiver(func) that returns undefined
for strict and native functions, and the function's context's global proxy
for "normal" functions.

BUG=v8:1547
TEST=cctest/api-test/ForeignFunctionReceiver

Review URL: http://codereview.chromium.org/7741042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9030 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-26 13:53:00 +00:00
yangguo@chromium.org
77141f78ff Tentative implementation of string slices (hidden under the flag --string-slices).
TEST=test/mjsunit/string-slices.js

Review URL: http://codereview.chromium.org/7477045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9027 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-26 13:03:30 +00:00
yangguo@chromium.org
ec7b679a8d Changed the order of arguments in the check as suggested to issue 1275.
BUG=v8:1275

Review URL: http://codereview.chromium.org/7740046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-26 08:45:47 +00:00
jkummerow@chromium.org
dda2889ba1 Refactor .gyp files:
common.gypi now contains global target defaults and is included by all .gyp files;
standalone.gypi contains definitions for stand-alone v8 builds.
This fixes d8 for the ARM simulator.

TEST=compiles and tests pass on all platforms

Review URL: http://codereview.chromium.org/7740020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9019 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-25 14:50:09 +00:00
lrn@chromium.org
893b8320b8 Added access check to Runtime_GetPrototype.
BUG=93759

Review URL: http://codereview.chromium.org/7701023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9016 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-25 13:22:55 +00:00
fschneider@chromium.org
2b024e3d5d Land two MIPS changes contributed by Paul Lind.
1. Issue 7744014: MIPS: Fixed and optimized MacroAssembler::Trunc_uw_d, Cvt_d_uw, Ext, Ins. (http://codereview.chromium.org/7744014/)

2. Issue 7740019: MIPS: Fix for function argument access in non-strict mode. (http://codereview.chromium.org/7740019/)
Review URL: http://codereview.chromium.org/7741016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9014 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-25 12:12:25 +00:00
mikhail.naganov@gmail.com
2e1e5fc09c Heap profiler: for objects of class "Object", try to lookup name
from the constructor function. This works well for binding objects,
and this matches DevTools' algorithm for name assignment.

R=sgjesse@chromium.org
BUG=none
TEST=test-heap-profiler/GetConstructorName

Review URL: http://codereview.chromium.org/7709026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-23 12:24:54 +00:00
yangguo@chromium.org
011b136ee0 Slight API change enabling opting out from null termination in String::Write*().
BUG=v8:1537
TEST=cctest test-api/StringWrite

Review URL: http://codereview.chromium.org/7706002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8996 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-23 11:11:12 +00:00
yangguo@chromium.org
107d1b5e65 Inserted a missing string encoding check in lastIndexOf.
Review URL: http://codereview.chromium.org/7685005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8992 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-22 13:55:25 +00:00
danno@chromium.org
edd691960f Implement UnionOfKeys for NonStrictArguments
BUG=none
TEST=cctest/test-api/IndexedInterceptorNonStrictArgsWithIndexedAccessor

Review URL: http://codereview.chromium.org/7657011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 16:15:30 +00:00
keuchel@chromium.org
5e983535f0 Fixed scanner initialization in test-parsing.
BUG=
TEST=

Review URL: http://codereview.chromium.org/7676003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8956 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 11:45:04 +00:00
mikhail.naganov@gmail.com
7904a85592 Remove some unnecessary namespace alias definitions.
We can pick the namespace alias 'i' from v8.h which is already included
in those files.

BUG=None
TEST=None

R=mnaganov@chromium.org

Signed-off-by: Thiago Farina <tfarina@chromium.org>

Review URL: http://codereview.chromium.org/7621035

--------------

Inline the implementation of Handle default ctor.

BUG=None
TEST=None

R=mnaganov@chromium.org

Signed-off-by: Thiago Farina <tfarina@chromium.org>

Review URL: http://codereview.chromium.org/7669013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8953 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 10:29:05 +00:00
keuchel@chromium.org
c6c504f8b6 Parse harmony let declarations.
Implementation of the harmony block scoped let bindings as proposed here:
http://wiki.ecmascript.org/doku.php?id=harmony:block_scoped_bindings

Changes to the syntax are explained there. They are active under the
harmony_block_scoping_ flag in the parser.

Review URL: http://codereview.chromium.org/7616009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8944 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-16 14:24:12 +00:00
mikhail.naganov@gmail.com
58824435d1 Pick the namespace alias 'i' from v8.h.
These files already include v8.h so they don't need to define the
namespace alias again.

Signed-off-by: Thiago Farina <tfarina@chromium.org>

Review URL: http://codereview.chromium.org/7640012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-12 09:49:55 +00:00
lrn@chromium.org
654417d1a9 Make threaded tests not use static fields for communication.
TEST=cctest/Threaded4

Review URL: http://codereview.chromium.org/7620007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8892 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 09:08:44 +00:00
antonm@chromium.org
48e6274cc3 Allows not API functions as inputs for CreationConext method.
Review URL: http://codereview.chromium.org/7552034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8885 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 06:40:14 +00:00
vitalyr@chromium.org
df91f6b396 Simpler (and a bit faster) keyword matcher.
Replaced the keyword matching state machine with a switch on the first char followed up by inlined char comparisons.

R=lrn@chromium.org
TEST=cctest/test-parsing/ScanKeywords

Review URL: http://codereview.chromium.org/7558017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-09 13:32:53 +00:00
jkummerow@chromium.org
1a849d2754 Make GYP build usable for day-to-day work (second attempt)
- Introduce a global Makefile that triggers GYP-based building
- Some fixes to .gyp[i] files to make everything work
- tools/test-wrapper-gypbuild.py as a temporary solution for easy testing

Original review URL: http://codereview.chromium.org/7383006/

Review URL: http://codereview.chromium.org/7550030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-05 09:44:30 +00:00
vitalyr@chromium.org
1dcb6e33cd Minimize malloc heap allocation on process startup.
R=vegorov@chromium.org
BUG=http://b/issue?id=5095592

Review URL: http://codereview.chromium.org/7572018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8833 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-04 15:18:18 +00:00
mstarzinger@chromium.org
b05ff5e0b9 Prototype of mark-and-compact support for Harmony weak maps.
R=vegorov@chromium.org
BUG=v8:1565
TEST=cctest/test-weakmaps

Review URL: http://codereview.chromium.org/7553012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-03 12:48:30 +00:00
danno@chromium.org
bdf6895bb3 Encapsulate element handling into a class keyed on ElementsKind
Advantage is that it's much easier to add new element types (like FAST_SMI_ELEMENTS), and that handling logic for each element kind is (more) consolidated.

Currently, only GetElementsWithReceiver uses the new encapsulation, but the goal is to move much more element functionality into the class incrementally.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/7527001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8810 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-03 11:12:46 +00:00
jkummerow@chromium.org
a41c25607d Revert "Make window.{undefined,NaN,Infinity} read-only"
This reverts r8766.

TEST=WebKit LayoutTests green again.

Review URL: http://codereview.chromium.org/7562005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8800 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-03 09:53:14 +00:00
kmillikin@chromium.org
4487f8c050 Revert "Revert "Fix a bug in scope analysis.""
Reapply r8783 with an additional fix.

Because the preparser and parser do not use the same scope analysis to
determine if a function can be lazily compiled, the parser can have false
positives.  Rather than treating this as a parse error, treat the preparser
as authoritative and eagerly compile the function.

R=lrn@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7565003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8797 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-03 09:10:35 +00:00
vegorov@chromium.org
cb99571cec Fix ContextDeserialization and PartialDeserialization tests.
Space should be reserved twice before each deserialization.

R=erik.corry@gmail.com

Review URL: http://codereview.chromium.org/7550009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8795 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-02 17:43:32 +00:00
jkummerow@chromium.org
15c979eeaa Make window.{undefined,NaN,Infinity} read-only
as per ES5.

BUG=89490
TEST=es5conform 15.1.*, 15.2.3.*; mjsunit/undeletable-functions

Review URL: http://codereview.chromium.org/7538016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8766 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-01 12:18:03 +00:00
mstarzinger@chromium.org
eef3e8739e Reintroduced dictionary that can use objects as keys.
R=vitalyr@chromium.org
TEST=cctest/test-dictionary

Review URL: http://codereview.chromium.org/7385006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8761 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-28 17:21:22 +00:00
jkummerow@chromium.org
0aab25fabf Fix: FunctionTemplate::SetPrototypeAttributes broke prototype object
BUG=v8:1539
TEST=cctest test-api/SetPrototypeAttributes

Review URL: http://codereview.chromium.org/7324027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8737 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-25 15:01:45 +00:00
mikhail.naganov@gmail.com
6894716121 v8: Move DeleteEmpty test to test-list.cc
BUG=None
TEST=None

Signed-off-by: Thiago Farina <tfarina@chromium.org>

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-24 17:59:59 +00:00
danno@chromium.org
3e7d642d0a Remaining changes to fully support FastDoubleArray.
R=ager@chromium.org
BUG=none
TEST=cctests, unboxed-double-array.js

Review URL: http://codereview.chromium.org/7473031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8718 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-22 09:04:16 +00:00
svenpanne@chromium.org
8d47a6f625 Fixed an off-by-one error in SplitConstantsInFullCompiler test.
The test tried to disassemble the last entry in a constant pool, which only
worked by accident until address randomization was introduced.
Review URL: http://codereview.chromium.org/7489005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8717 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-22 09:03:55 +00:00
ager@chromium.org
645bb1b1ba Add GetPropertyAttribute method for Object in the API
Patch by Peter Varga.

BUG=none
TEST=cctest/test-api/PropertyAttributes

Review URL: http://codereview.chromium.org/7321006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8679 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-18 17:44:57 +00:00
jkummerow@chromium.org
7ac9dfcc81 Revert "Make GYP build usable for day-to-day work"
This reverts r8674 due to failures on the buildbots.

Review URL: http://codereview.chromium.org/7396022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8677 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-18 16:39:41 +00:00
jkummerow@chromium.org
93c5c5fa23 Make GYP build usable for day-to-day work
- Introduce a global Makefile that triggers GYP-based building
- Some fixes to .gyp[i] files to make everything work
- tools/test-wrapper-gypbuild.py as a temporary solution for easy testing

Review URL: http://codereview.chromium.org/7383006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-18 14:19:48 +00:00
vitalyr@chromium.org
3d323c691b Avoid TLS load in AstNode constructor.
R=ager@chromium.org

Review URL: http://codereview.chromium.org/7383013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8664 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-15 16:57:35 +00:00
jkummerow@chromium.org
8e70bc14cc Fix gyp build
by replicating changes to SConscript from r8654 to cctest.gyp

TEST=cctest compiles with gyp/make.

Review URL: http://codereview.chromium.org/7371006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8658 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-15 08:09:20 +00:00
mikhail.naganov@gmail.com
e1e2b369eb Convert *.js files of cctest/test-log into "resources".
This allows running cctest from anywhere.

I was to rename single-letter variables in my script due to an encountered issue
in JSMin (http://code.google.com/p/v8/issues/detail?id=1557).

R=svenpanne@chromium.org,sgjesse@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7354027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8654 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-14 11:38:18 +00:00
vegorov@chromium.org
615add8463 Expose APIs for detecting boxed primitives, native errors and Math.
While implementing structured clone I found that I need support
for detecting and creating objects using the builtin Number, String
and Boolean constructors; this CL adds this support. I also need
to be able to detect entities of "native object type (e.g., Error)",
hence the new IsNativeError() calls.

(ref: http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#safe-passing-of-structured-data)

Patch by Luke Zarko.

Review URL: http://codereview.chromium.org/7344013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8653 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-14 11:00:04 +00:00
mikhail.naganov@gmail.com
5c57d0d643 Remove support for logging into a memory buffer.
The only usage of it was in logging tests, I've switched them for
using a file.

I've left out support for "--logfile=*" for now, as Chromium uses it.
Will be removed after the next V8 roll.

R=sgjesse@chromium.org
BUG=859
TEST=mjsunit/log-*

Review URL: http://codereview.chromium.org/7310025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8629 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 11:31:22 +00:00
whesse@chromium.org
b2e8d72bf5 Revert r8619 because of Webkit failures.
Review URL: http://codereview.chromium.org/7351014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8628 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 11:13:40 +00:00
mikhail.naganov@gmail.com
e4f7860a68 Clean up conditionals in tests after r8622.
R=sgjesse@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7353015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 10:08:52 +00:00
sgjesse@chromium.org
8a6108de95 Remove the ability to compile without logging and profiling
The preprocessor defines ENABLE_LOGGING_AND_PROFILING and ENABLE_VMSTATE_TRACKING has been removed as these where required to be turned on for Crankshaft to work. To re-enable reducing the binary size by leaving out heap and CPU profiler a new set of defines needs to be created.

R=ager@chromium.org

BUG=v8:1271
TEST=all

Review URL: http://codereview.chromium.org//7350014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 09:09:04 +00:00
yangguo@chromium.org
c0044bb7e2 Added dictionary that can use objects as keys.
R=vegorov@chromium.org
TEST=cctest/test-dictionary

Review URL: http://codereview.chromium.org/7349005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-12 15:13:57 +00:00
sgjesse@chromium.org
54e81c351f Add source position recording for variable loads
This provides more precise source to generated code mapping as variable loads can be handled using IC calls.

R=kmillikin@chromium.org

BUG=v8:1527
TEST=test/message/regress/regress-1527

Review URL: http://codereview.chromium.org//7327038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 15:20:17 +00:00
sgjesse@chromium.org
2fe5a976c9 Lower the number of threads for some threading tests when testing on ARM to avoid timeouts
R=ricow@chromium.org

BUG=none
TEST=cctest/test-lockers/LockerUnlocker,cctest/test-lockers/LockTwiceAndUnlock,cctest/test-lockers/SeparateIsolatesLocksNonexclusive

Review URL: http://codereview.chromium.org//7334007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 12:17:10 +00:00
svenpanne@chromium.org
c71cf782e8 Drastically reduce the transitive dependencies of jsregexp.h, making it (almost)
architecture-independent.

jsregexp.h is itself included transitively quite a lot, and by getting rid of 19
of its dependencies (which even included things like src/cpu.h, the various
assemblers, etc.), the recompilation behaviour is a bit less funny than it was.
Review URL: http://codereview.chromium.org/7331014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8589 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 09:12:17 +00:00
vegorov@chromium.org
29801d4e9b Correctly propagate toolchain setting in SConstruct.
Patch by Bert Belder.

Review URL: http://codereview.chromium.org/7309014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8555 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-06 12:36:05 +00:00
sgjesse@chromium.org
10bb16f495 Add support for lazy deoptimization from deferred stack checks
The debugger can be entered from the deferred stack check in optimized code. This can cause both lazy deoptimization and debugger deoptimization (setting the first break point and inspecting the stack for optimized code respectively). This required deoptimization support from the deferred stack check.

The lazy deoptimiztion call is inserted when the deferred code is done including restoring the registers. The bailout to the full code is the begining of the loop body as that is where the stack check is sitting in the optimized code. The bailout is not to the stack check in the full code as that is sitting at the end of the loop.

R=kmillikin@chromium.org

BUG=none
TEST=none

Review URL: http://codereview.chromium.org//7212025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8535 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-05 13:21:29 +00:00
sgjesse@chromium.org
9cc5b94c2e Correctly handle the constant pool in constant pool splitting test
The constant pool was not taken into account in the test test-compiler/SplitConstantsInFullCompiler which caused random failures.

This also reverts the test code added in r8469 and r8471.

R=ricow@chromium.org

BUG=none
TEST=test-compiler/SplitConstantsInFullCompiler

Review URL: http://codereview.chromium.org//7308001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8520 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-04 08:57:43 +00:00
vitalyr@chromium.org
fe7bdf1fe8 Remove unmarked entries from per context map caches.
Made "map_cache" a weak field of global context and added a pass over
all caches late in the marking phase.

R=vegorov@chromium.org
BUG=v8:1516
TEST=cctest/test-api/Regress1516

Review URL: http://codereview.chromium.org/7285031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8515 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 12:47:18 +00:00
mikhail.naganov@gmail.com
33177880c8 Remove "modules" and "tags" of the logging CPU profiler.
Modules now makes a little sense, as there is only one module.
Tags was a simplistic attempt of supporting nested profiles.

R=sgjesse@chromium.org
BUG=859

Review URL: http://codereview.chromium.org/7276046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 09:35:16 +00:00
jkummerow@chromium.org
d2f08851f0 Fix build on x64
Review URL: http://codereview.chromium.org/7284011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8471 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 14:28:41 +00:00