Skip to content

Commit

Permalink
fix compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
Kraks committed Jun 2, 2023
1 parent 6266003 commit fb15e8d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/main/scala/wasm/Eval.scala
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ case class Config(var frame: Frame, code: Code, stackBudget: Int) {
// case Plain(instr) => println(stack, instr)
// case _ => println(stack)
// }
val (newStack, newInstrs) = adminInstrs.head match {
val (newStack, newInstrs): (List[Value], List[AdminInstr]) = adminInstrs.head match {
case Plain(instr) => instr match {
// Parametric Instructions
case Drop => stack match {
Expand Down Expand Up @@ -253,7 +253,8 @@ case class Config(var frame: Frame, code: Code, stackBudget: Int) {
} else {
val mem = frame.module.memory.head
mem.copy(dest, src, n)
}
??? // FIXME
}
}
case _ => throw new Exception("Invalid stack")
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/wasm/Memory.scala
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ case class Memory(var memType: MemoryType, data: ArrayBuffer[Byte]) {
storeByte(dst + i, loadByte(src + i))
}
} else {
for (i <- 0 until size) {
for (i <- 0 until size.toInt) {
storeByte(dst + i, loadByte(src + i))
}
}
Expand Down

0 comments on commit fb15e8d

Please sign in to comment.