Reviewers: Sven Panne,
Message:
Here's a patch to simplify the parser by moving AstConstructionVisitor's
work
to a post-pass.
The AstConstructionVisitor computes the following things:
1. a cumulative ast node count for a function
2. the kDontSelfOptimize / kDontSoftInline / kDontCache flags
3. the feedback / ic feedback slots.
4. the dont_crankshaft_reason / dont_turbofan_reason bailoutreasons.
Ultimately this information propagates to the FunctionLiteral and thence
to the SharedFunctionInfo.
An observation: all of this information is only needed once we've made
the commitment to full-codegen a function, and thus have run the
post-pass.
1. The ast node count is used in inlining decisions. I think it used
to be used in optimization decisions but with asm.js that's no
longer the case. In any case when we go to inline a function, it's
probably been called before, and thus the ast node count has
already been set on the sharedfunctioninfo when the function was
parsed/full-codegenned.
* Question: is this correct? Can we inline functions that haven't
been called before?
2. The flags are all used after full-codegen, (kDontSoftInline is unused)
3. Likewise for the feedback slot counts and allocations.
4. Likewise for the bailoutreasons.
The patch is straightforward, except for a couple open questions:
1) Does this affect inlining / optimization decisions? I think not but I
don't
know
2) Is it OK for a lazy function to have an empty type feedback vector,
which
later gets reallocated? Is the liveedit treatment of type feedback vectors
correct?
Description:
AstNumberingVisitor does the work of AstConstructionVisitor
[email protected]
BUG=
Please review this at https://codereview.chromium.org/660083005/
Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+373, -549 lines):
M src/ast.h
M src/ast.cc
M src/ast-numbering.h
M src/ast-numbering.cc
M src/compiler.h
M src/compiler.cc
M src/compiler/js-inlining.cc
M src/full-codegen.cc
M src/hydrogen.cc
M src/liveedit.h
M src/liveedit.cc
M src/parser.h
M src/parser.cc
M src/preparser.h
M src/rewriter.cc
M src/scopes.h
M src/scopes.cc
M test/cctest/test-ast.cc
M test/cctest/test-compiler.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.