Branch: Tag:

2008-02-27

2008-02-27 23:59:24 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Changed the definition of Pike_fp->context to a pointer.
This should reduce the overhead for apply() somewhat.

Rev: src/apply_low.h:1.33
Rev: src/builtin.cmod:1.194
Rev: src/interpret.c:1.386
Rev: src/interpret.h:1.171
Rev: src/interpret_functions.h:1.200
Rev: src/modules/Gmp/mpz_glue.c:1.171
Rev: src/object.c:1.282
Rev: src/object.h:1.93
Rev: src/opcodes.c:1.170
Rev: src/operators.c:1.227
Rev: src/program.c:1.653

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: interpret.h,v 1.170 2007/06/17 01:33:51 mast Exp $ + || $Id: interpret.h,v 1.171 2008/02/27 23:59:13 grubba Exp $   */      #ifndef INTERPRET_H
89:    struct svalue **save_mark_sp;    struct svalue **mark_sp_base;    struct object *current_object; +  struct program *current_program; /* program containing the context. */ +  struct inherit *context; +  char *current_storage;       DO_IF_SECURITY(struct object *current_creds;)   #if defined(PROFILING)
96: Inside #if defined(PROFILING)
   cpu_time_t start_time; /** Adjusted time when thr frame started. */    cpu_time_t self_time_base; /* ??? */   #endif -  struct inherit context; -  char *current_storage; +    };      #define PIKE_FRAME_RETURN_INTERNAL 1
606:    time_in_children); \    }); \    Pike_interpreter.accounted_time += self_time; \ -  /* FIXME: Can context.prog be NULL? */ \ -  function = _fp_->context.prog->identifiers + _fp_->ident; \ +  /* FIXME: Can context->prog be NULL? */ \ +  function = _fp_->context->prog->identifiers + _fp_->ident; \    /* function->total_time = \    Pike_fp->self_time_base + time_passed; */ \    function->total_time += time_passed; \
796:      #define apply_current(FUN, ARGS) \    apply_low(Pike_fp->current_object, \ -  (FUN) + Pike_fp->context.identifier_level, \ +  (FUN) + Pike_fp->context->identifier_level, \    (ARGS))      PMOD_EXPORT extern int d_flag; /* really in main.c */