Reviewers: titzer, Michael Starzinger, rossberg,

Message:
PTAL

Of the "worst" allocations mentioned here..
https://code.google.com/p/chromium/issues/detail?id=417697#c14

Allocations that are discarded:
NewAssignment, NewNumberLiteral, NewBinaryOperation, NewExpressionStatement,
NewProperty, NewCall

Allocations that aren't discarded as a result of this change:
NewVariableProxy (required for scope analysis), NewUnknown (what is this?),
NewNumber (created by AstValueFactory and might be discardable)

Description:
Parsing especially large nested functions takes up more memory than necessary. Inner functions must be eagerly parsed for scope analysis, but the full AST is
also kept around even though it's not needed.

This CL mitigates this problem by allocating some AstNodes of the inner function
to a temporary Zone which is deallocated once the scope information has been
built. The remaining nodes (such as VariableProxy) must persist until scope
analysis actually happens, and have to be allocated to a parser-persistent Zone.

BUG=417697
LOG=N

Please review this at https://codereview.chromium.org/1304923004/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+149, -28 lines):
  M src/ast.h
  M src/parser.cc
  M test/cctest/test-parsing.cc
  A + test/mjsunit/compiler/lazy-iife-no-parens.js


--
--
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.

Reply via email to