Skip to content

Commit

Permalink
fixes after merge to make it compile
Browse files Browse the repository at this point in the history
  • Loading branch information
radeusgd committed Dec 27, 2024
1 parent 99f6462 commit 29c5fa0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.enso.compiler.core.ir.module.scope.definition.Method;
import org.enso.compiler.core.ir.module.scope.imports.Polyglot;
import org.enso.compiler.data.BindingsMap;
import org.enso.compiler.pass.resolve.MethodDefinitions$;
import org.enso.compiler.pass.resolve.MethodDefinitions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import scala.jdk.javaapi.CollectionConverters;
Expand Down Expand Up @@ -136,7 +136,7 @@ protected final TypeScopeReferenceType getTypeAssociatedWithMethod(Method.Explic
} else {
var metadata =
MetadataInteropHelpers.getMetadataOrNull(
typePointerOpt.get(), MethodDefinitions$.MODULE$, BindingsMap.Resolution.class);
typePointerOpt.get(), MethodDefinitions.INSTANCE, BindingsMap.Resolution.class);
if (metadata == null) {
logger.debug(
"Failed to resolve type pointer for method: {}", method.methodReference().showCode());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

/** A representation of Enso's per-file top-level scope. */
@ExportLibrary(TypesLibrary.class)
public final class ModuleScope extends EnsoObject implements EnsoObject, CommonModuleScopeShape<Function, Type, ImportExportScope> {
public final class ModuleScope extends EnsoObject implements CommonModuleScopeShape<Function, Type, ImportExportScope> {
private final Type associatedType;
private final Module module;
private final Map<String, Supplier<TruffleObject>> polyglotSymbols;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ import org.enso.compiler.core.ir.{
Type => Tpe
}
import org.enso.compiler.core.ir.module.scope.Definition
import org.enso.compiler.core.ir.module.scope.definition
import org.enso.compiler.core.ir.module.scope.Import
import org.enso.compiler.core.ir.module.scope.imports
import org.enso.compiler.core.ir.Name.Special
import org.enso.compiler.core.ir.expression.{
errors,
Application,
Expand Down Expand Up @@ -210,7 +206,7 @@ class IrToTruffle(
visibleName: String,
javaClassName: String
): Unit =
scopeBuilder.registerPolyglotSymbol(
this.scopeBuilder.registerPolyglotSymbol(
visibleName,
() => context.lookupJavaClass(javaClassName)
)
Expand Down Expand Up @@ -256,16 +252,16 @@ class IrToTruffle(
conversion.methodName.name,
fn.arguments,
fn.body,
ReadArgumentCheckNode.build(context, "conversion", toType),
TypeCheckValueNode.single("conversion", toType),
None,
true
)
val rootNode = MethodRootNode.build(
language,
expressionProcessor.scope,
scopeBuilder.asModuleScope(),
this.scopeBuilder.asModuleScope(),
() => bodyBuilder.bodyNode(),
makeSection(scopeBuilder.getModule, conversion.location),
makeSection(this.scopeBuilder.getModule, conversion.location),
toType,
conversion.methodName.name
)
Expand All @@ -285,7 +281,7 @@ class IrToTruffle(
"Conversion bodies must be functions at the point of codegen."
)
}
scopeBuilder.registerConversionMethod(toType, fromType, function)
this.scopeBuilder.registerConversionMethod(toType, fromType, function)
}
}

Expand Down Expand Up @@ -332,7 +328,7 @@ class IrToTruffle(
frameInfo
)

scopeBuilder.registerMethod(
this.scopeBuilder.registerMethod(
cons,
method.methodName.name,
() => {
Expand All @@ -350,7 +346,7 @@ class IrToTruffle(

override protected def processTypeDefinition(typ: Definition.Type): Unit = {
val atomDefs = typ.members
val asType = scopeBuilder.asModuleScope().getType(typ.name.name, true)
val asType = this.scopeBuilder.asModuleScope().getType(typ.name.name, true)
val atomConstructors =
atomDefs.map(cons => asType.getConstructors.get(cons.name.name))
atomConstructors
Expand Down

0 comments on commit 29c5fa0

Please sign in to comment.