Ignore:
Timestamp:
Aug 24, 2012, 2:23:51 PM (13 years ago)
Author:
[email protected]
Message:

Always null check cells before marking
https://bugs.webkit.org/show_bug.cgi?id=94968

Reviewed by Geoffrey Garen.

Originally we tried to minimise null checks by only null checking values
that we knew could be null, however given that we can't ever guarantee
when a GC will happen, we're better off just always assuming that a null
check will be necessary. This results in a much less fragile code base
as we can add GC allocations to object initialisers without having to
subsequently worry about whether the object we are initialising will need
to add a bunch of null checks in its visitChildren implementation.

  • heap/MarkStack.cpp:

(JSC::MarkStack::internalAppend):

  • heap/MarkStackInlineMethods.h:

(JSC::MarkStack::append):
(JSC::MarkStack::appendUnbarrieredPointer):

  • runtime/Structure.h:

(JSC::MarkStack::internalAppend):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r126613 r126624  
     12012-08-24  Oliver Hunt  <[email protected]>
     2
     3        Always null check cells before marking
     4        https://bugs.webkit.org/show_bug.cgi?id=94968
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Originally we tried to minimise null checks by only null checking values
     9        that we knew could be null, however given that we can't ever guarantee
     10        when a GC will happen, we're better off just always assuming that a null
     11        check will be necessary.  This results in a much less fragile code base
     12        as we can add GC allocations to object initialisers without having to
     13        subsequently worry about whether the object we are initialising will need
     14        to add a bunch of null checks in its visitChildren implementation.
     15
     16        * heap/MarkStack.cpp:
     17        (JSC::MarkStack::internalAppend):
     18        * heap/MarkStackInlineMethods.h:
     19        (JSC::MarkStack::append):
     20        (JSC::MarkStack::appendUnbarrieredPointer):
     21        * runtime/Structure.h:
     22        (JSC::MarkStack::internalAppend):
     23
    1242012-08-23  Oliver Hunt  <[email protected]>
    225
Note: See TracChangeset for help on using the changeset viewer.