Reviewers: vjaquez, Diego Pino, Dmitry Lomov (chromium), marja, Michael
Starzinger, rossberg, wingo (holiday until 11 sep), arv,
Message:
On 2014/08/11 08:51:39, marja wrote:
https://codereview.chromium.org/422923004/diff/20001/src/ast-value-factory.h
File src/ast-value-factory.h (right):
https://codereview.chromium.org/422923004/diff/20001/src/ast-value-factory.h#newcode91
src/ast-value-factory.h:91: bool IsArguments() const { return
IsOneByteEqualTo("arguments"); }
This doesn't look correct. The AstStrings are unique, so you should be
able to
compare the AstString* to AstValueFactory::arguments_string().
Is the problem that where this is used, there's no AstValueFactory? If so,
that
should probably be fixed... I mean, surely the AstValueFactory is
*somewhere*
since we managed to create the AstString...
I have updated the CL, the new version picks the value returned by of
"Parser::ast_value_factory()->arguments_string()" to make the pointer
comparison. For PreParser, the flag is checked directly from the bits
int "PreParserIdentifier" and the AstValueFactory is unused.
Description:
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=
Please review this at https://codereview.chromium.org/422923004/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+160, -4 lines):
M src/ast-value-factory.h
M src/preparser.h
M src/scopes.h
M src/scopes.cc
M test/cctest/test-parsing.cc
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.