projects
/
mate.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
codegen: map each real PC to java bytecode PC
[mate.git]
/
Mate
/
Types.hs
diff --git
a/Mate/Types.hs
b/Mate/Types.hs
index bff97df650a9b87d0679c643e010dd199c71a259..eea9550e37e36ae72df49b2537c24e55fa28681c 100644
(file)
--- a/
Mate/Types.hs
+++ b/
Mate/Types.hs
@@
-5,6
+5,7
@@
module Mate.Types
, BBEnd(..)
, MapBB
, ExceptionMap
, BBEnd(..)
, MapBB
, ExceptionMap
+ , JpcNpcMap
, RawMethod(..)
, TrapMap, MethodMap, ClassMap, FieldMap
, StringMap, VirtualMap, InterfaceMap
, RawMethod(..)
, TrapMap, MethodMap, ClassMap, FieldMap
, StringMap, VirtualMap, InterfaceMap
@@
-58,6
+59,9
@@
data BBEnd
type MapBB = M.Map BlockID BasicBlock
type ExceptionMap = M.Map (Word16, Word16) [(B.ByteString, Word16)]
type MapBB = M.Map BlockID BasicBlock
type ExceptionMap = M.Map (Word16, Word16) [(B.ByteString, Word16)]
+-- java byte code PC -> native PC
+type JpcNpcMap = M.Map Word32 Int
+
data RawMethod = RawMethod {
rawMapBB :: MapBB,
rawExcpMap :: ExceptionMap,
data RawMethod = RawMethod {
rawMapBB :: MapBB,
rawExcpMap :: ExceptionMap,
@@
-92,7
+96,7
@@
data StaticFieldInfo = StaticFieldInfo {
-- B.ByteString = name of method
-- NativeWord = entrypoint of method
-- B.ByteString = name of method
-- NativeWord = entrypoint of method
-type MethodMap = M.Map MethodInfo
NativeWord
+type MethodMap = M.Map MethodInfo
(NativeWord, JpcNpcMap)
data MethodInfo = MethodInfo {
methName :: B.ByteString,
data MethodInfo = MethodInfo {
methName :: B.ByteString,