Solved a problem with packages to be created in a compiled file not being recognized...
authorJuan Jose Garcia Ripoll <jjgarcia@jjgr-2.local>
Sun, 7 Feb 2010 14:48:19 +0000 (15:48 +0100)
committerJuan Jose Garcia Ripoll <jjgarcia@jjgr-2.local>
Sun, 7 Feb 2010 14:48:19 +0000 (15:48 +0100)
src/CHANGELOG
src/c/package.d
src/c/read.d

index ae69cfb..f256150 100755 (executable)
@@ -33,6 +33,10 @@ ECL 10.2.1:
 
  - The compiler now uses THE forms with a VALUES type.
 
+ - If file A.lsp explicitely loads B.lsp to use a package that is only defined
+   in B, then ECL signaled an error in the compiled version of A even after
+   this one had required B.lsp.
+
 * Visible changes:
 
  - Significant speedup in access to hash tables of up to 30% by writing
index 98925a8..27f2633 100644 (file)
@@ -135,7 +135,6 @@ ecl_make_package(cl_object name, cl_object nicknames, cl_object use_list)
        PACKAGE_OP_LOCK();
        if (cl_core.packages_to_be_created != OBJNULL) {
                cl_object l = cl_core.packages_to_be_created;
-               cl_object tail = l;
                while (CONSP(l)) {
                        cl_object pair = ECL_CONS_CAR(l);
                        cl_object other_name = ECL_CONS_CAR(pair);
@@ -144,15 +143,11 @@ ecl_make_package(cl_object name, cl_object nicknames, cl_object use_list)
                                    @':test', @'string=') != Cnil)
                        {
                                x = ECL_CONS_CDR(pair);
-                               pair = ECL_CONS_CDR(l);
-                               if (l == tail) {
-                                       cl_core.packages_to_be_created = pair;
-                               } else {
-                                       ECL_RPLACD(tail, pair);
-                               }
+                                cl_core.packages_to_be_created =
+                                        ecl_remove_eq(pair,
+                                                      cl_core.packages_to_be_created);
                                goto INTERN;
                        }
-                       tail = l;
                        l = ECL_CONS_CDR(l);
                }
        }
index d7d27c1..5790813 100644 (file)
@@ -2478,11 +2478,12 @@ read_VV(cl_object block, void (*entry_point)(cl_object))
                x = cl_core.packages_to_be_created;
                loop_for_on(x) {
                        if ((old_eptbc == OBJNULL) || !ecl_member(x, old_eptbc)) {
-                               CEerror(Ct, "The following package was referenced in a "
-                               "compiled file, but has not been created: ~A",
-                               2, block->cblock.name, CAR(x));
+                               CEerror(Ct, "The package named ~A was referenced in "
+                               "compiled file~&  ~A~&but has not been created",
+                               2, CAR(x), block->cblock.name);
                        }
                } end_loop_for_on;
+                old_eptbc = cl_core.packages_to_be_created;
                if (VVtemp) {
                        block->cblock.temp_data = NULL;
                        block->cblock.temp_data_size = 0;