Branch: Tag:

2001-03-03

2001-03-03 17:51:50 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Now creates correct function types when USE_PIKE_TYPE is enabled.

Rev: src/language.yacc:1.231
Rev: src/las.c:1.243

110:   /* This is the grammar definition of Pike. */      #include "global.h" - RCSID("$Id: language.yacc,v 1.230 2001/02/26 22:44:08 grubba Exp $"); + RCSID("$Id: language.yacc,v 1.231 2001/03/03 17:51:24 grubba Exp $");   #ifdef HAVE_MEMORY_H   #include <memory.h>   #endif
629:    for(; e>=0; e--)    {    push_finished_type(Pike_compiler->compiler_frame->variable[e].type); + #ifdef USE_PIKE_TYPE +  push_type(T_FUNCTION); + #endif /* USE_PIKE_TYPE */    } -  + #ifndef USE_PIKE_TYPE    push_type(T_FUNCTION); -  + #endif /* USE_PIKE_TYPE */       {    struct pike_type *s=compiler_pop_type();
1335:   #ifdef USE_PIKE_TYPE    push_reverse_type(T_MANY);    Pike_compiler->pike_type_mark_stackp--; -  while (*Pike_compiler->pike_type_mark_stackp < +  while (*Pike_compiler->pike_type_mark_stackp+1 <    Pike_compiler->type_stackp) {    push_reverse_type(T_FUNCTION);    }
1767:    }    Pike_compiler->varargs=0;    push_type(T_MANY); -  for(; e>=0; e--) +  for(; e>=0; e--) {    push_finished_type(Pike_compiler->compiler_frame->variable[e].type); -  + #ifdef USE_PIKE_TYPE    push_type(T_FUNCTION); -  + #endif /* USE_PIKE_TYPE */ +  } + #ifndef USE_PIKE_TYPE +  push_type(T_FUNCTION); + #endif /* !USE_PIKE_TYPE */       type=compiler_pop_type();   
1835:    push_type(T_VOID);    }    push_type(T_MANY); -  for(; e>=0; e--) +  for(; e>=0; e--) {    push_finished_type(Pike_compiler->compiler_frame->variable[e].type); -  + #ifdef USE_PIKE_TYPE    push_type(T_FUNCTION); -  + #endif /* USE_PIKE_TYPE */ +  } + #ifndef USE_PIKE_TYPE +  push_type(T_FUNCTION); + #endif /* !USE_PIKE_TYPE */       type=compiler_pop_type();    /***/
1956:    push_type(T_VOID);    }    push_type(T_MANY); -  for(; e>=0; e--) +  for(; e>=0; e--) {    push_finished_type(Pike_compiler->compiler_frame->variable[e].type); -  + #ifdef USE_PIKE_TYPE    push_type(T_FUNCTION); -  + #endif /* USE_PIKE_TYPE */ +  } + #ifndef USE_PIKE_TYPE +  push_type(T_FUNCTION); + #endif /* !USE_PIKE_TYPE */       type=compiler_pop_type();    /***/
2110:    for(e = $3-1; e>=0; e--)    {    push_finished_type(Pike_compiler->compiler_frame->variable[e].type); + #ifdef USE_PIKE_TYPE +  push_type(T_FUNCTION); + #endif /* USE_PIKE_TYPE */    } -  + #ifndef USE_PIKE_TYPE    push_type(T_FUNCTION); -  + #endif /* !USE_PIKE_TYPE */       type = compiler_pop_type();   
2735:    push_finished_type(Pike_compiler->compiler_frame->variable[e].type);   */    + #ifndef USE_PIKE_TYPE    push_type(T_FUNCTION); -  + #endif /* !USE_PIKE_TYPE */    type=compiler_pop_type();       sprintf(buf,"__lambda_%ld_%ld",