• Leszek Swirski's avatar
    [sfi] Remove SFI function identifier field · c941f11a
    Leszek Swirski authored
    Remove the function identifier field from SharedFunctionInfo. This field
    would store one of a) the function's inferred name, b) the "builtin
    function id", or c) debug info. We remove these in turn:
    
    a) The function's inferred name is available on the ScopeInfo, so like
       the start/end position we read it off either the ScopeInfo (for
       compiled functions) or the UncompiledData (for uncompiled functions).
    
       As a side-effect, now both UncompiledData and its subclass,
       UncompiledDataWithPreparsedScope, contain a pointer field. To keep
       BodyDescriptors manageable, we introduce a SubclassBodyDescriptor
       which effectively appends two BodyDescriptors together.
    
    b) The builtin function id is < 255, so we can steal a byte from
       expected no. of properies (also <255) and store these together.
       Eventually we want to get rid of this field and use the builtin ID,
       but this is pending JS builtin removal.
    
       As a side-effect, BuiltinFunctionId becomes an enum class (for better
       storage size guarantees).
    
    c) The debug info can hang off anything (since it stores the field it
       replaces), so we can attach it to the script field instead.
    
    This saves a word on compiled function (uncompiled functions
    unfortunately still have to store it in UncompiledData).
    
    Bug: chromium:818642
    Change-Id: I8b4b3a070f0fe328aafcaeac58842d144d12d996
    Reviewed-on: https://chromium-review.googlesource.com/1138328Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
    Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
    Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
    Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
    Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#54543}
    c941f11a
heap-snapshot-generator.cc 110 KB