Go to file
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
benchmarks More fixes for V8 benchmark version 7. 2012-03-15 17:13:50 +00:00
build Fix gyp_v8 to work with use_system_icu=1 2013-07-15 15:41:21 +00:00
include Add map transition for observed objects 2013-07-13 00:20:40 +00:00
preparser Factor out toolset definitions in a separate gypi file 2013-07-10 11:15:16 +00:00
samples Only depend on icudata on windows. 2013-07-11 11:01:00 +00:00
src [Object.observe] Lazily allocate callbackInfo structure 2013-07-15 22:16:30 +00:00
test [Object.observe] Lazily allocate callbackInfo structure 2013-07-15 22:16:30 +00:00
tools Turn propagate deoptimizing mark into a proper HPhase. 2013-07-15 09:53:00 +00:00
.gitignore Migrate blink tests that are not relevant to blink into a new V8 test suite called 'blink'. 2013-06-26 14:23:30 +00:00
AUTHORS Add methods to allow resuming execution after calling TerminateExecution(). 2013-04-22 15:01:45 +00:00
ChangeLog Prepare push to trunk. Now working on version 3.20.6. 2013-07-15 08:00:10 +00:00
DEPS Roll ICU to 210659 2013-07-11 11:34:46 +00:00
LICENSE Update LICENSE file 2012-01-03 16:38:42 +00:00
LICENSE.strongtalk Add LICENSE.v8, LICENSE.strongtalk and LICENSE.valgrind to the v8 2011-02-03 07:10:06 +00:00
LICENSE.v8 Add LICENSE.v8, LICENSE.strongtalk and LICENSE.valgrind to the v8 2011-02-03 07:10:06 +00:00
LICENSE.valgrind Add LICENSE.v8, LICENSE.strongtalk and LICENSE.valgrind to the v8 2011-02-03 07:10:06 +00:00
Makefile Make optimizations for debug configurable with compile flag. 2013-07-15 16:33:06 +00:00
Makefile.android Fix gyp_v8 to work with use_system_icu=1 2013-07-15 15:41:21 +00:00
Makefile.nacl Fix gyp_v8 to work with use_system_icu=1 2013-07-15 15:41:21 +00:00
OWNERS Add myself to OWNERS. 2013-06-27 11:37:47 +00:00
PRESUBMIT.py Keep two empty lines between declarations for cpp files 2013-07-05 09:52:11 +00:00