implements PR-09.1: remove moduleKey from FE/BE contracts
This commit is contained in:
+4
-5
@@ -299,8 +299,8 @@ public class LowerToIRVMService {
|
||||
final var entryPointModuleId = backend.getEntryPointModuleId();
|
||||
final var sorted = new ArrayList<>(backend.getExecutableFunctions().asList());
|
||||
sorted.sort((left, right) -> {
|
||||
final var leftModuleKey = moduleSortKey(backend, left.moduleId(), left.moduleKey());
|
||||
final var rightModuleKey = moduleSortKey(backend, right.moduleId(), right.moduleKey());
|
||||
final var leftModuleKey = moduleSortKey(backend, left.moduleId());
|
||||
final var rightModuleKey = moduleSortKey(backend, right.moduleId());
|
||||
final var moduleCmp = leftModuleKey.compareTo(rightModuleKey);
|
||||
if (moduleCmp != 0) {
|
||||
return moduleCmp;
|
||||
@@ -367,15 +367,14 @@ public class LowerToIRVMService {
|
||||
|
||||
private String moduleSortKey(
|
||||
final IRBackend backend,
|
||||
final ModuleId moduleId,
|
||||
final String fallbackModuleKey) {
|
||||
final ModuleId moduleId) {
|
||||
if (moduleId != null && !moduleId.isNone()) {
|
||||
final var index = moduleId.getIndex();
|
||||
if (index >= 0 && index < backend.getModulePool().size()) {
|
||||
return canonicalModuleSortKey(backend.getModulePool().get(index));
|
||||
}
|
||||
}
|
||||
return fallbackModuleKey == null ? "" : fallbackModuleKey;
|
||||
return "";
|
||||
}
|
||||
|
||||
private String canonicalModuleSortKey(final ModuleReference reference) {
|
||||
|
||||
Reference in New Issue
Block a user