Commit Graph

371 Commits

Author SHA1 Message Date
mstarzinger@chromium.org
739c9f6f01 Fix slot recording of code target patches.
This makes sure that we only record relocation slots for code target
patches that happen in marked objects. Unmarked ones might be visited
again, whereas marked ones are alive and will not be visited again.

R=ulan@chromium.org
BUG=chromium:152615,chromium:144230

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12655 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-02 15:46:55 +00:00
erik.corry@gmail.com
aba09dcf2e Allow partial scanning of large arrays in order to avoid
mark stack overflow.  This is a reland of r12609 -
https://chromiumcodereview.appspot.com/10959011 - but
this time VisitPointers has been fixed (it used to assume
that the first slot was on the first page of a large object).
Review URL: https://chromiumcodereview.appspot.com/10996018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-26 12:17:24 +00:00
erik.corry@gmail.com
5547815daf Revert 12609 (Allow partial scanning of large arrays)
due to crashes in unbox-double-arrays.js test.
Review URL: https://chromiumcodereview.appspot.com/10996017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-26 08:55:19 +00:00
erik.corry@gmail.com
a54e007a95 Allow partial scanning of large arrays in order to avoid
mark stack overflow.
Review URL: https://chromiumcodereview.appspot.com/10959011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12609 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-26 08:33:15 +00:00
mstarzinger@chromium.org
3018b875b1 Integrate map marking into static marking visitor.
This refactors the specialized marking of map contents to be done by the
static marking visitor shared between full and incremental marking. This
also fixes an issue where some maps weren't accounted for in the object
stats tracker. But more importantly, it simplifies the code base.

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12526 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-17 10:04:39 +00:00
verwaest@chromium.org
fb506e0864 Only count the descriptor array if it's owned by the map.
Review URL: https://chromiumcodereview.appspot.com/10918245

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 13:37:41 +00:00
verwaest@chromium.org
ebd3241b05 Sharing of descriptor arrays.
This CL adds multiple things:
Transition arrays do not directly point at their descriptor array anymore, but rather do so via an indirect pointer (a JSGlobalPropertyCell).

An ownership bit is added to maps indicating whether it owns its own descriptor array or not.

Maps owning a descriptor array can pass on ownership if a transition from that map is generated; but only if the descriptor array stays exactly the same; or if a descriptor is added.

Maps that don't have ownership get ownership back if their direct child to which ownership was passed is cleared in ClearNonLiveTransitions.

To detect which descriptors in an array are valid, each map knows its own NumberOfOwnDescriptors. Since the descriptors are sorted in order of addition, if we search and find a descriptor with index bigger than this number, it is not valid for the given map.

We currently still build up an enumeration cache (although this may disappear). The enumeration cache is always built for the entire descriptor array, even if not all descriptors are owned by the map. Once a descriptor array has an enumeration cache for a given map; this invariant will always be true, even if the descriptor array was extended. The extended array will inherit the enumeration cache from the smaller descriptor array. If a map with more descriptors needs an enumeration cache, it's EnumLength will still be set to invalid, so it will have to recompute the enumeration cache. This new cache will also be valid for smaller maps since they have their own enumlength; and use this to loop over the cache. If the EnumLength is still invalid, but there is already a cache present that is big enough; we just initialize the EnumLength field for the map.

When we apply ClearNonLiveTransitions and descriptor ownership is passed back to a parent map, the descriptor array is trimmed in-place and resorted. At the same time, the enumeration cache is trimmed in-place.

Only transition arrays contain descriptor arrays. If we transition to a map and pass ownership of the descriptor array along, the child map will not store the descriptor array it owns. Rather its parent will keep the pointer. So for every leaf-map, we find the descriptor array by following the back pointer, reading out the transition array, and fetching the descriptor array from the JSGlobalPropertyCell. If a map has a transition array, we fetch it from there. If a map has undefined as its back-pointer and has no transition array; it is considered to have an empty descriptor array.

When we modify properties, we cannot share the descriptor array. To accommodate this, the child map will get its own transition array; even if there are not necessarily any transitions leaving from the child map. This is necessary since it's the only way to store its own descriptor array.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-12 16:43:57 +00:00
erik.corry@gmail.com
1987542825 Fix invariant so that we cannot record relocation slots for
white objects when compacting.  Add flag for incremental code
compaction.
Review URL: https://chromiumcodereview.appspot.com/10907174

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12483 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-11 14:01:39 +00:00
rossberg@chromium.org
55e6227817 Rename JSGlobalProxy::context to native_context,
for clarity and consistency with GlobalObject::native_context.

R=svenpanne@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12341 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-20 11:35:50 +00:00
rossberg@chromium.org
984d0b0925 Rename Context::global to Context::global_object,
in preparation for global lexical scope.

R=mstarzinger@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12335 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-17 12:59:00 +00:00
rossberg@chromium.org
42552808ab Rename "global context" to "native context",
in anticipation of the upcoming lexical global scope.

Mostly automatised as:

for FILE in `egrep -ril "global[ _]?context" src test/cctest`
do
  echo $FILE
  sed "s/Global context/Native context/g" <$FILE >$FILE.0
  sed "s/global context/native context/g" <$FILE.0 >$FILE.1
  sed "s/global_context/native_context/g" <$FILE.1 >$FILE.2
  sed "s/GLOBAL_CONTEXT/NATIVE_CONTEXT/g" <$FILE.2 >$FILE.3
  sed "s/GlobalContext/NativeContext/g" <$FILE.3 >$FILE
  rm $FILE.[0-9]
done

R=mstarzinger@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-17 09:03:08 +00:00
verwaest@chromium.org
d53de0590a Swapped transition array and descriptor array.
Now a map points to a transition array which contains the descriptor array. The descriptor array is now immutable. The next step is to share the descriptor array with all back-pointed maps as long as there is a single line of extension. Maps that require a descriptor array but don't need transitions will still need a pseudo-empty transition array to contain the descriptor array.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12298 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-13 08:43:16 +00:00
erik.corry@gmail.com
9b3068bedd Fix intermittent failure in ReleaseOverReservedPages on x64.
BUG=v8:2216
Review URL: https://chromiumcodereview.appspot.com/10828253

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12292 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-10 13:45:22 +00:00
mstarzinger@chromium.org
6cfc3f4c18 Remove obsolete SLOT_ADDR macro usages.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12285 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-09 12:25:03 +00:00
mstarzinger@chromium.org
235d8b4f94 Fix integer division truncation error.
Review URL: https://chromiumcodereview.appspot.com/10831148
Patch from Nico Weber <thakis@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12261 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-06 13:23:52 +00:00
mstarzinger@chromium.org
81a43b5607 Make incremental marking clear ICs.
This extends the existing clearing of ICs during GC to incremental
marking in order to prevent cross-context retention that would last
until the next non-incremental GC.

R=erik.corry@gmail.com
TEST=cctest/test-heap/IncrementalMarkingClears[Mono,Poly]morhpicIC

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12259 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-06 10:35:48 +00:00
mstarzinger@chromium.org
d4e6aa33fc Refactor marking to share embedded pointer visitor.
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12246 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-01 11:29:48 +00:00
mstarzinger@chromium.org
7dd2e9777c Make incremental marking clear type feedback cells.
This extends the existing clearing of type feedback cells during GC to
incremental marking in order to prevent cross-context retention that
would last until the next non-incremental GC.

R=erik.corry@gmail.com
TEST=cctest/test-heap/IncrementalMarkingClearsTypeFeedbackCells

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12245 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-01 11:24:14 +00:00
mstarzinger@chromium.org
76fe67b092 Implement verification of context separation.
This adds the --verify-global-context-separation flag which can be used
to verify that no code object embeds pointers to more than one global
context after a full GC. It uses an object visitor that just performs
shallow traversal of the object graph spanned by one code object, and
breaks at points where application objects are encountered. So it will
not trip on cross-context leaks introduced by the application itself.

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12224 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-30 10:47:04 +00:00
yangguo@chromium.org
4d1d1eb53e Fix building with GCC 3.x
R=yangguo@chromium.org
BUG=v8:2016, v8:2017
TEST=

Review URL: https://chromiumcodereview.appspot.com/10823034
Patch from James Pike <g00gle@chilon.net>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12199 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-26 09:18:09 +00:00
mstarzinger@chromium.org
abede994d9 Refactor incremental marking to use static visitor.
This is a refactoring only change that switches incremental marking to
use a static object visitor. It also shares the common code between the
non-incremental and the incremental marker. Sharing that would require
semantical changes will be done later.

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12193 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-25 15:23:07 +00:00
danno@chromium.org
0fb5189a32 Refine object stats for FixedArrays.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-20 14:06:24 +00:00
verwaest@chromium.org
26afeb6ea5 Don't record elements transition slots since it will contain a map.
Additionally removed unused code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-20 07:24:50 +00:00
sanjoy@chromium.org
693c7643d2 Optimize functions on a second thread.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-19 18:58:23 +00:00
danno@chromium.org
1ab272ab36 Track counts/sizes of CODE sub types with --track-gc-object-stats
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12104 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-17 11:58:49 +00:00
verwaest@chromium.org
11e5c9e281 Removed transitions from the accessor pair descriptors.
AccessorPair related transitions are now also stored as single map links, simplifying the code that handles transitions. AccessorPairs can now be shared between descriptor arrays, since they can only be mutated after another transition anyway; during which the pair is copied before writing.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12097 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-16 14:02:50 +00:00
danno@chromium.org
aae81e125b Add counters that automatically track object sizes and counts.
Review URL: https://chromiumcodereview.appspot.com/10702168

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-13 12:22:09 +00:00
verwaest@chromium.org
45419ee145 Swap bitfield3 and backpointer.
Bitfield3 now has its own field, while the backpointer shares the field with the descriptor array; which will become the transition array.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12034 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-10 13:31:36 +00:00
verwaest@chromium.org
75407ae2b7 Moving prototype transitions into the header of the transition array.
Review URL: https://chromiumcodereview.appspot.com/10692026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12022 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-10 07:53:00 +00:00
verwaest@chromium.org
d7a5b7d5e2 Separating transitions from descriptors.
In this design maps contain descriptor arrays, which in turn can contain transition arrays. If transitions are needed when no descriptor array is present, a descriptor array without real descriptors is inserted just so it can point at the transition array.

The transition array does not contain details about the field it transitions to. In order to weed out transitions to FIELDs from CONSTANT_FUNCTION (what used to be MAP_TRANSITION vs CONSTANT_TRANSITION), the transition needs to be followed and the details need to be looked up in the target map. CALLBACKS transitions are still easy to recognize since the transition targets are stored as an AccessorPair containing the maps, rather than the maps directly.

Currently AccessorPairs containing a transition and an accessor are shared between the descriptor array and the transition array. This simplifies lookup since we only have to look in one of both arrays. This will change in subsequent revisions, when descriptor arrays will become shared between multiple maps, since transitions cannot be shared.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11994 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-05 13:54:20 +00:00
verwaest@chromium.org
68c944c265 In-place shrinking of descriptor arrays with non-live transitions.
Instead of overwriting non-live transitions with NULL_DESCRIPTORs, we remove them from the array by compacting the array (shifting live values to the left) and in-place trimming the array. If the final descriptor array contains no live values (only contained transitions which are now all cleared), we move bit_field3 back from the descriptor array to the map. The descriptor array itself will be collected in the next GC.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-25 13:10:54 +00:00
mstarzinger@chromium.org
776493ab42 Fix lazy sweeping heuristics to prevent old-space expansion.
This is a temporary fix to prevent excessive expansion of old-space
caused by inaccuracies in lazy sweeper advancing. We actually don't
intend to sweep any pages eagerly, but that requires further changes
to lazy sweeping.

R=ulan@chromium.org,erik.corry@gmail.com
BUG=v8:2194

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11904 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-22 11:47:30 +00:00
yangguo@chromium.org
47be3e8231 Fix lint.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11903 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-22 10:11:19 +00:00
mstarzinger@chromium.org
6cf640ab6c Adapt fragmentation heuristics for over reserved pages.
This adapts the heuristics that detect fragmented pages to reduce memory
footprint for spaces with over reserved memory. This minimizes external
fragmentation caused by pages that cannot be released to the OS because
of just a few live objects on them.

R=erik.corry@gmail.com
TEST=cctest/test-heap/ReleaseOverReservedPages

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11901 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-22 09:29:49 +00:00
verwaest@chromium.org
8aca22b1ef Implementing weak referencing elements transition maps.
Review URL: https://chromiumcodereview.appspot.com/10559032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11842 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-18 11:43:09 +00:00
ulan@chromium.org
b072e6156b Unify promotion and allocation limit computation.
BUG=129628
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11835 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-15 13:48:54 +00:00
fschneider@chromium.org
bb0a2ea766 Share optimized code for closures.
Each SharedFunctionInfo gets an optimized code map to store
one optimized code object per context. When allocating a new
closure we consult this map and check if there is optimized code
that can be shared.

This patch is based on an original patch
by Anton Muhin (http://codereview.chromium.org/6793013/).

BUG=v8:2087, v8:2094
TEST=test/mjsunit/compiler/optimized-closures.js
Review URL: https://chromiumcodereview.appspot.com/10103035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-14 14:06:22 +00:00
verwaest@chromium.org
2b574ef580 Promoting elements transitions to their own field.
This is a first step towards separating all transitions from the property descriptions. If we link the property descriptions from the transition object, this will in allow the descriptor array (property descriptions) to become immutable.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11750 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-11 06:59:56 +00:00
verwaest@chromium.org
98c37e1f4c Merging ContentArray into DescriptorArray
Review URL: https://chromiumcodereview.appspot.com/10412030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11703 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-04 07:20:11 +00:00
verwaest@chromium.org
75f35d3fe1 Decoupling MarkDescriptorArray as much as possible from the ContentArray.
Review URL: https://chromiumcodereview.appspot.com/10417030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11683 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-30 15:15:17 +00:00
mstarzinger@chromium.org
f17833b6ec Fix presubmit error in r11630.
TBR=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11632 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-23 11:40:38 +00:00
mstarzinger@chromium.org
7412d9adbe Change sentinel value for zapping of old-to-new pointers.
R=erik.corry@gmail.com
BUG=v8:2143

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-23 11:17:22 +00:00
mstarzinger@chromium.org
f9b93e6cc7 Implement map collection for incremental marking.
This causes map transitions to be treated weakly during incremental
marking and hence allows clearing of non-live transitions. The marking
code is now shared between incremental and non-incremental mode.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11577 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-16 10:07:50 +00:00
mstarzinger@chromium.org
88a9350f14 Revert r11556 and r11558 to allow roll.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11564 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-15 12:01:23 +00:00
mstarzinger@chromium.org
0c54a2371c Implement map collection for incremental marking.
This causes map transitions to be treated weakly during incremental
marking and hence allows clearing of non-live transitions. The marking
code is now shared between incremental and non-incremental mode.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11556 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-15 08:39:25 +00:00
mstarzinger@chromium.org
526b3f2cac Implement explicit back pointers in transition tree.
This makes back pointers in the map transition tree explicit by having
accurate back pointers throughout the lifetime of maps instead of
establishing and destroying back pointers before and after each marking
phase. This is a prerequisite for being able to clear map transitions
during incremental marking.

R=vegorov@chromium.org
BUG=v8:1465

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11528 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-09 07:29:18 +00:00
ulan@chromium.org
ae0a7ec93a Use correct size of promoted space for setting promotion and allocation limits.
Review URL: https://chromiumcodereview.appspot.com/10376008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-04 09:36:46 +00:00
mstarzinger@chromium.org
11d24334fc Implement ClearFunctionTypeFeedback for test cases.
R=danno@chromium.org
TEST=mjsunit/compiler/inline-construct

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11509 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-04 09:16:38 +00:00
erik.corry@gmail.com
bd3c2c028f Enable code flushing even when objects were marked incrementally,
since the incremental visitor is setting the gc_age fields correctly.
This means the ResetSharedFunctionInfoCountersDuringIncrementalMarking
test passes even if it hits a marking stack overflow.
Review URL: https://chromiumcodereview.appspot.com/10258001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-02 12:58:40 +00:00
svenpanne@chromium.org
a0d67fd9b0 Flush PC-to-code cache before doing verification.
Review URL: https://chromiumcodereview.appspot.com/10144002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11395 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-20 09:37:06 +00:00
mstarzinger@chromium.org
7d22d73ebf Fix issues when stressing compaction with WeakMaps.
1) While marking the backing hash table of a WeakMap we also need to
   record the slot because it might be on an evacuation candidate.
2) With incremental marking one backing hash table might be marked more
   than once because the WeakMap might have gone through a white to gray
   transition.
3) The corner case when the allocation of the backing hash table itself
   causes a GC, leads to a WeakMap with an undefined table field, so we
   still need to handle this case correctly.

R=vegorov@chromium.org
TEST=mjsunit/harmony/proxies-example-membrane --stress-compaction

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11385 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-19 10:32:38 +00:00
vegorov@chromium.org
870eba4c65 Process weak references between optimized JSFunctions on scavenges.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11347 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-17 10:37:41 +00:00
mstarzinger@chromium.org
6276295e28 Fix WeakMap processing for evacuation candidates (2).
This fixes processing of WeakMaps so that keys on evacuation candidates
which are also reachable by other strong paths are correctly recorded in
the slots buffer.

Also backing stores that reside in the large-object-space now use the
correct anchor slot.

R=vegorov@chromium.org
BUG=v8:2060
TEST=cctest/test-weakmaps/Regress2060b

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11279 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-11 15:32:31 +00:00
mstarzinger@chromium.org
00d9c14729 Fix WeakMap processing for evacuation candidates.
This fixes processing of WeakMaps so that value entries on an evacuation
candidate are correctly recorded in the slots buffer. We didn't pass the
correct slot into the backing hashtable while visiting values.

Also the live bytes counter for large object space pages was not reset
correctly when incremental marking is aborted.

R=vegorov@chromium.org
BUG=v8:2060
TEST=cctest/test-weakmaps/Regress2060

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11264 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-11 09:14:29 +00:00
ulan@chromium.org
59b06fd638 Reset function info counters after context disposal.
R=jkummerow@chromium.org
BUG=117767,V8:1902

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-26 13:08:08 +00:00
ulan@chromium.org
0b6a617779 Age inline caches after context disposal.
Review URL: https://chromiumcodereview.appspot.com/9837005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11122 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-23 13:33:11 +00:00
erik.corry@gmail.com
e3774cf23f Record the addresses of pages that are unmapped to aid
in post mortem crash dump analysis.
Review URL: https://chromiumcodereview.appspot.com/9700061

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-16 14:13:22 +00:00
mstarzinger@chromium.org
cd91894d2f Fix missing initialization of mark-compact flags.
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11006 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-12 12:17:46 +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
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
jkummerow@chromium.org
0177aa62da Count ICs that have type information.
Hidden behind --type-info-threshold=X flag, usage dependent on experimental profiler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-20 12:57:23 +00:00
jkummerow@chromium.org
de510c3a58 Split experimental profiler flags
Review URL: https://chromiumcodereview.appspot.com/9374015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-09 13:30:01 +00:00
jkummerow@chromium.org
aa2e842134 Count-based profiling for primitive functions (hidden behind a flag)
Review URL: https://chromiumcodereview.appspot.com/9361026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10657 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-09 10:19:46 +00:00
vegorov@chromium.org
96baf602df Ensure that regexp code flushing correctly updates slots buffer.
Enable code compaction again.

R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-08 15:44:07 +00:00
vegorov@chromium.org
99fa8059c3 Try enabling (non-incremental) code compaction again.
This time include slot-recording fixes in code flushing that were accidentally omitted from the previous commit.

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-07 14:43:51 +00:00
vegorov@chromium.org
9920e441fa Disable code compaction again while we investigate buildbot check failures.
Review URL: https://chromiumcodereview.appspot.com/9351013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-07 10:03:08 +00:00
vegorov@chromium.org
029aa9ef92 Enable non-incremental code compaction.
It is intended to bring memory usage down on idle notifications.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-07 08:51:47 +00:00
vegorov@chromium.org
405b875fec Fix compilation failure introduced by r10601.
Cast intptr_t to int in PrintFs.

TBR=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10602 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-03 14:30:48 +00:00
vegorov@chromium.org
a7b0481b6d Tweak compaction candidate selection to avoid keeping page with low occupancy around.
Increase slots buffer chain length to 15 to make compaction more aggressive and usefull.

Pass gc and collector selection reasons to GCTracer to allow more meaningull --gc-trace.

Print fragmentation of spaces that we do not compact.

R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10601 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-03 14:16:40 +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
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
mstarzinger@chromium.org
8c12b6b743 Implement target cache for constructor calls.
This caches call targets of constructor calls by associating one element
caches with call sites. The type feedback oracle can use the recorded
valued to gather type information for monomorphic constructor call sites.

R=kmillikin@chromium.org,vegorov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10531 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-27 13:03:19 +00:00
svenpanne@chromium.org
a538072a08 By popular demand: Slightly more honest typing in ClearNonLiveMapTransitions
Review URL: https://chromiumcodereview.appspot.com/9290049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10526 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-27 09:34:05 +00:00
vegorov@chromium.org
67d72eab45 When preparing heap for breakpoints make sure not to flush away non-optimized code for inlined functions.
Debug::PrepareForBreakPoints was not fully populating active_functions list.

R=erik.corry@gmail.com
TEST=test/mjsunit/regress/regress-debug-code-recompilation.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10503 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-25 15:11:59 +00:00
svenpanne@chromium.org
7719981078 Refactoring only: Extracted 2 methods from ClearNonLiveTransitions
This simple refactoring makes it very clear that clearing non-live transitions
actually consists of 2 quite separate things. Things would even be nicer if the
prototype transitions were represented by a separate data structure instead of
reusing FixedArray in an interesting way once again.

As an additional bonus, this CL makes it possible to read each of the methods in
question on a 30" screen without scrolling!

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10501 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-25 14:22:59 +00:00
svenpanne@chromium.org
6859247172 Do not follow accessor map transitions when marking descriptor arrays.
Note that we currently have no such transitions, but we will in the future, and
we have to avoid keeping maps live too long.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10495 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-25 08:50:55 +00:00
mstarzinger@chromium.org
dffb78e312 Fix missing write-barrier for prototype transitions.
R=vegorov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10451 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-19 18:50:01 +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
erik.corry@gmail.com
504ef4f243 Robustify the clearing of the cache of map-related ICs on the map.
Review URL: https://chromiumcodereview.appspot.com/9159009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10438 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-19 13:22:16 +00:00
jkummerow@chromium.org
3a4bed8a7e Only clear monomorphic ICs on GC after Context exit
Review URL: https://chromiumcodereview.appspot.com/9255014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-18 16:16:11 +00:00
vegorov@chromium.org
3fd6ba109e When adjusting page's live bytes counter from the mutator adjust owners unswept free bytes counter.
R=mstarzinger@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-18 09:21:07 +00:00
mstarzinger@chromium.org
f3045d3802 Fix corner-case in heap size estimation.
Empty but unswept pages could cause the unswept_free_bytes counter to
to be off in case heap gets shrunk and page gets released before it was
swept properly.

R=vegorov@chromium.org
BUG=v8:1893

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10421 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-17 14:09:12 +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
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
erik.corry@gmail.com
70da367f6b More spelling changes.
Review URL: http://codereview.chromium.org/9231009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-16 12:38:59 +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
aae1d6c6d4 Do not delay sweeping of pages that are completely free.
R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-19 11:33:54 +00:00
ricow@chromium.org
ec66c36fbf Reland 10216 - Optimize the equality check case of ICCompare stubs.
Now with arm and x64 support. Additionally, added default unreachable case to switch statement in CompareIC::TargetState to make win and mac compilers happy.

Reviewer guide:
This is an exact copy of 10216 except:
src/arm/*
src/x64/*
src/ic.cc (added default case to swith in CompareIC::TargetState)
Review URL: http://codereview.chromium.org/8872060

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10219 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-09 09:26:14 +00:00
ricow@chromium.org
174532d23f Revert 10216 Optimize the equality check case of ICCompare stubs.
Missing arm and x64 implementations
Review URL: http://codereview.chromium.org/8883023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-08 17:28:44 +00:00
ricow@chromium.org
1028cf2631 Optimize the equality check case of ICCompare stubs.
This includes specialcasing the generation when we know that the maps
of the two objects are the same. In addition, a new specialized
compare ic known objects cache is created.

The reason for the cache is that we need to have access to the stub
code from the roots; if we do not, the GC will collect the stub. In
this specialized case we use the map pointer as key in the cache, and
we always do a lookup before generating code. Actually hitting
something in the cache will happen very rarely, but we could
potentially overwrite an existing stub, which again will lead to the
GC collecting this old stub (even if it is referenced from other code
objects)
Review URL: http://codereview.chromium.org/8520006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10216 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-08 17:17:21 +00:00
vegorov@chromium.org
a457040ca6 Ensure that non-optimized code objects are not flushed for inlined functions.
Collector was flushing them if optimized code was reachable only through the stack (not through the JSFunction object) which happens when you have a pending lazy deoptimization.

Also prevent v8::Script::New from leaking internal objects allocated by the compiler into outer HandleScope.

R=kmillikin@chromium.org
BUG=http://crbug.com/97116
TEST=test/mjsunit/regress/regress-97116.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-08 16:07:07 +00:00
erik.corry@gmail.com
a8bd2260ea Rescan cells at the end of mark-sweep. This means they don't need a
write barrier.
Review URL: http://codereview.chromium.org/8816021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10187 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-07 08:43:41 +00:00
erik.corry@gmail.com
49a4dd983d Fix performance on the page cycler, which is not designed to test
GC speed.
Review URL: http://codereview.chromium.org/8804004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-05 08:58:12 +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
erik.corry@gmail.com
e9b6e58560 Fix windows build.
Review URL: http://codereview.chromium.org/8725029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10086 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-29 12:17:59 +00:00
erik.corry@gmail.com
9c18742dd6 Only sweep one page eagerly unless we are running out of space.
Limit the number of pages that are compacted in a given GC.
Review URL: http://codereview.chromium.org/8692002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10084 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-29 11:56:14 +00:00
mstarzinger@chromium.org
e3eb71e991 Fix assertion while marking Harmony weak maps.
R=erik.corry@gmail.com
BUG=v8:1845
TEST=mjsunit/harmony/proxies-example-membrane

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-29 08:48:51 +00:00
ulan@chromium.org
e951d38261 Set the code age field of SharedFunctionInfo correctly.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10046 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-22 19:46:00 +00:00
mstarzinger@chromium.org
5834284848 Refactor embedded pointer visitors for the serializer
This patch continues the refactoring that started in r9597 and
extends it with support for the serializer.
This is required for MIPS support in the serializer.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9971 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-11 12:28:42 +00:00
vegorov@chromium.org
b8dc77ab9a Fix Heap::Shrink to ensure that it does not free pages that are still in use.
Heap::Shrink is called from EnsureFromSpaceIsCommitted at the very start of the GC. At this moment live bytes counts on pages are in inconsistent states. Some pages might have been already swept but have not been yet reached by an incremental marker (or incremental marker is not in progress) and have live bytes count set to 0. Thus we can't rely only on LiveBytes to determine which pages can be released to the OS.

R=mstarzinger@chromium.org
BUG=100414

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9953 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 13:24:00 +00:00
svenpanne@chromium.org
b16e02e823 Made PropertyType handling even more explicit.
Replaced FIRST_PHANTOM_PROPERTY_TYPE by a predicate. Removed the (hopefully)
last default cases for switches on PropertyType. Benchmarks show that both
changes are performace-neutral.

Now every value of PropertyType should either be handled by an explicit case in
a switch or by an equality operator. Therefore, the C++ compiler should finally
be able to tell us which places to touch when changing PropertyType.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9930 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 12:47:15 +00:00
mstarzinger@chromium.org
79cadcc947 Fix Harmony sets and maps to allow null as key.
This changes the internal convention for marking deleted entries in hash
tables from null_value to the_hole_value, which is consistent with other
usages of the_hole.

R=rossberg@chromium.org,kmillikin@chromium.org
BUG=v8:1622
TEST=mjsunit/harmony/collections

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9871 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 14:17:05 +00:00
erik.corry@gmail.com
b8af27868f Speed up debug mode GC.
Review URL: http://codereview.chromium.org/8380038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9772 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 12:13:06 +00:00
vegorov@chromium.org
5d72dde98a Switch UnreachableObjectsFilter to use Marking instead of InstrusiveMarking.
GcSafeFindCodeForInnerPointer does not work with intrusive marking now and it is used when roots are iterated.

R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9721 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 11:40:16 +00:00
mstarzinger@chromium.org
1da890af54 Refactor how embedded pointers are visited.
This refactoring (almost) gets rid of the requirement to get the target
object address for an object pointer embedded in code objects. This is
not possible on MIPS as pointers are encoded using two instructions. All
usages of RelocInfo::target_object_address() are (almost) obsoleted by
this change. The serializer still uses it, so MIPS will not yet work
with snapshots turned on.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-12 15:43:41 +00:00
erik.corry@gmail.com
3ce33aacc6 New flag --stress-compaction
Review URL: http://codereview.chromium.org/8234002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9582 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-11 15:52:15 +00:00
erik.corry@gmail.com
ba8a7f374e Add --noclever-optimizations to disable some things that have
caused trouble in the past.
Review URL: http://codereview.chromium.org/8229005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-11 11:35:04 +00:00
vegorov@chromium.org
7e1c2d9d1e Keep MemoryChunk::LiveBytes in sync when marking deque overflows.
R=erik.corry@gmail.com
BUG=v8:1672

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9525 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-05 09:42:20 +00:00
vegorov@chromium.org
71519ee4b2 Fix presubmit error in mark-compact.cc
TBR=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9496 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-30 11:09:31 +00:00
vegorov@chromium.org
807ae24307 Adjust assertions in UpdateSlot to match UpdatePointer in PointersUpdatingVisitor.
R=erik.corry@gmail.com
BUG=v8:1740

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-30 08:45:28 +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
mstarzinger@chromium.org
279356b4b3 Implement shrinking of paged spaces during sweeping.
For each paged space we release all but one of the unused pages after
marking (when we know the number of live bytes) but before actually
sweeping it. This is not yet done for lazy swept pages.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-29 12:27:31 +00:00
vegorov@chromium.org
36ae5f3811 Pass correct anchor_slot for EMBEDDED_OBJECT pointers from code objects.
Correctly initialize newly created large-object pages when incremental marking with compaction is in progress.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9475 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 17:45:58 +00:00
vegorov@chromium.org
39512e148d EvacuateNewSpaceAndCandidates should explicitly skip dead large objects.
LargeObjectSpace is swept at the very end of SweepSpaces.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9460 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 10:45:27 +00:00
mstarzinger@chromium.org
a79d439586 Fix slot buffers of abandoned evacuation candidates.
R=vegorov@chromium.org
BUG=v8:1734
TEST=cctest/test-mark-compact/NoPromotion

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9454 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-27 13:35:04 +00:00
kmillikin@chromium.org
bcb781d76a Record function call targets, use them for inlining.
Introduce a version of the CallFunctionStub that records monomorphic
call targets in a one-element cache in the instruction stream.  Use
the cache for inlining attempts in the optimizing backend.

R=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9449 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-27 11:42:02 +00:00
mstarzinger@chromium.org
e7da8b3eeb Pass sweeping mode as template parameter.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9440 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-27 07:52:34 +00:00
mikhail.naganov@gmail.com
b5946d78c5 Add ObjectMoveEvent reporting for the Heap Profiler into MarkCompact.
R=vegorov@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9432 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 15:59:27 +00:00
vegorov@chromium.org
6dee868e03 Enable compaction, disable code-compaction.
Enable array-join test again.

R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9425 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 11:46:16 +00:00
vegorov@chromium.org
a0f07e5db1 Fix bug in PointersUpdatingVisitor::UpdatePointer.
It was updating the same pointer twice (was using InNewSpace instead of
InFromSpace).

Also make FLAG_never_compact supercede FLAG_always_compact.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9423 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 10:24:42 +00:00
vegorov@chromium.org
1046b1a464 Disable compaction.
Introduce flag to control code compaction.

R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9420 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 08:53:27 +00:00
danno@chromium.org
d21902b25e Cache multiple ElementsKind map transition per map.
R=jkummerow@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-23 15:09:00 +00:00
mstarzinger@chromium.org
ec587f8a11 Implement verification of new space evacuation.
R=vegorov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9408 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-23 07:30:57 +00:00
vegorov@chromium.org
bfd048173f Notify collector about lazily deoptimized code objects.
All slots that were recorded on these objects during incremental marking should be ignored as they are no longer valid.

To filter such invalidated slots out during slots buffers iteration we set all markbits under the invalidated code object to 1 after the code space was swept and before slots buffers are processed.

R=erik.corry@gmail.com
BUG=v8:1713
TEST=test/mjsunit/regress/regress-1713.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9402 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 16:01:35 +00:00
mstarzinger@chromium.org
873e4980db Fix transferal of marking bits on array trimming.
R=vegorov@chromium.org
BUG=v8:1708
TEST=mjsunit/regress/regress-1708

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9394 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 13:03:22 +00:00
rossberg@chromium.org
fdade92c20 Reorganize object type enum, such that proxies are no longer in the middle
of the range of proper JS objects.

Unfortunately, callable types no longer form a range now. However, there
are only two anyway. We put them at either end of the range of JS object
types so that certain compares can be combined.

R=erik.corry@gmail.com,kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9370 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 14:46:54 +00:00
vegorov@chromium.org
5b8a6c1e54 Make heap iterable in PrepareForBreakPoints.
When aborting incremental marking with compaction discard all slots collected on evacuation candidates.

R=ricow@chromium.org
BUG=v8:1700
TEST=inspector/debugger/debugger-step-in.html

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9360 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 11:20:05 +00:00
lrn@chromium.org
610281f4ee Fix calculation of live-bytes in pages.
The "live bytes" count is *really* a "marked black" count - i.e., the count of bytes *known* to be live.

Fix aggravating bug on X64 where assembler code used a value that was off
by a factor of 2^31.

Ensure that sweeping clears live-bytes. Added other missing increments.

Added print statements to trace live-byte modifications, under a flag.

Still a few cases of undercounting left.

(New issue to merge from GC branch to bleeding_edge)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9338 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 11:20:00 +00:00
erik.corry@gmail.com
2f1f203bff Fix pc to code cache so it can cope with a pointer to the start of the code
object.  Rename it to be the inner pointer to code cache.
Review URL: http://codereview.chromium.org/7969013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9336 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 10:08:39 +00:00
svenpanne@chromium.org
d4bb00230b Make newer GCCs happier: Fixed NULL vs. 0 confusion.
Review URL: http://codereview.chromium.org/7970008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9333 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 09:43:58 +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
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
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
ricow@chromium.org
907065c1ae Fix presubmit
Review URL: http://codereview.chromium.org/7354021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8636 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 13:29:10 +00:00
vegorov@chromium.org
67709e5355 Fix bug in prototype transitions cache clearing introduced by r8165.
Invalid loop nesting causes full cleanup of the prototype transitions cache on every GC.

R=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8634 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 13:16:00 +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
ricow@chromium.org
0f682143d9 Introduce code flushing of RegExp code.
Due to issues relating mostly to chrome extensions we have lately been
running into OOMs that are caused by our executable space running
out. This change introduces flushing of code from regexps if we have
not used the code for 5 mark sweeps.

The approach is different from the normal function code flusing. Here
we make a copy of the code inside the data array, and exchange the
original code with a smi determined by the sweep_generation (a new
heap variable increased everytime we do mark sweep/compact). If we
encounter a smi in EnsureCompiled we simply reinstate the code
object. If, in the marking phase of mark sweep, we find a regexp that
already have a smi in the code field, and this is more than 5
generations old we flush the code from the saved index.
Review URL: http://codereview.chromium.org/7282026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8532 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-05 06:19:53 +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
karlklose@chromium.org
cc19d1e278 Revert "Merge arguments branch to bleeding merge."
This reverts commit ceb31498b9d69edca3260820fb4047045891ce6d.

TBR=kmillikin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8308 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-16 06:37:49 +00:00
karlklose@chromium.org
6cfeb2d400 Merge arguments branch to bleeding merge.
Review URL: http://codereview.chromium.org/7167006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 15:09:28 +00:00
ager@chromium.org
ef7b56bf3e Remove unused methods.
Do not force set DEBUG.

R=kasperl@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8287 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 06:51:22 +00:00
kmillikin@chromium.org
371af773cf A collection of context-related refactoring changes.
Introduce separate maps for function and with contexts.  Use the function
context map for testing whether a context is a function context (global
contexts are no longer function contexts).

Split the paths for allocating with and catch contexts.

Rename some functions.  Generally refactor code to make it simpler.

R=ager@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 11:26:01 +00:00
danno@chromium.org
4de3bb500c Implement core support for FixedDoubleArrays.
Under a flag without IC or Crankshaft support.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8229 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 10:03:35 +00:00
mikhail.naganov@gmail.com
3b2470d296 Fix presubmit errors catched by a more recent version of cpplint.py.
Mainly, there were errors concerning blank lines before and after class access
control sections [whitespace/blank_line].

BEFORE an access control section (e.g. public:, private:) there should be a
blank line (except for the section right after the class declaration).

AFTER an access control section there should be no blank line.

TBR=ager@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8193 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-07 07:17:46 +00:00
erik.corry@gmail.com
0023cacc22 Fix traversal of the map transition tree to take the prototype
transitions into account.
Review URL: http://codereview.chromium.org/7074052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-03 14:48:09 +00:00
rossberg@chromium.org
670f947a5c Implement set trap for proxies, and revamp class hierarchy in preparation:
- Introduce a class JSReceiver, that is a common superclass of JSObject and
  JSProxy. Use JSReceiver where appropriate (probably lots of places that we
  still have to migrate, but we will find those later with proxy test suite).

- Move appropriate methods to JSReceiver class (SetProperty,
  GetPropertyAttribute, Get/SetPrototype, Lookup, and so on).

- Introduce new JSFunctionProxy subclass of JSProxy. Currently only a stub.

- Overhaul enum InstanceType:
  * Introduce FIRST/LAST_SPEC_OBJECT_TYPE that ranges over all types that
    represent JS objects, and use that consistently to check language types.
  * Rename FIRST/LAST_JS_OBJECT_TYPE and FIRST/LAST_FUNCTION_CLASS_TYPE
    to FIRST/LAST_[NON]CALLABLE_SPEC_OBJECT_TYPE for clarity.
  * Eliminate the overlap over JS_REGEXP_TYPE.
  * Also replace FIRST_JS_OBJECT with FIRST_JS_RECEIVER, but only use it where
    we exclusively talk about the internal representation type.
  * Insert JS_PROXY and JS_FUNCTION_PROXY in the appropriate places.

- Fix all checks concerning classification, especially for functions, to
  use the CALLABLE_SPEC_OBJECT range (that includes funciton proxies).

- Handle proxies in SetProperty (that was the easiest part :) ).

- A few simple test cases.

R=kmillikin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8126 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 16:38:40 +00:00
vegorov@chromium.org
65e406ed0d Add a comment about map collection into MarkCompactCollector::MarkUnmarkedObject.
Review URL: http://codereview.chromium.org/6992059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-25 10:49:48 +00:00
danno@chromium.org
70d5e6d582 Add bit_field3 to Map objects
Reuse instance_descriptor field in the map to store additional flags when there are no descriptors. When descriptors get added to the map, move the flags to the DescriptorArray and access through indirection.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8001 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 15:59:38 +00:00