Delinted somewhat (did not work on 2/2 machines)
This commit is contained in:
parent
af7686cd66
commit
cf0cd51810
6 changed files with 13 additions and 5 deletions
|
@ -32,7 +32,7 @@ routine_label(df)
|
||||||
{
|
{
|
||||||
df->prc_label = ++data_label;
|
df->prc_label = ++data_label;
|
||||||
C_df_dlb(df->prc_label);
|
C_df_dlb(df->prc_label);
|
||||||
C_rom_scon(df->df_idf->id_text, strlen(df->df_idf->id_text) + 1);
|
C_rom_scon(df->df_idf->id_text, (arith)(strlen(df->df_idf->id_text) + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
RomString(nd)
|
RomString(nd)
|
||||||
|
@ -250,7 +250,7 @@ CodeEndBlock(df, StackAdjustment)
|
||||||
}
|
}
|
||||||
if( tp = ResultType(df->df_type) ) {
|
if( tp = ResultType(df->df_type) ) {
|
||||||
if( !options['R'] ) {
|
if( !options['R'] ) {
|
||||||
C_lin(LineNumber);
|
C_lin((arith)LineNumber);
|
||||||
C_lol(df->prc_bool);
|
C_lol(df->prc_bool);
|
||||||
C_cal("_nfa");
|
C_cal("_nfa");
|
||||||
C_asp(word_size);
|
C_asp(word_size);
|
||||||
|
|
|
@ -20,6 +20,7 @@ struct def *
|
||||||
MkDef(id, scope, kind)
|
MkDef(id, scope, kind)
|
||||||
register struct idf *id;
|
register struct idf *id;
|
||||||
register struct scope *scope;
|
register struct scope *scope;
|
||||||
|
long kind;
|
||||||
{
|
{
|
||||||
/* Create a new definition structure in scope "scope", with
|
/* Create a new definition structure in scope "scope", with
|
||||||
* id "id" and kind "kind".
|
* id "id" and kind "kind".
|
||||||
|
@ -44,6 +45,7 @@ struct def *
|
||||||
define(id, scope, kind)
|
define(id, scope, kind)
|
||||||
register struct idf *id;
|
register struct idf *id;
|
||||||
register struct scope *scope;
|
register struct scope *scope;
|
||||||
|
long kind;
|
||||||
{
|
{
|
||||||
/* Declare an identifier in a scope, but first check if it
|
/* Declare an identifier in a scope, but first check if it
|
||||||
already has been defined.
|
already has been defined.
|
||||||
|
@ -52,7 +54,7 @@ define(id, scope, kind)
|
||||||
*/
|
*/
|
||||||
register struct def *df;
|
register struct def *df;
|
||||||
|
|
||||||
if( df = lookup(id, scope, 0) ) {
|
if( df = lookup(id, scope, 0L) ) {
|
||||||
if (df->df_kind == D_INUSE) {
|
if (df->df_kind == D_INUSE) {
|
||||||
if( kind != D_INUSE ) {
|
if( kind != D_INUSE ) {
|
||||||
error("\"%s\" already used in this block",
|
error("\"%s\" already used in this block",
|
||||||
|
|
|
@ -31,6 +31,7 @@ struct def *
|
||||||
lookup(id, scope, inuse)
|
lookup(id, scope, inuse)
|
||||||
register struct idf *id;
|
register struct idf *id;
|
||||||
struct scope *scope;
|
struct scope *scope;
|
||||||
|
long inuse;
|
||||||
{
|
{
|
||||||
/* Look up a definition of an identifier in scope "scope".
|
/* Look up a definition of an identifier in scope "scope".
|
||||||
Make the "def" list self-organizing.
|
Make the "def" list self-organizing.
|
||||||
|
|
|
@ -116,7 +116,7 @@ Compile(src, dst)
|
||||||
C_df_dlb(++data_label);
|
C_df_dlb(++data_label);
|
||||||
C_rom_scon(FileName,(arith) strlen(FileName) + 1);
|
C_rom_scon(FileName,(arith) strlen(FileName) + 1);
|
||||||
LLparse();
|
LLparse();
|
||||||
C_ms_src((arith) (LineNumber - 1), FileName);
|
C_ms_src((int)LineNumber - 1, FileName);
|
||||||
if( fp_used ) C_ms_flt();
|
if( fp_used ) C_ms_flt();
|
||||||
C_close();
|
C_close();
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
|
@ -32,6 +32,8 @@
|
||||||
|
|
||||||
extern int proclevel;
|
extern int proclevel;
|
||||||
|
|
||||||
|
extern char *sprint();
|
||||||
|
|
||||||
static struct db_str {
|
static struct db_str {
|
||||||
unsigned sz;
|
unsigned sz;
|
||||||
char *base;
|
char *base;
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include "node.h"
|
#include "node.h"
|
||||||
#include "scope.h"
|
#include "scope.h"
|
||||||
#include "type.h"
|
#include "type.h"
|
||||||
|
#include "dbsymtab.h"
|
||||||
|
|
||||||
int slevel = 0; /* nesting level of statements */
|
int slevel = 0; /* nesting level of statements */
|
||||||
}
|
}
|
||||||
|
@ -47,14 +48,16 @@ Statement
|
||||||
]?
|
]?
|
||||||
{ if( !options['L'] )
|
{ if( !options['L'] )
|
||||||
C_lin((arith) dot.tk_lineno);
|
C_lin((arith) dot.tk_lineno);
|
||||||
|
#ifdef DBSYMTAB
|
||||||
if (options['g']) {
|
if (options['g']) {
|
||||||
static int ms_lineno;
|
static int ms_lineno;
|
||||||
|
|
||||||
if (ms_lineno != dot.tk_lineno) {
|
if (ms_lineno != dot.tk_lineno) {
|
||||||
C_ms_std((char *) 0, N_SLINE, dot.tk_lineno);
|
C_ms_std((char *) 0, N_SLINE, (int) dot.tk_lineno);
|
||||||
ms_lineno = dot.tk_lineno;
|
ms_lineno = dot.tk_lineno;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* DBSYMTAB */
|
||||||
}
|
}
|
||||||
[
|
[
|
||||||
SimpleStatement
|
SimpleStatement
|
||||||
|
|
Loading…
Add table
Reference in a new issue