Track usage of "this" and "arguments" in Scope
authorwingo@igalia.com <wingo@igalia.com>
Thu, 16 Oct 2014 13:19:36 +0000 (13:19 +0000)
committerwingo@igalia.com <wingo@igalia.com>
Thu, 16 Oct 2014 13:19:36 +0000 (13:19 +0000)
commit0841f7241b2c36904f781b71859bf3f77a854af5
treea65bcf98fbc942b92b52892215cb057c738183b9
parent04760937788a6d77d09ed7828a64c5dd4bd2d973
Track usage of "this" and "arguments" in Scope

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
src/ast-value-factory.h
src/globals.h
src/objects.h
src/preparser.h
src/runtime/runtime-debug.cc
src/scopeinfo.cc
src/scopes.cc
src/scopes.h
test/cctest/test-parsing.cc