https://chromiumcodereview.appspot.com/9348057/diff/1/src/ast.h File src/ast.h (right):
https://chromiumcodereview.appspot.com/9348057/diff/1/src/ast.h#newcode444 src/ast.h:444: virtual bool IsInlineable() const; On 2012/02/08 15:23:04, Kevin Millikin wrote:
I think this method is obsolete (and the check in hydrogen.cc is
unnecessary),
because the declaration's inline-ability is already recorded in the
function
containing it. Talk to jkummerow.
I can't tell, but according to Jakob, the info is available for all AstNodes, except Declarations, because they are kind of special, e.g. because they live in the scope. https://chromiumcodereview.appspot.com/9348057/diff/1/src/ast.h#newcode473 src/ast.h:473: class VariableDeclaration: public Declaration { On 2012/02/08 15:23:04, Kevin Millikin wrote:
It's a little weird that VariableDeclaration includes 'function' and
'const' as
well as 'var' and 'let'. Does the (proposed) ES grammar have a name
for those
things?
Not yet, it currently still just calls them "declarations" collectively, because modules haven't made it into the draft yet. The grammar in the modules proposal uses VariableDeclaration to include 'const' (it seems), but not 'function'. Would LocalDeclaration be better? (Those are the ones that are allowed locally, although they may also appear in global or module scope.) https://chromiumcodereview.appspot.com/9348057/ -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
