Changeset 3876

Show
Ignore:
Timestamp:
06/18/09 20:21:35 (8 months ago)
Author:
EricAllen
Message:

Added API linker and associated hooks (work in progress).
Added some testing of cache cleaning.

Location:
trunk/ProjectFortress
Files:
4 added
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/ProjectFortress/src/com/sun/fortress/compiler/StaticChecker.java

    r3865 r3876  
    4545import com.sun.fortress.nodes.Type; 
    4646import com.sun.fortress.repository.FortressRepository; 
     47import com.sun.fortress.scala_src.linker.ApiLinker; 
     48import com.sun.fortress.scala_src.linker.CompoundApiChecker; 
    4749import com.sun.fortress.scala_src.typechecker.CoercionTest; 
    4850import com.sun.fortress.scala_src.typechecker.ExportChecker; 
     
    290292                                             GlobalEnvironment env, 
    291293                                             FortressRepository repository) { 
     294 
     295        // Check if this is a compound API, and, if so, link it into a single API. 
     296        List<StaticError> errors = new CompoundApiChecker(env, repository).check(api); 
     297        if (! errors.isEmpty()) {  
     298            return new TypeCheckerResult(api.ast(), errors); 
     299        } 
     300        api = new ApiLinker(env, repository).link(api); 
     301 
    292302        // Check type hierarchy to ensure acyclicity. 
    293         List<StaticError> errors = new TypeHierarchyChecker(api, env, repository).checkHierarchy(); 
     303        errors = new TypeHierarchyChecker(api, env, repository).checkHierarchy(); 
    294304        if (! errors.isEmpty()) { 
    295305            return new TypeCheckerResult(api.ast(), errors); 
  • trunk/ProjectFortress/src/com/sun/fortress/compiler/index/CompilationUnitIndex.java

    r3760 r3876  
    8282    } 
    8383 
     84    public Set<APIName> comprises() {  
     85        final Set<APIName> result = new HashSet<APIName>(); 
     86        for (APIName _apiName : ast().getComprises()) {  
     87            result.add(_apiName); 
     88        } 
     89        return result; 
     90    } 
     91 
    8492    public Map<Id, Variable> variables() { return _variables; } 
    8593