Branch: Tag:

2017-11-18

2017-11-18 10:14:46 by Arne Goedeke <el@laramies.com>

Interpreter: use callsite for parent_clone and cast

* store the parent info inside of the callsite, instead
of a frame. this avoids frame allocation in parent clone
calls

* store the compiled type in the callsite. this makes casts more
efficient in map et. al.

152:    /* this is used for many things */    void *ptr;    +  union { +  struct {    /* this error handler is used to restore Pike_interpreter.catching_eval_jmpbuf to    * saved_jmpbuf when an error happens. only used for calls to pike code. */    LOW_JMP_BUF *saved_jmpbuf;    ONERROR onerror; -  +  } pike; +  struct { +  INT32 run_time_type; +  } cast; +  struct { +  struct object *parent; +  INT16 fun; +  } parent_clone; +  } u; +    };      PMOD_EXPORT extern int Pike_stack_size;
186: Inside #if defined(PIKE_DEBUG)
  static inline void callsite_init(struct pike_callsite *c, INT32 args) {   #ifdef PIKE_DEBUG    c->type = CALLTYPE_NONE; -  c->saved_jmpbuf = NULL; +  c->u.pike.saved_jmpbuf = NULL;   #endif    c->flags = 0;    c->frame = NULL;