Reviewers: Feng Qian, Mads Ager, plesner,

Message:
I tried a handful of approaches, and this ended up being the cleanest.
Keeping a HashMap on V8's side was very cumbersome.  There is still some
confusion between who owns the global list (between global-handles and
mark-compact), but I'm not going to address that now.

I think pushing the most of this to the caller is the best thing we can
do.  This will make it easier to tune things on the bindings side.

This makes an API change, but I suspect we're the only users of this
API.

V8 bindings change review coming up right now.

Description:
Improve mark-compact object grouping interface.

The main goal was to improve O(n^2) behavior when there are many object
groups.  The old API required the grouping to be done on the v8 side,
along with a linear search.  The new interface requires the caller to do
the grouping, passing V8 entire groups at a time.  This removes the
group id concept on the v8 side.

   - Changed AddObjectToGroup to AddObjectGroup.
   - Removed the group id concept from the V8 side.
   - Remove a static constructor while I'm here, lazily initialize
     the object groups list.
   - Cleaned up return by non-const references to return pointers.

Please review this at http://codereview.chromium.org/13341

Affected files:
   M include/v8.h
   M src/api.cc
   M src/global-handles.h
   M src/global-handles.cc
   M src/mark-compact.cc



--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to