Home » openjdk-7 » net.nosica » compiler » codegeneration » common »



InstanciatedExceptionEnvironment   Environment for instanciated thrown exception Used during polymorphism analysis to get all instanciated exceptions
and generate suitable optimized code for exception handling 
code | html
InstanciatedExceptionEnvironmentImpl.UndoAction     code | html


ComputeMetricVisitor   Compute metricity of a method not implemented for now
metricity is defined as followed :
number of Intermediate representation object in a method

==> computing metricity can be an helper to decide wether or not a method must be inlined 
code | html
DisplayVisitor   Display an Intermediate Representation (IR) tree Usefull for debugging purpose :
it displays all contents of the node : this way we can see if code is produced in right order
we can also see if polymorphism analysis has driven good result
code | html
InstanciatedExceptionEnvironmentImpl     code | html
InstanciatedExceptionEnvironmentImpl.RemoveException     code | html
InstanciatedExceptionEnvironmentImpl.ReplaceException     code | html
ResolveExpressionPolymorphismVisitor   Resolve polymorphism for a particular expression visit all node of an expression and populate all types instanciated to their declaration
e.g :
A a = create();
A create() {
 switch (random) {
   case 0 : {
     return new AImpl1();
   case 1 : {
     return new AImpl2();
 else {
   return new ADefaultImpl();
From this code we can see can take 3 different implementations :
{AImpl1, AImpl2, ADefaultImpl}.
The purpose of this visitor will be to follow all expressions (including method call)
to collect all possible types (here we see that method create can return {AImpl1, AImpl2, ADefaultImpl})
and associate it to their declarations ==> We know a will possibly take 3 identity so we will be able
to generate code for this 3 types only. 
code | html
ResolveMethodPolymorphismVisitor   Resolve polymorphism of a method  code | html
ResolvePolymorphismVisitor   visit all statements to perform a ResolveExpresionPolymorphismVisitor analysis on each expressions  code | html