• Peter Marshall's avatar
    [memory] Save space in the FeedbackMetadata on 64 bit platforms. · 5a70a5ea
    Peter Marshall authored
    Previously we used a FixedArray for the FeedbackMetadata, packing bits
    of information into Smi fields. On 64-bit platforms, we waste at least
    half of the available memory by using the Smi representation.
    
    Given that this is just raw data (no pointers), we can just use a new
    type that uses the existing packing scheme to store the data in int32
    format instead.
    
    This CL changes FeedbackMetadata to a new subclass of HeapObject. This
    is to reduce the API surface exposed, in comparison to extending/using
    a more general purpose data structure like ByteArray, which is also just
    raw data.
    
    FeedbackMetadata only exposes general purpose methods for accessing
    slots, but hides the implementation detail of packing bits into int32
    fields.
    
    This CL also introduces a sentinal EmptyFeedbackMetadata, because there
    are ~750 empty FeedbackMetadata objects when running an empty program in
    V8. These are probably for builtins.
    
    Bug: v8:7500
    Change-Id: Ic85563153abbd71a22854cee8519260c32b1e9ab
    Reviewed-on: https://chromium-review.googlesource.com/945730
    Commit-Queue: Peter Marshall <petermarshall@chromium.org>
    Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
    Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#51842}
    5a70a5ea
Name
Last commit
Last update
..
OWNERS Loading commit data...
duplicate-finder.h Loading commit data...
expression-classifier.h Loading commit data...
expression-scope-reparenter.cc Loading commit data...
expression-scope-reparenter.h Loading commit data...
func-name-inferrer.cc Loading commit data...
func-name-inferrer.h Loading commit data...
parse-info.cc Loading commit data...
parse-info.h Loading commit data...
parser-base.h Loading commit data...
parser.cc Loading commit data...
parser.h Loading commit data...
parsing.cc Loading commit data...
parsing.h Loading commit data...
pattern-rewriter.cc Loading commit data...
preparse-data.cc Loading commit data...
preparse-data.h Loading commit data...
preparsed-scope-data.cc Loading commit data...
preparsed-scope-data.h Loading commit data...
preparser.cc Loading commit data...
preparser.h Loading commit data...
rewriter.cc Loading commit data...
rewriter.h Loading commit data...
scanner-character-streams.cc Loading commit data...
scanner-character-streams.h Loading commit data...
scanner.cc Loading commit data...
scanner.h Loading commit data...
token.cc Loading commit data...
token.h Loading commit data...