[uim-commit] r1607 - trunk/uim
yamaken at freedesktop.org
yamaken at freedesktop.org
Mon Sep 26 20:21:53 PDT 2005
Author: yamaken
Date: 2005-09-26 20:21:50 -0700 (Mon, 26 Sep 2005)
New Revision: 1607
Removed:
trunk/uim/uim-scm-gc.c
Modified:
trunk/uim/Makefile.am
trunk/uim/uim-scm.c
Log:
* uim/uim-scm-gc.c
- Removed since the recent implementation change enables that the
functions can be contained uim-scm.c and single object file
* uim/uim-scm.c
- (uim_scm_gc_protect_stack_ptr,
uim_scm_gc_ensure_uninlined_func_ptr,
uim_scm_gc_protect_stack_internal,
uim_scm_gc_ensure_uninlined_func_internal): Moved from uim-scm-gc.c
* uim/Makefile.am
- (libuim_la_SOURCES): Remove uim-scm-gc.c
Modified: trunk/uim/Makefile.am
===================================================================
--- trunk/uim/Makefile.am 2005-09-27 02:53:13 UTC (rev 1606)
+++ trunk/uim/Makefile.am 2005-09-27 03:21:50 UTC (rev 1607)
@@ -14,7 +14,7 @@
libuim_la_SOURCES = uim.c uim-util.c uim-func.c uim-key.c \
uim-internal.h gettext.h uim-encoding.h\
- siod.h uim-scm.c uim-scm-gc.c \
+ siod.h uim-scm.c \
uim-helper.c uim-helper-client.c \
intl.c \
uim-ipc.c \
Deleted: trunk/uim/uim-scm-gc.c
===================================================================
--- trunk/uim/uim-scm-gc.c 2005-09-27 02:53:13 UTC (rev 1606)
+++ trunk/uim/uim-scm-gc.c 2005-09-27 03:21:50 UTC (rev 1607)
@@ -1,87 +0,0 @@
-/*
-
- Copyright (c) 2003-2005 uim Project http://uim.freedesktop.org/
-
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. Neither the name of authors nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-
-*/
-
-#include "siod.h"
-#include "uim-scm.h"
-
-
-#if UIM_SCM_GCC4_READY_GC
-/*
- * For ensuring that these function calls be uninlined. Don't access these
- * variables directly.
- *
- * Exporting the variables ensures that a expression (*f)() is certainly real
- * function call since the variables can be updated from outside of
- * libuim. Therefore, be avoid making the variables static by combining libuim
- * into other codes which enables function inlining for them.
- */
-uim_lisp *(*uim_scm_gc_protect_stack_ptr)(void)
- = &uim_scm_gc_protect_stack_internal;
-uim_func_ptr (*uim_scm_gc_ensure_uninlined_func_ptr)(uim_func_ptr)
- = &uim_scm_gc_ensure_uninlined_func_internal;
-#endif /* UIM_SCM_GCC4_READY_GC */
-
-#if UIM_SCM_GCC4_READY_GC
-void
-uim_scm_gc_protect(uim_lisp *location)
-{
- siod_gc_protect((LISP *)location);
-}
-
-uim_lisp *
-uim_scm_gc_protect_stack_internal(void)
-{
- /*
- * &stack_start will be relocated to start of the frame of subsequent
- * function call
- */
- LISP stack_start;
-
- siod_gc_protect_stack(&stack_start);
-
- /* intentionally returns invalidated local address */
- return (uim_lisp *)&stack_start;
-}
-
-void
-uim_scm_gc_unprotect_stack(uim_lisp *stack_start)
-{
- siod_gc_unprotect_stack((LISP *)stack_start);
-}
-
-uim_func_ptr
-uim_scm_gc_ensure_uninlined_func_internal(uim_func_ptr func)
-{
- return func;
-}
-#endif /* UIM_SCM_GCC4_READY_GC */
Modified: trunk/uim/uim-scm.c
===================================================================
--- trunk/uim/uim-scm.c 2005-09-27 02:53:13 UTC (rev 1606)
+++ trunk/uim/uim-scm.c 2005-09-27 03:21:50 UTC (rev 1607)
@@ -85,7 +85,23 @@
static int uim_siod_fatal;
static FILE *uim_output = NULL;
+#if UIM_SCM_GCC4_READY_GC
+/*
+ * For ensuring that these function calls be uninlined. Don't access these
+ * variables directly.
+ *
+ * Exporting the variables ensures that a expression (*f)() is certainly real
+ * function call since the variables can be updated from outside of
+ * libuim. Therefore, be avoid making the variables static by combining libuim
+ * into other codes which enables function inlining for them.
+ */
+uim_lisp *(*uim_scm_gc_protect_stack_ptr)(void)
+ = &uim_scm_gc_protect_stack_internal;
+uim_func_ptr (*uim_scm_gc_ensure_uninlined_func_ptr)(uim_func_ptr)
+ = &uim_scm_gc_ensure_uninlined_func_internal;
+#endif /* UIM_SCM_GCC4_READY_GC */
+
FILE *
uim_scm_get_output(void)
{
@@ -236,23 +252,44 @@
return (uim_lisp)funcptrcons(func_ptr);
}
-#if !UIM_SCM_GCC4_READY_GC
void
uim_scm_gc_protect(uim_lisp *location)
{
- gc_protect((LISP *)location);
+ siod_gc_protect((LISP *)location);
}
void
-uim_scm_gc_protect_stack(uim_lisp *stack_start)
+uim_scm_gc_unprotect_stack(uim_lisp *stack_start)
{
- siod_gc_protect_stack((LISP *)stack_start);
+ siod_gc_unprotect_stack((LISP *)stack_start);
}
+#if UIM_SCM_GCC4_READY_GC
+uim_lisp *
+uim_scm_gc_protect_stack_internal(void)
+{
+ /*
+ * &stack_start will be relocated to start of the frame of subsequent
+ * function call
+ */
+ LISP stack_start;
+
+ siod_gc_protect_stack(&stack_start);
+
+ /* intentionally returns invalidated local address */
+ return (uim_lisp *)&stack_start;
+}
+
+uim_func_ptr
+uim_scm_gc_ensure_uninlined_func_internal(uim_func_ptr func)
+{
+ return func;
+}
+#else /* UIM_SCM_GCC4_READY_GC */
void
-uim_scm_gc_unprotect_stack(uim_lisp *stack_start)
+uim_scm_gc_protect_stack(uim_lisp *stack_start)
{
- siod_gc_unprotect_stack((LISP *)stack_start);
+ siod_gc_protect_stack((LISP *)stack_start);
}
#endif /* UIM_SCM_GCC4_READY_GC */
More information about the uim-commit
mailing list