lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [2/5] lucy-clownfish git commit: Remove unused method
Date Thu, 26 Nov 2015 18:20:44 GMT
Remove unused method


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

Branch: refs/heads/master
Commit: 69dd42d3d3c68cbf651296fb5608bfde044e8e75
Parents: ffeefa5
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Sun Nov 22 18:15:27 2015 +0100
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Thu Nov 26 19:18:22 2015 +0100

----------------------------------------------------------------------
 compiler/perl/lib/Clownfish/CFC.xs |  7 ------
 compiler/src/CFCPerlSub.c          | 38 ---------------------------------
 compiler/src/CFCPerlSub.h          |  7 ------
 3 files changed, 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/69dd42d3/compiler/perl/lib/Clownfish/CFC.xs
----------------------------------------------------------------------
diff --git a/compiler/perl/lib/Clownfish/CFC.xs b/compiler/perl/lib/Clownfish/CFC.xs
index d7a5385..c942338 100644
--- a/compiler/perl/lib/Clownfish/CFC.xs
+++ b/compiler/perl/lib/Clownfish/CFC.xs
@@ -2061,13 +2061,6 @@ PPCODE:
 }
 
 SV*
-params_hash_def(self)
-    CFCPerlSub *self;
-CODE:
-    RETVAL = S_sv_eat_c_string(CFCPerlSub_params_hash_def(self));
-OUTPUT: RETVAL
-
-SV*
 build_param_specs(self, first)
     CFCPerlSub *self;
     size_t first;

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/69dd42d3/compiler/src/CFCPerlSub.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCPerlSub.c b/compiler/src/CFCPerlSub.c
index f1dee85..6942abc 100644
--- a/compiler/src/CFCPerlSub.c
+++ b/compiler/src/CFCPerlSub.c
@@ -79,44 +79,6 @@ CFCPerlSub_destroy(CFCPerlSub *self) {
 }
 
 char*
-CFCPerlSub_params_hash_def(CFCPerlSub *self) {
-    if (!self->use_labeled_params) {
-        return NULL;
-    }
-
-    char *def = CFCUtil_strdup("");
-    def = CFCUtil_cat(def, "%", self->perl_name, "_PARAMS = (", NULL);
-
-    CFCVariable **arg_vars = CFCParamList_get_variables(self->param_list);
-    const char **vals = CFCParamList_get_initial_values(self->param_list);
-
-    // No labeled params means an empty params hash def.
-    if (!arg_vars[1]) {
-        def = CFCUtil_cat(def, ");\n", NULL);
-        return def;
-    }
-
-    for (int i = 1; arg_vars[i] != NULL; i++) {
-        CFCVariable *var = arg_vars[i];
-        const char *var_name = CFCVariable_get_name(var);
-        const char *val = vals[i];
-        val = val == NULL
-              ? "undef"
-              : strcmp(val, "NULL") == 0
-              ? "undef"
-              : strcmp(val, "true") == 0
-              ? "1"
-              : strcmp(val, "false") == 0
-              ? "0"
-              : val;
-        def = CFCUtil_cat(def, "\n    ", var_name, " => ", val, ",", NULL);
-    }
-    def = CFCUtil_cat(def, "\n);\n", NULL);
-
-    return def;
-}
-
-char*
 CFCPerlSub_arg_declarations(CFCPerlSub *self, size_t first) {
     CFCParamList *param_list = self->param_list;
     CFCVariable **arg_vars   = CFCParamList_get_variables(param_list);

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/69dd42d3/compiler/src/CFCPerlSub.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCPerlSub.h b/compiler/src/CFCPerlSub.h
index d45852a..f113d7a 100644
--- a/compiler/src/CFCPerlSub.h
+++ b/compiler/src/CFCPerlSub.h
@@ -66,13 +66,6 @@ CFCPerlSub_init(CFCPerlSub *self, struct CFCParamList *param_list,
 void
 CFCPerlSub_destroy(CFCPerlSub *self);
 
-/** Return Perl code initializing a package-global hash where all the keys are
- * the names of labeled params.  The hash's name consists of the the binding's
- * perl_name() plus "_PARAMS".
- */
-char*
-CFCPerlSub_params_hash_def(CFCPerlSub *self);
-
 /** Generate C declarations for the variables holding the arguments, from
  * `first` onwards.
  */


Mime
View raw message