lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [08/10] git commit: Remove unneeded parameter
Date Mon, 17 Mar 2014 17:27:55 GMT
Remove unneeded parameter


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

Branch: refs/heads/explicit-dependencies-wip2
Commit: cd402eb4dcf260867ab6e69fea4ab8bd8a44ff51
Parents: 5bdf313
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Wed Mar 12 18:02:22 2014 +0100
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Mon Mar 17 18:25:30 2014 +0100

----------------------------------------------------------------------
 compiler/perl/lib/Clownfish/CFC.xs | 54 ++++++++-------------------------
 compiler/perl/t/105-object_type.t  | 18 +++++------
 compiler/perl/t/300-variable.t     |  6 ++--
 compiler/perl/t/301-param_list.t   |  4 +--
 compiler/perl/t/404-file.t         |  4 +--
 compiler/perl/t/600-parser.t       |  4 +--
 compiler/src/CFCClass.c            | 10 +++---
 compiler/src/CFCClass.h            |  2 +-
 compiler/src/CFCFunction.c         |  6 ++--
 compiler/src/CFCFunction.h         |  2 +-
 compiler/src/CFCHierarchy.c        |  2 +-
 compiler/src/CFCMethod.c           |  4 +--
 compiler/src/CFCMethod.h           |  2 +-
 compiler/src/CFCParamList.c        |  4 +--
 compiler/src/CFCParamList.h        |  2 +-
 compiler/src/CFCTestClass.c        |  9 ++----
 compiler/src/CFCTestFile.c         |  4 +--
 compiler/src/CFCTestMethod.c       |  3 +-
 compiler/src/CFCTestParamList.c    |  7 ++---
 compiler/src/CFCTestParser.c       |  2 +-
 compiler/src/CFCTestType.c         | 19 +++++-------
 compiler/src/CFCTestVariable.c     |  7 ++---
 compiler/src/CFCType.c             |  4 +--
 compiler/src/CFCType.h             |  2 +-
 compiler/src/CFCVariable.c         |  4 +--
 compiler/src/CFCVariable.h         |  2 +-
 26 files changed, 73 insertions(+), 114 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/perl/lib/Clownfish/CFC.xs
----------------------------------------------------------------------
diff --git a/compiler/perl/lib/Clownfish/CFC.xs b/compiler/perl/lib/Clownfish/CFC.xs
index faa74f3..f69dfc4 100644
--- a/compiler/perl/lib/Clownfish/CFC.xs
+++ b/compiler/perl/lib/Clownfish/CFC.xs
@@ -268,15 +268,10 @@ CODE:
 OUTPUT: RETVAL
 
 void
-resolve_types(self, classes_sv)
+resolve_types(self)
     CFCClass *self;
-    SV *classes_sv;
 PPCODE:
-    CFCClass **classes
-        = (CFCClass**)S_av_to_array_of_cfcbase(classes_sv,
-                                               "Clownfish::CFC::Model::Class");
-    CFCClass_resolve_types(self, classes);
-    FREEMEM(classes);
+    CFCClass_resolve_types(self);
 
 void
 _set_or_get(self, ...)
@@ -662,15 +657,10 @@ CODE:
 OUTPUT: RETVAL
 
 void
-resolve_types(self, classes_sv)
+resolve_types(self)
     CFCFunction *self;
-    SV *classes_sv;
 PPCODE:
-    CFCClass **classes
-        = (CFCClass**)S_av_to_array_of_cfcbase(classes_sv,
-                                               "Clownfish::CFC::Model::Class");
-    CFCFunction_resolve_types(self, classes);
-    FREEMEM(classes);
+    CFCFunction_resolve_types(self);
 
 void
 _set_or_get(self, ...)
@@ -866,15 +856,10 @@ CODE:
 OUTPUT: RETVAL
 
 void
-resolve_types(self, classes_sv)
+resolve_types(self)
     CFCMethod *self;
-    SV *classes_sv;
 PPCODE:
-    CFCClass **classes
-        = (CFCClass**)S_av_to_array_of_cfcbase(classes_sv,
-                                               "Clownfish::CFC::Model::Class");
-    CFCMethod_resolve_types(self, classes);
-    FREEMEM(classes);
+    CFCMethod_resolve_types(self);
 
 void
 exclude_from_host(self)
@@ -996,15 +981,10 @@ PPCODE:
     CFCParamList_add_param(self, variable, value);
 
 void
-resolve_types(self, classes_sv)
+resolve_types(self)
     CFCParamList *self;
-    SV *classes_sv;
 PPCODE:
-    CFCClass **classes
-        = (CFCClass**)S_av_to_array_of_cfcbase(classes_sv,
-                                               "Clownfish::CFC::Model::Class");
-    CFCParamList_resolve_types(self, classes);
-    FREEMEM(classes);
+    CFCParamList_resolve_types(self);
 
 void
 _set_or_get(self, ...)
@@ -1550,15 +1530,10 @@ CODE:
 OUTPUT: RETVAL
 
 void
-resolve(self, classes_sv)
+resolve(self)
     CFCType *self;
-    SV *classes_sv;
 PPCODE:
-    CFCClass **classes
-        = (CFCClass**)S_av_to_array_of_cfcbase(classes_sv,
-                                               "Clownfish::CFC::Model::Class");
-    CFCType_resolve(self, classes);
-    FREEMEM(classes);
+    CFCType_resolve(self);
 
 void
 _set_or_get(self, ...)
@@ -1772,15 +1747,10 @@ CODE:
 OUTPUT: RETVAL
 
 void
-resolve_type(self, classes_sv)
+resolve_type(self)
     CFCVariable *self;
-    SV *classes_sv;
 PPCODE:
-    CFCClass **classes
-        = (CFCClass**)S_av_to_array_of_cfcbase(classes_sv,
-                                               "Clownfish::CFC::Model::Class");
-    CFCVariable_resolve_type(self, classes);
-    FREEMEM(classes);
+    CFCVariable_resolve_type(self);
 
 void
 _set_or_get(self, ...)

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/perl/t/105-object_type.t
----------------------------------------------------------------------
diff --git a/compiler/perl/t/105-object_type.t b/compiler/perl/t/105-object_type.t
index a9ac3fc..9bdce59 100644
--- a/compiler/perl/t/105-object_type.t
+++ b/compiler/perl/t/105-object_type.t
@@ -38,11 +38,11 @@ for my $bad_specifier (qw( foo Foo_Bar FOOBAR 1Foo 1FOO )) {
 }
 
 my @specifiers = qw( Foo FooJr FooIII Foo4th );
-my @classes = map { $parser->parse("class $_ {}") } @specifiers;
+$parser->parse("class $_ {}") for @specifiers;
 
 for my $specifier (@specifiers) {
     my $type = $parser->parse("$specifier*");
-    $type->resolve(\@classes);
+    $type->resolve;
     is( $type->get_specifier, "neato_$specifier",
         "object_type_specifier: $specifier" );
     is( $parser->parse("neato_$specifier*")->get_specifier,
@@ -81,12 +81,12 @@ my $foo_type = Clownfish::CFC::Model::Type->new_object(
     parcel    => 'Neato',
     specifier => 'Foo',
 );
-$foo_type->resolve(\@classes);
+$foo_type->resolve;
 my $another_foo = Clownfish::CFC::Model::Type->new_object(
     parcel    => 'Neato',
     specifier => 'Foo',
 );
-$another_foo->resolve(\@classes);
+$another_foo->resolve;
 ok( $foo_type->equals($another_foo), "equals" );
 
 my $bar_class = Clownfish::CFC::Model::Class->create(
@@ -97,7 +97,7 @@ my $bar_type = Clownfish::CFC::Model::Type->new_object(
     parcel    => 'Neato',
     specifier => 'Bar',
 );
-$bar_type->resolve([ $bar_class ]);
+$bar_type->resolve;
 ok( !$foo_type->equals($bar_type), "different specifier spoils equals" );
 
 my $foreign_foo_class = Clownfish::CFC::Model::Class->create(
@@ -108,7 +108,7 @@ my $foreign_foo = Clownfish::CFC::Model::Type->new_object(
     parcel    => 'Foreign',
     specifier => 'Foo',
 );
-$foreign_foo->resolve([ $foreign_foo_class ]);
+$foreign_foo->resolve;
 ok( !$foo_type->equals($foreign_foo), "different parcel spoils equals" );
 is( $foreign_foo->get_specifier, "foreign_Foo",
     "prepend parcel prefix to specifier" );
@@ -118,7 +118,7 @@ my $incremented_foo = Clownfish::CFC::Model::Type->new_object(
     specifier   => 'Foo',
     incremented => 1,
 );
-$incremented_foo->resolve(\@classes);
+$incremented_foo->resolve;
 ok( $incremented_foo->incremented, "incremented" );
 ok( !$foo_type->incremented,       "not incremented" );
 ok( !$foo_type->equals($incremented_foo),
@@ -130,7 +130,7 @@ my $decremented_foo = Clownfish::CFC::Model::Type->new_object(
     specifier   => 'Foo',
     decremented => 1,
 );
-$decremented_foo->resolve(\@classes);
+$decremented_foo->resolve;
 ok( $decremented_foo->decremented, "decremented" );
 ok( !$foo_type->decremented,       "not decremented" );
 ok( !$foo_type->equals($decremented_foo),
@@ -142,7 +142,7 @@ my $const_foo = Clownfish::CFC::Model::Type->new_object(
     specifier => 'Foo',
     const     => 1,
 );
-$const_foo->resolve(\@classes);
+$const_foo->resolve;
 ok( !$foo_type->equals($const_foo), "different const spoils equals" );
 like( $const_foo->to_c, qr/const/, "const included in C representation" );
 

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/perl/t/300-variable.t
----------------------------------------------------------------------
diff --git a/compiler/perl/t/300-variable.t b/compiler/perl/t/300-variable.t
index a5f33be..bc49d17 100644
--- a/compiler/perl/t/300-variable.t
+++ b/compiler/perl/t/300-variable.t
@@ -49,7 +49,7 @@ my $var = Clownfish::CFC::Model::Variable->new(
     micro_sym => 'foo',
     type      => new_type('float*')
 );
-$var->resolve_type([]);
+$var->resolve_type;
 is( $var->local_c,           'float* foo',  "local_c" );
 is( $var->local_declaration, 'float* foo;', "declaration" );
 ok( $var->local, "default to local access" );
@@ -58,7 +58,7 @@ $var = Clownfish::CFC::Model::Variable->new(
     micro_sym => 'foo',
     type      => new_type('float[1]')
 );
-$var->resolve_type([]);
+$var->resolve_type;
 is( $var->local_c, 'float foo[1]',
     "to_c appends array to var name rather than type specifier" );
 
@@ -70,7 +70,7 @@ $var = Clownfish::CFC::Model::Variable->new(
     class_name  => 'Crustacean::Lobster::LobsterClaw',
     class_cnick => 'LobClaw',
 );
-$var->resolve_type([ $foo_class ]);
+$var->resolve_type;
 is( $var->global_c, 'neato_Foo* neato_LobClaw_foo', "global_c" );
 
 isa_ok(

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/perl/t/301-param_list.t
----------------------------------------------------------------------
diff --git a/compiler/perl/t/301-param_list.t b/compiler/perl/t/301-param_list.t
index b315e9a..b3665c8 100644
--- a/compiler/perl/t/301-param_list.t
+++ b/compiler/perl/t/301-param_list.t
@@ -33,14 +33,14 @@ isa_ok(
 my $obj_class = $parser->parse("class Obj {}");
 
 my $param_list = $parser->parse("(Obj *self, int num)");
-$param_list->resolve_types([ $obj_class ]);
+$param_list->resolve_types;
 isa_ok( $param_list, "Clownfish::CFC::Model::ParamList" );
 ok( !$param_list->variadic, "not variadic" );
 is( $param_list->to_c, 'neato_Obj* self, int num', "to_c" );
 is( $param_list->name_list, 'self, num', "name_list" );
 
 $param_list = $parser->parse("(Obj *self=NULL, int num, ...)");
-$param_list->resolve_types([ $obj_class ]);
+$param_list->resolve_types;
 ok( $param_list->variadic, "variadic" );
 is_deeply(
     $param_list->get_initial_values,

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/perl/t/404-file.t
----------------------------------------------------------------------
diff --git a/compiler/perl/t/404-file.t b/compiler/perl/t/404-file.t
index 11668c4..d071c66 100644
--- a/compiler/perl/t/404-file.t
+++ b/compiler/perl/t/404-file.t
@@ -70,8 +70,8 @@ my $file_spec = Clownfish::CFC::Model::FileSpec->new(
     is( scalar @$classes, 3, "classes() filters blocks" );
     my $class = $classes->[0];
     my ( $foo, $bar ) = @{ $class->member_vars };
-    $foo->resolve_type($classes);
-    $bar->resolve_type($classes);
+    $foo->resolve_type;
+    $bar->resolve_type;
     is( $foo->get_type->get_specifier,
         'stuff_Foo', 'file production picked up parcel def' );
     is( $bar->get_type->get_specifier, 'stuff_Bar', 'parcel def is sticky' );

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/perl/t/600-parser.t
----------------------------------------------------------------------
diff --git a/compiler/perl/t/600-parser.t b/compiler/perl/t/600-parser.t
index 94dbed3..8d6e26e 100644
--- a/compiler/perl/t/600-parser.t
+++ b/compiler/perl/t/600-parser.t
@@ -57,7 +57,7 @@ isa_ok( $parser->parse("bool"),
 for (qw( ByteBuf Obj ANDMatcher )) {
     my $class = $parser->parse("class $_ {}");
     my $type  = $parser->parse("$_*");
-    $type->resolve([ $class ]);
+    $type->resolve;
     is( $type->get_specifier, "crust_$_", "object_type_specifier $_" );
 }
 
@@ -134,7 +134,7 @@ ok( $parser->parse($_), "declaration statement: $_" )
 for (qw( Foo FooJr FooIII Foo4th )) {
     my $class = $parser->parse("class $_ {}");
     my $type  = $parser->parse("$_*");
-    $type->resolve([ $class ]);
+    $type->resolve;
     is( $type->get_specifier, "crust_$_", "object_type_specifier: $_" )
 }
 Clownfish::CFC::Model::Class->_clear_registry();

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/src/CFCClass.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCClass.c b/compiler/src/CFCClass.c
index 38d1c28..fccecf8 100644
--- a/compiler/src/CFCClass.c
+++ b/compiler/src/CFCClass.c
@@ -480,18 +480,18 @@ CFCClass_fresh_method(CFCClass *self, const char *sym) {
 }
 
 void
-CFCClass_resolve_types(CFCClass *self, CFCClass **classes) {
+CFCClass_resolve_types(CFCClass *self) {
     for (size_t i = 0; self->functions[i] != NULL; i++) {
-        CFCFunction_resolve_types(self->functions[i], classes);
+        CFCFunction_resolve_types(self->functions[i]);
     }
     for (size_t i = 0; self->methods[i] != NULL; i++) {
-        CFCMethod_resolve_types(self->methods[i], classes);
+        CFCMethod_resolve_types(self->methods[i]);
     }
     for (size_t i = 0; self->member_vars[i] != NULL; i++) {
-        CFCVariable_resolve_type(self->member_vars[i], classes);
+        CFCVariable_resolve_type(self->member_vars[i]);
     }
     for (size_t i = 0; self->inert_vars[i] != NULL; i++) {
-        CFCVariable_resolve_type(self->inert_vars[i], classes);
+        CFCVariable_resolve_type(self->inert_vars[i]);
     }
 }
 

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/src/CFCClass.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCClass.h b/compiler/src/CFCClass.h
index 5c52728..00e05a3 100644
--- a/compiler/src/CFCClass.h
+++ b/compiler/src/CFCClass.h
@@ -142,7 +142,7 @@ CFCClass_find_novel_method(CFCClass *self, const char *sym);
 /** Find the actual class of all object variables without prefix.
  */
 void
-CFCClass_resolve_types(CFCClass *self, CFCClass **classes);
+CFCClass_resolve_types(CFCClass *self);
 
 /** Bequeath all inherited methods and members to children.
  */

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/src/CFCFunction.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCFunction.c b/compiler/src/CFCFunction.c
index 6f781f4..3926164 100644
--- a/compiler/src/CFCFunction.c
+++ b/compiler/src/CFCFunction.c
@@ -84,9 +84,9 @@ CFCFunction_init(CFCFunction *self, CFCParcel *parcel, const char *exposure,
 }
 
 void
-CFCFunction_resolve_types(CFCFunction *self, struct CFCClass **classes) {
-    CFCType_resolve(self->return_type, classes);
-    CFCParamList_resolve_types(self->param_list, classes);
+CFCFunction_resolve_types(CFCFunction *self) {
+    CFCType_resolve(self->return_type);
+    CFCParamList_resolve_types(self->param_list);
 }
 
 void

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/src/CFCFunction.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCFunction.h b/compiler/src/CFCFunction.h
index baab2c7..16a789e 100644
--- a/compiler/src/CFCFunction.h
+++ b/compiler/src/CFCFunction.h
@@ -114,7 +114,7 @@ CFCFunction_public(CFCFunction *self);
 /** Find the actual class of all object variables without prefix.
  */
 void
-CFCFunction_resolve_types(CFCFunction *self, struct CFCClass **classes);
+CFCFunction_resolve_types(CFCFunction *self);
 
 #ifdef __cplusplus
 }

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/src/CFCHierarchy.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCHierarchy.c b/compiler/src/CFCHierarchy.c
index af03016..f7e9520 100644
--- a/compiler/src/CFCHierarchy.c
+++ b/compiler/src/CFCHierarchy.c
@@ -214,7 +214,7 @@ CFCHierarchy_build(CFCHierarchy *self) {
     }
 
     for (int i = 0; self->classes[i] != NULL; i++) {
-        CFCClass_resolve_types(self->classes[i], self->classes);
+        CFCClass_resolve_types(self->classes[i]);
     }
 
     S_connect_classes(self);

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/src/CFCMethod.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCMethod.c b/compiler/src/CFCMethod.c
index f5780e2..97c68ae 100644
--- a/compiler/src/CFCMethod.c
+++ b/compiler/src/CFCMethod.c
@@ -149,8 +149,8 @@ CFCMethod_init(CFCMethod *self, CFCParcel *parcel, const char *exposure,
 }
 
 void
-CFCMethod_resolve_types(CFCMethod *self, struct CFCClass **classes) {
-    CFCFunction_resolve_types((CFCFunction*)self, classes);
+CFCMethod_resolve_types(CFCMethod *self) {
+    CFCFunction_resolve_types((CFCFunction*)self);
 }
 
 void

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/src/CFCMethod.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCMethod.h b/compiler/src/CFCMethod.h
index 0c96220..ad3294c 100644
--- a/compiler/src/CFCMethod.h
+++ b/compiler/src/CFCMethod.h
@@ -71,7 +71,7 @@ CFCMethod_init(CFCMethod *self, struct CFCParcel *parcel,
                int is_abstract);
 
 void
-CFCMethod_resolve_types(CFCMethod *self, struct CFCClass **classes);
+CFCMethod_resolve_types(CFCMethod *self);
 
 void
 CFCMethod_destroy(CFCMethod *self);

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/src/CFCParamList.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCParamList.c b/compiler/src/CFCParamList.c
index 087030c..06b5e0e 100644
--- a/compiler/src/CFCParamList.c
+++ b/compiler/src/CFCParamList.c
@@ -61,9 +61,9 @@ CFCParamList_init(CFCParamList *self, int variadic) {
 }
 
 void
-CFCParamList_resolve_types(CFCParamList *self, struct CFCClass **classes) {
+CFCParamList_resolve_types(CFCParamList *self) {
     for (size_t i = 0; self->variables[i]; ++i) {
-        CFCVariable_resolve_type(self->variables[i], classes);
+        CFCVariable_resolve_type(self->variables[i]);
     }
 }
 

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/src/CFCParamList.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCParamList.h b/compiler/src/CFCParamList.h
index 886fdfe..2aaae6d 100644
--- a/compiler/src/CFCParamList.h
+++ b/compiler/src/CFCParamList.h
@@ -38,7 +38,7 @@ CFCParamList*
 CFCParamList_init(CFCParamList *self, int variadic);
 
 void
-CFCParamList_resolve_types(CFCParamList *self, struct CFCClass **classes);
+CFCParamList_resolve_types(CFCParamList *self);
 
 void
 CFCParamList_destroy(CFCParamList *self);

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/src/CFCTestClass.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCTestClass.c b/compiler/src/CFCTestClass.c
index 36bd4ee..aa080ae 100644
--- a/compiler/src/CFCTestClass.c
+++ b/compiler/src/CFCTestClass.c
@@ -126,12 +126,9 @@ S_run_tests(CFCTest *test) {
         = CFCTest_parse_method(test, parser, "void Do_Stuff(Foo *self);");
     CFCClass_add_method(foo, do_stuff);
 
-    CFCClass *class_list[6] = {
-        foo, foo_jr, final_foo, thing_class, widget_class, NULL
-    };
-    CFCClass_resolve_types(foo, class_list);
-    CFCClass_resolve_types(foo_jr, class_list);
-    CFCClass_resolve_types(final_foo, class_list);
+    CFCClass_resolve_types(foo);
+    CFCClass_resolve_types(foo_jr);
+    CFCClass_resolve_types(final_foo);
 
     CFCClass_add_child(foo, foo_jr);
     CFCClass_add_child(foo_jr, final_foo);

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/src/CFCTestFile.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCTestFile.c b/compiler/src/CFCTestFile.c
index ad1cd5c..44e6f1c 100644
--- a/compiler/src/CFCTestFile.c
+++ b/compiler/src/CFCTestFile.c
@@ -97,11 +97,11 @@ S_run_tests(CFCTest *test) {
            "classes() filters blocks");
         CFCVariable **member_vars = CFCClass_member_vars(classes[0]);
         CFCType *foo_type = CFCVariable_get_type(member_vars[0]);
-        CFCType_resolve(foo_type, classes);
+        CFCType_resolve(foo_type);
         STR_EQ(test, CFCType_get_specifier(foo_type), "stuff_Foo",
                "file production picked up parcel def");
         CFCType *bar_type = CFCVariable_get_type(member_vars[1]);
-        CFCType_resolve(bar_type, classes);
+        CFCType_resolve(bar_type);
         STR_EQ(test, CFCType_get_specifier(bar_type), "stuff_Bar",
                "parcel def is sticky");
 

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/src/CFCTestMethod.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCTestMethod.c b/compiler/src/CFCTestMethod.c
index cde5d7e..39dd8d3 100644
--- a/compiler/src/CFCTestMethod.c
+++ b/compiler/src/CFCTestMethod.c
@@ -255,7 +255,6 @@ S_run_final_tests(CFCTest *test) {
         = CFCTest_parse_class(test, parser, "class Obj {}");
     CFCClass *foo_class
         = CFCTest_parse_class(test, parser, "class Neato::Foo {}");
-    CFCClass *class_list[3] = { obj_class, foo_class, NULL };
     CFCType *return_type = CFCTest_parse_type(test, parser, "Obj*");
     CFCParamList *param_list
         = CFCTest_parse_param_list(test, parser, "(Foo *self)");
@@ -264,7 +263,7 @@ S_run_final_tests(CFCTest *test) {
         = CFCMethod_new(neato_parcel, NULL, "Neato::Foo", "Foo",
                         "Return_An_Obj", return_type, param_list,
                         NULL, 0, 0);
-    CFCMethod_resolve_types(not_final, class_list);
+    CFCMethod_resolve_types(not_final);
     CFCMethod *final = CFCMethod_finalize(not_final);
     OK(test, CFCMethod_compatible(not_final, final),
        "finalize clones properly");

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/src/CFCTestParamList.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCTestParamList.c b/compiler/src/CFCTestParamList.c
index 29ff226..9dab0b8 100644
--- a/compiler/src/CFCTestParamList.c
+++ b/compiler/src/CFCTestParamList.c
@@ -38,12 +38,11 @@ S_run_tests(CFCTest *test) {
     CFCParcel *neato_parcel
         = CFCTest_parse_parcel(test, parser, "parcel Neato;");
     CFCClass *obj_class = CFCTest_parse_class(test, parser, "class Obj {}");
-    CFCClass *class_list[2] = { obj_class, NULL };
 
     {
         CFCParamList *param_list
             = CFCTest_parse_param_list(test, parser, "(Obj *self, int num)");
-        CFCParamList_resolve_types(param_list, class_list);
+        CFCParamList_resolve_types(param_list);
         OK(test, !CFCParamList_variadic(param_list), "not variadic");
         STR_EQ(test, CFCParamList_to_c(param_list), "neato_Obj* self, int num",
                "to_c");
@@ -57,7 +56,7 @@ S_run_tests(CFCTest *test) {
         CFCParamList *param_list
             = CFCTest_parse_param_list(test, parser,
                                        "(Obj *self=NULL, int num, ...)");
-        CFCParamList_resolve_types(param_list, class_list);
+        CFCParamList_resolve_types(param_list);
         OK(test, CFCParamList_variadic(param_list), "variadic");
         STR_EQ(test, CFCParamList_to_c(param_list),
                "neato_Obj* self, int num, ...", "to_c");
@@ -77,7 +76,7 @@ S_run_tests(CFCTest *test) {
     {
         CFCParamList *param_list
             = CFCTest_parse_param_list(test, parser, "()");
-        CFCParamList_resolve_types(param_list, class_list);
+        CFCParamList_resolve_types(param_list);
         STR_EQ(test, CFCParamList_to_c(param_list), "void", "to_c");
         INT_EQ(test, CFCParamList_num_vars(param_list), 0, "num_vars");
         CFCVariable **variables = CFCParamList_get_variables(param_list);

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/src/CFCTestParser.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCTestParser.c b/compiler/src/CFCTestParser.c
index 556a135..f377baa 100644
--- a/compiler/src/CFCTestParser.c
+++ b/compiler/src/CFCTestParser.c
@@ -127,7 +127,7 @@ S_run_tests(CFCTest *test) {
             char *src      = CFCUtil_sprintf("%s*", class_name);
             char *expected = CFCUtil_sprintf("crust_%s", class_name);
             CFCType *type = CFCTest_parse_type(test, parser, src);
-            CFCType_resolve(type, class_list);
+            CFCType_resolve(type);
             STR_EQ(test, CFCType_get_specifier(type), expected,
                    "object_type_specifier: %s", class_name);
             FREEMEM(src);

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/src/CFCTestType.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCTestType.c b/compiler/src/CFCTestType.c
index f0ce2d6..693613f 100644
--- a/compiler/src/CFCTestType.c
+++ b/compiler/src/CFCTestType.c
@@ -290,7 +290,6 @@ S_run_object_tests(CFCTest *test) {
 
             char *class_code = CFCUtil_sprintf("class %s {}", specifier);
             CFCClass *klass = CFCTest_parse_class(test, parser, class_code);
-            CFCClass *class_list[2] = { klass, NULL };
             FREEMEM(class_code);
 
             static const char *prefixes[2] = { "", "neato_" };
@@ -298,7 +297,7 @@ S_run_object_tests(CFCTest *test) {
             for (int j = 0; j < 2; ++j) {
                 char *src = CFCUtil_sprintf("%s%s*", prefixes[j], specifier);
                 CFCType *type = CFCTest_parse_type(test, parser, src);
-                CFCType_resolve(type, class_list);
+                CFCType_resolve(type);
                 STR_EQ(test, CFCType_get_specifier(type), expect,
                        "object_type_specifier: %s", src);
                 OK(test, CFCType_is_object(type), "%s is_object", src);
@@ -332,13 +331,12 @@ S_run_object_tests(CFCTest *test) {
     CFCClass *foo_class
         = CFCClass_create(neato_parcel, NULL, "Foo", NULL, NULL, NULL, NULL,
                           NULL, false, false);
-    CFCClass *class_list[2] = { foo_class, NULL };
     CFCType *foo = CFCType_new_object(0, neato_parcel, "Foo", 1);
-    CFCType_resolve(foo, class_list);
+    CFCType_resolve(foo);
 
     {
         CFCType *another_foo = CFCType_new_object(0, neato_parcel, "Foo", 1);
-        CFCType_resolve(another_foo, class_list);
+        CFCType_resolve(another_foo);
         OK(test, CFCType_equals(foo, another_foo), "equals");
         CFCBase_decref((CFCBase*)another_foo);
     }
@@ -348,8 +346,7 @@ S_run_object_tests(CFCTest *test) {
             = CFCClass_create(neato_parcel, NULL, "Bar", NULL, NULL, NULL,
                               NULL, NULL, false, false);
         CFCType *bar = CFCType_new_object(0, neato_parcel, "Bar", 1);
-        CFCClass *bar_class_list[2] = { bar_class, NULL };
-        CFCType_resolve(bar, bar_class_list);
+        CFCType_resolve(bar);
         OK(test, !CFCType_equals(foo, bar),
            "different specifier spoils equals");
         CFCBase_decref((CFCBase*)bar);
@@ -362,9 +359,8 @@ S_run_object_tests(CFCTest *test) {
         CFCClass *foreign_foo_class
             = CFCClass_create(foreign_parcel, NULL, "Foreign::Foo", NULL, NULL,
                               NULL, NULL, NULL, false, false);
-        CFCClass *foreign_class_list[2] = { foreign_foo_class, NULL };
         CFCType *foreign_foo = CFCType_new_object(0, foreign_parcel, "Foo", 1);
-        CFCType_resolve(foreign_foo, foreign_class_list);
+        CFCType_resolve(foreign_foo);
         OK(test, !CFCType_equals(foo, foreign_foo),
            "different parcel spoils equals");
         STR_EQ(test, CFCType_get_specifier(foreign_foo), "foreign_Foo",
@@ -378,7 +374,7 @@ S_run_object_tests(CFCTest *test) {
         for (int i = 0; i < 4; ++i) {
             CFCType *modified_foo
                 = CFCType_new_object(flags[i], neato_parcel, "Foo", 1);
-            CFCType_resolve(modified_foo, class_list);
+            CFCType_resolve(modified_foo);
             OK(test, accessors[i](modified_foo), "%s", modifiers[i]);
             OK(test, !accessors[i](foo), "not %s", modifiers[i]);
             OK(test, !CFCType_equals(foo, modified_foo),
@@ -518,9 +514,8 @@ S_run_composite_tests(CFCTest *test) {
     }
 
     {
-        CFCClass *class_list[1] = { NULL };
         CFCType *foo_array = CFCTest_parse_type(test, parser, "foo_t[]");
-        CFCType_resolve(foo_array, class_list);
+        CFCType_resolve(foo_array);
         STR_EQ(test, CFCType_get_array(foo_array), "[]", "get_array");
         STR_EQ(test, CFCType_to_c(foo_array), "foo_t",
                "array subscripts not included by to_c");

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/src/CFCTestVariable.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCTestVariable.c b/compiler/src/CFCTestVariable.c
index e8096e7..022db0b 100644
--- a/compiler/src/CFCTestVariable.c
+++ b/compiler/src/CFCTestVariable.c
@@ -39,13 +39,12 @@ S_run_tests(CFCTest *test) {
     CFCParcel *neato_parcel
         = CFCTest_parse_parcel(test, parser, "parcel Neato;");
     CFCClass *foo_class = CFCTest_parse_class(test, parser, "class Foo {}");
-    CFCClass *class_list[2] = { foo_class, NULL };
 
     {
         CFCType *type = CFCTest_parse_type(test, parser, "float*");
         CFCVariable *var
             = CFCVariable_new(NULL, NULL, NULL, NULL, "foo", type, 0);
-        CFCVariable_resolve_type(var, class_list);
+        CFCVariable_resolve_type(var);
         STR_EQ(test, CFCVariable_local_c(var), "float* foo", "local_c");
         STR_EQ(test, CFCVariable_local_declaration(var), "float* foo;",
                "local_declaration");
@@ -59,7 +58,7 @@ S_run_tests(CFCTest *test) {
         CFCType *type = CFCTest_parse_type(test, parser, "float[1]");
         CFCVariable *var
             = CFCVariable_new(NULL, NULL, NULL, NULL, "foo", type, 0);
-        CFCVariable_resolve_type(var, class_list);
+        CFCVariable_resolve_type(var);
         STR_EQ(test, CFCVariable_local_c(var), "float foo[1]",
                "to_c appends array to var name rather than type specifier");
 
@@ -73,7 +72,7 @@ S_run_tests(CFCTest *test) {
             = CFCVariable_new(neato_parcel, NULL,
                               "Crustacean::Lobster::LobsterClaw", "LobClaw",
                               "foo", type, 0);
-        CFCVariable_resolve_type(var, class_list);
+        CFCVariable_resolve_type(var);
         STR_EQ(test, CFCVariable_global_c(var), "neato_Foo* neato_LobClaw_foo",
                "global_c");
 

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/src/CFCType.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCType.c b/compiler/src/CFCType.c
index 974f33a..8a3d774 100644
--- a/compiler/src/CFCType.c
+++ b/compiler/src/CFCType.c
@@ -262,9 +262,9 @@ CFCType_new_arbitrary(CFCParcel *parcel, const char *specifier) {
 }
 
 void
-CFCType_resolve(CFCType *self, CFCClass **classes) {
+CFCType_resolve(CFCType *self) {
     if (CFCType_is_composite(self)) {
-        CFCType_resolve(self->child, classes);
+        CFCType_resolve(self->child);
         return;
     }
     if (!CFCType_is_object(self)) {

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/src/CFCType.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCType.h b/compiler/src/CFCType.h
index fbf18e7..53916c1 100644
--- a/compiler/src/CFCType.h
+++ b/compiler/src/CFCType.h
@@ -176,7 +176,7 @@ CFCType_new_arbitrary(struct CFCParcel *parcel, const char *specifier);
 /** Find the actual class of an object variable without prefix.
  */
 void
-CFCType_resolve(CFCType *self, struct CFCClass **classes);
+CFCType_resolve(CFCType *self);
 
 void
 CFCType_destroy(CFCType *self);

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/src/CFCVariable.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCVariable.c b/compiler/src/CFCVariable.c
index 4292e35..71e3473 100644
--- a/compiler/src/CFCVariable.c
+++ b/compiler/src/CFCVariable.c
@@ -85,8 +85,8 @@ CFCVariable_init(CFCVariable *self, struct CFCParcel *parcel,
 }
 
 void
-CFCVariable_resolve_type(CFCVariable *self, struct CFCClass **classes) {
-    CFCType_resolve(self->type, classes);
+CFCVariable_resolve_type(CFCVariable *self) {
+    CFCType_resolve(self->type);
 }
 
 void

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd402eb4/compiler/src/CFCVariable.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCVariable.h b/compiler/src/CFCVariable.h
index 7263de7..c67d3c6 100644
--- a/compiler/src/CFCVariable.h
+++ b/compiler/src/CFCVariable.h
@@ -57,7 +57,7 @@ CFCVariable_init(CFCVariable *self, struct CFCParcel *parcel,
                  struct CFCType *type, int inert);
 
 void
-CFCVariable_resolve_type(CFCVariable *self, struct CFCClass **classes);
+CFCVariable_resolve_type(CFCVariable *self);
 
 void
 CFCVariable_destroy(CFCVariable *self);


Mime
View raw message