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

pike_types.c File Reference

#include "global.h"
#include <ctype.h>
#include "svalue.h"
#include "pike_types.h"
#include "stralloc.h"
#include "stuff.h"
#include "array.h"
#include "program.h"
#include "constants.h"
#include "object.h"
#include "multiset.h"
#include "mapping.h"
#include "pike_macros.h"
#include "pike_error.h"
#include "las.h"
#include "lex.h"
#include "pike_memory.h"
#include "bignum.h"
#include "main.h"
#include "opcodes.h"
#include "cyclic.h"
#include "block_alloc.h"

Defines

#define A_EXACT   1
#define B_EXACT   2
#define NO_MAX_ARGS   4
#define NO_SHORTCUTS   8
#define LE_WEAK_OBJECTS   1
#define PIKE_TYPE_HASH_SIZE   32768
#define TWOT(X, Y)   (((X) << 8)+(Y))
#define PIKE_TYPE_CHUNK   128
#define PT_COPY_CAR   1
#define PT_COPY_CDR   2
#define PT_COPY_BOTH   3
#define PT_SET_MARKER   4
#define mk_type   debug_mk_type
#define low_index_type   debug_low_index_type
#define low_range_type   debug_low_range_type
#define low_key_type   debug_low_key_type
#define low_make_pike_type   debug_low_make_pike_type
#define low_make_function_type   debug_low_make_function_type

Functions

pike_typedebug_pop_type (void)
pike_typedebug_compiler_pop_type (void)
char * get_name_of_type (TYPE_T t)
void debug_free_type (struct pike_type *t)
ptrdiff_t pop_stack_mark (void)
void type_stack_pop_to_mark (void)
pike_typedebug_peek_type_stack (void)
void debug_push_int_type (INT_TYPE min, INT_TYPE max)
void debug_push_object_type (int flag, INT32 id)
void debug_push_object_type_backwards (int flag, INT32 id)
void debug_push_scope_type (int level)
void debug_push_assign_type (int marker)
void debug_push_type_name (struct pike_string *name)
void debug_push_finished_type (struct pike_type *t)
void debug_push_type (unsigned int type)
void debug_pop_type_stack (unsigned int expected)
void debug_push_reverse_type (unsigned int type)
void debug_push_finished_type_with_markers (struct pike_type *type, struct pike_type **markers)
INT32 extract_type_int (char *p)
pike_typedebug_pop_unfinished_type (void)
pike_typeparse_type (const char *s)
void my_describe_type (struct pike_type *type)
pike_stringdescribe_type (struct pike_type *type)
TYPE_T compile_type_to_runtime_type (struct pike_type *t)
pike_typeor_pike_types (struct pike_type *a, struct pike_type *b, int zero_implied)
pike_typeand_pike_types (struct pike_type *a, struct pike_type *b)
int strict_check_call (struct pike_type *fun_type, struct pike_type *arg_type)
int check_soft_cast (struct pike_type *to, struct pike_type *from)
int match_types (struct pike_type *a, struct pike_type *b)
int pike_types_le (struct pike_type *a, struct pike_type *b)
pike_typeindex_type (struct pike_type *type, struct pike_type *index_type, node *n)
pike_typerange_type (struct pike_type *type, struct pike_type *index1_type, struct pike_type *index2_type)
pike_typearray_value_type (struct pike_type *array_type)
pike_typekey_type (struct pike_type *type, node *n)
int check_indexing (struct pike_type *type, struct pike_type *index_type, node *n)
int count_arguments (struct pike_type *s)
int minimum_arguments (struct pike_type *s)
pike_typecheck_call (struct pike_type *args, struct pike_type *type, int strict)
pike_typenew_check_call (node *fun, int *argno, struct pike_type *type, node *args)
pike_typezzap_function_return (struct pike_type *a, INT32 id)
pike_typeget_type_of_svalue (struct svalue *s)
pike_typeobject_type_to_program_type (struct pike_type *obj_t)
int type_may_overload (struct pike_type *type, int lfun)
void yyexplain_nonmatching_types (struct pike_type *type_a, struct pike_type *type_b, int flags)
pike_typedebug_make_pike_type (const char *serialized_type)
int pike_type_allow_premature_toss (struct pike_type *type)
pike_stringtype_to_string (struct pike_type *t)
void init_types (void)
void cleanup_pike_types (void)
void cleanup_pike_type_table (void)

Variables

int max_correct_args
PMOD_EXPORT struct pike_typestring_type_string
PMOD_EXPORT struct pike_typeint_type_string
PMOD_EXPORT struct pike_typefloat_type_string
PMOD_EXPORT struct pike_typefunction_type_string
PMOD_EXPORT struct pike_typeobject_type_string
PMOD_EXPORT struct pike_typeprogram_type_string
PMOD_EXPORT struct pike_typearray_type_string
PMOD_EXPORT struct pike_typemultiset_type_string
PMOD_EXPORT struct pike_typemapping_type_string
PMOD_EXPORT struct pike_typetype_type_string
PMOD_EXPORT struct pike_typemixed_type_string
PMOD_EXPORT struct pike_typevoid_type_string
PMOD_EXPORT struct pike_typezero_type_string
PMOD_EXPORT struct pike_typeany_type_string
PMOD_EXPORT struct pike_typeweak_type_string
pike_type ** pike_type_hash = NULL
size_t pike_type_hash_size = 0
pike_typetype_stack [PIKE_TYPE_STACK_SIZE]
pike_type ** pike_type_mark_stack [PIKE_TYPE_STACK_SIZE/4]

Define Documentation

#define A_EXACT   1
 

#define B_EXACT   2
 

#define LE_WEAK_OBJECTS   1
 

#define low_index_type   debug_low_index_type
 

#define low_key_type   debug_low_key_type
 

#define low_make_function_type   debug_low_make_function_type
 

#define low_make_pike_type   debug_low_make_pike_type
 

#define low_range_type   debug_low_range_type
 

#define mk_type   debug_mk_type
 

#define NO_MAX_ARGS   4
 

#define NO_SHORTCUTS   8
 

#define PIKE_TYPE_CHUNK   128
 

#define PIKE_TYPE_HASH_SIZE   32768
 

#define PT_COPY_BOTH   3
 

#define PT_COPY_CAR   1
 

#define PT_COPY_CDR   2
 

#define PT_SET_MARKER   4
 

#define TWOT X,
 )     (((X) << 8)+(Y))
 


Function Documentation

struct pike_type* and_pike_types struct pike_type a,
struct pike_type b
 

struct pike_type* array_value_type struct pike_type array_type  ) 
 

struct pike_type* check_call struct pike_type args,
struct pike_type type,
int  strict
 

int check_indexing struct pike_type type,
struct pike_type index_type,
node n
 

int check_soft_cast struct pike_type to,
struct pike_type from
 

void cleanup_pike_type_table void   ) 
 

void cleanup_pike_types void   ) 
 

TYPE_T compile_type_to_runtime_type struct pike_type t  ) 
 

int count_arguments struct pike_type s  ) 
 

struct pike_type* debug_compiler_pop_type void   ) 
 

void debug_free_type struct pike_type t  ) 
 

struct pike_type* debug_make_pike_type const char *  serialized_type  ) 
 

struct pike_type* debug_peek_type_stack void   ) 
 

struct pike_type* debug_pop_type void   ) 
 

void debug_pop_type_stack unsigned int  expected  ) 
 

struct pike_type* debug_pop_unfinished_type void   ) 
 

void debug_push_assign_type int  marker  ) 
 

void debug_push_finished_type struct pike_type t  ) 
 

void debug_push_finished_type_with_markers struct pike_type type,
struct pike_type **  markers
 

void debug_push_int_type INT_TYPE  min,
INT_TYPE  max
 

void debug_push_object_type int  flag,
INT32  id
 

void debug_push_object_type_backwards int  flag,
INT32  id
 

void debug_push_reverse_type unsigned int  type  ) 
 

void debug_push_scope_type int  level  ) 
 

void debug_push_type unsigned int  type  ) 
 

void debug_push_type_name struct pike_string name  ) 
 

struct pike_string* describe_type struct pike_type type  ) 
 

INT32 extract_type_int char *  p  ) 
 

char* get_name_of_type TYPE_T  t  ) 
 

struct pike_type* get_type_of_svalue struct svalue s  ) 
 

struct pike_type* index_type struct pike_type type,
struct pike_type index_type,
node n
 

void init_types void   ) 
 

struct pike_type* key_type struct pike_type type,
node n
 

int match_types struct pike_type a,
struct pike_type b
 

int minimum_arguments struct pike_type s  ) 
 

void my_describe_type struct pike_type type  ) 
 

struct pike_type* new_check_call node fun,
int argno,
struct pike_type type,
node args
 

struct pike_type* object_type_to_program_type struct pike_type obj_t  ) 
 

struct pike_type* or_pike_types struct pike_type a,
struct pike_type b,
int  zero_implied
 

struct pike_type* parse_type const char *  s  ) 
 

int pike_type_allow_premature_toss struct pike_type type  ) 
 

int pike_types_le struct pike_type a,
struct pike_type b
 

ptrdiff_t pop_stack_mark void   ) 
 

struct pike_type* range_type struct pike_type type,
struct pike_type index1_type,
struct pike_type index2_type
 

int strict_check_call struct pike_type fun_type,
struct pike_type arg_type
 

int type_may_overload struct pike_type type,
int  lfun
 

void type_stack_pop_to_mark void   ) 
 

struct pike_string* type_to_string struct pike_type t  ) 
 

void yyexplain_nonmatching_types struct pike_type type_a,
struct pike_type type_b,
int  flags
 

struct pike_type* zzap_function_return struct pike_type a,
INT32  id
 


Variable Documentation

PMOD_EXPORT struct pike_type* any_type_string
 

PMOD_EXPORT struct pike_type* array_type_string
 

PMOD_EXPORT struct pike_type* float_type_string
 

PMOD_EXPORT struct pike_type* function_type_string
 

PMOD_EXPORT struct pike_type* int_type_string
 

PMOD_EXPORT struct pike_type* mapping_type_string
 

int max_correct_args
 

PMOD_EXPORT struct pike_type* mixed_type_string
 

PMOD_EXPORT struct pike_type* multiset_type_string
 

PMOD_EXPORT struct pike_type* object_type_string
 

struct pike_type** pike_type_hash = NULL
 

size_t pike_type_hash_size = 0
 

struct pike_type** pike_type_mark_stack[PIKE_TYPE_STACK_SIZE/4]
 

PMOD_EXPORT struct pike_type* program_type_string
 

PMOD_EXPORT struct pike_type* string_type_string
 

struct pike_type* type_stack[PIKE_TYPE_STACK_SIZE]
 

PMOD_EXPORT struct pike_type* type_type_string
 

PMOD_EXPORT struct pike_type* void_type_string
 

PMOD_EXPORT struct pike_type* weak_type_string
 

PMOD_EXPORT struct pike_type* zero_type_string
 


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