• Adam Klein's avatar
    [ast] Make CaseClause a plain ZoneObject, not an Expression · de046f5f
    Adam Klein authored
    CaseClause never made sense as an Expression; this CL allows us to
    remove several UNREACHABLEs and slim down the representation of
    CaseClause by removing its source position (which was only used
    in prettyprinting).
    
    The only real fallout of this change is that SourceRangeMap now
    stores its keys as ZoneObject*, rather than AstNode*, but since
    there's already compile time typechecking for inserting items
    into the map this shouldn't cause any ill effects.
    
    While modifying CaseClause, also removed the dead body_target()
    accessor (and related member variable). Thus this CL overall
    reduces the memory needed for each CaseClause by two words.
    
    Bug: v8:6092
    Change-Id: I0021c0590a69e29305c41ec6105c8824ae0cc25b
    Reviewed-on: https://chromium-review.googlesource.com/639316Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
    Reviewed-by: 's avatarMythri Alle <mythria@chromium.org>
    Commit-Queue: Adam Klein <adamk@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#47722}
    de046f5f
prettyprinter.cc 34.8 KB