• Jakob Gruber's avatar
    [snapshot] Move builtins to dedicated snapshot area · 49e3bfd5
    Jakob Gruber authored
    As a first step towards lazy builtin deserialization, this CL moves
    builtins to their own dedicated area in the snapshot blob, physically
    located after startup data and before context-specific data.
    
    The startup- and partial serializers now serialize all seen builtins as
    references, i.e. they only encode the relevant builtin id (taking care
    to preserve special behavior around the interpreter trampoline and
    CompileLazy). Builtins are later fully serialized by the
    BuiltinSerializer. The separate blobs are finally glued together by
    CreateSnapshotBlob.
    
    Deserialization takes the same steps: when we see builtin reference
    bytecodes before builtins have been deserialized, we push to a list of
    deferred builtin references. After builtin deserialization, this list is
    iterated and all builtin references are fixed up.
    
    Bug: v8:6624
    Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
    Change-Id: Idee42fa9c92bdbe8d5b8c4b8bf3ca9dd39634004
    Reviewed-on: https://chromium-review.googlesource.com/610225Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
    Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
    Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#47596}
    49e3bfd5
builtin-deserializer.h 1.23 KB