root/trunk/ProjectFortress/src/com/sun/fortress/compiler/phases/EmptyPhase.java @ 2404

Revision 2404, 1.6 KB (checked in by mspiegel, 16 months ago)

[static analysis] Another refactoring of Shell.java. Static phases are now declared in package com.sun.fortress.compiler.phases.

Line 
1package com.sun.fortress.compiler.phases;
2
3import java.util.Map;
4
5import com.sun.fortress.compiler.AnalyzeResult;
6import com.sun.fortress.compiler.GlobalEnvironment;
7import com.sun.fortress.compiler.IndexBuilder;
8import com.sun.fortress.compiler.typechecker.TypeEnv;
9import com.sun.fortress.exceptions.StaticError;
10import com.sun.fortress.nodes.Api;
11import com.sun.fortress.nodes.Component;
12import com.sun.fortress.nodes.Node;
13import com.sun.fortress.nodes_util.Span;
14import com.sun.fortress.repository.FortressRepository;
15import com.sun.fortress.useful.Debug;
16
17import edu.rice.cs.plt.iter.IterUtil;
18import edu.rice.cs.plt.tuple.Option;
19import edu.rice.cs.plt.tuple.Pair;
20
21public class EmptyPhase extends Phase {
22
23        private final Iterable<Api> apis;
24        private final Iterable<Component> components;
25       
26        public EmptyPhase(FortressRepository repository, GlobalEnvironment env,
27                        Iterable<Api> apis, Iterable<Component> components, long lastModified) {
28                super(null);           
29                this.repository = repository;           
30                this.env = env;
31                this.apis = apis;
32                this.components = components;           
33                this.lastModified = lastModified;
34        }
35
36        @Override       
37    public AnalyzeResult execute( ) throws StaticError {
38        Debug.debug( Debug.Type.FORTRESS, 1, "Start phase Empty" );
39        IndexBuilder.ApiResult apiIndex = IndexBuilder.buildApis(apis, lastModified);
40        IndexBuilder.ComponentResult componentIndex = IndexBuilder.buildComponents(components, lastModified);
41        return new AnalyzeResult(apiIndex.apis(), componentIndex.components(),
42                        IterUtil.<StaticError>empty(), Option.<Map<Pair<Node,Span>, TypeEnv>>none());
43    }
44
45}
Note: See TracBrowser for help on using the browser.