Update of /cvsroot/hoc/hoc/HOC/HOC
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31094/HOC/HOC
Modified Files:
Class.hs DeclareSelector.hs Arguments.hs
Log Message:
Add a few NOINLINE pragmas to avoid bloating the code when compiling with
-O. Basically, nothing that's used from declareSelector or declareClass
should be inlined.
Index: DeclareSelector.hs
===================================================================
RCS file: /cvsroot/hoc/hoc/HOC/HOC/DeclareSelector.hs,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- DeclareSelector.hs 26 Jul 2005 03:11:43 -0000 1.10
+++ DeclareSelector.hs 26 Jul 2005 05:25:42 -0000 1.11
@@ -29,6 +29,17 @@
$(makeMarshallers 4)
marshallersUpTo = 4
+{-# NOINLINE method0 #-}
+{-# NOINLINE method0_ #-}
+{-# NOINLINE method1 #-}
+{-# NOINLINE method1_ #-}
+{-# NOINLINE method2 #-}
+{-# NOINLINE method2_ #-}
+{-# NOINLINE method3 #-}
+{-# NOINLINE method3_ #-}
+{-# NOINLINE method4 #-}
+{-# NOINLINE method4_ #-}
+
$(makeCannedCIFs [
[t| ID () -> IO () |],
[t| ID () -> IO (ID ()) |],
Index: Arguments.hs
===================================================================
RCS file: /cvsroot/hoc/hoc/HOC/HOC/Arguments.hs,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Arguments.hs 6 Dec 2004 03:46:51 -0000 1.2
+++ Arguments.hs 26 Jul 2005 05:25:42 -0000 1.3
@@ -97,6 +97,7 @@
let orderedArgs = (last args : sel : init args)
ffiPrepCif ret orderedArgs
+{-# NOINLINE getCifForSelector #-} -- might be called from generated code
getCifForSelector sel = unsafePerformIO $ makeCifForSelector sel
objCMethodType thing = ret ++ concat (last args : ":" : init args)
Index: Class.hs
===================================================================
RCS file: /cvsroot/hoc/hoc/HOC/HOC/Class.hs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- Class.hs 27 Oct 2003 16:48:04 -0000 1.1.1.1
+++ Class.hs 26 Jul 2005 05:25:42 -0000 1.2
@@ -21,6 +21,7 @@
getClassByName name = withCString name c_getClassByName
+{-# NOINLINE unsafeGetClassObject #-} -- called from generated code, save space
unsafeGetClassObject name = unsafePerformIO $
getClassByName name >>= importImmortal
|