@@ -104,12 +104,6 @@ case object MemoryFill extends Instr
104104case object MemoryCopy extends Instr
105105case class MemoryInit (seg : Int ) extends Instr
106106// case class DataDrop(seg: Int) extends Instr
107- // case class RefNull(ty: RefType) extends Instr
108- // case class RefFunc(func: Int) extends Instr
109- // case object RefIsNull extends Instr
110- case class PushSym (name : String , concreteVal : Num ) extends Instr
111- case class Symbolic (ty : ValueType ) extends Instr
112- case object SymAssert extends Instr
113107case class Const (num : Num ) extends Instr
114108case class Test (op : TestOp ) extends Instr
115109case class Compare (op : RelOp ) extends Instr
@@ -132,17 +126,23 @@ case class Convert(op: CvtOp) extends Instr
132126// case class VecExtract(op: VecExtractOp) extends Instr
133127// case class VecReplace(op: VecReplaceOp) extends Instr
134128
129+ // Instructions for symbolic execution
130+ case class PushSym (name : String , concreteVal : Num ) extends Instr
131+ case class Symbolic (ty : ValueType ) extends Instr
132+ case object SymAssert extends Instr
133+
135134// TODO: add wasmfx instructions
136135// TODO: should I take care of the unresolved cases?
137- case class Suspend (tag_id : Int ) extends Instr
136+ case class Suspend (tag : Int ) extends Instr
138137// note that cont.new can only be called with a func type
139- case class ContNew (ty_id : Int ) extends Instr
138+ case class ContNew (ty : Int ) extends Instr
139+ // case class RefNull(ty: RefType) extends Instr
140+ // case object RefIsNull extends Instr
140141// note that ref.func can be called with any of the extended function type
141- case class RefFunc (ty_id : Int ) extends Instr
142-
143- case class Resume (ty_id : Int , ons : List [Handler ]) extends Instr
142+ case class RefFunc (ty : Int ) extends Instr
143+ case class Resume (ty : Int , ons : List [Handler ]) extends Instr
144144// TODO: make sure this class wants to extend WIR
145- case class Handler (tag_id : Int , label_id : Int ) extends WIR
145+ case class Handler (tag : Int , label : Int ) extends WIR
146146
147147trait Unresolved
148148case class CallUnresolved (name : String ) extends Instr with Unresolved
@@ -266,7 +266,6 @@ case class ValBlockType(tipe: Option[ValueType]) extends BlockType;
266266case class RTGlobal (ty : GlobalType , var value : Value )
267267
268268// Values
269-
270269abstract class Value extends WIR {
271270 def tipe : ValueType
272271}
0 commit comments