- 12 Feb, 2014 1 commit
-
-
rafaelw@chromium.org authored
This patch generalizes Object.observe callbacks and promise resolution into a FIFO queue called a "microtask queue". It also exposes new V8 API which exposes the microtask queue to the embedder. In particular, it allows the embedder to -schedule a microtask (EnqueueExternalMicrotask) -run the microtask queue (RunMicrotasks) -control whether the microtask queue is run automatically within V8 when the last script exits (SetAutorunMicrotasks). R=dcarney@chromium.org, rossberg@chromium.org, dcarney, rossberg, svenpanne BUG= Review URL: https://codereview.chromium.org/154283002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 07 Feb, 2014 1 commit
-
-
rafaelw@chromium.org authored
TBR=adamk,rossberg BUG= Review URL: https://codereview.chromium.org/150103012 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19176 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 04 Feb, 2014 1 commit
-
-
rafaelw@chromium.org authored
R=rossberg@chromium.org, rossberg BUG= Review URL: https://codereview.chromium.org/131413008 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19084 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 08 Jan, 2014 1 commit
-
-
rafaelw@chromium.org authored
This patch includes the follow two minor optimizations: 1) When Object.unobserve-ing, instead of deleting from changeObservers, set the index position to null, and null-check when iterating elsewhere 2) Isolate creation of null-proto objects inside a utility function These former (deleting) was clearly showing up in d8 --prof traces and the later was preventing optimization of containing functions because of non-standard literal. Combined, on MDV construction/teardown benchmark, saves about 10%. Note that this patch also cleans up retrieving objectInfo inside a utility function. R=rossberg@chromium.org, rossberg BUG= Review URL: https://codereview.chromium.org/123523002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18501 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 27 Nov, 2013 1 commit
-
-
rossberg@chromium.org authored
Based on prototype at https://github.com/rossberg-chromium/js-promise which informed the latest spec draft version at https://github.com/domenic/promises-unwrapping/blob/master/README.md Activated by --harmony-promises. Feature complete with respect to the draft spec, plus the addition of .when and .deferred methods. Final naming and other possible deviations from the current draft will hopefully be resolved soon after the next TC39 meeting. This CL also generalises the Object.observe delivery loop into a simplistic microtask loop. Currently, all observer events are delivered before invoking any promise handler in a single fixpoint iteration. It's not clear yet what the final semantics is supposed to be (should there be a global event ordering?), but it will probably require a more thorough event loop abstraction inside V8 once we get there. R=dslomov@chromium.org, yhirano@chromium.org BUG= Review URL: https://codereview.chromium.org/64223010 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18113 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 06 Nov, 2013 1 commit
-
-
rafaelw@chromium.org authored
Note the spec now reflects the updated naming: http://wiki.ecmascript.org/doku.php?id=harmony:observe_spec_changes R=rossberg@chromium.org, rossberg BUG=v8:2940 Review URL: https://codereview.chromium.org/46043020 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17520 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 05 Nov, 2013 2 commits
-
-
rafaelw@chromium.org authored
Note: spec has been updated here: http://wiki.ecmascript.org/doku.php?id=harmony:observe_spec_changes. R=rossberg@chromium.org, rossberg BUG=v8:2975,v8:2941 Review URL: https://codereview.chromium.org/47703003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
rafaelw@chromium.org authored
R=arv@chromium.org, rossberg@chromium.org, rossberg BUG=v8:2942 Review URL: https://codereview.chromium.org/36313002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17476 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 17 Oct, 2013 1 commit
-
-
yangguo@chromium.org authored
Nobody should need to use $NaN, 0/0, 1/0 and void 0. R=mvstanton@chromium.org BUG= Review URL: https://codereview.chromium.org/27491002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 13 Sep, 2013 1 commit
-
-
rossberg@chromium.org authored
R=rossberg@chromium.org BUG= Review URL: https://codereview.chromium.org/23464058 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16703 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 11 Sep, 2013 2 commits
-
-
adamk@chromium.org authored
This change is mostly straightforward: for 'normal' sorts of change records, simply don't deliver a changeRecord to a given observer callback if an access the callback's Context is not allowed to "GET" or "HAS" changeRecord.name on changeRecord.object, or if ACCESS_KEYS is disallowed. For 'splice' records, the question of whether to hand it to an observer is trickier, since there are multiple properties involved, and multiple types of possible information leakage. Given that access-checked objects are very rare (only two in Blink, Window and Location), and that they are not normally used as Arrays, it seems better to simply not emit any splice records for such objects rather than spending lots of logic to attempt to avoid information leakage for something that may never happen. BUG=v8:2778 R=rossberg@chromium.org Review URL: https://codereview.chromium.org/22962009 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16663 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
rossberg@chromium.org authored
The spec omits the receiver arg with the idea arrow functions with lexical |this| will obviate the need for it. BUG= R=rossberg@chromium.org Review URL: https://codereview.chromium.org/23727006 Patch from Rafael Weinstein <rafaelw@chromium.org>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16644 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 10 Sep, 2013 1 commit
-
-
adamk@chromium.org authored
This patch implements optimized objectInfo structure which manages the set of observers associated with an object and the changeRecord types which they accept. Observation in the normal case (Object.observe, default accept types, one observer) now allocates fewer objects and unobservation no longer needs to scan and splice an InternalArray -- making the combined speed of observe/unobserve about 200% faster. This patch implements the following optimizations: -objectInfo is initially created without any connected objects or arrays. The first observer is referenced directly by objectInfo, and when a second observer is added, changeObservers converts to a mapping of callbackPriority->observer, which allows for constant time registration/de-registration. -observer.accept and objectInfo.performing are conceptually the same data-structure. This is now directly represented as an abstract "TypeMap" which can later be optimized to be a smi in common cases, (e.g: https://codereview.chromium.org/19269007/). -objectInfo observers are only represented by an object with an accept typeMap if the set of accept types is non-default R=rossberg@chromium.org Review URL: https://codereview.chromium.org/19541010 Patch from Rafael Weinstein <rafaelw@chromium.org>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16629 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 04 Sep, 2013 2 commits
-
-
adamk@chromium.org authored
Revert "This patch implements optimized objectInfo structure which manages the set of observers associated with an object and the changeRecord types which they accept." This reverts r16539 as it triggers crashes on the GC stress bot. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16540 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
adamk@chromium.org authored
This patch implements optimized objectInfo structure which manages the set of observers associated with an object and the changeRecord types which they accept. Observation in the normal case (Object.observe, default accept types, one observer) now allocates fewer objects and unobservation no longer needs to scan and splice an InternalArray -- making the combined speed of observe/unobserve about 200% faster. This patch implements the following optimizations: -objectInfo is initially created without any connected objects or arrays. The first observer is referenced directly by objectInfo, and when a second observer is added, changeObservers converts to a mapping of callbackPriority->observer, which allows for constant time registration/de-registration. -observer.accept and objectInfo.performing are conceptually the same data-structure. This is now directly represented as an abstract "TypeMap" which can later be optimized to be a smi in common cases, (e.g: https://codereview.chromium.org/19269007/). -objectInfo observers are only represented by an object with an accept typeMap if the set of accept types is non-default R=rossberg@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=16343 Review URL: https://codereview.chromium.org/19541010 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16539 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 26 Aug, 2013 2 commits
-
-
adamk@chromium.org authored
Revert "This patch implements optimized objectInfo structure which manages the set of observers associated with an object and the changeRecord types which they accept." This reverts r16343 due to mjsunit object-observe failures on several bots: - V8 Linux nosse2 - V8 GC stress 2 TBR=rossberg Review URL: https://codereview.chromium.org/23491002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
adamk@chromium.org authored
This patch implements optimized objectInfo structure which manages the set of observers associated with an object and the changeRecord types which they accept. Observation in the normal case (Object.observe, default accept types, one observer) now allocates fewer objects and unobservation no longer needs to scan and splice an InternalArray -- making the combined speed of observe/unobserve about 200% faster. This patch implements the following optimizations: -objectInfo is initially created without any connected objects or arrays. The first observer is referenced directly by objectInfo, and when a second observer is added, changeObservers converts to a mapping of callbackPriority->observer, which allows for constant time registration/de-registration. -observer.accept and objectInfo.performing are conceptually the same data-structure. This is now directly represented as an abstract "TypeMap" which can later be optimized to be a smi in common cases, (e.g: https://codereview.chromium.org/19269007/). -objectInfo observers are only represented by an object with an accept typeMap if the set of accept types is non-default R=rossberg@chromium.org Review URL: https://codereview.chromium.org/19541010 Patch from Rafael Weinstein <rafaelw@chromium.org>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16343 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 06 Aug, 2013 1 commit
-
-
rossberg@chromium.org authored
https://codereview.chromium.org/19541010/ The main problem is that if you called Object.getNotifier(obj) on an object, %SetObserved(object) would never get called on it, and thus it would be unobservable (new test added for this). Additionally, Runtime::SetObserved was asserting obj->IsJSObject() which would fail if called on a proxy. It just happens that our existing test always called getNotifier() before Object.observe on proxies, and thus we never previously attempted to transition the map of a proxy. Both issues are now fixed and properly tested. R=rossberg@chromium.org Review URL: https://codereview.chromium.org/21891008 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16074 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 22 Jul, 2013 1 commit
-
-
mstarzinger@chromium.org authored
WeakSets work similar to ordinary Sets but the value (which must be an object) is held weakly. This is available under --harmony-collections BUG=v8:2785 R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/19678023 Patch from Erik Arvidsson <arv@chromium.org>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15792 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 15 Jul, 2013 1 commit
-
-
adamk@chromium.org authored
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
-
- 13 Jul, 2013 1 commit
-
-
adamk@chromium.org authored
This patch enables objects to undergo a single transition when they become observed, avoiding the need to create a new map for every observed objects. Observed objects which become unobserved does not cause another map transition and unobserved does not clear the observed bit on the map. The unobserved object. R=verwaest@chromium.org Review URL: https://codereview.chromium.org/18221006 Patch from Rafael Weinstein <rafaelw@chromium.org>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15650 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 06 Jun, 2013 1 commit
-
-
adamk@chromium.org authored
R=rossberg@chromium.org BUG= Review URL: https://codereview.chromium.org/16438010 Patch from Rafael Weinstein <rafaelw@chromium.org>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14989 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 28 May, 2013 1 commit
-
-
rossberg@chromium.org authored
Review URL: https://codereview.chromium.org/15898004 Patch from Rafael Weinstein <rafaelw@chromium.org>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14848 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 16 May, 2013 1 commit
-
-
rossberg@chromium.org authored
Review URL: https://codereview.chromium.org/14978007 Patch from Rafael Weinstein <rafaelw@chromium.org>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14705 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 15 May, 2013 3 commits
-
-
adamk@chromium.org authored
Fixes the debug check failure on sorting an object with an array __proto__. Original Issue: https://codereview.chromium.org/14779011/ TBR=adamk@chromium.org Review URL: https://codereview.chromium.org/14977015 Patch from Rafael Weinstein <rafaelw@chromium.org>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14698 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
adamk@chromium.org authored
Reverts r14696 because it caused debug assertion failures when running test/mjsunit/harmony/object-observe.js TBR=rossberg Review URL: https://codereview.chromium.org/15203002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14697 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
adamk@chromium.org authored
R=rossberg,adamk,arv BUG= Review URL: https://codereview.chromium.org/14779011 Patch from Rafael Weinstein <rafaelw@chromium.org>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 07 May, 2013 1 commit
-
-
rossberg@chromium.org authored
R=rossberg,adamk BUG= Review URL: https://codereview.chromium.org/15017003 Patch from Rafael Weinstein <rafaelw@chromium.org>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14569 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 22 Mar, 2013 1 commit
-
-
rossberg@chromium.org authored
R=svenpanne@chromium.org BUG=v8:2158 Review URL: https://codereview.chromium.org/12422019 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 04 Feb, 2013 1 commit
-
-
adamk@chromium.org authored
object-observe.js uses weak maps to add "hidden" properties to objects. Previously, the hash tables it was using weren't actually weak. This patch changes the existing runtime functions to create instances of JSWeakMap instead of exposing ObjectHashTable directly. Review URL: https://codereview.chromium.org/12092079 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13591 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 19 Dec, 2012 2 commits
-
-
rossberg@chromium.org authored
R=yangguo@chromium.org BUG=125308 Review URL: https://codereview.chromium.org/11631002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13240 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
rossberg@chromium.org authored
Added test for recursive change generation. R=yangguo@chromium.org BUG=v8:2409 Review URL: https://codereview.chromium.org/11593028 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13239 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 13 Dec, 2012 1 commit
-
-
rossberg@chromium.org authored
Also, disable TestFastElementsLength test for now, since it flakes on buildbots for yet unknown reasons. R=mstarzinger@chromium.org BUG=v8:2409 Review URL: https://codereview.chromium.org/11554019 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13213 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 05 Dec, 2012 1 commit
-
-
rossberg@chromium.org authored
The approach in this change is to handle the unwrapping/wrapping of the global object transparently with respect to the JS implementation of Object.observe. An alternate approach would be to add a runtime method like %IsJSGlobalProxy and %UnwrapJSGlobalProxy, but it seems ugly to give JS (even implementation JS) access to the unwrapped global. BUG=v8:2409 Review URL: https://codereview.chromium.org/11414094 Patch from Adam Klein <adamk@chromium.org>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13142 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 20 Nov, 2012 1 commit
-
-
rossberg@chromium.org authored
BUG=v8:2418 Review URL: https://codereview.chromium.org/11419078 Patch from Rafael Weinstein <rafaelw@chromium.org>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13009 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 16 Nov, 2012 1 commit
-
-
rossberg@chromium.org authored
Note: The test here requires https://codereview.chromium.org/11364237/ to land in order to pass because Object.freeze calls Object.getOwnPropertyNames(). BUG=v8:2411 Review URL: https://codereview.chromium.org/11377171 Patch from Rafael Weinstein <rafaelw@chromium.org>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12983 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 13 Nov, 2012 2 commits
-
-
rossberg@chromium.org authored
To preserve ordering guarantees during end-of-turn delivery, Object.deliverChangeRecords needs to remove the delivered-to observer from the list of active observers. The added test demonstrates this behavior. Review URL: https://codereview.chromium.org/11410046 Patch from Adam Klein <adamk@chromium.org>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12951 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
rossberg@chromium.org authored
Review URL: https://codereview.chromium.org/11293248 Patch from Rafael Weinstein <rafaelw@chromium.org>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12950 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 09 Nov, 2012 2 commits
-
-
rossberg@chromium.org authored
Updated all tests to use getNotifier or actual object mutation instead of notify, and added tests for new behavior of getNotifier. Review URL: https://codereview.chromium.org/11369154 Patch from Adam Klein <adamk@chromium.org>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12923 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
rossberg@chromium.org authored
The previous fix wasn't broad enough: it only fixed the reference for a single Context. Review URL: https://codereview.chromium.org/11361172 Patch from Adam Klein <adamk@chromium.org>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12913 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-