Jan 9, 2011 at 12:28 AM
Edited Jan 9, 2011 at 1:17 AM
I suspect this is handled in your AST layer, for example in methods like Ast.MethodCall::GetThisArgument(). Is this correct?
For some reason (that honestly I cannot recall, I should walk again the same path - or maybe I should start writing notes about what I do) I decided in past to not use your AST layer. This is not an irrevocable choice, I already rethinked my "compiler"
several times as I improved my understanding of language programming, CCI and what I'm doing.
Can I ask you why do you handle that kind of detail at the level of AST? Do you think it's the "natural" place or it just happened that it was ok with the people using/developing CCI to handle them in that layer?
Don't you think that there is something missing in the code model? Like an expression IThisArgument? It should have a similar role of expressions such as ITargetExpression or IBoundExpression and should not be confused with IThisReference which is a
possible value for IThisArgument (just like an IParameterDefinition is a possible value for an IBoundExpression).
This doesn't seem totally improper to me since, unlike the metadata model that mirrors very strictly the raw metadata items, the code model is already a level of abstraction higher than the plain IL code.
Data: "Raw" Metadata Items Metadata Model (nothing) \
CCI world -> \
> Ast Model
<-- .NET world /
Code: "Raw" IL Operations IL Operations Code Model /
Using CCI as client you manipulate metadata objects but probably most of the times you don't manipulate code as IL operations, even when you don't use the Ast layer and that's because you have an additional abstraction layer. I care about IL operations only
in diagnostics displays, for example.
I'm using CCI for both metaprogramming and language programming and while I had to think if I needed the AST layer while doing language programming I never felt the need to use Metadata-AST for metaprogramming before today.
I hope I managed to explain myself.