Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ailrst committed Jan 29, 2024
1 parent b46eb70 commit ee56b8b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/scala/ir/Program.scala
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ class Parameter(var name: String, var size: Int, var value: Register) {

sealed trait BlockKind

/* Block can be a call return entry or return */
case class Regular() extends BlockKind

/* Block is the fallthrough / return target of a call. */
case class CallReturn(from: Call) extends BlockKind
Expand Down Expand Up @@ -426,15 +428,15 @@ class Block private (
object Block:

def regular(label: String, address: Option[Int], statements: IterableOnce[Statement], jump: Jump) : Block = {
new Block(Regular, label, address, statements, jump)
new Block(Regular(), label, address, statements, jump)
}

def regular(label: String, address: Option[Int], statements: IterableOnce[Statement]) : Block = {
new Block(Regular, label, address, statements, GoTo(Seq(), Some(label + "_unknown")))
new Block(Regular(), label, address, statements, GoTo(Seq(), Some(label + "_unknown")))
}

def regular(label: String, address: Option[Int] = None) : Block = {
new Block(Regular, label, address, IntrusiveList.empty, GoTo(Seq(), Some(label + "_unknown")))
new Block(Regular(), label, address, IntrusiveList.empty, GoTo(Seq(), Some(label + "_unknown")))
}

def callReturn(from: Call) : Block = {
Expand Down

0 comments on commit ee56b8b

Please sign in to comment.