• Dan Elphick's avatar
    [explicit isolates] Add ReadOnlyRoots · ff32ba8e
    Dan Elphick authored
    Adds a ReadOnlyRoots class trivially constructable from a Heap* or
    Isolate* and which can be obtained from a any HeapObject which provides
    access to roots objects that will always be in RO_SPACE. In the longer
    term this object will be accessed via a global variable without
    requiring an Isolate or using the memory address of a HeapObject to
    infer it.
    
    Moves the list macros in heap.h to roots.h and splits some of them into
    two parts (read-only and mutable).
    
    Convert cases of heap_object->GetHeap()->root_accessor() to
    heap_objects->GetReadOnlyRoots().root_accessor().
    
    Bug: v8:7786
    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: I14b01052adb2af9a5ec82b970e933d6a423d17a5
    Reviewed-on: https://chromium-review.googlesource.com/1122127
    Commit-Queue: Dan Elphick <delphick@chromium.org>
    Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
    Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
    Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#54160}
    ff32ba8e
compilation-cache-inl.h 2.5 KB