This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 84356 - Use lazy function bodies parsing
Summary: Use lazy function bodies parsing
Status: CLOSED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-06 18:46 UTC by Vladimir Voskresensky
Modified: 2007-12-27 17:07 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2006-09-06 18:46:58 UTC
To improve responsiveness and reduce memory we should postpone parsing of
function's bodies.
Comment 1 Vladimir Voskresensky 2006-09-06 18:50:30 UTC
use balanceCurlies alternative in case of lazy bodies and put it under
CSM_COMPOUND_STATEMENT_LAZY, then on request of function body build underlined
full AST
Comment 2 Vladimir Voskresensky 2006-09-07 16:09:42 UTC
Fixed by:
- introduced new FakeAST node for lazy content of compound statement
- all compound statements impl in model are responsible for restoring own full
tree, as result it's transparent for functions, it works for any compound statement.
- flag to turn off "cnd.modelimpl.excl.compound" (it is ON by default)
- getter for underlined token from CsmAST
- token stream around lazy compound subtree

CVS log:
Checking in antlr2/CPPParserEx.java;
/shared/data/ccvs/repository/cnd/modelimpl/src/org/netbeans/modules/cnd/modelimpl/antlr2/CPPParserEx.java,v
 <--  CPPParserEx.java
new revision: 1.2.2.2; previous revision: 1.2.2.1
done
Checking in antlr2/CsmAST.java;
/shared/data/ccvs/repository/cnd/modelimpl/src/org/netbeans/modules/cnd/modelimpl/antlr2/CsmAST.java,v
 <--  CsmAST.java
new revision: 1.2.2.4; previous revision: 1.2.2.3
done
Checking in antlr2/cppparser.g;
/shared/data/ccvs/repository/cnd/modelimpl/src/org/netbeans/modules/cnd/modelimpl/antlr2/cppparser.g,v
 <--  cppparser.g
new revision: 1.2.2.2; previous revision: 1.2.2.1
done
Checking in csm/core/FileImpl.java;
/shared/data/ccvs/repository/cnd/modelimpl/src/org/netbeans/modules/cnd/modelimpl/csm/core/FileImpl.java,v
 <--  FileImpl.java
new revision: 1.2.2.7; previous revision: 1.2.2.6
done
Checking in csm/core/TraceFlags.java;
/shared/data/ccvs/repository/cnd/modelimpl/src/org/netbeans/modules/cnd/modelimpl/csm/core/TraceFlags.java,v
 <--  TraceFlags.java
new revision: 1.2.2.6; previous revision: 1.2.2.5
done
Checking in csm/core/AstRenderer.java;
/shared/data/ccvs/repository/cnd/modelimpl/src/org/netbeans/modules/cnd/modelimpl/csm/core/AstRenderer.java,v
 <--  AstRenderer.java
new revision: 1.2.2.3; previous revision: 1.2.2.2
done
Checking in csm/deep/CompoundStatementImpl.java;
/shared/data/ccvs/repository/cnd/modelimpl/src/org/netbeans/modules/cnd/modelimpl/csm/deep/CompoundStatementImpl.java,v
 <--  CompoundStatementImpl.java
new revision: 1.2.2.2; previous revision: 1.2.2.1
done