v8/test/cctest
adamk@chromium.org fab9f4e126 [Object.observe] Lazily allocate callbackInfo structure
This patch allows callbacks to lazily allocate the InternalArray which is used to store pendingChangeRecords. This moves some of the expense of observation to the case where changes actually occurred.

When there are no pendingChangeRecords, the callbackInfo structure is a number which is the callbacks priority. Whenever a changeRecord is enqueued to the callback, it "normalizes" to be an InternalArray with a priority property. Immediately before its changeRecords are delivered, it returns to its optimized state.

---
Note: Naming confusion resolved:

This patch corrects some naming confusion in object-observe.js. Previously, we used the terms "callback" and "observer" to mean roughly the same thing, and overloaded the term "observer" to be both the callback itself and the *registration* on a object to observe (which now includes an accept map).

This patch resolves this confusion:

"object" (objectInfo, objectInfoMap): This refers to the observed object and its structures

"callback" (callbackInfo, callbackInfoMap): This refers to the callback to whom change records may be delivered

"observer" (objectInfo.changeObservers): This refers to a registration to observe a given object by a given callback with the specified accept list.
---

R=rossberg@chromium.org

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

Patch from Rafael Weinstein <rafaelw@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15682 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-15 22:16:30 +00:00
..
cctest.cc Change ArrayBuffer API and implementation to use embedder-provided allocator. 2013-06-11 10:41:14 +00:00
cctest.gyp Implement truncated d-to-i as a stub on x86 2013-07-12 12:28:32 +00:00
cctest.h remove most uses of raw handle constructors 2013-06-13 09:27:09 +00:00
cctest.status MIPS: Skip cctest/test-serialize tests. 2013-07-04 18:47:13 +00:00
gay-fixed.cc
gay-fixed.h
gay-precision.cc
gay-precision.h
gay-shortest.cc
gay-shortest.h
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
test-accessors.cc Keep two empty lines between declarations for cpp files 2013-07-05 09:52:11 +00:00
test-alloc.cc Deprecate FACTORY helper macro. 2013-06-04 10:30:05 +00:00
test-api.cc Use internal array as API function cache. 2013-07-15 11:41:41 +00:00
test-assembler-arm.cc ARM: Implement memcpy using NEON. 2013-07-10 15:32:39 +00:00
test-assembler-ia32.cc Keep two empty lines between declarations for cpp files 2013-07-05 09:52:11 +00:00
test-assembler-mips.cc MIPS: Fix cctest/test-assembler-mips on MIPS32R1 architecture. 2013-06-19 17:15:21 +00:00
test-assembler-x64.cc Keep two empty lines between declarations for cpp files 2013-07-05 09:52:11 +00:00
test-ast.cc Get rid of ZoneScope completely. 2013-06-26 13:36:16 +00:00
test-bignum-dtoa.cc
test-bignum.cc
test-circular-queue.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-code-stubs-ia32.cc Fix windows build breakage due to 15645 2013-07-12 13:45:41 +00:00
test-compiler.cc Fixed more gc stress builder tests. 2013-06-25 11:16:13 +00:00
test-conversions.cc Keep two empty lines between declarations for cpp files 2013-07-05 09:52:11 +00:00
test-cpu-profiler.cc Improve test-cpu-profiler.cc tests stability 2013-07-10 12:56:58 +00:00
test-dataflow.cc Get rid of ZoneScope completely. 2013-06-26 13:36:16 +00:00
test-date.cc Keep two empty lines between declarations for cpp files 2013-07-05 09:52:11 +00:00
test-debug.cc Make cctest/test-debug pass with extensions installed 2013-07-05 13:33:20 +00:00
test-declarative-accessors.cc remove most uses of raw handle constructors 2013-06-13 09:27:09 +00:00
test-decls.cc remove all old style callbacks - patch 3 2013-06-20 12:28:27 +00:00
test-deoptimization.cc stop using AsciiValue 2013-05-13 14:18:05 +00:00
test-dictionary.cc Disable stress_compaction flag in several GC tests to meet test 2013-06-19 08:58:09 +00:00
test-disasm-arm.cc ARM: Implement memcpy using NEON. 2013-07-10 15:32:39 +00:00
test-disasm-ia32.cc Deprecate FACTORY helper macro. 2013-06-04 10:30:05 +00:00
test-disasm-mips.cc Unify the way cctest initalizes the VM for each test case. 2013-04-10 08:29:39 +00:00
test-disasm-x64.cc Unify the way cctest initalizes the VM for each test case. 2013-04-10 08:29:39 +00:00
test-diy-fp.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-double.cc Keep two empty lines between declarations for cpp files 2013-07-05 09:52:11 +00:00
test-dtoa.cc
test-fast-dtoa.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-fixed-dtoa.cc
test-flags.cc Ensure removing processed command line arguments. 2012-06-13 15:02:05 +00:00
test-func-name-inference.cc Deprecate FACTORY helper macro. 2013-06-04 10:30:05 +00:00
test-global-handles.cc New GC APIs, try 2. 2013-04-24 15:59:23 +00:00
test-global-object.cc remove most uses of raw handle constructors 2013-06-13 09:27:09 +00:00
test-hashing.cc Clean up the usage of V8_TARGET_ARCH_${arch} and V8_HOST_ARCH_${arch} 2013-06-28 15:34:48 +00:00
test-hashmap.cc
test-heap-profiler.cc HeapProfiler: check that heap snapshot has no unretained entries except root. 2013-07-10 12:40:42 +00:00
test-heap.cc Reland deprecation of HAllocateObject in favor of HAllocate. 2013-07-15 15:12:16 +00:00
test-list.cc Keep two empty lines between declarations for cpp files 2013-07-05 09:52:11 +00:00
test-liveedit.cc Get rid of ZoneScope completely. 2013-06-26 13:36:16 +00:00
test-lock.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-lockers.cc Keep two empty lines between declarations for cpp files 2013-07-05 09:52:11 +00:00
test-log-stack-tracer.cc Keep two empty lines between declarations for cpp files 2013-07-05 09:52:11 +00:00
test-log.cc Keep two empty lines between declarations for cpp files 2013-07-05 09:52:11 +00:00
test-macro-assembler-x64.cc Keep two empty lines between declarations for cpp files 2013-07-05 09:52:11 +00:00
test-mark-compact.cc Update limits in test-mark-compact 2013-07-05 12:24:30 +00:00
test-object-observe.cc [Object.observe] Lazily allocate callbackInfo structure 2013-07-15 22:16:30 +00:00
test-parsing.cc Keep two empty lines between declarations for cpp files 2013-07-05 09:52:11 +00:00
test-platform-linux.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-platform-macos.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-platform-nullos.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-platform-tls.cc Keep two empty lines between declarations for cpp files 2013-07-05 09:52:11 +00:00
test-platform-win32.cc Make gyp work with MingW32 2013-04-15 08:33:31 +00:00
test-platform.cc Keep two empty lines between declarations for cpp files 2013-07-05 09:52:11 +00:00
test-profile-generator.cc CPUProfiler: Improve line numbers support in profiler. 2013-07-07 11:42:30 +00:00
test-random.cc Deprecate FACTORY helper macro. 2013-06-04 10:30:05 +00:00
test-regexp.cc Keep two empty lines between declarations for cpp files 2013-07-05 09:52:11 +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 Remove unused counters 2013-06-19 16:50:38 +00:00
test-sockets.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-spaces.cc Use MemoryChunk-based allocation for deoptimization entry code 2013-01-29 09:09:55 +00:00
test-strings.cc Get rid of ZoneScope completely. 2013-06-26 13:36:16 +00:00
test-strtod.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-symbols.cc remove most V8_ALLOW_ACCESS_TO_* defines from test classes 2013-05-28 11:54:52 +00:00
test-thread-termination.cc Keep two empty lines between declarations for cpp files 2013-07-05 09:52:11 +00:00
test-threads.cc Keep two empty lines between declarations for cpp files 2013-07-05 09:52:11 +00:00
test-types.cc Keep two empty lines between declarations for cpp files 2013-07-05 09:52:11 +00:00
test-unbound-queue.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-utils.cc Replace OS::MemCopy with OS::MemMove (just as fast but more flexible). 2013-04-16 12:30:51 +00:00
test-version.cc
test-weakmaps.cc remove old MakeWeak 2013-06-03 08:17:04 +00:00
test-weaktypedarrays.cc API for DataView. 2013-06-24 11:23:50 +00:00
testcfg.py Remove SCons related files 2013-04-18 11:01:14 +00:00