Don't include class headers in boot.c Now that the class singletons are declared in the parcel headers, the class headers aren't needed in boot.c.
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/d9def8b0 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/d9def8b0 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/d9def8b0 Branch: refs/heads/optimize_autogen Commit: d9def8b07b0a3d6a76a7d9136925ae523c27cb41 Parents: 9e19425 Author: Nick Wellnhofer <[email protected]> Authored: Sun Nov 30 20:56:09 2014 +0100 Committer: Nick Wellnhofer <[email protected]> Committed: Sun Jan 4 23:59:18 2015 +0100 ---------------------------------------------------------------------- compiler/src/CFCPerl.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/d9def8b0/compiler/src/CFCPerl.c ---------------------------------------------------------------------- diff --git a/compiler/src/CFCPerl.c b/compiler/src/CFCPerl.c index 7103eac..deefc1a 100644 --- a/compiler/src/CFCPerl.c +++ b/compiler/src/CFCPerl.c @@ -234,8 +234,12 @@ S_write_boot_c(CFCPerl *self) { char *isa_pushes = CFCUtil_strdup(""); for (size_t i = 0; parcels[i]; ++i) { - if (!CFCParcel_included(parcels[i])) { - const char *prefix = CFCParcel_get_prefix(parcels[i]); + CFCParcel *parcel = parcels[i]; + + if (!CFCParcel_included(parcel)) { + const char *prefix = CFCParcel_get_prefix(parcel); + pound_includes = CFCUtil_cat(pound_includes, "#include \"", prefix, + "parcel.h\"\n", NULL); bootstrap_code = CFCUtil_cat(bootstrap_code, " ", prefix, "bootstrap_parcel();\n", NULL); } @@ -243,14 +247,9 @@ S_write_boot_c(CFCPerl *self) { for (size_t i = 0; ordered[i] != NULL; i++) { CFCClass *klass = ordered[i]; - if (CFCClass_included(klass)) { continue; } + if (CFCClass_included(klass) || CFCClass_inert(klass)) { continue; } const char *class_name = CFCClass_get_class_name(klass); - const char *include_h = CFCClass_include_h(klass); - pound_includes = CFCUtil_cat(pound_includes, "#include \"", - include_h, "\"\n", NULL); - - if (CFCClass_inert(klass)) { continue; } // Add aliases for selected KinoSearch classes which allow old indexes // to be read. @@ -293,8 +292,6 @@ S_write_boot_c(CFCPerl *self) { const char pattern[] = "%s\n" "\n" - "#include \"cfish_parcel.h\"\n" - "\n" "/* Avoid conflicts with Clownfish bool type. */\n" "#define HAS_BOOL\n" "#include \"EXTERN.h\"\n"
