Main Page | Class List | Directories | File List | Class Members | File Members

interpret.c File Reference

#include "global.h"
#include "interpret.h"
#include "object.h"
#include "program.h"
#include "svalue.h"
#include "array.h"
#include "mapping.h"
#include "pike_error.h"
#include "stralloc.h"
#include "constants.h"
#include "pike_macros.h"
#include "multiset.h"
#include "backend.h"
#include "operators.h"
#include "opcodes.h"
#include "pike_embed.h"
#include "lex.h"
#include "builtin_functions.h"
#include "signal_handler.h"
#include "gc.h"
#include "threads.h"
#include "callback.h"
#include "fd_control.h"
#include "pike_security.h"
#include "bignum.h"
#include "pike_types.h"
#include "pikecode.h"
#include "block_alloc.h"
#include <fcntl.h>
#include <errno.h>
#include <ctype.h>
#include "interpreter.h"
#include "apply_low.h"

Defines

#define EVALUATOR_STACK_SIZE   100000
#define TRACE_LEN   (100 + Pike_interpreter.trace_level * 10)
#define SVALUE_STACK_MARGIN   (100 + LOW_SVALUE_STACK_MARGIN)
#define C_STACK_MARGIN   (20000 + LOW_C_STACK_MARGIN)
#define LOW_SVALUE_STACK_MARGIN   20
#define LOW_C_STACK_MARGIN   500
#define TRACE(X)
#define print_return_value()
#define DEBUG_LOG_ARG(arg)   0
#define DEBUG_LOG_ARG2(arg2)   0
#define EVAL_INSTR_RET_CHECK(x)
#define SET_PROG_COUNTER(X)   (PROG_COUNTER=(X))
#define INIT_BLOCK(X)
#define EXIT_BLOCK(X)
#define SCOPE   scope
#define basic_low_return(save_sp)

Functions

void gdb_stop_here (void)
void push_sp_mark (void)
ptrdiff_t pop_sp_mark (void)
PMOD_EXPORT int low_init_interpreter (struct Pike_interpreter *interpreter)
PMOD_EXPORT void init_interpreter (void)
void lvalue_to_svalue_no_free (struct svalue *to, struct svalue *lval)
PMOD_EXPORT void assign_lvalue (struct svalue *lval, struct svalue *from)
anythingget_pointer_if_this_type (struct svalue *lval, TYPE_T t)
PMOD_EXPORT void find_external_context (struct external_variable_context *loc, int depth)
void reset_evaluator (void)
void really_free_pike_scope (struct pike_frame *scope)
int low_mega_apply (enum apply_type type, INT32 args, void *arg1, void *arg2)
void low_return (void)
void low_return_pop (void)
void unlink_previous_frame (void)
void mega_apply (enum apply_type type, INT32 args, void *arg1, void *arg2)
PMOD_EXPORT void f_call_function (INT32 args)
PMOD_EXPORT void call_handle_error (void)
PMOD_EXPORT int apply_low_safe_and_stupid (struct object *o, INT32 offset)
PMOD_EXPORT void safe_apply_low3 (struct object *o, int fun, int args, char *error)
PMOD_EXPORT void safe_apply_low2 (struct object *o, int fun, int args, int handle_errors)
PMOD_EXPORT void safe_apply_low (struct object *o, int fun, int args)
PMOD_EXPORT void safe_apply (struct object *o, const char *fun, INT32 args)
PMOD_EXPORT int low_unsafe_apply_handler (const char *fun, struct object *handler, struct object *compat, INT32 args)
PMOD_EXPORT void low_safe_apply_handler (const char *fun, struct object *handler, struct object *compat, INT32 args)
PMOD_EXPORT int safe_apply_handler (const char *fun, struct object *handler, struct object *compat, INT32 args, TYPE_FIELD rettypes)
PMOD_EXPORT void apply_lfun (struct object *o, int fun, int args)
PMOD_EXPORT void apply_shared (struct object *o, struct pike_string *fun, int args)
PMOD_EXPORT void apply (struct object *o, const char *fun, int args)
PMOD_EXPORT void apply_svalue (struct svalue *s, INT32 args)
PMOD_EXPORT void safe_apply_svalue (struct svalue *s, int args, int handle_errors)
PMOD_EXPORT void apply_external (int depth, int fun, INT32 args)
void gdb_backtrace ()
void gdb_backtraces ()
PMOD_EXPORT void custom_check_stack (ptrdiff_t amount, const char *fmt,...)
PMOD_EXPORT void low_cleanup_interpret (struct Pike_interpreter *interpreter)
PMOD_EXPORT void cleanup_interpret (void)
void really_clean_up_interpret (void)

Variables

PMOD_EXPORT const char Pike_check_stack_errmsg []
PMOD_EXPORT const char Pike_check_mark_stack_errmsg []
PMOD_EXPORT const char Pike_check_c_stack_errmsg []
PMOD_EXPORT struct Pike_interpreter Pike_interpreter
PMOD_EXPORT int Pike_stack_size = EVALUATOR_STACK_SIZE
callback_list evaluator_callbacks

Define Documentation

#define basic_low_return save_sp   ) 
 

Value:

DO_IF_DEBUG(                                            \
    if(Pike_mark_sp < Pike_fp->save_mark_sp)            \
      Pike_fatal("Popped below save_mark_sp!\n");       \
    if(Pike_sp<Pike_interpreter.evaluator_stack)        \
      Pike_fatal("Stack error (also simple).\n");       \
    )                                                   \
                                                        \
    Pike_mark_sp=Pike_fp->save_mark_sp;                 \
                                                        \
  POP_PIKE_FRAME()

#define C_STACK_MARGIN   (20000 + LOW_C_STACK_MARGIN)
 

#define DEBUG_LOG_ARG arg   )     0
 

#define DEBUG_LOG_ARG2 arg2   )     0
 

#define EVAL_INSTR_RET_CHECK  ) 
 

#define EVALUATOR_STACK_SIZE   100000
 

#define EXIT_BLOCK  ) 
 

Value:

do {                                            \
  free_object(X->current_object);                                       \
  if(X->context.prog) free_program(X->context.prog);                    \
  if(X->context.parent) free_object(X->context.parent);                 \
  if(X->scope) free_pike_scope(X->scope);                               \
  DO_IF_SECURITY( if(X->current_creds) {                                \
    free_object(X->current_creds);                                      \
  })                                                                    \
  DO_IF_DEBUG(                                                          \
  if(X->flags & PIKE_FRAME_MALLOCED_LOCALS)                             \
  Pike_fatal("Pike frame is not supposed to have malloced locals here!\n"));    \
                                                                        \
  DO_IF_DMALLOC(                                                        \
    X->context.prog=0;                                                  \
    X->context.parent=0;                                                \
    X->context.name=0;                                                  \
    X->scope=0;                                                         \
    X->current_object=0;                                                \
    X->flags=0;                                                         \
    X->expendible=0;                                                    \
    X->locals=0;                                                        \
    DO_IF_SECURITY( X->current_creds=0; )                               \
 )                                                                      \
}while(0)

#define INIT_BLOCK  ) 
 

Value:

do {                    \
  X->refs=0;                                    \
  add_ref(X);   /* For DMALLOC... */            \
  X->flags=0;                                   \
  X->scope=0;                                   \
  DO_IF_SECURITY( if(CURRENT_CREDS) {           \
    add_ref(X->current_creds=CURRENT_CREDS);    \
  } else {                                      \
    X->current_creds = 0;                       \
  })                                            \
}while(0)

#define LOW_C_STACK_MARGIN   500
 

#define LOW_SVALUE_STACK_MARGIN   20
 

#define print_return_value void   ) 
 

#define SCOPE   scope
 

#define SET_PROG_COUNTER  )     (PROG_COUNTER=(X))
 

#define SVALUE_STACK_MARGIN   (100 + LOW_SVALUE_STACK_MARGIN)
 

#define TRACE  ) 
 

#define TRACE_LEN   (100 + Pike_interpreter.trace_level * 10)
 


Function Documentation

PMOD_EXPORT void apply struct object o,
const char *  fun,
int  args
 

PMOD_EXPORT void apply_external int  depth,
int  fun,
INT32  args
 

PMOD_EXPORT void apply_lfun struct object o,
int  fun,
int  args
 

PMOD_EXPORT int apply_low_safe_and_stupid struct object o,
INT32  offset
 

PMOD_EXPORT void apply_shared struct object o,
struct pike_string fun,
int  args
 

PMOD_EXPORT void apply_svalue struct svalue s,
INT32  args
 

PMOD_EXPORT void assign_lvalue struct svalue lval,
struct svalue from
 

PMOD_EXPORT void call_handle_error void   ) 
 

PMOD_EXPORT void cleanup_interpret void   ) 
 

PMOD_EXPORT void custom_check_stack ptrdiff_t  amount,
const char *  fmt,
  ...
 

PMOD_EXPORT void f_call_function INT32  args  ) 
 

PMOD_EXPORT void find_external_context struct external_variable_context loc,
int  depth
 

void gdb_backtrace  ) 
 

void gdb_backtraces  ) 
 

void gdb_stop_here void   ) 
 

union anything* get_pointer_if_this_type struct svalue lval,
TYPE_T  t
 

PMOD_EXPORT void init_interpreter void   ) 
 

PMOD_EXPORT void low_cleanup_interpret struct Pike_interpreter interpreter  ) 
 

PMOD_EXPORT int low_init_interpreter struct Pike_interpreter interpreter  ) 
 

int low_mega_apply enum apply_type  type,
INT32  args,
void *  arg1,
void *  arg2
 

void low_return void   ) 
 

void low_return_pop void   ) 
 

PMOD_EXPORT void low_safe_apply_handler const char *  fun,
struct object handler,
struct object compat,
INT32  args
 

PMOD_EXPORT int low_unsafe_apply_handler const char *  fun,
struct object handler,
struct object compat,
INT32  args
 

void lvalue_to_svalue_no_free struct svalue to,
struct svalue lval
 

void mega_apply enum apply_type  type,
INT32  args,
void *  arg1,
void *  arg2
 

ptrdiff_t pop_sp_mark void   ) 
 

void push_sp_mark void   ) 
 

void really_clean_up_interpret void   ) 
 

void really_free_pike_scope struct pike_frame scope  ) 
 

void reset_evaluator void   ) 
 

PMOD_EXPORT void safe_apply struct object o,
const char *  fun,
INT32  args
 

PMOD_EXPORT int safe_apply_handler const char *  fun,
struct object handler,
struct object compat,
INT32  args,
TYPE_FIELD  rettypes
 

PMOD_EXPORT void safe_apply_low struct object o,
int  fun,
int  args
 

PMOD_EXPORT void safe_apply_low2 struct object o,
int  fun,
int  args,
int  handle_errors
 

PMOD_EXPORT void safe_apply_low3 struct object o,
int  fun,
int  args,
char *  error
 

PMOD_EXPORT void safe_apply_svalue struct svalue s,
int  args,
int  handle_errors
 

void unlink_previous_frame void   ) 
 


Variable Documentation

struct callback_list evaluator_callbacks
 

PMOD_EXPORT const char Pike_check_c_stack_errmsg[]
 

Initial value:

  "C stack overflow.\n"

PMOD_EXPORT const char Pike_check_mark_stack_errmsg[]
 

Initial value:

  "Mark stack overflow.\n"

PMOD_EXPORT const char Pike_check_stack_errmsg[]
 

Initial value:

  "Svalue stack overflow. "
  "(%ld of %ld entries on stack, needed %ld more entries)\n"

PMOD_EXPORT struct Pike_interpreter Pike_interpreter
 

PMOD_EXPORT int Pike_stack_size = EVALUATOR_STACK_SIZE
 


Generated on Fri Jul 22 23:44:29 2005 for Pike by  doxygen 1.3.9.1