X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=Mate%2FTypes.hs;h=de17e3780aa4cf8c695e72ce4a6891fb505a64e8;hb=2ac2a68eb5b709caa636d1a9a56a40268d378550;hp=060ffb7403e3d1e036bbec9cedbc97eab3659288;hpb=e233bbb3bd29c6665239c7a9139826ce21913d29;p=mate.git diff --git a/Mate/Types.hs b/Mate/Types.hs index 060ffb7..de17e37 100644 --- a/Mate/Types.hs +++ b/Mate/Types.hs @@ -42,6 +42,7 @@ type BlockID = Int -- Represents a CFG node data BasicBlock = BasicBlock { code :: [Instruction], + exception :: B.ByteString, successor :: BBEnd } -- describes (leaving) edges of a CFG node @@ -67,12 +68,15 @@ data RawMethod = RawMethod { type TrapMap = M.Map NativeWord TrapCause type TrapPatcher = CPtrdiff -> CodeGen () () CPtrdiff +type TrapPatcherEax = CPtrdiff -> CPtrdiff -> CodeGen () () CPtrdiff +type TrapPatcherEsp = TrapPatcherEax data TrapCause - = StaticMethod MethodInfo -- for static calls + = StaticMethod TrapPatcher -- for static calls | VirtualCall Bool MethodInfo (IO NativeWord) -- for invoke{interface,virtual} - | InstanceOf B.ByteString -- class name - | NewObject B.ByteString -- class name + | InstanceOf TrapPatcherEax + | ThrowException TrapPatcherEsp + | NewObject TrapPatcher | StaticField StaticFieldInfo | ObjectField TrapPatcher