/[guile]/guile/guile-core/libguile/eval.c
ViewVC logotype

Diff of /guile/guile-core/libguile/eval.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.292 by dirk, Sun Apr 20 11:01:33 2003 UTC revision 1.293 by dirk, Sun Apr 20 18:08:07 2003 UTC
# Line 399  SCM_GLOBAL_SYMBOL (scm_sym_else, "else") Line 399  SCM_GLOBAL_SYMBOL (scm_sym_else, "else")
399  SCM_GLOBAL_SYMBOL (scm_sym_unquote, "unquote");  SCM_GLOBAL_SYMBOL (scm_sym_unquote, "unquote");
400  SCM_GLOBAL_SYMBOL (scm_sym_uq_splicing, "unquote-splicing");  SCM_GLOBAL_SYMBOL (scm_sym_uq_splicing, "unquote-splicing");
401    
 SCM scm_f_apply;  
   
402  SCM_GLOBAL_SYMBOL (scm_sym_enter_frame, "enter-frame");  SCM_GLOBAL_SYMBOL (scm_sym_enter_frame, "enter-frame");
403  SCM_GLOBAL_SYMBOL (scm_sym_apply_frame, "apply-frame");  SCM_GLOBAL_SYMBOL (scm_sym_apply_frame, "apply-frame");
404  SCM_GLOBAL_SYMBOL (scm_sym_exit_frame, "exit-frame");  SCM_GLOBAL_SYMBOL (scm_sym_exit_frame, "exit-frame");
# Line 1247  scm_macroexp (SCM x, SCM env) Line 1245  scm_macroexp (SCM x, SCM env)
1245    goto macro_tail;    goto macro_tail;
1246  }  }
1247    
1248    #define SCM_BIT7(x) (127 & SCM_UNPACK (x))
1249    
1250    /* A function object to implement "apply" for non-closure functions.  */
1251    static SCM f_apply;
1252    /* An endless list consisting of #<undefined> objects:  */
1253    static SCM undefineds;
1254    
1255  /* scm_unmemocopy takes a memoized expression together with its  /* scm_unmemocopy takes a memoized expression together with its
1256   * environment and rewrites it to its original form.  Thus, it is the   * environment and rewrites it to its original form.  Thus, it is the
1257   * inversion of the rewrite rules above.  The procedure is not   * inversion of the rewrite rules above.  The procedure is not
# Line 1262  scm_macroexp (SCM x, SCM env) Line 1267  scm_macroexp (SCM x, SCM env)
1267   * This ought to change.   * This ought to change.
1268   */   */
1269    
 #define SCM_BIT7(x) (127 & SCM_UNPACK (x))  
   
1270  static SCM  static SCM
1271  build_binding_list (SCM names, SCM inits)  build_binding_list (SCM names, SCM inits)
1272  {  {
# Line 2195  dispatch: Line 2198  dispatch:
2198    
2199      case SCM_BIT7 (SCM_IM_LETREC):      case SCM_BIT7 (SCM_IM_LETREC):
2200        x = SCM_CDR (x);        x = SCM_CDR (x);
2201        env = EXTEND_ENV (SCM_CAR (x), scm_undefineds, env);        env = EXTEND_ENV (SCM_CAR (x), undefineds, env);
2202        x = SCM_CDR (x);        x = SCM_CDR (x);
2203        {        {
2204          SCM init_forms = SCM_CAR (x);          SCM init_forms = SCM_CAR (x);
# Line 2332  dispatch: Line 2335  dispatch:
2335              }              }
2336            else            else
2337              {              {
2338                proc = scm_f_apply;                proc = f_apply;
2339                goto evapply;                goto evapply;
2340              }              }
2341    
# Line 4477  SCM_DEFINE (scm_eval, "eval", 2, 0, 0, Line 4480  SCM_DEFINE (scm_eval, "eval", 2, 0, 0,
4480  /* At this point, scm_deval and scm_dapply are generated.  /* At this point, scm_deval and scm_dapply are generated.
4481   */   */
4482    
4483  # define DEVAL  #define DEVAL
4484  # include "eval.c"  #include "eval.c"
   
4485    
4486    
4487  void  void
# Line 4497  scm_init_eval () Line 4499  scm_init_eval ()
4499    scm_set_smob_free (scm_tc16_promise, promise_free);    scm_set_smob_free (scm_tc16_promise, promise_free);
4500    scm_set_smob_print (scm_tc16_promise, promise_print);    scm_set_smob_print (scm_tc16_promise, promise_print);
4501    
4502    /* Dirk:Fixme:: make scm_undefineds local to eval.c: it's only used here. */    undefineds = scm_list_1 (SCM_UNDEFINED);
4503    scm_undefineds = scm_list_1 (SCM_UNDEFINED);    SCM_SETCDR (undefineds, undefineds);
4504    SCM_SETCDR (scm_undefineds, scm_undefineds);    scm_permanent_object (undefineds);
   scm_listofnull = scm_list_1 (SCM_EOL);  
4505    
4506    scm_f_apply = scm_c_define_subr ("apply", scm_tc7_lsubr_2, scm_apply);    scm_listofnull = scm_list_1 (SCM_EOL);
4507    
4508    /* acros */    f_apply = scm_c_define_subr ("apply", scm_tc7_lsubr_2, scm_apply);
4509    /* end of acros */    scm_permanent_object (f_apply);
4510    
4511  #include "libguile/eval.x"  #include "libguile/eval.x"
4512        

Legend:
Removed from v.1.292  
changed lines
  Added in v.1.293

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26