• neis's avatar
    [modules] Properly initialize declared variables. · f4dfb6fb
    neis authored
    Before evaluating a module, all variables declared at the top-level
    in _any_ of the modules in the dependency graph must be initialized.
    This is observable because a module A can access a variable imported
    from module B (e.g. a function) at a point when module B's body hasn't
    been evaluated yet.
    
    We achieve this by implementing modules internally as generators with
    two states (not initialized, initialized).
    
    R=adamk@chromium.org
    BUG=v8:1569
    
    Review-Url: https://codereview.chromium.org/2375793002
    Cr-Commit-Position: refs/heads/master@{#39871}
    f4dfb6fb
parser.cc 212 KB