Reland "heap: Uniform object construction""
Switch to a uniform object construction that does not differentiate between mixins and regular garabge collected objects and as a consequence can interrupt both construction cases with garbage collections. Object construction now uniformely works as follows: 1. The object under construction is marked so in the HeapObjectHeader. 2. Upon discovering such an object it is delayed in a separate marking worklist. 3. Upon hitting the main atomic pause all such objects are conservatively scanned for pointers without using the Trace method. Special cases: a. Mixins in construction: The HeapObjectHeader cannot retrived for such objects. A default GetTraceDescriptor() implementation returning a sentinel marker is used to discover that such objects should be delayed. b. Upon reaching a safepoint (e.g. no stack), in-construction objects are moved to a marking worklist that, similar to the regular marking worklist, allows for incremental processing. Effects: - No more TLS access for no-GC scope on mixin construction. - No more memory needed for the no-GC scope marker in mixin classes - MakeGarbageCollected should require less binary size as implementations can be aligned. - Incremental marking Start and Step operations are safe to be called with stack (even though it is preferable to not do so). - Object construction is safe to be used with a concurrent marker as it is ok for any objects (mixins as well as normal ones) to be published to the object graph during constructors. This reverts commit ad406608. Bug: 911662 Change-Id: I7babc6bac25b446a63783bf2c3d19e9b525d9e9a Reviewed-on: https://chromium-review.googlesource.com/c/1405991Reviewed-by:Kentaro Hara <haraken@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#622098}
Showing
Please register or sign in to comment