Skip to content

Commit 5be3b82

Browse files
committed
remove AtomType stub - it was not finished - to be re-added in next iteration
1 parent 113eec3 commit 5be3b82

File tree

3 files changed

+0
-42
lines changed

3 files changed

+0
-42
lines changed

engine/runtime-compiler/src/main/java/org/enso/compiler/pass/analyse/types/scope/AtomType.java

-19
This file was deleted.

engine/runtime-compiler/src/main/java/org/enso/compiler/pass/analyse/types/scope/StaticModuleScope.java

-13
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,18 @@ public final class StaticModuleScope
3535
private final TypeScopeReference associatedType;
3636
private final List<StaticImportExportScope> imports;
3737
private final List<StaticImportExportScope> exports;
38-
private final Map<String, AtomType> typesDefinedHere;
3938
private final Map<TypeScopeReference, Map<String, TypeRepresentation>> methods;
4039

4140
private StaticModuleScope(
4241
QualifiedName moduleName,
4342
TypeScopeReference associatedType,
4443
List<StaticImportExportScope> imports,
4544
List<StaticImportExportScope> exports,
46-
Map<String, AtomType> typesDefinedHere,
4745
Map<TypeScopeReference, Map<String, TypeRepresentation>> methods) {
4846
this.moduleName = moduleName;
4947
this.associatedType = associatedType;
5048
this.imports = imports;
5149
this.exports = exports;
52-
this.typesDefinedHere = typesDefinedHere;
5350
this.methods = methods;
5451
}
5552

@@ -60,7 +57,6 @@ static final class Builder
6057
private final TypeScopeReference associatedType;
6158
private final List<StaticImportExportScope> imports = new ArrayList<>();
6259
private final List<StaticImportExportScope> exports = new ArrayList<>();
63-
private final Map<String, AtomType> typesDefinedHere = new HashMap<>();
6460
private final Map<TypeScopeReference, Map<String, TypeRepresentation>> methods =
6561
new HashMap<>();
6662

@@ -85,7 +81,6 @@ public StaticModuleScope build() {
8581
associatedType,
8682
Collections.unmodifiableList(imports),
8783
Collections.unmodifiableList(exports),
88-
Collections.unmodifiableMap(typesDefinedHere),
8984
Collections.unmodifiableMap(methods));
9085
}
9186

@@ -98,14 +93,6 @@ public TypeScopeReference getAssociatedType() {
9893
return associatedType;
9994
}
10095

101-
void registerType(AtomType type) {
102-
checkSealed();
103-
var previous = typesDefinedHere.putIfAbsent(type.getName(), type);
104-
if (previous != null) {
105-
throw new IllegalStateException("Type already defined: " + type.getName());
106-
}
107-
}
108-
10996
void registerMethod(TypeScopeReference parentType, String name, TypeRepresentation type) {
11097
checkSealed();
11198
var typeMethods = methods.computeIfAbsent(parentType, k -> new HashMap<>());

engine/runtime-compiler/src/main/java/org/enso/compiler/pass/analyse/types/scope/StaticModuleScopeAnalysis.java

-10
Original file line numberDiff line numberDiff line change
@@ -124,18 +124,8 @@ protected void processMethodDefinition(Method.Explicit method) {
124124

125125
@Override
126126
protected void processTypeDefinition(Definition.Type typ) {
127-
List<AtomType.Constructor> constructors =
128-
CollectionConverters$.MODULE$.asJava(typ.members()).stream()
129-
.map(
130-
constructorDef ->
131-
new AtomType.Constructor(
132-
constructorDef.name().name(), constructorDef.isPrivate()))
133-
.toList();
134-
135-
AtomType atomType = new AtomType(typ.name().name(), constructors);
136127
var qualifiedName = scopeBuilder.getModuleName().createChild(typ.name().name());
137128
var atomTypeScope = TypeScopeReference.atomType(qualifiedName);
138-
scopeBuilder.registerType(atomType);
139129
registerFieldGetters(scopeBuilder, atomTypeScope, typ);
140130
}
141131

0 commit comments

Comments
 (0)