implements PR-09.1: remove moduleKey from FE/BE contracts

This commit is contained in:
2026-03-24 13:42:33 +00:00
parent 98adb67bc0
commit 32ab6d7a76
17 changed files with 53 additions and 166 deletions
@@ -46,7 +46,7 @@ class PbsGoldenArtifactsTest {
final var callable = file.callableSignatures().get(i);
out.append(i)
.append(':')
.append(callable.moduleKey())
.append(callable.moduleId().isNone() ? "-" : callable.moduleId().getIndex())
.append("::")
.append(callable.callableName())
.append('/')
@@ -61,7 +61,7 @@ class PbsGoldenArtifactsTest {
out.append("fn#")
.append(i)
.append(':')
.append(fn.moduleKey())
.append(fn.moduleId().isNone() ? "-" : fn.moduleId().getIndex())
.append("::")
.append(fn.callableName())
.append(" id=")
@@ -211,7 +211,6 @@ class PBSFrontendPhaseServiceTest {
assertNotNull(callInstruction.calleeModuleId());
assertEquals(targetFn.moduleId().getIndex(), callInstruction.calleeModuleId().getIndex());
assertEquals(targetFn.moduleKey(), callInstruction.calleeModuleKey());
assertTrue(callerFn.moduleId().getIndex() != callInstruction.calleeModuleId().getIndex());
}
@@ -916,7 +915,8 @@ class PBSFrontendPhaseServiceTest {
.filter(function -> "frame".equals(function.callableName()))
.findFirst();
final var executableNames = irBackend.getExecutableFunctions().stream()
.map(function -> function.callableName() + "@" + function.moduleKey())
.map(function -> function.callableName() + "@"
+ (function.moduleId().isNone() ? "-" : function.moduleId().getIndex()))
.toList();
assertTrue(
frameExecutableOptional.isPresent(),
@@ -1,11 +1,11 @@
callables=2
0:::b/1|(simple:int)->simple:int
1:::a/0|()->simple:int
0:-::b/1|(simple:int)->simple:int
1:-::a/0|()->simple:int
intrinsics=0
fn#0:::b id=0
fn#0:-::b id=0
GET_LOCAL calleeId=- intrinsicId=-
RET calleeId=- intrinsicId=-
fn#1:::a id=1
fn#1:-::a id=1
PUSH_I32 calleeId=- intrinsicId=-
CALL_FUNC calleeId=0 intrinsicId=-
RET calleeId=- intrinsicId=-