• aperez's avatar
    Cleanups needed for this-scoping in arrow functions · 00844d46
    aperez authored
    Remove Variable::IsValidReference(), and the Variable::is_valid_ref_
    member: This was "false" only for "this", and for internal variables.
    For the first, VariableProxy::is_this() can be used for the check
    instead; and for internal variables, it is guaranteed they they will
    not be written to (because the V8 code does not do it, and they are
    not accessible from JavaScript).
    
    The "bool is_this" parameter of VariableProxy() constructor is
    changed to use Variable::Kind. This will allow to later on adding
    a parameter to create unresolved variables of any kind, which in
    turn will be used to make references to "this" initially unresolved,
    and use the existing variable resolution mechanics for "this".
    
    BUG=v8:2700
    LOG=N
    
    Review URL: https://codereview.chromium.org/1024703004
    
    Cr-Commit-Position: refs/heads/master@{#27404}
    00844d46
ast.h 113 KB