Search in sources :

Example 1 with UnknownTypeCollector

use of com.redhat.ceylon.compiler.java.loader.UnknownTypeCollector in project ceylon-compiler by ceylon.

the class CeyloncCompilerDelegate method typeCheck.

@Override
public void typeCheck(java.util.List<PhasedUnit> listOfUnits) {
    StatusPrinter sp = getStatusPrinter();
    int size = listOfUnits.size();
    int i = 1;
    for (PhasedUnit pu : listOfUnits) {
        if (sp != null)
            progress(sp, 1, i++, size, pu);
        pu.validateTree();
        pu.scanDeclarations();
    }
    i = 1;
    for (PhasedUnit pu : listOfUnits) {
        if (sp != null)
            progress(sp, 2, i++, size, pu);
        pu.scanTypeDeclarations();
    }
    i = 1;
    for (PhasedUnit pu : listOfUnits) {
        if (sp != null)
            progress(sp, 3, i++, size, pu);
        pu.validateRefinement();
    }
    i = 1;
    for (PhasedUnit pu : listOfUnits) {
        if (sp != null)
            progress(sp, 4, i++, size, pu);
        pu.analyseTypes();
    }
    i = 1;
    for (PhasedUnit pu : listOfUnits) {
        if (sp != null)
            progress(sp, 5, i++, size, pu);
        pu.analyseFlow();
    }
    i = 1;
    for (PhasedUnit pu : listOfUnits) {
        if (sp != null)
            progress(sp, 6, i++, size, pu);
        pu.analyseUsage();
    }
    i = 1;
    UnknownTypeCollector utc = new UnknownTypeCollector();
    for (PhasedUnit pu : listOfUnits) {
        if (sp != null)
            progress(sp, 7, i++, size, pu);
        pu.getCompilationUnit().visit(utc);
    }
}
Also used : StatusPrinter(com.redhat.ceylon.common.StatusPrinter) PhasedUnit(com.redhat.ceylon.compiler.typechecker.context.PhasedUnit) UnknownTypeCollector(com.redhat.ceylon.compiler.java.loader.UnknownTypeCollector)

Aggregations

StatusPrinter (com.redhat.ceylon.common.StatusPrinter)1 UnknownTypeCollector (com.redhat.ceylon.compiler.java.loader.UnknownTypeCollector)1 PhasedUnit (com.redhat.ceylon.compiler.typechecker.context.PhasedUnit)1