|
|
|
|
|
|
|
Re: How to extend javascript type inference [message #725007 is a reply to message #724727] |
Tue, 13 September 2011 18:10 |
Ning Wang Messages: 10 Registered: July 2011 |
Junior Member |
|
|
Type propagation is to propagate type along dataflow from a type define site to type use site. I look at the code of resolveExpressionType that does bottom up traverse to find out the type define site from a use site.
I think the algorithm works this way:
Step 1. do top down traversal, finds unresolved types from JsDoc, and associate these types with the corresponding ASTNodes.
Step 2. resolves unresolved types
Step 3. do bottom up traversal for each statement and associates ASTNode with resolved type.
Is my understanding correct?
Thanks.
[Updated on: Wed, 14 September 2011 22:37] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04023 seconds