SCCS-vsn: old/dbx/symbols.c 1.11
/* Copyright (c) 1982 Regents of the University of California */
/* Copyright (c) 1982 Regents of the University of California */
-static char sccsid[] = "@(#)symbols.c 1.10 %G%";
+static char sccsid[] = "@(#)symbols.c 1.11 %G%";
public symbol_dump(func)
Symbol func;
{
public symbol_dump(func)
Symbol func;
{
- register Symbol s;
- register Integer i;
+ register Symbol s;
+ register Integer i;
- printf(" symbols in %s \n",symname(func));
- for(i=0; i< HASHTABLESIZE; i++)
- for(s=hashtab[i]; s != nil; s=s->next_sym) {
- if (s->block == func) psym(s);
- }
+ printf(" symbols in %s \n",symname(func));
+ for (i = 0; i< HASHTABLESIZE; i++) {
+ for (s = hashtab[i]; s != nil; s = s->next_sym) {
+ if (s->block == func) {
+ psym(s);
+ }
+ }
+ }
}
/*
* Free all the symbols currently allocated.
*/
}
/*
* Free all the symbols currently allocated.
*/
public symbol_free()
{
Sympool s, t;
public symbol_free()
{
Sympool s, t;
+/*
+ * Create base types.
+ */
+
+public symbols_init()
+{
+ t_boolean = maketype("$boolean", 0L, 1L);
+ t_int = maketype("$integer", 0x80000000L, 0x7fffffffL);
+ t_char = maketype("$char", 0L, 127L);
+ t_real = maketype("$real", 8L, 0L);
+ t_nil = maketype("$nil", 0L, 0L);
+}
+
/*
* Create a builtin type.
* Builtin types are circular in that btype->type->type = btype.
/*
* Create a builtin type.
* Builtin types are circular in that btype->type->type = btype.
- /*
- * Perform a cast if the call is of the form "type(expr)".
- */
case O_CALL:
p1 = p->value.arg[0];
p->nodetype = rtype(p1->nodetype)->type;
case O_CALL:
p1 = p->value.arg[0];
p->nodetype = rtype(p1->nodetype)->type;