/* $Id: rtinfo.h,v 1.3 2008/11/02 18:47:41 kiesling Exp $ */

/*
  This file is part of ctalk.
  Copyright © 2005-2008 Robert Kiesling, ctalk@ctalklang.org.
  Permission is granted to copy this software provided that this copyright
  notice is included in all source code modules.

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software Foundation, 
  Inc., 51 Franklin St., Fifth Floor, Boston, MA 02110-1301 USA.
*/

#ifndef _RTINFO_H
#define _RTINFO_H

#ifndef FILENAME_MAX
#define FILENAME_MAX 4096
#endif
#ifndef MAXLABEL
#define MAXLABEL 255
#endif

#ifndef _OBJECT_H
#include "object.h"
#endif

#ifndef _CVAR_H
#include "cvar.h"
#endif

typedef struct _rtmethd {
  char name[MAXLABEL];
  METHOD *method;
} RT_METHD;

typedef struct _rtfn {
  char name[MAXLABEL];
  union {
    VARENTRY *vars;
    OBJECT *objs; 
  } local_objects;
  CVAR *local_cvars;
  struct _rtfn *next;
  struct _rtfn *prev;
} RT_FN;

typedef struct _rtinfo {
  char source_file[FILENAME_MAX];
  OBJECT *rcvr_obj;
  OBJECT *rcvr_class_obj;
  OBJECT *method_class_obj;
  METHOD *method;
  OBJECT *(*method_fn)(void);
  RT_FN *_rt_fn;
  Boolean classlib_read;
  Boolean inline_call;
  int rt_methd_ptr;
  int _arg_frame_top;
} RT_INFO;

#endif  /* #ifndef _RTINFO_H */
