Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 4 additions & 17 deletions pkl-core/src/main/java/org/pkl/core/runtime/AnalyzeModule.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
* Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,30 +19,17 @@
import java.net.URI;

public class AnalyzeModule extends StdLibModule {
private static final VmTyped instance = VmUtils.createEmptyModule();

static {
loadModule(URI.create("pkl:analyze"), instance);
}

public static VmTyped getModule() {
return instance;
return getModule(URI.create("pkl:analyze"));
}

public static VmClass getImportGraphClass() {
return AnalyzeModule.ImportGraphClass.instance;
return loadClass("ImportGraph");
}

public static VmClass getImportClass() {
return AnalyzeModule.ImportClass.instance;
}

private static final class ImportGraphClass {
static final VmClass instance = loadClass("ImportGraph");
}

private static final class ImportClass {
static final VmClass instance = loadClass("Import");
return loadClass("Import");
}

@TruffleBoundary
Expand Down
Loading
Loading