From: Sam S. <sd...@gn...> - 2005-01-19 19:03:31
|
> * Bruno Haible <oe...@py...t> [2005-01-19 18:52:59 +0100]: > > Sam wrote: >> this won't fix compiled code... > > I take over the compiler.lisp part. I have a partial fix already... > You can concentrate on control.d. the appended patch fixes 12 out of the 14 eval failures. the remaining 2 bugs are in funcall_iclosure(): Form: (LET ((X 5)) (PROGV '(X) '(20) ((LAMBDA (&OPTIONAL (X (1+ X)) (Z (1+ X))) (DECLARE (SPECIAL X)) Z)))) CORRECT: 7 CLISP : 22 Form: (LET ((X 5)) (PROGV '(X) '(20) ((LAMBDA (&OPTIONAL (Y (1+ X)) (Z (1+ X))) (DECLARE (SPECIAL X)) Z)))) CORRECT: 6 CLISP : 21 the amusing thing is that this patch: --- eval.d 19 Jan 2005 11:40:04 -0500 1.183 +++ eval.d 19 Jan 2005 14:01:33 -0500 @@ -2387,7 +2387,7 @@ /* the special-references first: */ dotimesC(count,spec_count, { pushSTACK(specdecl); /* preliminary "binding value" */ - pushSTACK_symbolwithflags(*varptr++,wbit(active_bit_o)); /* make a note of binding as being active */ + pushSTACK_symbolwithflags(*varptr++,wbit(dynam_bit_o)); /* inactive */ }); frame_pointer = args_end_pointer; if (var_count-spec_count > 0) { fixes one test and breaks another: Form: (LET ((X 5)) ((LAMBDA (X) (DECLARE (SPECIAL X)) X) (1+ X))) CORRECT: 6 CLISP : 5 Form: (LET ((X 5)) (PROGV '(X) '(20) ((LAMBDA (&OPTIONAL (X (1+ X)) (Z (1+ X))) (DECLARE (SPECIAL X)) Z)))) CORRECT: 7 CLISP : 6 -- Sam Steingold (http://www.podval.org/~sds) running w2k <http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/> <http://www.mideasttruth.com/> <http://www.honestreporting.com> XFM: Exit file manager? [Continue] [Cancel] [Abort] --- control.d 17 Jan 2005 22:24:12 -0500 1.117 +++ control.d 19 Jan 2005 10:05:41 -0500 @@ -457,7 +457,7 @@ } /* store special-declared symbol in stack: */ pushSTACK(specdecl); /* SPECDECL as "value" */ - pushSTACK_symbolwithflags(declsym,wbit(active_bit_o)); /* Symbol active */ + pushSTACK_symbolwithflags(declsym,wbit(dynam_bit_o)); /* Symbol inactive */ check_STACK(); spec_anz++; } @@ -520,7 +520,7 @@ } } while (--count); #else - var object to_compare = as_object(as_oint(symbol) | wbit(active_bit_o)); + var object to_compare = as_object(as_oint(symbol) | wbit(dynam_bit_o)); var gcv_object_t* ptr = spec_pointer; var uintL count = spec_anz; do { @@ -557,16 +557,6 @@ ASSERT(!constant_var_p(TheSymbol(symbol))); STACK_(varframe_binding_sym) = symbol; } - if (specdecled || special_var_p(TheSymbol(symbol))) { - /* bind dynamically */ - #if (varframe_binding_mark == varframe_binding_sym) - STACK_(varframe_binding_mark) = as_object(as_oint(symbol) | wbit(dynam_bit_o)); - #else - STACK_(varframe_binding_mark) = as_object(as_oint(Fixnum_0) | wbit(dynam_bit_o)); - #endif - } else { - /* bind statically */ - } } varspecs = Cdr(varspecs); var_anz++; |