Commit 7fe83fed authored by Kunshan Wang's avatar Kunshan Wang

Batch renaming

KeepAlive -> Keepalive
Watchpoint -> WatchPoint
Fp -> FP
parent ffe3b088
...@@ -155,7 +155,7 @@ instBody ...@@ -155,7 +155,7 @@ instBody
(caseVal+=value caseDest+=destClause )* '}' # InstSwitch (caseVal+=value caseDest+=destClause )* '}' # InstSwitch
// Inter-function Control Flow // Inter-function Control Flow
| 'CALL' funcCallBody excClause keepAliveClause # InstCall | 'CALL' funcCallBody excClause keepaliveClause # InstCall
| 'TAILCALL' funcCallBody # InstTailCall | 'TAILCALL' funcCallBody # InstTailCall
| 'RET' retVals # InstRet | 'RET' retVals # InstRet
...@@ -190,20 +190,20 @@ instBody ...@@ -190,20 +190,20 @@ instBody
| 'FENCE' memord # InstFence | 'FENCE' memord # InstFence
// Trap // Trap
| 'TRAP' typeList excClause keepAliveClause # InstTrap | 'TRAP' typeList excClause keepaliveClause # InstTrap
| 'WATCHPOINT' wpid=intLiteral typeList | 'WATCHPOINT' wpid=intLiteral typeList
dis=destClause ena=destClause ('WPEXC' '(' wpExc=destClause ')')? keepAliveClause # InstWatchPoint dis=destClause ena=destClause ('WPEXC' '(' wpExc=destClause ')')? keepaliveClause # InstWatchPoint
| 'WPBRANCH' wpid=intLiteral dis=destClause ena=destClause # InstWPBranch | 'WPBRANCH' wpid=intLiteral dis=destClause ena=destClause # InstWPBranch
// Foreign Function Interface // Foreign Function Interface
| 'CCALL' callConv=flag '<' funcTy=type funcSig '>' callee=value argList excClause keepAliveClause # InstCCall | 'CCALL' callConv=flag '<' funcTy=type funcSig '>' callee=value argList excClause keepaliveClause # InstCCall
// Thread and Stack Operations // Thread and Stack Operations
| 'NEWTHREAD' stack=value threadLocalClause? newStackClause excClause # InstNewThread | 'NEWTHREAD' stack=value threadLocalClause? newStackClause excClause # InstNewThread
| 'SWAPSTACK' swappee=value curStackClause newStackClause excClause keepAliveClause # InstSwapStack | 'SWAPSTACK' swappee=value curStackClause newStackClause excClause keepaliveClause # InstSwapStack
// Common Instructions // Common Instructions
| 'COMMINST' nam=globalName flagList? typeList? funcSigList? argList? excClause keepAliveClause # InstCommInst | 'COMMINST' nam=globalName flagList? typeList? funcSigList? argList? excClause keepaliveClause # InstCommInst
; ;
retVals retVals
...@@ -231,7 +231,7 @@ excClause ...@@ -231,7 +231,7 @@ excClause
: ('EXC' '(' nor=destClause exc=destClause ')')? : ('EXC' '(' nor=destClause exc=destClause ')')?
; ;
keepAliveClause keepaliveClause
: ('KEEPALIVE' '(' value* ')')? : ('KEEPALIVE' '(' value* ')')?
; ;
......
...@@ -400,8 +400,8 @@ private[text] class FunctionBuilderImpl( ...@@ -400,8 +400,8 @@ private[text] class FunctionBuilderImpl(
replacements.put(n, n2) replacements.put(n, n2)
n2 n2
} else { used += n; n } } else { used += n; n }
def mapKeepAlive(ka: Option[KeepAliveClause]) = def mapKeepalive(ka: Option[KeepaliveClause]) =
ka map (c => KeepAliveClause(new IList(c.vars map r collect {case lv: LocalVarName => lv}))) ka map (c => KeepaliveClause(new IList(c.vars map r collect {case lv: LocalVarName => lv})))
def mapNewStackClause(c: NewStackClause): NewStackClause = c match { def mapNewStackClause(c: NewStackClause): NewStackClause = c match {
case NewStackClause.PassValue(argTy, arg) => NewStackClause.PassValue(argTy, r(arg)) case NewStackClause.PassValue(argTy, arg) => NewStackClause.PassValue(argTy, r(arg))
case i: NewStackClause.PassVoid => i case i: NewStackClause.PassVoid => i
...@@ -419,7 +419,7 @@ private[text] class FunctionBuilderImpl( ...@@ -419,7 +419,7 @@ private[text] class FunctionBuilderImpl(
case Select(condTy, opndTy, cond, ifTrue, ifFalse) => case Select(condTy, opndTy, cond, ifTrue, ifFalse) =>
Select(condTy, opndTy, r(cond), r(ifTrue), r(ifFalse)) Select(condTy, opndTy, r(cond), r(ifTrue), r(ifFalse))
case Call(sig, callee, argList, ka) => case Call(sig, callee, argList, ka) =>
Call(sig, r(callee), new IList(argList map r), mapKeepAlive(ka)) Call(sig, r(callee), new IList(argList map r), mapKeepalive(ka))
case TailCall(sig, callee, argList) => case TailCall(sig, callee, argList) =>
TailCall(sig, r(callee), new IList(argList map r)) TailCall(sig, r(callee), new IList(argList map r))
case Ret(rv) => Ret(new IList(rv map r)) case Ret(rv) => Ret(new IList(rv map r))
...@@ -452,14 +452,14 @@ private[text] class FunctionBuilderImpl( ...@@ -452,14 +452,14 @@ private[text] class FunctionBuilderImpl(
case i: CmpXchg => i.copy(loc = r(i.loc), expected = r(i.expected), desired = r(i.desired)) case i: CmpXchg => i.copy(loc = r(i.loc), expected = r(i.expected), desired = r(i.desired))
case i: AtomicRMW => i.copy(loc = r(i.loc), opnd = r(i.opnd)) case i: AtomicRMW => i.copy(loc = r(i.loc), opnd = r(i.opnd))
case i: Fence => i case i: Fence => i
case Trap(retTy, ka) => Trap(retTy, mapKeepAlive(ka)) case Trap(retTy, ka) => Trap(retTy, mapKeepalive(ka))
case i: CCall => i.copy(callee = r(i.callee), argList = new IList(i.argList map r), case i: CCall => i.copy(callee = r(i.callee), argList = new IList(i.argList map r),
keepAliveClause = mapKeepAlive(i.keepAliveClause)) keepaliveClause = mapKeepalive(i.keepaliveClause))
case NewThread(stack, nsClause) => NewThread(r(stack), mapNewStackClause(nsClause)) case NewThread(stack, nsClause) => NewThread(r(stack), mapNewStackClause(nsClause))
case SwapStack(swappee, csClause, nsClause, ka) => case SwapStack(swappee, csClause, nsClause, ka) =>
SwapStack(r(swappee), csClause, mapNewStackClause(nsClause), mapKeepAlive(ka)) SwapStack(r(swappee), csClause, mapNewStackClause(nsClause), mapKeepalive(ka))
case i: CommInst => i.copy(argList = i.argList map (l => new IList(l map r)), case i: CommInst => i.copy(argList = i.argList map (l => new IList(l map r)),
keepAliveClause = mapKeepAlive(i.keepAliveClause)) keepaliveClause = mapKeepalive(i.keepaliveClause))
} }
Some(new IList(names map l) -> postInst) Some(new IList(names map l) -> postInst)
case Id(_, v) => case Id(_, v) =>
...@@ -482,7 +482,7 @@ private[text] class FunctionBuilderImpl( ...@@ -482,7 +482,7 @@ private[text] class FunctionBuilderImpl(
new IList(cases map (c => SwitchCase(r(c.value), mapDest(c.dest))))))) new IList(cases map (c => SwitchCase(r(c.value), mapDest(c.dest)))))))
case PreWatchPoint(wpid, retTy, dis, ena, exc, ka) => case PreWatchPoint(wpid, retTy, dis, ena, exc, ka) =>
val post = PostWatchPoint(wpid, retTy, mapDest(dis), mapDest(ena), exc map mapDest, val post = PostWatchPoint(wpid, retTy, mapDest(dis), mapDest(ena), exc map mapDest,
mapKeepAlive(ka)) mapKeepalive(ka))
Some((new IList(names map l), post)) Some((new IList(names map l), post))
} }
PostBasicBlock( PostBasicBlock(
......
...@@ -206,20 +206,20 @@ object Inst { ...@@ -206,20 +206,20 @@ object Inst {
sig: FuncSigName, sig: FuncSigName,
callee: VarName, callee: VarName,
argList: IList[VarName], argList: IList[VarName],
keepAliveClause: Option[KeepAliveClause] keepaliveClause: Option[KeepaliveClause]
) extends PrePostInst(s"CALL <$sig> $callee ($argList)" + ?(keepAliveClause)) with SupportsExcClause { ) extends PrePostInst(s"CALL <$sig> $callee ($argList)" + ?(keepaliveClause)) with SupportsExcClause {
def this(sig: FuncSigName, callee: VarName, argList: IList[VarName]) = def this(sig: FuncSigName, callee: VarName, argList: IList[VarName]) =
this(sig, callee, argList, None) this(sig, callee, argList, None)
def this(sig: FuncSigName, callee: VarName, argList: IList[VarName], keepAliveClause: KeepAliveClause) = def this(sig: FuncSigName, callee: VarName, argList: IList[VarName], keepaliveClause: KeepaliveClause) =
this(sig, callee, argList, Some(keepAliveClause)) this(sig, callee, argList, Some(keepaliveClause))
override def returnTypes(implicit context: Context) = override def returnTypes(implicit context: Context) =
(for (FuncSig(_, retTypes) <- context resolve sig) yield retTypes) getOrElse { (for (FuncSig(_, retTypes) <- context resolve sig) yield retTypes) getOrElse {
throw TypeResolveException(s"Undefined function signature: $sig") throw TypeResolveException(s"Undefined function signature: $sig")
} }
override def referencedVars = override def referencedVars =
new IList(callee +: (argList.toSeq ++ keepAliveClause.toSeq.flatMap(_.vars))) new IList(callee +: (argList.toSeq ++ keepaliveClause.toSeq.flatMap(_.vars)))
override def preExcString = s"CALL <$sig> $callee ($argList)" override def preExcString = s"CALL <$sig> $callee ($argList)"
override def postExcString = ?(keepAliveClause) override def postExcString = ?(keepaliveClause)
} }
case class TailCall(sig: FuncSigName, callee: VarName, argList: IList[VarName]) case class TailCall(sig: FuncSigName, callee: VarName, argList: IList[VarName])
...@@ -447,15 +447,15 @@ object Inst { ...@@ -447,15 +447,15 @@ object Inst {
case class Trap( case class Trap(
retTy: IList[TypeName], retTy: IList[TypeName],
keepAliveClause: Option[KeepAliveClause] keepaliveClause: Option[KeepaliveClause]
) extends PrePostInst(s"TRAP <$retTy>" + ?(keepAliveClause)) with SupportsExcClause { ) extends PrePostInst(s"TRAP <$retTy>" + ?(keepaliveClause)) with SupportsExcClause {
def this(retTy: IList[TypeName]) = this(retTy, None) def this(retTy: IList[TypeName]) = this(retTy, None)
def this(retTy: IList[TypeName], keepAliveClause: KeepAliveClause) = def this(retTy: IList[TypeName], keepaliveClause: KeepaliveClause) =
this(retTy, Some(keepAliveClause)) this(retTy, Some(keepaliveClause))
override def preExcString = s"TRAP <$retTy>" override def preExcString = s"TRAP <$retTy>"
override def postExcString = ?(keepAliveClause) override def postExcString = ?(keepaliveClause)
override def returnTypes(implicit context: Context) = retTy override def returnTypes(implicit context: Context) = retTy
override def referencedVars = new IList(keepAliveClause.toSeq.flatMap(_.vars)) override def referencedVars = new IList(keepaliveClause.toSeq.flatMap(_.vars))
} }
case class PreWatchPoint( case class PreWatchPoint(
...@@ -464,12 +464,12 @@ object Inst { ...@@ -464,12 +464,12 @@ object Inst {
dis: LabelName, dis: LabelName,
ena: LabelName, ena: LabelName,
exc: Option[LabelName], exc: Option[LabelName],
keepAliveClause: Option[KeepAliveClause] keepaliveClause: Option[KeepaliveClause]
) extends PreInst { ) extends PreInst {
override def returnTypes(implicit context: Context) = retTy override def returnTypes(implicit context: Context) = retTy
override def toString = override def toString =
s"WATCHPOINT $wpid <$retTy> $dis $ena" + ?(exc map (l => s"WPEXC($l)")) + ?(keepAliveClause) s"WATCHPOINT $wpid <$retTy> $dis $ena" + ?(exc map (l => s"WPEXC($l)")) + ?(keepaliveClause)
override def referencedVars = new IList(keepAliveClause.toSeq.flatMap(_.vars)) override def referencedVars = new IList(keepaliveClause.toSeq.flatMap(_.vars))
override def possibleJumps = new IList(Seq(dis, ena) ++ exc) override def possibleJumps = new IList(Seq(dis, ena) ++ exc)
} }
...@@ -479,13 +479,13 @@ object Inst { ...@@ -479,13 +479,13 @@ object Inst {
dis: DestClause, dis: DestClause,
ena: DestClause, ena: DestClause,
exc: Option[DestClause], exc: Option[DestClause],
keepAliveClause: Option[KeepAliveClause] keepaliveClause: Option[KeepaliveClause]
) extends PostInst { ) extends PostInst {
override def returnTypes(implicit context: Context) = retTy override def returnTypes(implicit context: Context) = retTy
override def toString = override def toString =
s"WATCHPOINT $wpid <$retTy> $dis $ena" + ?(exc map (l => s"WPEXC($l)")) + ?(keepAliveClause) s"WATCHPOINT $wpid <$retTy> $dis $ena" + ?(exc map (l => s"WPEXC($l)")) + ?(keepaliveClause)
override def referencedVars = override def referencedVars =
new IList(dis.args ++ ena.args ++ exc.toSeq.flatMap(_.args) ++ keepAliveClause.toSeq.flatMap(_.vars)) new IList(dis.args ++ ena.args ++ exc.toSeq.flatMap(_.args) ++ keepaliveClause.toSeq.flatMap(_.vars))
} }
// Unsafe Native Call // Unsafe Native Call
...@@ -496,8 +496,8 @@ object Inst { ...@@ -496,8 +496,8 @@ object Inst {
sig: FuncSigName, sig: FuncSigName,
callee: VarName, callee: VarName,
argList: IList[VarName], argList: IList[VarName],
keepAliveClause: Option[KeepAliveClause] keepaliveClause: Option[KeepaliveClause]
) extends PrePostInst(s"CCALL $callConv <$calleeTy $sig> $callee ($argList)" + ?(keepAliveClause)) { ) extends PrePostInst(s"CCALL $callConv <$calleeTy $sig> $callee ($argList)" + ?(keepaliveClause)) {
def this( def this(
callConv: Flag, callConv: Flag,
calleeTy: TypeName, calleeTy: TypeName,
...@@ -511,14 +511,14 @@ object Inst { ...@@ -511,14 +511,14 @@ object Inst {
sig: FuncSigName, sig: FuncSigName,
callee: VarName, callee: VarName,
argList: IList[VarName], argList: IList[VarName],
keepAliveClause: KeepAliveClause keepaliveClause: KeepaliveClause
) = this(callConv, calleeTy, sig, callee, argList, Some(keepAliveClause)) ) = this(callConv, calleeTy, sig, callee, argList, Some(keepaliveClause))
override def returnTypes(implicit context: Context) = override def returnTypes(implicit context: Context) =
(for (FuncSig(_, retTypes) <- context resolve sig) yield retTypes) getOrElse { (for (FuncSig(_, retTypes) <- context resolve sig) yield retTypes) getOrElse {
throw TypeResolveException(s"Undefined function signature: $sig") throw TypeResolveException(s"Undefined function signature: $sig")
} }
override def referencedVars = override def referencedVars =
new IList(callee +: (argList.toSeq ++ keepAliveClause.toSeq.flatMap(_.vars))) new IList(callee +: (argList.toSeq ++ keepaliveClause.toSeq.flatMap(_.vars)))
} }
// Thread and Stack // Thread and Stack
...@@ -534,19 +534,19 @@ object Inst { ...@@ -534,19 +534,19 @@ object Inst {
swappee: VarName, swappee: VarName,
curStackClause: CurStackClause, curStackClause: CurStackClause,
newStackClause: NewStackClause, newStackClause: NewStackClause,
keepAliveClause: Option[KeepAliveClause] keepaliveClause: Option[KeepaliveClause]
) extends PrePostInst(s"SWAPSTACK $swappee $curStackClause $newStackClause" + ?(keepAliveClause)) ) extends PrePostInst(s"SWAPSTACK $swappee $curStackClause $newStackClause" + ?(keepaliveClause))
with SupportsExcClause { with SupportsExcClause {
def this(swappee: VarName, curStackClause: CurStackClause, newStackClause: NewStackClause) = def this(swappee: VarName, curStackClause: CurStackClause, newStackClause: NewStackClause) =
this(swappee, curStackClause, newStackClause, None) this(swappee, curStackClause, newStackClause, None)
def this(swappee: VarName, curStackClause: CurStackClause, newStackClause: NewStackClause, def this(swappee: VarName, curStackClause: CurStackClause, newStackClause: NewStackClause,
keepAliveClause: KeepAliveClause) = keepaliveClause: KeepaliveClause) =
this(swappee, curStackClause, newStackClause, Some(keepAliveClause)) this(swappee, curStackClause, newStackClause, Some(keepaliveClause))
override def returnTypes(implicit context: Context) = IList() override def returnTypes(implicit context: Context) = IList()
override def referencedVars = override def referencedVars =
new IList(swappee +: (newStackClause.referencedVars.toSeq ++ keepAliveClause.toSeq.flatMap(_.vars))) new IList(swappee +: (newStackClause.referencedVars.toSeq ++ keepaliveClause.toSeq.flatMap(_.vars)))
override def preExcString = s"SWAPSTACK $swappee $curStackClause $newStackClause" override def preExcString = s"SWAPSTACK $swappee $curStackClause $newStackClause"
override def postExcString = ?(keepAliveClause) override def postExcString = ?(keepaliveClause)
} }
// Common Instructions // Common Instructions
...@@ -558,25 +558,25 @@ object Inst { ...@@ -558,25 +558,25 @@ object Inst {
typeList: Option[IList[TypeName]], typeList: Option[IList[TypeName]],
funcSigList: Option[IList[FuncSigName]], funcSigList: Option[IList[FuncSigName]],
argList: Option[IList[VarName]], argList: Option[IList[VarName]],
keepAliveClause: Option[KeepAliveClause] keepaliveClause: Option[KeepaliveClause]
) extends PrePostInst( ) extends PrePostInst(
s"COMMINST $instName" + s"COMMINST $instName" +
?(flagList map ("[" + _ + "]")) + ?(flagList map ("[" + _ + "]")) +
?(typeList map ("<" + _ + ">")) + ?(typeList map ("<" + _ + ">")) +
?(funcSigList map ("<[" + _ + "]>")) + ?(funcSigList map ("<[" + _ + "]>")) +
?(argList map ("(" + _ + ")")) + ?(argList map ("(" + _ + ")")) +
?(keepAliveClause) ?(keepaliveClause)
) with SupportsExcClause { ) with SupportsExcClause {
// FIXME: Need source for comminst return types // FIXME: Need source for comminst return types
override def returnTypes(implicit context: Context) = IList() override def returnTypes(implicit context: Context) = IList()
override def referencedVars = override def referencedVars =
new IList(instName +: (argList.toSeq.flatten ++ keepAliveClause.toSeq.flatMap(_.vars))) new IList(instName +: (argList.toSeq.flatten ++ keepaliveClause.toSeq.flatMap(_.vars)))
override def preExcString = s"COMMINST $instName" + override def preExcString = s"COMMINST $instName" +
?(flagList map ("[" + _ + "]")) + ?(flagList map ("[" + _ + "]")) +
?(typeList map ("<" + _ + ">")) + ?(typeList map ("<" + _ + ">")) +
?(funcSigList map ("<[" + _ + "]>")) + ?(funcSigList map ("<[" + _ + "]>")) +
?(argList map ("(" + _ + ")")) ?(argList map ("(" + _ + ")"))
override def postExcString = ?(keepAliveClause) override def postExcString = ?(keepaliveClause)
} }
} }
...@@ -604,7 +604,7 @@ object AtomicRMWOptr extends Enumeration { ...@@ -604,7 +604,7 @@ object AtomicRMWOptr extends Enumeration {
val UnsignMin = Value("UMIN") val UnsignMin = Value("UMIN")
} }
case class KeepAliveClause(vars: IList[LocalVarName]) { case class KeepaliveClause(vars: IList[LocalVarName]) {
override def toString = s"KEEPALIVE(${vars mkString " "})" override def toString = s"KEEPALIVE(${vars mkString " "})"
} }
case class SwitchCase[T](value: VarName, dest: T) { case class SwitchCase[T](value: VarName, dest: T) {
......
...@@ -60,8 +60,8 @@ object CommInsts extends SimpleNamespace[CommInst] { ...@@ -60,8 +60,8 @@ object CommInsts extends SimpleNamespace[CommInst] {
commInst(0x25c, "@uvm.meta.pop_frames_to") commInst(0x25c, "@uvm.meta.pop_frames_to")
commInst(0x25d, "@uvm.meta.push_frame") commInst(0x25d, "@uvm.meta.push_frame")
commInst(0x25e, "@uvm.meta.enable_watchpoint") commInst(0x25e, "@uvm.meta.enable_watchPoint")
commInst(0x25f, "@uvm.meta.disable_watchpoint") commInst(0x25f, "@uvm.meta.disable_watchPoint")
commInst(0x260, "@uvm.meta.set_trap_handler") commInst(0x260, "@uvm.meta.set_trap_handler")
......
...@@ -397,7 +397,7 @@ private[textinput] class InstanceUIRTextReader(idFactory: IDFactory, source: Str ...@@ -397,7 +397,7 @@ private[textinput] class InstanceUIRTextReader(idFactory: IDFactory, source: Str
implicit def resArgList(a: ArgListContext): Seq[SSAVariable] = a.value.map(resVar) implicit def resArgList(a: ArgListContext): Seq[SSAVariable] = a.value.map(resVar)
implicit def resKA(ka: KeepAliveClauseContext): Seq[LocalVariable] = ka.value.map(resLocalVar) implicit def resKA(ka: KeepaliveClauseContext): Seq[LocalVariable] = ka.value.map(resLocalVar)
def resFuncCallBody(fcb: FuncCallBodyContext): (FuncSig, SSAVariable, Seq[SSAVariable]) = def resFuncCallBody(fcb: FuncCallBodyContext): (FuncSig, SSAVariable, Seq[SSAVariable]) =
(fcb.funcSig, fcb.callee, fcb.argList) (fcb.funcSig, fcb.callee, fcb.argList)
...@@ -472,7 +472,7 @@ private[textinput] class InstanceUIRTextReader(idFactory: IDFactory, source: Str ...@@ -472,7 +472,7 @@ private[textinput] class InstanceUIRTextReader(idFactory: IDFactory, source: Str
case ii: InstCallContext => case ii: InstCallContext =>
InstCall(null, null, null, null, null).later(phase4) { i => InstCall(null, null, null, null, null).later(phase4) { i =>
asgnFuncCallBody(i, ii.funcCallBody) asgnFuncCallBody(i, ii.funcCallBody)
i.excClause = ii.excClause; i.keepAlives = ii.keepAliveClause i.excClause = ii.excClause; i.keepalives = ii.keepaliveClause
} }
case ii: InstTailCallContext => case ii: InstTailCallContext =>
InstTailCall(null, null, null).later(phase4) { i => InstTailCall(null, null, null).later(phase4) { i =>
...@@ -566,11 +566,11 @@ private[textinput] class InstanceUIRTextReader(idFactory: IDFactory, source: Str ...@@ -566,11 +566,11 @@ private[textinput] class InstanceUIRTextReader(idFactory: IDFactory, source: Str
InstFence(ii.memord) InstFence(ii.memord)
case ii: InstTrapContext => case ii: InstTrapContext =>
InstTrap(ii.typeList(), null, null).later(phase4) { i => InstTrap(ii.typeList(), null, null).later(phase4) { i =>
i.excClause = ii.excClause; i.keepAlives = ii.keepAliveClause i.excClause = ii.excClause; i.keepalives = ii.keepaliveClause
} }
case ii: InstWatchPointContext => case ii: InstWatchPointContext =>
InstWatchPoint(ii.wpid.intValue(), ii.typeList(), null, null, null, null).later(phase4) { i => InstWatchPoint(ii.wpid.intValue(), ii.typeList(), null, null, null, null).later(phase4) { i =>
i.dis = ii.dis; i.ena = ii.ena; i.exc = Option(ii.wpExc).map(resDestClause); i.keepAlives = ii.keepAliveClause i.dis = ii.dis; i.ena = ii.ena; i.exc = Option(ii.wpExc).map(resDestClause); i.keepalives = ii.keepaliveClause
} }
case ii: InstWPBranchContext => case ii: InstWPBranchContext =>
InstWPBranch(ii.wpid.intValue(), null, null).later(phase4) { i => InstWPBranch(ii.wpid.intValue(), null, null).later(phase4) { i =>
...@@ -578,7 +578,7 @@ private[textinput] class InstanceUIRTextReader(idFactory: IDFactory, source: Str ...@@ -578,7 +578,7 @@ private[textinput] class InstanceUIRTextReader(idFactory: IDFactory, source: Str
} }
case ii: InstCCallContext => case ii: InstCCallContext =>
InstCCall(ii.callConv, ii.funcTy, ii.funcSig, null, null, null, null).later(phase4) { i => InstCCall(ii.callConv, ii.funcTy, ii.funcSig, null, null, null, null).later(phase4) { i =>
i.callee = ii.callee; i.argList = ii.argList; i.excClause = ii.excClause; i.keepAlives = ii.keepAliveClause i.callee = ii.callee; i.argList = ii.argList; i.excClause = ii.excClause; i.keepalives = ii.keepaliveClause
} }
case ii: InstNewThreadContext => case ii: InstNewThreadContext =>
InstNewThread(null, null, null, null).later(phase4) { i => InstNewThread(null, null, null, null).later(phase4) { i =>
...@@ -592,14 +592,14 @@ private[textinput] class InstanceUIRTextReader(idFactory: IDFactory, source: Str ...@@ -592,14 +592,14 @@ private[textinput] class InstanceUIRTextReader(idFactory: IDFactory, source: Str
i.swappee = ii.swappee i.swappee = ii.swappee
i.curStackAction = ii.curStackClause i.curStackAction = ii.curStackClause
i.newStackAction = ii.newStackClause i.newStackAction = ii.newStackClause
i.excClause = ii.excClause; i.keepAlives = ii.keepAliveClause i.excClause = ii.excClause; i.keepalives = ii.keepaliveClause
} }
case ii: InstCommInstContext => case ii: InstCommInstContext =>
InstCommInst(CommInsts(ii.nam), Option(ii.flagList()).map(convFlagList).getOrElse(Seq()), null, null, null, null, null).later(phase4) { i => InstCommInst(CommInsts(ii.nam), Option(ii.flagList()).map(convFlagList).getOrElse(Seq()), null, null, null, null, null).later(phase4) { i =>
i.typeList = Option(ii.typeList).map(resTypeList).getOrElse(Seq()) i.typeList = Option(ii.typeList).map(resTypeList).getOrElse(Seq())
i.funcSigList = Option(ii.funcSigList).map(resFuncSigList).getOrElse(Seq()) i.funcSigList = Option(ii.funcSigList).map(resFuncSigList).getOrElse(Seq())
i.argList = Option(ii.argList).map(resArgList).getOrElse(Seq()) i.argList = Option(ii.argList).map(resArgList).getOrElse(Seq())
i.excClause = ii.excClause; i.keepAlives = ii.keepAliveClause i.excClause = ii.excClause; i.keepalives = ii.keepaliveClause
} }
} }
......
...@@ -280,7 +280,7 @@ class InstanceHailScriptLoader(microVM: MicroVM, memorySupport: MemorySupport, m ...@@ -280,7 +280,7 @@ class InstanceHailScriptLoader(microVM: MicroVM, memorySupport: MemorySupport, m
} }
kind match { kind match {
case 1 => { val r = mc.tr64FromFp(hv.asInstanceOf[MuDoubleValue]); mc.deleteValue(hv); r } case 1 => { val r = mc.tr64FromFP(hv.asInstanceOf[MuDoubleValue]); mc.deleteValue(hv); r }
case 2 => { val r = mc.tr64FromInt(hv.asInstanceOf[MuIntValue]); mc.deleteValue(hv); r } case 2 => { val r = mc.tr64FromInt(hv.asInstanceOf[MuIntValue]); mc.deleteValue(hv); r }
case 3 => { hv.asInstanceOf[MuTagRef64Value] } case 3 => { hv.asInstanceOf[MuTagRef64Value] }
} }
......
...@@ -189,8 +189,8 @@ object TypeInferer { ...@@ -189,8 +189,8 @@ object TypeInferer {
case "@uvm.meta.pop_frames_to" => Seq() case "@uvm.meta.pop_frames_to" => Seq()
case "@uvm.meta.push_frame" => Seq() case "@uvm.meta.push_frame" => Seq()
case "@uvm.meta.enable_watchpoint" => Seq() case "@uvm.meta.enable_watchPoint" => Seq()
case "@uvm.meta.disable_watchpoint" => Seq() case "@uvm.meta.disable_watchPoint" => Seq()
case "@uvm.meta.set_trap_handler" => Seq() case "@uvm.meta.set_trap_handler" => Seq()
} }
......
...@@ -22,7 +22,7 @@ trait CommInstExecutor extends InterpreterActions with ObjectPinner { ...@@ -22,7 +22,7 @@ trait CommInstExecutor extends InterpreterActions with ObjectPinner {
override def interpretCurrentCommonInstruction(): Unit = { override def interpretCurrentCommonInstruction(): Unit = {
assert(curInst.isInstanceOf[InstCommInst]) assert(curInst.isInstanceOf[InstCommInst])
val InstCommInst(ci, flagList, typeList, sigList, argList, excClause, keepAlives) = curInst val InstCommInst(ci, flagList, typeList, sigList, argList, excClause, keepalives) = curInst
ci.name.get match { ci.name.get match {
// Thread and stack operations // Thread and stack operations
...@@ -71,7 +71,7 @@ trait CommInstExecutor extends InterpreterActions with ObjectPinner { ...@@ -71,7 +71,7 @@ trait CommInstExecutor extends InterpreterActions with ObjectPinner {
case "@uvm.tr64.is_fp" => { case "@uvm.tr64.is_fp" => {
val Seq(tr) = argList val Seq(tr) = argList
results(0).asBoolean = OpHelper.tr64IsFp(tr.asTR64Raw) results(0).asBoolean = OpHelper.tr64IsFP(tr.asTR64Raw)
continueNormally() continueNormally()
} }
...@@ -110,8 +110,8 @@ trait CommInstExecutor extends InterpreterActions with ObjectPinner { ...@@ -110,8 +110,8 @@ trait CommInstExecutor extends InterpreterActions with ObjectPinner {
case "@uvm.tr64.to_fp" => { case "@uvm.tr64.to_fp" => {
val Seq(tr) = argList val Seq(tr) = argList
val raw = tr.asTR64Raw val raw = tr.asTR64Raw
if (OpHelper.tr64IsFp(raw)) { if (OpHelper.tr64IsFP(raw)) {
val result = OpHelper.tr64ToFp(raw) val result = OpHelper.tr64ToFP(raw)
results(0).asDouble = result results(0).asDouble = result
continueNormally() continueNormally()
} else { } else {
...@@ -357,8 +357,8 @@ trait CommInstExecutor extends InterpreterActions with ObjectPinner { ...@@ -357,8 +357,8 @@ trait CommInstExecutor extends InterpreterActions with ObjectPinner {
case "@uvm.meta.pop_frame" => ??? case "@uvm.meta.pop_frame" => ???
case "@uvm.meta.push_frame" => ??? case "@uvm.meta.push_frame" => ???
case "@uvm.meta.enable_watchpoint" => ??? case "@uvm.meta.enable_watchPoint" => ???
case "@uvm.meta.disable_watchpoint" => ??? case "@uvm.meta.disable_watchPoint" => ???
case "@uvm.meta.set_trap_handler" => ??? case "@uvm.meta.set_trap_handler" => ???
......
...@@ -240,7 +240,7 @@ trait InstructionExecutor extends InterpreterActions with CommInstExecutor { ...@@ -240,7 +240,7 @@ trait InstructionExecutor extends InterpreterActions with CommInstExecutor {
} }
} }
case i @ InstCall(sig, callee, argList, excClause, keepAlives) => { case i @ InstCall(sig, callee, argList, excClause, keepalives) => {
val calleeFunc = callee.asFunc.getOrElse { val calleeFunc = callee.asFunc.getOrElse {
throw new UvmRuntimeException(ctx + "Callee must not be NULL") throw new UvmRuntimeException(ctx + "Callee must not be NULL")
} }
...@@ -484,11 +484,11 @@ trait InstructionExecutor extends InterpreterActions with CommInstExecutor { ...@@ -484,11 +484,11 @@ trait InstructionExecutor extends InterpreterActions with CommInstExecutor {
continueNormally() continueNormally()
} }
case i @ InstTrap(retTy, excClause, keepAlives) => { case i @ InstTrap(retTy, excClause, keepalives) => {
doTrap(retTy, 0) doTrap(retTy, 0)
} }
case i @ InstWatchPoint(wpID, retTy, dis, ena, exc, keepAlives) => { case i @ InstWatchPoint(wpID, retTy, dis, ena, exc, keepalives) => {
val isEnabled = microVM.trapManager.isWatchPointEnabled(wpID) val isEnabled = microVM.trapManager.isWatchPointEnabled(wpID)
if (isEnabled) { if (isEnabled) {
...@@ -507,7 +507,7 @@ trait InstructionExecutor extends InterpreterActions with CommInstExecutor { ...@@ -507,7 +507,7 @@ trait InstructionExecutor extends InterpreterActions with CommInstExecutor {
} }
} }
case i @ InstCCall(callConv, funcTy, sig, callee, argList, excClause, keepAlives) => { case i @ InstCCall(callConv, funcTy, sig, callee, argList, excClause, keepalives) => {
if (callConv != Flag("#DEFAULT")) { if (callConv != Flag("#DEFAULT")) {
throw new UvmRefImplException(ctx + "Currently only support the #DEFAULT callConv. %s found.".format(callConv.name)) throw new UvmRefImplException(ctx + "Currently only support the #DEFAULT callConv. %s found.".format(callConv.name))
} }
...@@ -544,7 +544,7 @@ trait InstructionExecutor extends InterpreterActions with CommInstExecutor { ...@@ -544,7 +544,7 @@ trait InstructionExecutor extends InterpreterActions with CommInstExecutor {
continueNormally() continueNormally()
} }
case i @ InstSwapStack(swappee, curStackAction, newStackAction, excClause, keepAlives) => { case i @ InstSwapStack(swappee, curStackAction, newStackAction, excClause, keepalives) => {
val oldStack = curStack val oldStack = curStack
val newStack = swappee.asStack.getOrElse { val newStack = swappee.asStack.getOrElse {
throw new UvmUndefinedBehaviorException(ctx + "Swappee must not be NULL.") throw new UvmUndefinedBehaviorException(ctx + "Swappee must not be NULL.")
......
...@@ -400,7 +400,7 @@ trait InterpreterActions extends InterpreterThreadState { ...@@ -400,7 +400,7 @@ trait InterpreterActions extends InterpreterThreadState {
catchException(exc) catchException(exc)
} }
// Trap and watchpoint handling // Trap and watchPoint handling
/** Execute the trap handler in the Client. Work for both TRAP and WATCHPOINT. */ /** Execute the trap handler in the Client. Work for both TRAP and WATCHPOINT. */
protected def doTrap(retTys: Seq[Type], wpID: Int) = { protected def doTrap(retTys: Seq[Type], wpID: Int) = {
......
...@@ -551,8 +551,8 @@ class DefinedMuFrame( ...@@ -551,8 +551,8 @@ class DefinedMuFrame(
def keepaliveBoxes(): Seq[ValueBox] = { def keepaliveBoxes(): Seq[ValueBox] = {
curInst match { curInst match {
case hka: HasKeepAliveClause => case hka: HasKeepaliveClause =>
val kas = hka.keepAlives val kas = hka.keepalives
val kaBoxes = kas.map(boxes.apply) val kaBoxes = kas.map(boxes.apply)
kaBoxes