Commit e30383f5 authored by johnvg@science.ru.nl's avatar johnvg@science.ru.nl

move struct ident_string to scanner_2.c, in struct parameter: remove fields...

move struct ident_string to scanner_2.c, in struct parameter: remove fields par_kind and par_ident, replace field par_loc by par_loc_name
parent 7c68b4c5
......@@ -2871,9 +2871,8 @@ BECodeParameterList (CleanString location, BENodeIdP nodeId, BECodeParameterP pa
parameter = ConvertAllocType (struct parameter);
parameter->par_kind = 0;
parameter->par_node_id = nodeId;
parameter->par_loc = Identifier (ConvertCleanString (location));
parameter->par_loc_name = ConvertCleanString (location);
parameter->par_next = parameters;
return parameter;
......
......@@ -3914,9 +3914,9 @@ void GenParameters (Bool input, Parameters params, int asp, int bsp)
if (!is_first_parameter)
FPutC (' ',OutFile);
if (IsSimpleState (node_id->nid_state) && node_id->nid_state.state_kind==OnB)
FPrintF (OutFile, "b%d:%s",bsp-node_id->nid_b_index,params->par_loc->ident_name);
FPrintF (OutFile, "b%d:%s",bsp-node_id->nid_b_index,params->par_loc_name);
else
FPrintF (OutFile, "a%d:%s",asp-node_id->nid_a_index,params->par_loc->ident_name);
FPrintF (OutFile, "a%d:%s",asp-node_id->nid_a_index,params->par_loc_name);
is_first_parameter=0;
}
}
......
......@@ -23,6 +23,15 @@
# include "scanner.h"
# include "sizes.h"
typedef struct ident_string *IdentStringP;
struct ident_string {
IdentStringP left;
IdentStringP right;
Ident ident;
char *string;
};
static IdentP
NewIdentInTable (TableKind tableKind, char *name)
{
......
......@@ -164,7 +164,7 @@ STRUCT(ident,Ident){
unsigned char ident_table; /* TableKind */
unsigned char ident_mark;
};
#define INLINE_MASK 8
#define WARNED_NO_INLINE_CODE 16
......@@ -182,15 +182,6 @@ typedef enum {
ParallelNFAnnot, InterleavedNFAnnot
} Annotation;
typedef struct ident_string *IdentStringP;
struct ident_string {
IdentStringP left;
IdentStringP right;
Ident ident;
char *string;
};
typedef struct def_repr DefRepr,*DefMod;
typedef struct node_def *NodeDefs;
......@@ -440,18 +431,11 @@ STRUCT (node_def,NodeDef){
typedef struct parameter Parameter,*Parameters;
struct parameter {
union {
NodeId val_node_id; /* if par_kind == 0 */
Ident val_ident; /* if par_kind == 1 */
} par_val;
Ident par_loc;
NodeId par_node_id;
char * par_loc_name;
Parameters par_next;
int par_kind;
};
#define par_node_id par_val.val_node_id
#define par_ident par_val.val_ident
typedef struct instruction Instruction,*Instructions;
struct instruction {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment