global code analysis
You are here :

Sub nodes

Recent changes
Site plan
 
 

This is a special phase of the compilation. Its purpose is to analyse the code and determine for each variables the set of possible TypeName it can bear at runtime. This way we can optimise away late-binding when possible.

For example :

 interface A {
   sub f();
 }
 
 class AImpl implements A {
   public sub f() {
   }
 }
 
 A a = new AImpl();
 a.f();
 

In usual OO language using late binding, the call will not be resolved until runtime. In Nosica, this is false. We can prove this call is really a call to AImpl.f(). We modify the resulting code so that there is no tests nor virtual table. The code is really a call to AImpl.f() on instance 'a'.

Propulsed by Wiclear