Skip to content

Commit

Permalink
Removes CaptureFields and handle capture references within GraphBuilder.
Browse files Browse the repository at this point in the history
	Change on 2016/11/29 by kstanger <kstanger@google.com>

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140498526
  • Loading branch information
kstanger authored and Keith Stanger committed Dec 1, 2016
1 parent e53febc commit 6d4af70
Show file tree
Hide file tree
Showing 5 changed files with 164 additions and 203 deletions.
1 change: 0 additions & 1 deletion cycle_finder/Makefile
Expand Up @@ -34,7 +34,6 @@ TEST_CLASS_DIR = $(BUILD_DIR)/test
TRANSLATOR_CLASS_DIR = $(J2OBJC_ROOT)/translator/$(CLASS_DIR) TRANSLATOR_CLASS_DIR = $(J2OBJC_ROOT)/translator/$(CLASS_DIR)


JAVA_SOURCES = \ JAVA_SOURCES = \
com/google/devtools/cyclefinder/CaptureFields.java \
com/google/devtools/cyclefinder/CycleFinder.java \ com/google/devtools/cyclefinder/CycleFinder.java \
com/google/devtools/cyclefinder/Edge.java \ com/google/devtools/cyclefinder/Edge.java \
com/google/devtools/cyclefinder/GraphBuilder.java \ com/google/devtools/cyclefinder/GraphBuilder.java \
Expand Down

This file was deleted.

Expand Up @@ -130,10 +130,9 @@ private File stripIncompatible(


public List<List<Edge>> findCycles() throws IOException { public List<List<Edge>> findCycles() throws IOException {
Parser parser = createParser(options); Parser parser = createParser(options);
final CaptureFields captureFields = new CaptureFields();
NameList whitelist = NameList whitelist =
NameList.createFromFiles(options.getWhitelistFiles(), options.fileEncoding()); NameList.createFromFiles(options.getWhitelistFiles(), options.fileEncoding());
final GraphBuilder graphBuilder = new GraphBuilder(captureFields, whitelist); final GraphBuilder graphBuilder = new GraphBuilder(whitelist);


List<String> sourceFiles = options.getSourceFiles(); List<String> sourceFiles = options.getSourceFiles();
File strippedDir = stripIncompatible(sourceFiles, parser); File strippedDir = stripIncompatible(sourceFiles, parser);
Expand All @@ -143,7 +142,6 @@ public List<List<Edge>> findCycles() throws IOException {
public void handleParsedUnit(String path, CompilationUnit unit) { public void handleParsedUnit(String path, CompilationUnit unit) {
new LambdaTypeElementAdder(unit).run(); new LambdaTypeElementAdder(unit).run();
new OuterReferenceResolver(unit).run(); new OuterReferenceResolver(unit).run();
captureFields.collect(unit);
graphBuilder.visitAST(unit); graphBuilder.visitAST(unit);
} }
}; };
Expand Down

0 comments on commit 6d4af70

Please sign in to comment.