lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [09/10] git commit: refs/heads/charmonizer-decoupling - Switch to new CFISH macros in generated code
Date Sun, 21 Jul 2013 13:35:18 GMT
Switch to new CFISH macros in generated code

All the generated code doesn't depend on charmony.h now.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/2868d6c7
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/2868d6c7
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/2868d6c7

Branch: refs/heads/charmonizer-decoupling
Commit: 2868d6c73f5e248a73aeb9db90ab7fb595340b60
Parents: 2731ed4
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Sun Jul 21 12:06:37 2013 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Sun Jul 21 15:31:34 2013 +0200

----------------------------------------------------------------------
 clownfish/compiler/src/CFCBindMethod.c      |  4 +--
 clownfish/compiler/src/CFCDumpable.c        |  2 +-
 clownfish/compiler/src/CFCPerl.c            |  4 +--
 clownfish/compiler/src/CFCPerlConstructor.c |  2 +-
 clownfish/compiler/src/CFCPerlMethod.c      |  8 ++---
 clownfish/compiler/src/CFCPerlTypeMap.c     | 42 ++++++++++++------------
 6 files changed, 31 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/2868d6c7/clownfish/compiler/src/CFCBindMethod.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCBindMethod.c b/clownfish/compiler/src/CFCBindMethod.c
index 3669b04..7ef11e1 100644
--- a/clownfish/compiler/src/CFCBindMethod.c
+++ b/clownfish/compiler/src/CFCBindMethod.c
@@ -223,7 +223,7 @@ S_build_unused_vars(CFCVariable **vars) {
         const char *var_name = CFCVariable_micro_sym(vars[i]);
         size_t size = strlen(unused) + strlen(var_name) + 80;
         unused = (char*)REALLOCATE(unused, size);
-        strcat(unused, "\n    CHY_UNUSED_VAR(");
+        strcat(unused, "\n    CFISH_UNUSED_VAR(");
         strcat(unused, var_name);
         strcat(unused, ");");
     }
@@ -239,7 +239,7 @@ S_maybe_unreachable(CFCType *return_type) {
     }
     else {
         const char *ret_type_str = CFCType_to_c(return_type);
-        char pattern[] = "\n    CHY_UNREACHABLE_RETURN(%s);";
+        char pattern[] = "\n    CFISH_UNREACHABLE_RETURN(%s);";
         return_statement = CFCUtil_sprintf(pattern, ret_type_str);
     }
     return return_statement;

http://git-wip-us.apache.org/repos/asf/lucy/blob/2868d6c7/clownfish/compiler/src/CFCDumpable.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCDumpable.c b/clownfish/compiler/src/CFCDumpable.c
index 269eddd..de62098 100644
--- a/clownfish/compiler/src/CFCDumpable.c
+++ b/clownfish/compiler/src/CFCDumpable.c
@@ -269,7 +269,7 @@ S_add_load_method(CFCClass *klass) {
             "    cfish_VTable *vtable = cfish_VTable_singleton(class_name, NULL);\n"
             "    %s *loaded = (%s*)Cfish_VTable_Make_Obj(vtable);\n"
             "    %sIVARS *ivars = %s%s_IVARS(loaded);\n"
-            "    CHY_UNUSED_VAR(self);\n";
+            "    CFISH_UNUSED_VAR(self);\n";
         char *autocode
             = CFCUtil_sprintf(pattern, full_func_sym, full_struct, full_struct,
                               full_struct,

http://git-wip-us.apache.org/repos/asf/lucy/blob/2868d6c7/clownfish/compiler/src/CFCPerl.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCPerl.c b/clownfish/compiler/src/CFCPerl.c
index d1d0dad..fbdba5a 100644
--- a/clownfish/compiler/src/CFCPerl.c
+++ b/clownfish/compiler/src/CFCPerl.c
@@ -370,8 +370,8 @@ S_xs_file_contents(CFCPerl *self, const char *generated_xs,
         "PPCODE:\n"
         "{\n"
         "    const char* file = __FILE__;\n"
-        "    CHY_UNUSED_VAR(cv);\n"
-        "    CHY_UNUSED_VAR(items); %s\n"
+        "    CFISH_UNUSED_VAR(cv);\n"
+        "    CFISH_UNUSED_VAR(items); %s\n"
         "}\n"
         "\n"
         "%s\n"

http://git-wip-us.apache.org/repos/asf/lucy/blob/2868d6c7/clownfish/compiler/src/CFCPerlConstructor.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCPerlConstructor.c b/clownfish/compiler/src/CFCPerlConstructor.c
index 67891bd..114b5cd 100644
--- a/clownfish/compiler/src/CFCPerlConstructor.c
+++ b/clownfish/compiler/src/CFCPerlConstructor.c
@@ -115,7 +115,7 @@ CFCPerlConstructor_xsub_def(CFCPerlConstructor *self) {
         "XS(%s);\n"
         "XS(%s) {\n"
         "    dXSARGS;\n"
-        "    CHY_UNUSED_VAR(cv);\n"
+        "    CFISH_UNUSED_VAR(cv);\n"
         "    if (items < 1) { CFISH_THROW(CFISH_ERR, \"Usage: %%s(class_name, ...)\",
 GvNAME(CvGV(cv))); }\n"
         "    SP -= items;\n"
         "\n"

http://git-wip-us.apache.org/repos/asf/lucy/blob/2868d6c7/clownfish/compiler/src/CFCPerlMethod.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCPerlMethod.c b/clownfish/compiler/src/CFCPerlMethod.c
index c109bd1..8266c59 100644
--- a/clownfish/compiler/src/CFCPerlMethod.c
+++ b/clownfish/compiler/src/CFCPerlMethod.c
@@ -251,7 +251,7 @@ S_xsub_def_labeled_params(CFCPerlMethod *self) {
         "XS(%s);\n"
         "XS(%s) {\n"
         "    dXSARGS;\n"
-        "    CHY_UNUSED_VAR(cv);\n"
+        "    CFISH_UNUSED_VAR(cv);\n"
         "    if (items < 1) { CFISH_THROW(CFISH_ERR, \"Usage: %%s(%s, ...)\",  GvNAME(CvGV(cv)));
}\n"
         "    SP -= items;\n"
         "\n"
@@ -360,7 +360,7 @@ S_xsub_def_positional_args(CFCPerlMethod *self) {
         "XS(%s);\n"
         "XS(%s) {\n"
         "    dXSARGS;\n"
-        "    CHY_UNUSED_VAR(cv);\n"
+        "    CFISH_UNUSED_VAR(cv);\n"
         "    SP -= items;\n"
         "    %s;\n"
         "\n"
@@ -422,7 +422,7 @@ S_build_unused_vars(CFCVariable **vars) {
         const char *var_name = CFCVariable_micro_sym(vars[i]);
         size_t size = strlen(unused) + strlen(var_name) + 80;
         unused = (char*)REALLOCATE(unused, size);
-        strcat(unused, "\n    CHY_UNUSED_VAR(");
+        strcat(unused, "\n    CFISH_UNUSED_VAR(");
         strcat(unused, var_name);
         strcat(unused, ");");
     }
@@ -438,7 +438,7 @@ S_maybe_unreachable(CFCType *return_type) {
     }
     else {
         const char *ret_type_str = CFCType_to_c(return_type);
-        char pattern[] = "\n    CHY_UNREACHABLE_RETURN(%s);";
+        char pattern[] = "\n    CFISH_UNREACHABLE_RETURN(%s);";
         return_statement = CFCUtil_sprintf(pattern, ret_type_str);
     }
     return return_statement;

http://git-wip-us.apache.org/repos/asf/lucy/blob/2868d6c7/clownfish/compiler/src/CFCPerlTypeMap.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCPerlTypeMap.c b/clownfish/compiler/src/CFCPerlTypeMap.c
index dbc87b6..2d02195 100644
--- a/clownfish/compiler/src/CFCPerlTypeMap.c
+++ b/clownfish/compiler/src/CFCPerlTypeMap.c
@@ -154,7 +154,7 @@ CFCPerlTypeMap_to_perl(CFCType *type, const char *cf_var) {
         else if (strcmp(specifier, "uint64_t") == 0) {
             char pattern[] =
                 "sizeof(UV) == 8 ? "
-                "newSVuv((UV)%s) : newSVnv((NV)CHY_U64_TO_DOUBLE(%s))";
+                "newSVuv((UV)%s) : newSVnv((NV)CFISH_U64_TO_DOUBLE(%s))";
             result = CFCUtil_sprintf(pattern, cf_var, cf_var);
         }
         else if (strcmp(specifier, "uint32_t") == 0) {
@@ -202,15 +202,15 @@ static const char typemap_start[] =
     "# Auto-generated file.\n"
     "\n"
     "TYPEMAP\n"
-    "bool\tCHY_BOOL\n"
-    "int8_t\tCHY_SIGNED_INT\n"
-    "int16_t\tCHY_SIGNED_INT\n"
-    "int32_t\tCHY_SIGNED_INT\n"
-    "int64_t\tCHY_BIG_SIGNED_INT\n"
-    "uint8_t\tCHY_UNSIGNED_INT\n"
-    "uint16_t\tCHY_UNSIGNED_INT\n"
-    "uint32_t\tCHY_UNSIGNED_INT\n"
-    "uint64_t\tCHY_BIG_UNSIGNED_INT\n"
+    "bool\tCFISH_BOOL\n"
+    "int8_t\tCFISH_SIGNED_INT\n"
+    "int16_t\tCFISH_SIGNED_INT\n"
+    "int32_t\tCFISH_SIGNED_INT\n"
+    "int64_t\tCFISH_BIG_SIGNED_INT\n"
+    "uint8_t\tCFISH_UNSIGNED_INT\n"
+    "uint16_t\tCFISH_UNSIGNED_INT\n"
+    "uint32_t\tCFISH_UNSIGNED_INT\n"
+    "uint64_t\tCFISH_BIG_UNSIGNED_INT\n"
     "\n"
     "const cfish_CharBuf*\tCONST_CHARBUF\n";
 
@@ -218,19 +218,19 @@ static const char typemap_start[] =
 static const char typemap_input[] =
     "INPUT\n"
     "\n"
-    "CHY_BOOL\n"
+    "CFISH_BOOL\n"
     "    $var = ($type)SvTRUE($arg);\n"
     "\n"
-    "CHY_SIGNED_INT \n"
+    "CFISH_SIGNED_INT \n"
     "    $var = ($type)SvIV($arg);\n"
     "\n"
-    "CHY_UNSIGNED_INT\n"
+    "CFISH_UNSIGNED_INT\n"
     "    $var = ($type)SvUV($arg);\n"
     "\n"
-    "CHY_BIG_SIGNED_INT \n"
+    "CFISH_BIG_SIGNED_INT \n"
     "    $var = (sizeof(IV) == 8) ? ($type)SvIV($arg) : ($type)SvNV($arg);\n"
     "\n"
-    "CHY_BIG_UNSIGNED_INT \n"
+    "CFISH_BIG_UNSIGNED_INT \n"
     "    $var = (sizeof(UV) == 8) ? ($type)SvUV($arg) : ($type)SvNV($arg);\n"
     "\n"
     "CONST_CHARBUF\n"
@@ -240,23 +240,23 @@ static const char typemap_input[] =
 static const char typemap_output[] =
     "OUTPUT\n"
     "\n"
-    "CHY_BOOL\n"
+    "CFISH_BOOL\n"
     "    sv_setiv($arg, (IV)$var);\n"
     "\n"
-    "CHY_SIGNED_INT\n"
+    "CFISH_SIGNED_INT\n"
     "    sv_setiv($arg, (IV)$var);\n"
     "\n"
-    "CHY_UNSIGNED_INT\n"
+    "CFISH_UNSIGNED_INT\n"
     "    sv_setuv($arg, (UV)$var);\n"
     "\n"
-    "CHY_BIG_SIGNED_INT\n"
+    "CFISH_BIG_SIGNED_INT\n"
     "    if (sizeof(IV) == 8) { sv_setiv($arg, (IV)$var); }\n"
     "    else                 { sv_setnv($arg, (NV)$var); }\n"
     "\n"
-    "CHY_BIG_UNSIGNED_INT\n"
+    "CFISH_BIG_UNSIGNED_INT\n"
     "    if (sizeof(UV) == 8) { sv_setuv($arg, (UV)$var); }\n"
     "    else {\n"
-    "        sv_setnv($arg, (NV)CHY_U64_TO_DOUBLE($var));\n"
+    "        sv_setnv($arg, (NV)CFISH_U64_TO_DOUBLE($var));\n"
     "    }\n"
     "\n";
 


Mime
View raw message