v8/test/cctest
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
..
cctest.cc Reverting 3174. Aka reapplying 3150, 3151 and 3159. Aka api accessor 2009-11-04 08:51:48 +00:00
cctest.gyp MIPS: Rename "mips" arch to "mipsel" in the GYP build. 2012-07-11 15:15:04 +00:00
cctest.h Cosmetic changes ("set up" is a verb, "setup" is a noun). 2012-01-13 13:09:52 +00:00
cctest.status Enable/disable LiveEdit using the (C++) debug API. 2012-09-10 09:24:17 +00:00
gay-fixed.cc Dtoa for fixed notation. 2010-05-05 13:51:27 +00:00
gay-fixed.h Dtoa for fixed notation. 2010-05-05 13:51:27 +00:00
gay-precision.cc Added precision mode to fast-dtoa. 2010-09-20 09:18:00 +00:00
gay-precision.h Added precision mode to fast-dtoa. 2010-09-20 09:18:00 +00:00
gay-shortest.cc Dtoa for fixed notation. 2010-05-05 13:51:27 +00:00
gay-shortest.h Dtoa for fixed notation. 2010-05-05 13:51:27 +00:00
log-eq-of-logging-and-traversal.js Eliminate the need for code delete events in CPU profiler. 2011-09-14 11:47:03 +00:00
SConscript Implement date library functions in C++. 2012-03-09 12:07:29 +00:00
test-accessors.cc Add isolate accessor to AccessorInfo and Arguments. 2012-04-13 09:38:00 +00:00
test-alloc.cc Swapped transition array and descriptor array. 2012-08-13 08:43:16 +00:00
test-api.cc Introduce new API to expose external string resource regardless of encoding. 2012-09-12 11:29:50 +00:00
test-assembler-arm.cc Relax requirement from VFP3 to VFP2 where possible. 2012-07-25 15:26:16 +00:00
test-assembler-ia32.cc Support multi-byte nop instructions as recommended by 2011-12-02 10:01:50 +00:00
test-assembler-mips.cc MIPS: Added support for Loongson architectures. 2012-03-13 16:18:30 +00:00
test-assembler-x64.cc Cosmetic changes ("set up" is a verb, "setup" is a noun). 2012-01-13 13:09:52 +00:00
test-ast.cc One Zone per CompilationInfo. 2012-06-20 08:58:41 +00:00
test-bignum-dtoa.cc Fix X64 compilation on Windows. 2011-02-03 11:13:04 +00:00
test-bignum.cc Bignum implementation of Strtod. 2010-11-08 11:49:47 +00:00
test-circular-queue.cc Pick the namespace alias 'i' from v8.h. 2011-08-12 09:49:55 +00:00
test-compiler.cc Index script compilation cache over context, too, 2012-08-28 10:49:23 +00:00
test-conversions.cc Cleanup of ScannerConstants, now named UnicodeCache. 2011-04-12 08:27:38 +00:00
test-cpu-profiler.cc Cosmetic changes ("set up" is a verb, "setup" is a noun). 2012-01-13 13:09:52 +00:00
test-dataflow.cc One Zone per CompilationInfo. 2012-06-20 08:58:41 +00:00
test-date.cc Implement date library functions in C++. 2012-03-09 12:07:29 +00:00
test-debug.cc Enable/disable LiveEdit using the (C++) debug API. 2012-09-10 09:24:17 +00:00
test-decls.cc Allocate block-scoped global bindings to global context. 2012-08-28 11:25:08 +00:00
test-deoptimization.cc Add kAbortIncrementalMarkingMask flag for GC. 2012-03-07 17:52:16 +00:00
test-dictionary.cc Limit initial size of hidden properties and store identity hashes inline. 2012-07-30 13:09:09 +00:00
test-disasm-arm.cc Martyn Capewell <m.m.capewell@googlemail.com> 2012-06-12 17:26:28 +00:00
test-disasm-ia32.cc Support multi-byte nop instructions as recommended by 2011-12-02 10:01:50 +00:00
test-disasm-mips.cc MIPS: Added support for Loongson architectures. 2012-03-13 16:18:30 +00:00
test-disasm-x64.cc Fix MinGW-w64 GCC 4.7 compilation 2012-04-17 14:53:06 +00:00
test-diy-fp.cc Rename files containing underscores. 2010-03-19 12:15:24 +00:00
test-double.cc Remove unused IsNan function 2012-04-23 13:44:06 +00:00
test-dtoa.cc Fix compilation on 64-bit Windows, update Visual Studio projects. 2011-02-03 13:29:10 +00:00
test-fast-dtoa.cc Fix X64 Windows compilation. 2011-02-03 15:14:46 +00:00
test-fixed-dtoa.cc Dtoa for fixed notation. 2010-05-05 13:51:27 +00:00
test-flags.cc Ensure removing processed command line arguments. 2012-06-13 15:02:05 +00:00
test-func-name-inference.cc Fix FindSharedFunctionInfoInScript to not optimize. 2012-09-03 14:23:00 +00:00
test-hashing.cc Minor cleanups of numeric seeded hashing patch. 2012-01-10 13:24:18 +00:00
test-hashmap.cc Make the hash map test run faster by doing less work. 2009-05-15 13:49:00 +00:00
test-heap-profiler.cc Sharing of descriptor arrays. 2012-09-12 16:43:57 +00:00
test-heap.cc Release stack trace data after firing Error.stack accessor. 2012-08-29 07:51:48 +00:00
test-list.cc Progress towards making Zones independent of Isolates and Threads. 2012-06-04 14:42:58 +00:00
test-liveedit.cc One Zone per CompilationInfo. 2012-06-20 08:58:41 +00:00
test-lock.cc Stop running some liveedit tests (see issue 915). 2010-10-29 07:10:14 +00:00
test-lockers.cc MIPS: Reduced the number of threads in cctest test-lockers. 2011-11-23 08:36:03 +00:00
test-log-stack-tracer.cc When running with --always-opt, don't deoptimize named loads with uninitialized type feedback. 2012-03-21 09:23:09 +00:00
test-log.cc Merge experimental/gc branch to the bleeding_edge. 2011-09-19 18:36:47 +00:00
test-macro-assembler-x64.cc Fix non-ia32 build. 2011-04-01 15:37:59 +00:00
test-mark-compact.cc Rename Context::global to Context::global_object, 2012-08-17 12:59:00 +00:00
test-parsing.cc Remove obsolete ParserApi::PartialPreParse method. 2012-07-17 11:31:05 +00:00
test-platform-linux.cc Add OS::GetCurrentProcessId and prepend output from trace-gc with the current pid 2012-07-10 12:52:36 +00:00
test-platform-macos.cc Changed copyright header from google inc. to v8 project authors. 2008-09-09 20:08:45 +00:00
test-platform-nullos.cc Changed copyright header from google inc. to v8 project authors. 2008-09-09 20:08:45 +00:00
test-platform-tls.cc "Deiceolate" Thread classes. 2011-06-10 09:54:04 +00:00
test-platform-win32.cc Add OS::GetCurrentProcessId and prepend output from trace-gc with the current pid 2012-07-10 12:52:36 +00:00
test-profile-generator.cc Merge experimental/gc branch to the bleeding_edge. 2011-09-19 18:36:47 +00:00
test-random.cc Rename Context::global to Context::global_object, 2012-08-17 12:59:00 +00:00
test-regexp.cc Reland regexp global optimizations. 2012-08-28 09:37:41 +00:00
test-reloc-info.cc Merge experimental/gc branch to the bleeding_edge. 2011-09-19 18:36:47 +00:00
test-serialize.cc Rename Context::global to Context::global_object, 2012-08-17 12:59:00 +00:00
test-sockets.cc Cosmetic changes ("set up" is a verb, "setup" is a noun). 2012-01-13 13:09:52 +00:00
test-spaces.cc Reduce initial boot-up memory use. This is an other attempt at what 2012-04-02 08:32:31 +00:00
test-strings.cc Fix edge case of extension with NULL as source string. 2012-09-11 14:16:56 +00:00
test-strtod.cc Revert r10913. 2012-03-05 07:55:27 +00:00
test-thread-termination.cc Fix race condition in test-thread-termination. 2012-04-03 10:15:12 +00:00
test-threads.cc Fixing test case from r9469. 2011-09-28 14:26:23 +00:00
test-unbound-queue.cc Pick the namespace alias 'i' from v8.h. 2011-08-12 09:49:55 +00:00
test-utils.cc Fix build errors. 2012-07-30 08:54:51 +00:00
test-version.cc Update V8 to version 3.0 (re-land r5920). 2010-12-07 11:31:57 +00:00
test-weakmaps.cc Fix issues when stressing compaction with WeakMaps. 2012-04-19 10:32:38 +00:00
testcfg.py Add Makefile targets for running tests on Android. 2012-07-03 07:45:58 +00:00