• 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
Name
Last commit
Last update
..
DEPS Loading commit data...
OWNERS Loading commit data...
builtin-deserializer-allocator.cc Loading commit data...
builtin-deserializer-allocator.h Loading commit data...
builtin-deserializer.cc Loading commit data...
builtin-deserializer.h Loading commit data...
builtin-serializer-allocator.cc Loading commit data...
builtin-serializer-allocator.h Loading commit data...
builtin-serializer.cc Loading commit data...
builtin-serializer.h Loading commit data...
builtin-snapshot-utils.cc Loading commit data...
builtin-snapshot-utils.h Loading commit data...
code-serializer.cc Loading commit data...
code-serializer.h Loading commit data...
default-deserializer-allocator.cc Loading commit data...
default-deserializer-allocator.h Loading commit data...
default-serializer-allocator.cc Loading commit data...
default-serializer-allocator.h Loading commit data...
deserializer.cc Loading commit data...
deserializer.h Loading commit data...
embedded-empty.cc Loading commit data...
macros.h Loading commit data...
mksnapshot.cc Loading commit data...
natives-common.cc Loading commit data...
natives-external.cc Loading commit data...
natives.h Loading commit data...
object-deserializer.cc Loading commit data...
object-deserializer.h Loading commit data...
partial-deserializer.cc Loading commit data...
partial-deserializer.h Loading commit data...
partial-serializer.cc Loading commit data...
partial-serializer.h Loading commit data...
references.h Loading commit data...
serializer-common.cc Loading commit data...
serializer-common.h Loading commit data...
serializer.cc Loading commit data...
serializer.h Loading commit data...
snapshot-common.cc Loading commit data...
snapshot-empty.cc Loading commit data...
snapshot-external.cc Loading commit data...
snapshot-source-sink.cc Loading commit data...
snapshot-source-sink.h Loading commit data...
snapshot.h Loading commit data...
startup-deserializer.cc Loading commit data...
startup-deserializer.h Loading commit data...
startup-serializer.cc Loading commit data...
startup-serializer.h Loading commit data...