re-shape of compiler pipeline

This commit is contained in:
2026-03-30 19:40:00 +01:00
parent 9d2a9955c0
commit d22c7d16ef
6 changed files with 84 additions and 57 deletions
@@ -13,7 +13,7 @@ import java.util.LinkedHashSet;
@Builder
@Getter
public class IRBackend {
public class IRBackend implements IRBackendReader {
@Builder.Default
private final String entryPointCallableName = "main";
@Builder.Default
@@ -0,0 +1,20 @@
package p.studio.compiler.models;
import p.studio.compiler.source.identifiers.ModuleId;
import p.studio.compiler.source.tables.CallableSignatureRef;
import p.studio.compiler.source.tables.IntrinsicReference;
import p.studio.compiler.source.tables.ModuleReference;
import p.studio.utilities.structures.ReadOnlyList;
public interface IRBackendReader {
String getEntryPointCallableName();
ModuleId getEntryPointModuleId();
ReadOnlyList<IRFunction> getFunctions();
ReadOnlyList<IRSyntheticFunction> getSyntheticFunctions();
ReadOnlyList<IRGlobal> getGlobals();
ReadOnlyList<IRBackendExecutableFunction> getExecutableFunctions();
ReadOnlyList<ModuleReference> getModulePool();
ReadOnlyList<CallableSignatureRef> getCallableSignatures();
ReadOnlyList<IntrinsicReference> getIntrinsicPool();
IRReservedMetadata getReservedMetadata();
}