Commit 48de1b2c authored by Kunshan Wang's avatar Kunshan Wang

Bundle and some slight changes.

parent 7c5feb7f
File deleted
package uvm
class Bundle {
import uvm.types._
import uvm.ssavalues._
}
\ No newline at end of file
class Bundle {
val typeNs = new SimpleNamespace[Type]()
val funcSigNs = new SimpleNamespace[FuncSig]()
val declConstNs = new SimpleNamespace[DeclaredConstant]()
val globalDataNS = new SimpleNamespace[GlobalData]()
val funcNs = new SimpleNamespace[Function]()
val globalValueNS = new SimpleNamespace[Constant]()
}
......@@ -17,10 +17,14 @@ class Function extends IdentifiedSettable {
class CFG {
var func: Function = null
var bbs: Seq[BasicBlock] = Nil
var bbs: Seq[BasicBlock] = null
var entry: BasicBlock = null
var params: Seq[Parameter] = null
var bbNs: Namespace[BasicBlock] = null // Consider using one global bb ns
var instNs: Namespace[Instruction] = null // Consider using one global value ns
}
class BasicBlock extends IdentifiedSettable {
var insts: Seq[Instruction] = Nil
var insts: Seq[Instruction] = null
}
\ No newline at end of file
......@@ -6,12 +6,18 @@ abstract class Type extends IdentifiedSettable {
override final def toString: String = Type.prettyPrint(this)
}
abstract class FPType extends Type
abstract class AbstractRefType extends Type {
def ty: Type
}
case class TypeInt(var length: Int) extends Type
case class TypeFloat() extends Type
case class TypeDouble() extends Type
case class TypeRef(var ty: Type) extends Type
case class TypeIRef(var ty: Type) extends Type
case class TypeWeakRef(var ty: Type) extends Type
case class TypeFloat() extends FPType
case class TypeDouble() extends FPType
case class TypeRef(var ty: Type) extends AbstractRefType
case class TypeIRef(var ty: Type) extends AbstractRefType
case class TypeWeakRef(var ty: Type) extends AbstractRefType
case class TypeStruct(var fieldTy: Seq[Type]) extends Type
case class TypeArray(var elemTy: Type, var len: Long) extends Type
case class TypeHybrid(var fixedPart: Type, var varPart: Type) extends Type
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment