• Leszek Swirski's avatar
    [modules] Make exported variable indices stable · e39b90f6
    Leszek Swirski authored
    A module's exported variables are assigned a cell index based on their
    order in the exported variable map. This map is keyed by the variable
    name, an AstRawString*.
    
    Unfortunately, these string pointers are not guaranteed to increase
    monotonically as variables are encountered, which means that this map
    isn't stable across parses. In particular, it can cause failures for
    setVariableValue if the parser is unlucky.
    
    This patch adds a custom comparator to these AstRawString* keyed maps,
    which is stable across parses.
    
    Change-Id: Ie6e88fc2d252d873de661d7fc5278feba3955727
    Reviewed-on: https://chromium-review.googlesource.com/1131503Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#54379}
    e39b90f6
Name
Last commit
Last update
..
OWNERS Loading commit data...
ast-function-literal-id-reindexer.cc Loading commit data...
ast-function-literal-id-reindexer.h Loading commit data...
ast-source-ranges.h Loading commit data...
ast-traversal-visitor.h Loading commit data...
ast-value-factory.cc Loading commit data...
ast-value-factory.h Loading commit data...
ast.cc Loading commit data...
ast.h Loading commit data...
context-slot-cache.cc Loading commit data...
context-slot-cache.h Loading commit data...
modules.cc Loading commit data...
modules.h Loading commit data...
prettyprinter.cc Loading commit data...
prettyprinter.h Loading commit data...
scopes.cc Loading commit data...
scopes.h Loading commit data...
variables.cc Loading commit data...
variables.h Loading commit data...