• wingo@igalia.com's avatar
    Track usage of "this" and "arguments" in Scope · 0841f724
    wingo@igalia.com authored
    This adds flags in Scope to track wheter a Scope uses "this" and,
    "arguments". The information is exposed via Scope::uses_this(),
    and Scope::uses_arguments(), respectively. Flags for tracking
    usage on any inner scope uses are available as well via
    Scope::inner_uses_this(), and Scope::inner_uses_arguments().
    
    Knowing whether scopes use "this" and "arguments" will be handy
    to generate the code needed to capture their values when generating
    the code for arrow functions.
    
    BUG=v8:2700
    LOG=
    R=rossberg@chromium.org
    
    Review URL: https://codereview.chromium.org/422923004
    
    Patch from Adrian Perez de Castro <aperez@igalia.com>.
    
    git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24663 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    0841f724
globals.h 24.8 KB