Branch: Tag:

2014-12-04

2014-12-04 19:25:11 by Arne Goedeke <el@laramies.com>

Runtime: make FIND_LFUN work again with unfixed programs

668:   #define PROG_FROM_INT(P,X) PROG_FROM_PTR(P, PTR_FROM_INT(P, X))   #define ID_FROM_INT(P,X) ID_FROM_PTR(P, PTR_FROM_INT(P, X))    - #define FIND_LFUN(P,N) ( dmalloc_touch(struct program *,(P))->flags & PROGRAM_FIXED && (N) < NUM_LFUNS ?((P)->lfuns[(N)]):find_lfun_fatal((P), (N)) ) +    #define QUICK_FIND_LFUN(P,N) (dmalloc_touch(struct program *,(P))->lfuns[N])      #ifdef DO_PIKE_CLEANUP
1069:   void make_program_executable(struct program *p);   /* Prototypes end here */    + static INLINE int FIND_LFUN(struct program * p, int lfun) { +  dmalloc_touch(struct program*, p); +  if (lfun < 0 || lfun >= NUM_LFUNS) return find_lfun_fatal(p, lfun); +  +  if (p->flags & PROGRAM_FIXED) return p->lfuns[lfun]; +  return low_find_lfun(p, lfun); + } +  +    #ifndef PIKE_USE_MACHINE_CODE   #define make_program_executable(X)   #endif