feat: parallel type checking #42
@@ -104,7 +104,9 @@ def compile(
|
|||||||
val asmLines = backend(typedProg)
|
val asmLines = backend(typedProg)
|
||||||
val backendEnd = System.nanoTime()
|
val backendEnd = System.nanoTime()
|
||||||
writer.writeTo(asmLines, outputPath) *>
|
writer.writeTo(asmLines, outputPath) *>
|
||||||
logAction(s"Backend time (${filePath.toRealPath()}): ${(backendEnd - backendStart).toFloat / 1e6} ms") *>
|
logAction(
|
||||||
|
s"Backend time (${filePath.toRealPath()}): ${(backendEnd - backendStart).toFloat / 1e6} ms"
|
||||||
|
) *>
|
||||||
IO.blocking(println(s"Success: ${outputPath.toRealPath()}"))
|
IO.blocking(println(s"Success: ${outputPath.toRealPath()}"))
|
||||||
|
|
||||||
def processProgram(contents: String, file: File, outDir: Path): IO[Int] =
|
def processProgram(contents: String, file: File, outDir: Path): IO[Int] =
|
||||||
@@ -112,7 +114,9 @@ def compile(
|
|||||||
for {
|
for {
|
||||||
frontendResult <- frontend(contents, file)
|
frontendResult <- frontend(contents, file)
|
||||||
frontendEnd = System.nanoTime()
|
frontendEnd = System.nanoTime()
|
||||||
_ <- logAction(s"Frontend time (${filePath.toRealPath()}): ${(frontendEnd - frontendStart).toFloat / 1e6} ms")
|
_ <- logAction(
|
||||||
|
s"Frontend time (${filePath.toRealPath()}): ${(frontendEnd - frontendStart).toFloat / 1e6} ms"
|
||||||
|
)
|
||||||
res <- frontendResult match {
|
res <- frontendResult match {
|
||||||
case Left(errors) =>
|
case Left(errors) =>
|
||||||
val code = errors.map(err => err.exitCode).toList.min
|
val code = errors.map(err => err.exitCode).toList.min
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import cats.data.Chain
|
|||||||
import cats.data.NonEmptyList
|
import cats.data.NonEmptyList
|
||||||
import parsley.{Failure, Success}
|
import parsley.{Failure, Success}
|
||||||
|
|
||||||
|
|
||||||
object renamer {
|
object renamer {
|
||||||
import ast._
|
import ast._
|
||||||
import types._
|
import types._
|
||||||
|
|||||||
Reference in New Issue
Block a user