1. 12 Feb, 2014 1 commit
    • rafaelw@chromium.org's avatar
      V8 Microtask Queue & API · 6b5a4cde
      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
      6b5a4cde
  2. 07 Feb, 2014 1 commit
  3. 04 Feb, 2014 1 commit
  4. 08 Jan, 2014 1 commit
    • rafaelw@chromium.org's avatar
      Minor Object.observe optimizations · 902a0592
      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
      902a0592
  5. 27 Nov, 2013 1 commit
  6. 06 Nov, 2013 1 commit
  7. 05 Nov, 2013 2 commits
  8. 17 Oct, 2013 1 commit
  9. 13 Sep, 2013 1 commit
  10. 11 Sep, 2013 2 commits
  11. 10 Sep, 2013 1 commit
    • adamk@chromium.org's avatar
      This patch implements optimized objectInfo structure which manages the set of... · 9139e1a8
      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
      9139e1a8
  12. 04 Sep, 2013 2 commits
  13. 26 Aug, 2013 2 commits
  14. 06 Aug, 2013 1 commit
  15. 22 Jul, 2013 1 commit
  16. 15 Jul, 2013 1 commit
    • adamk@chromium.org's avatar
      [Object.observe] Lazily allocate callbackInfo structure · fab9f4e1
      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
      fab9f4e1
  17. 13 Jul, 2013 1 commit
  18. 06 Jun, 2013 1 commit
  19. 28 May, 2013 1 commit
  20. 16 May, 2013 1 commit
  21. 15 May, 2013 3 commits
  22. 07 May, 2013 1 commit
  23. 22 Mar, 2013 1 commit
  24. 04 Feb, 2013 1 commit
  25. 19 Dec, 2012 2 commits
  26. 13 Dec, 2012 1 commit
  27. 05 Dec, 2012 1 commit
  28. 20 Nov, 2012 1 commit
  29. 16 Nov, 2012 1 commit
  30. 13 Nov, 2012 2 commits
  31. 09 Nov, 2012 2 commits