-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make minor changes to
ExtractUsedNames
et al
This commit makes minor changes to `ExtractUsednames` in the spirit of better readability and some microoptimization to leave it the way it was before (see the rewrite of `add` by a `contains` + `add`). It also makes some changes to the API: sets some classes to final and renames `ClassFileManagers` to `ClassFileManager` for consistency with the rest of the API. In the future, I'm happy to consider a name change, but for now it's better to stick to the convention of `ClassFileManager` being acting like a "companion object".
- Loading branch information
Showing
6 changed files
with
86 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 11 additions & 5 deletions
16
internal/compiler-interface/src/main/java/xsbti/UseScope.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
package xsbti; | ||
|
||
|
||
import java.util.EnumSet; | ||
|
||
/** | ||
* Defines the scope in which a name hash was captured. | ||
* | ||
* The incremental compiler uses [[UseScope]] to determine some Scala semantics | ||
* assumed in the presence of a name in a concrete position. For instance, | ||
* [[PatMatTarget]] is used for names that appear as the target types of a | ||
* pattern match. | ||
* | ||
* The order of declaration of these is crucial. Don't change it. | ||
*/ | ||
public enum UseScope { | ||
// Order of declaration is crucial | ||
// We can support only 6 values with current implementation of mapper | ||
// Don't add more than 6 scopes. Otherwise, change `Mapper` implementation. | ||
Default, Implicit, PatMatTarget | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters