[svn:parrot] r48943 - trunk/compilers/imcc

NotFound at svn.parrot.org NotFound at svn.parrot.org
Sat Sep 11 23:04:26 UTC 2010


Author: NotFound
Date: Sat Sep 11 23:04:26 2010
New Revision: 48943
URL: https://trac.parrot.org/parrot/changeset/48943

Log:
add can return null decorator to the try_find_op imcc function and make it static

Modified:
   trunk/compilers/imcc/imc.h
   trunk/compilers/imcc/parser_util.c

Modified: trunk/compilers/imcc/imc.h
==============================================================================
--- trunk/compilers/imcc/imc.h	Sat Sep 11 22:53:19 2010	(r48942)
+++ trunk/compilers/imcc/imc.h	Sat Sep 11 23:04:26 2010	(r48943)
@@ -318,21 +318,6 @@
 void register_compilers(PARROT_INTERP)
         __attribute__nonnull__(1);
 
-PARROT_WARN_UNUSED_RESULT
-op_info_t * try_find_op(PARROT_INTERP,
-    ARGMOD(IMC_Unit *unit),
-    ARGIN(const char *name),
-    ARGMOD(SymReg **r),
-    int n,
-    int keyvec,
-    int emit)
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(3)
-        __attribute__nonnull__(4)
-        FUNC_MODIFIES(*unit)
-        FUNC_MODIFIES(*r);
-
 #define ASSERT_ARGS_imcc_compile_file __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(fullname) \
@@ -389,11 +374,6 @@
     , PARROT_ASSERT_ARG(args))
 #define ASSERT_ARGS_register_compilers __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_try_find_op __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(unit) \
-    , PARROT_ASSERT_ARG(name) \
-    , PARROT_ASSERT_ARG(r))
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 /* HEADERIZER END: compilers/imcc/parser_util.c */
 

Modified: trunk/compilers/imcc/parser_util.c
==============================================================================
--- trunk/compilers/imcc/parser_util.c	Sat Sep 11 22:53:19 2010	(r48942)
+++ trunk/compilers/imcc/parser_util.c	Sat Sep 11 23:04:26 2010	(r48943)
@@ -64,6 +64,22 @@
 
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
+static op_info_t * try_find_op(PARROT_INTERP,
+    ARGMOD(IMC_Unit *unit),
+    ARGIN(const char *name),
+    ARGMOD(SymReg **r),
+    int n,
+    int keyvec,
+    int emit)
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2)
+        __attribute__nonnull__(3)
+        __attribute__nonnull__(4)
+        FUNC_MODIFIES(*unit)
+        FUNC_MODIFIES(*r);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
 static const char * try_rev_cmp(ARGIN(const char *name), ARGMOD(SymReg **r))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
@@ -91,6 +107,11 @@
     , PARROT_ASSERT_ARG(r))
 #define ASSERT_ARGS_imcc_destroy_macro_values __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(value))
+#define ASSERT_ARGS_try_find_op __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(unit) \
+    , PARROT_ASSERT_ARG(name) \
+    , PARROT_ASSERT_ARG(r))
 #define ASSERT_ARGS_try_rev_cmp __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(name) \
     , PARROT_ASSERT_ARG(r))
@@ -970,8 +991,8 @@
 
 /*
 
-=item C<op_info_t * try_find_op(PARROT_INTERP, IMC_Unit *unit, const char *name,
-SymReg **r, int n, int keyvec, int emit)>
+=item C<static op_info_t * try_find_op(PARROT_INTERP, IMC_Unit *unit, const char
+*name, SymReg **r, int n, int keyvec, int emit)>
 
 Try to find valid op doing the same operation e.g.
 
@@ -986,7 +1007,8 @@
 */
 
 PARROT_WARN_UNUSED_RESULT
-op_info_t *
+PARROT_CAN_RETURN_NULL
+static op_info_t *
 try_find_op(PARROT_INTERP, ARGMOD(IMC_Unit *unit), ARGIN(const char *name),
         ARGMOD(SymReg **r), int n, int keyvec, int emit)
 {


More information about the parrot-commits mailing list