nativeMaschine: s/unsigned int/ptrdiff_t/g
[mate.git] / Mate.hs
diff --git a/Mate.hs b/Mate.hs
index 08e7a7946cdec2392c47877697b96541aa957153..ee03d8d78ad1b3dfb19f766ae813d062f000c305 100644 (file)
--- a/Mate.hs
+++ b/Mate.hs
@@ -20,7 +20,7 @@ import Mate.BasicBlocks
 import Mate.MethodPool
 import Mate.Types
 import Mate.ClassPool
-import Mate.X86TrapHandling
+import Mate.NativeMaschine
 
 main ::  IO ()
 main = do
@@ -66,14 +66,11 @@ executeMain bclspath cls = do
   case find (\x -> methodName x == "main") methods of
     Just m -> do
       let mi = MethodInfo "main" bclspath $ methodSignature m
-      hmap <- parseMethod cls "main" $ methodSignature m
-      case hmap of
-        Just hmap' -> do
-          entry <- compileBB hmap' mi
-          addMethodRef entry mi [bclspath]
+      rawmethod <- parseMethod cls "main" $ methodSignature m
+      entry <- compileBB rawmethod mi
+      addMethodRef entry mi [bclspath]
 #ifdef DEBUG
-          printf "executing `main' now:\n"
+      printf "executing `main' now:\n"
 #endif
-          executeFuncPtr entry
-        Nothing -> error "main not found"
+      executeFuncPtr entry
     Nothing -> error "main not found"