implements PR-O1.1
This commit is contained in:
+7
-2
@@ -26,12 +26,16 @@ public class EmitBytecodePipelineStage implements PipelineStage {
|
||||
return BuildingIssueSink.empty()
|
||||
.report(builder -> builder
|
||||
.error(true)
|
||||
.phase("BACKEND_EMIT_BYTECODE")
|
||||
.code("MARSHAL_FORMAT_STAGE_INPUT_MISSING")
|
||||
.message("[BUILD]: optimized IRVM is missing before EmitBytecode stage"));
|
||||
}
|
||||
if (ctx.optimizedIrvm.hasInternalOpcodes()) {
|
||||
return BuildingIssueSink.empty()
|
||||
.report(builder -> builder
|
||||
.error(true)
|
||||
.phase("BACKEND_EMIT_BYTECODE")
|
||||
.code("MARSHAL_VERIFY_PRECHECK_INTERNAL_OPCODE_RESIDUAL")
|
||||
.message("[BUILD]: optimized IRVM still contains internal opcodes"));
|
||||
}
|
||||
try {
|
||||
@@ -41,8 +45,9 @@ public class EmitBytecodePipelineStage implements PipelineStage {
|
||||
return BuildingIssueSink.empty()
|
||||
.report(builder -> builder
|
||||
.error(true)
|
||||
.message("[BUILD]: bytecode marshaling failed (%s): %s"
|
||||
.formatted(e.code().name(), e.getMessage()))
|
||||
.phase("BACKEND_EMIT_BYTECODE")
|
||||
.code(e.code().name())
|
||||
.message("[BUILD]: bytecode marshaling failed: " + e.getMessage())
|
||||
.exception(e));
|
||||
}
|
||||
return BuildingIssueSink.empty();
|
||||
|
||||
+10
-4
@@ -27,6 +27,8 @@ public class LowerToIRVMPipelineStage implements PipelineStage {
|
||||
return BuildingIssueSink.empty()
|
||||
.report(builder -> builder
|
||||
.error(true)
|
||||
.phase("BACKEND_LOWER_TO_IRVM")
|
||||
.code("MARSHAL_FORMAT_STAGE_INPUT_MISSING")
|
||||
.message("[BUILD]: IRBackend is missing before LowerToIRVM stage"));
|
||||
}
|
||||
try {
|
||||
@@ -35,15 +37,19 @@ public class LowerToIRVMPipelineStage implements PipelineStage {
|
||||
return BuildingIssueSink.empty()
|
||||
.report(builder -> builder
|
||||
.error(true)
|
||||
.message("[BUILD]: lower to irvm failed (%s): %s"
|
||||
.formatted(e.code().name(), e.getMessage()))
|
||||
.phase("BACKEND_LOWER_TO_IRVM")
|
||||
.code(e.code().name())
|
||||
.message("[BUILD]: lower to irvm failed: " + e.getMessage())
|
||||
.exception(e));
|
||||
} catch (IRVMValidationException e) {
|
||||
return BuildingIssueSink.empty()
|
||||
.report(builder -> builder
|
||||
.error(true)
|
||||
.message("[BUILD]: lower to irvm validation failed (%s): %s"
|
||||
.formatted(e.code().name(), e.getMessage()))
|
||||
.phase("BACKEND_LOWER_TO_IRVM")
|
||||
.code(e.code().name())
|
||||
.functionIndex(e.functionIndex())
|
||||
.pc(e.pc())
|
||||
.message("[BUILD]: lower to irvm validation failed: " + e.getMessage())
|
||||
.exception(e));
|
||||
}
|
||||
return BuildingIssueSink.empty();
|
||||
|
||||
+9
-2
@@ -26,6 +26,8 @@ public class OptimizeIRVMPipelineStage implements PipelineStage {
|
||||
return BuildingIssueSink.empty()
|
||||
.report(builder -> builder
|
||||
.error(true)
|
||||
.phase("BACKEND_OPTIMIZE_IRVM")
|
||||
.code("MARSHAL_FORMAT_STAGE_INPUT_MISSING")
|
||||
.message("[BUILD]: IRVM is missing before OptimizeIRVM stage"));
|
||||
}
|
||||
try {
|
||||
@@ -34,13 +36,18 @@ public class OptimizeIRVMPipelineStage implements PipelineStage {
|
||||
return BuildingIssueSink.empty()
|
||||
.report(builder -> builder
|
||||
.error(true)
|
||||
.message("[BUILD]: optimize irvm validation failed (%s): %s"
|
||||
.formatted(e.code().name(), e.getMessage()))
|
||||
.phase("BACKEND_OPTIMIZE_IRVM")
|
||||
.code(e.code().name())
|
||||
.functionIndex(e.functionIndex())
|
||||
.pc(e.pc())
|
||||
.message("[BUILD]: optimize irvm validation failed: " + e.getMessage())
|
||||
.exception(e));
|
||||
} catch (RuntimeException e) {
|
||||
return BuildingIssueSink.empty()
|
||||
.report(builder -> builder
|
||||
.error(true)
|
||||
.phase("BACKEND_OPTIMIZE_IRVM")
|
||||
.code("MARSHAL_VERIFY_PRECHECK_OPTIMIZE_RUNTIME_FAILURE")
|
||||
.message("[BUILD]: optimize irvm failed: " + e.getMessage())
|
||||
.exception(e));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user