symbol.c (ffesymbol_new_): Remove tests for macro FFECOM_symbolHOOK.

* symbol.c (ffesymbol_new_): Remove tests for macro
	FFECOM_symbolHOOK.
	* symbol.h: Likewise.

	* storag.c (ffestorag_new): Remove tests for macro
	FFECOM_storageHOOK.
	* storag.h: Likewise.

	* lab.c (ffelab_new): Remove tests for macro FFECOM_labelHOOK.
	* lab.h: Likewise.

	* global.c: Remove tests for macro FFECOM_globalHOOK.
	* global.h (struct _ffeglobal_): Likewise.

	* bld.h: Remove tests for macros FFECOM_constantHOOK,
	FFECOM_nonterHOOK, FFECOM_globalHOOK, FFECOM_labelHOOK,
	FFECOM_storageHOOK, FFECOM_symbolHOOK.
	Remove code dependend on FFECOM_itemHOOK.
	* bld.c: Likewise.

	* com.h (FFECOM_constantHOOK): Remove define.
	(FFECOM_nonterHOOK): Remove.
	(FFECOM_globalHOOK): Remove.
	(FFECOM_labelHOOK): Remove.
	(FFECOM_storageHOOK): Remove.
	(FFECOM_symbolHOOK): Remove.

	* com.c (ffecom_get_external_identifier_): Remove usage of
	FFETARGET_isENFORCED_MAIN_NAME.

	* bld.c: Remove code dependend on FFEBLD_BLANK_, FFECOM_itemHOOK.
	(ffebld_new_accter): Likewise.
	(ffebld_new_arrter): Likewise.
	(ffebld_new_conter_with_orig): Likewise.
	(ffebld_new_item): Likewise.
	(ffebld_new_labter): Likewise.
	(ffebld_new_labtok): Likewise.
	(ffebld_new_none): Likewise.
	(ffebld_new_one): Likewise.
	(ffebld_new_symter): Likewise.
	(ffebld_new_two): Likewise.

From-SVN: r67594
This commit is contained in:
Andreas Jaeger 2003-06-07 19:52:49 +02:00 committed by Andreas Jaeger
parent 44de936eff
commit ddc612a2ba
13 changed files with 57 additions and 123 deletions

View File

@ -1,3 +1,47 @@
2003-06-07 Andreas Jaeger <aj@suse.de>
* symbol.c (ffesymbol_new_): Remove tests for macro
FFECOM_symbolHOOK.
* symbol.h: Likewise.
* storag.c (ffestorag_new): Remove tests for macro
FFECOM_storageHOOK.
* storag.h: Likewise.
* lab.c (ffelab_new): Remove tests for macro FFECOM_labelHOOK.
* lab.h: Likewise.
* global.c: Remove tests for macro FFECOM_globalHOOK.
* global.h (struct _ffeglobal_): Likewise.
* bld.h: Remove tests for macros FFECOM_constantHOOK,
FFECOM_nonterHOOK, FFECOM_globalHOOK, FFECOM_labelHOOK,
FFECOM_storageHOOK, FFECOM_symbolHOOK.
Remove code dependend on FFECOM_itemHOOK.
* bld.c: Likewise.
* com.h (FFECOM_constantHOOK): Remove define.
(FFECOM_nonterHOOK): Remove.
(FFECOM_globalHOOK): Remove.
(FFECOM_labelHOOK): Remove.
(FFECOM_storageHOOK): Remove.
(FFECOM_symbolHOOK): Remove.
* com.c (ffecom_get_external_identifier_): Remove usage of
FFETARGET_isENFORCED_MAIN_NAME.
* bld.c: Remove code dependend on FFEBLD_BLANK_, FFECOM_itemHOOK.
(ffebld_new_accter): Likewise.
(ffebld_new_arrter): Likewise.
(ffebld_new_conter_with_orig): Likewise.
(ffebld_new_item): Likewise.
(ffebld_new_labter): Likewise.
(ffebld_new_labtok): Likewise.
(ffebld_new_none): Likewise.
(ffebld_new_one): Likewise.
(ffebld_new_symter): Likewise.
(ffebld_new_two): Likewise.
Sat Jun 7 12:10:41 2003 Neil Booth <neil@daikokuya.co.uk>
* com.c (ffe_init_options): Update.

View File

@ -1,5 +1,5 @@
/* bld.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 2003 Free Software Foundation, Inc.
Contributed by James Craig Burley.
This file is part of GNU Fortran.
@ -70,16 +70,6 @@ struct _ffebld_pool_stack_ ffebld_pool_stack_;
/* Static objects accessed by functions in this module. */
#if FFEBLD_BLANK_
static struct _ffebld_ ffebld_blank_
=
{
0,
{FFEINFO_basictypeNONE, FFEINFO_kindtypeNONE, 0, FFEINFO_kindNONE,
FFEINFO_whereNONE, FFETARGET_charactersizeNONE},
{NULL, NULL}
};
#endif
#if FFETARGET_okCHARACTER1
static ffebldConstant ffebld_constant_character1_;
#endif
@ -715,9 +705,7 @@ ffebld_constant_new_character1_val (ffetargetCharacter1 val)
nc->next = c->next;
nc->consttype = FFEBLD_constCHARACTER1;
nc->u.character1 = val;
#ifdef FFECOM_constantHOOK
nc->hook = FFECOM_constantNULL;
#endif
c->next = nc;
return nc;
@ -773,9 +761,7 @@ ffebld_constant_new_complex1_val (ffetargetComplex1 val)
nc->next = c->next;
nc->consttype = FFEBLD_constCOMPLEX1;
nc->u.complex1 = val;
#ifdef FFECOM_constantHOOK
nc->hook = FFECOM_constantNULL;
#endif
c->next = nc;
return nc;
@ -831,9 +817,7 @@ ffebld_constant_new_complex2_val (ffetargetComplex2 val)
nc->next = c->next;
nc->consttype = FFEBLD_constCOMPLEX2;
nc->u.complex2 = val;
#ifdef FFECOM_constantHOOK
nc->hook = FFECOM_constantNULL;
#endif
c->next = nc;
return nc;
@ -881,9 +865,7 @@ ffebld_constant_new_hollerith_val (ffetargetHollerith val)
nc->next = c->next;
nc->consttype = FFEBLD_constHOLLERITH;
nc->u.hollerith = val;
#ifdef FFECOM_constantHOOK
nc->hook = FFECOM_constantNULL;
#endif
c->next = nc;
return nc;
@ -938,9 +920,7 @@ ffebld_constant_new_integer1_val (ffetargetInteger1 val)
nc->next = c->next;
nc->consttype = FFEBLD_constINTEGER1;
nc->u.integer1 = val;
#ifdef FFECOM_constantHOOK
nc->hook = FFECOM_constantNULL;
#endif
c->next = nc;
return nc;
@ -976,9 +956,7 @@ ffebld_constant_new_integer2_val (ffetargetInteger2 val)
nc->next = c->next;
nc->consttype = FFEBLD_constINTEGER2;
nc->u.integer2 = val;
#ifdef FFECOM_constantHOOK
nc->hook = FFECOM_constantNULL;
#endif
c->next = nc;
return nc;
@ -1014,9 +992,7 @@ ffebld_constant_new_integer3_val (ffetargetInteger3 val)
nc->next = c->next;
nc->consttype = FFEBLD_constINTEGER3;
nc->u.integer3 = val;
#ifdef FFECOM_constantHOOK
nc->hook = FFECOM_constantNULL;
#endif
c->next = nc;
return nc;
@ -1052,9 +1028,7 @@ ffebld_constant_new_integer4_val (ffetargetInteger4 val)
nc->next = c->next;
nc->consttype = FFEBLD_constINTEGER4;
nc->u.integer4 = val;
#ifdef FFECOM_constantHOOK
nc->hook = FFECOM_constantNULL;
#endif
c->next = nc;
return nc;
@ -1165,9 +1139,7 @@ ffebld_constant_new_logical1_val (ffetargetLogical1 val)
nc->next = c->next;
nc->consttype = FFEBLD_constLOGICAL1;
nc->u.logical1 = val;
#ifdef FFECOM_constantHOOK
nc->hook = FFECOM_constantNULL;
#endif
c->next = nc;
return nc;
@ -1203,9 +1175,7 @@ ffebld_constant_new_logical2_val (ffetargetLogical2 val)
nc->next = c->next;
nc->consttype = FFEBLD_constLOGICAL2;
nc->u.logical2 = val;
#ifdef FFECOM_constantHOOK
nc->hook = FFECOM_constantNULL;
#endif
c->next = nc;
return nc;
@ -1241,9 +1211,7 @@ ffebld_constant_new_logical3_val (ffetargetLogical3 val)
nc->next = c->next;
nc->consttype = FFEBLD_constLOGICAL3;
nc->u.logical3 = val;
#ifdef FFECOM_constantHOOK
nc->hook = FFECOM_constantNULL;
#endif
c->next = nc;
return nc;
@ -1279,9 +1247,7 @@ ffebld_constant_new_logical4_val (ffetargetLogical4 val)
nc->next = c->next;
nc->consttype = FFEBLD_constLOGICAL4;
nc->u.logical4 = val;
#ifdef FFECOM_constantHOOK
nc->hook = FFECOM_constantNULL;
#endif
c->next = nc;
return nc;
@ -1335,9 +1301,7 @@ ffebld_constant_new_real1_val (ffetargetReal1 val)
nc->next = c->next;
nc->consttype = FFEBLD_constREAL1;
nc->u.real1 = val;
#ifdef FFECOM_constantHOOK
nc->hook = FFECOM_constantNULL;
#endif
c->next = nc;
return nc;
@ -1391,9 +1355,7 @@ ffebld_constant_new_real2_val (ffetargetReal2 val)
nc->next = c->next;
nc->consttype = FFEBLD_constREAL2;
nc->u.real2 = val;
#ifdef FFECOM_constantHOOK
nc->hook = FFECOM_constantNULL;
#endif
c->next = nc;
return nc;
@ -1557,9 +1519,7 @@ ffebld_constant_new_typeless_val (ffebldConst type, ffetargetTypeless val)
nc->next = c->next;
nc->consttype = type;
nc->u.typeless = val;
#ifdef FFECOM_constantHOOK
nc->hook = FFECOM_constantNULL;
#endif
c->next = nc;
return nc;
@ -4231,9 +4191,6 @@ ffebld_new_accter (ffebldConstantArray a, ffebit b)
ffebld x;
x = ffebld_new ();
#if FFEBLD_BLANK_
*x = ffebld_blank_;
#endif
x->op = FFEBLD_opACCTER;
x->u.accter.array = a;
x->u.accter.bits = b;
@ -4254,9 +4211,6 @@ ffebld_new_arrter (ffebldConstantArray a, ffetargetOffset size)
ffebld x;
x = ffebld_new ();
#if FFEBLD_BLANK_
*x = ffebld_blank_;
#endif
x->op = FFEBLD_opARRTER;
x->u.arrter.array = a;
x->u.arrter.size = size;
@ -4276,9 +4230,6 @@ ffebld_new_conter_with_orig (ffebldConstant c, ffebld o)
ffebld x;
x = ffebld_new ();
#if FFEBLD_BLANK_
*x = ffebld_blank_;
#endif
x->op = FFEBLD_opCONTER;
x->u.conter.expr = c;
x->u.conter.orig = o;
@ -4297,15 +4248,9 @@ ffebld_new_item (ffebld head, ffebld trail)
ffebld x;
x = ffebld_new ();
#if FFEBLD_BLANK_
*x = ffebld_blank_;
#endif
x->op = FFEBLD_opITEM;
x->u.item.head = head;
x->u.item.trail = trail;
#ifdef FFECOM_itemHOOK
x->u.item.hook = FFECOM_itemNULL;
#endif
return x;
}
@ -4321,9 +4266,6 @@ ffebld_new_labter (ffelab l)
ffebld x;
x = ffebld_new ();
#if FFEBLD_BLANK_
*x = ffebld_blank_;
#endif
x->op = FFEBLD_opLABTER;
x->u.labter = l;
return x;
@ -4346,9 +4288,6 @@ ffebld_new_labtok (ffelexToken t)
ffebld x;
x = ffebld_new ();
#if FFEBLD_BLANK_
*x = ffebld_blank_;
#endif
x->op = FFEBLD_opLABTOK;
x->u.labtok = t;
return x;
@ -4365,9 +4304,6 @@ ffebld_new_none (ffebldOp o)
ffebld x;
x = ffebld_new ();
#if FFEBLD_BLANK_
*x = ffebld_blank_;
#endif
x->op = o;
return x;
}
@ -4383,14 +4319,9 @@ ffebld_new_one (ffebldOp o, ffebld left)
ffebld x;
x = ffebld_new ();
#if FFEBLD_BLANK_
*x = ffebld_blank_;
#endif
x->op = o;
x->u.nonter.left = left;
#ifdef FFECOM_nonterHOOK
x->u.nonter.hook = FFECOM_nonterNULL;
#endif
return x;
}
@ -4410,9 +4341,6 @@ ffebld_new_symter (ffesymbol s, ffeintrinGen gen, ffeintrinSpec spec,
ffebld x;
x = ffebld_new ();
#if FFEBLD_BLANK_
*x = ffebld_blank_;
#endif
x->op = FFEBLD_opSYMTER;
x->u.symter.symbol = s;
x->u.symter.generic = gen;
@ -4433,15 +4361,10 @@ ffebld_new_two (ffebldOp o, ffebld left, ffebld right)
ffebld x;
x = ffebld_new ();
#if FFEBLD_BLANK_
*x = ffebld_blank_;
#endif
x->op = o;
x->u.nonter.left = left;
x->u.nonter.right = right;
#ifdef FFECOM_nonterHOOK
x->u.nonter.hook = FFECOM_nonterNULL;
#endif
return x;
}

View File

@ -1,5 +1,5 @@
/* bld.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 2003 Free Software Foundation, Inc.
Contributed by James Craig Burley.
This file is part of GNU Fortran.
@ -400,18 +400,13 @@ struct _ffebld_
{
ffebld left;
ffebld right;
#ifdef FFECOM_nonterHOOK
ffecomNonter hook; /* Whatever the compiler/backend wants! */
#endif
}
nonter;
struct
{
ffebld head;
ffebld trail;
#ifdef FFECOM_itemHOOK
ffecomItem hook; /* Whatever the compiler/backend wants! */
#endif
}
item;
struct
@ -459,9 +454,7 @@ struct _ffebld_constant_
real. */
ffebldConstant negated; /* We point to each other through here. */
ffebldConst consttype;
#ifdef FFECOM_constantHOOK
ffecomConstant hook; /* Whatever the compiler/backend wants! */
#endif
bool numeric; /* A numeric kind of constant. */
ffebldConstantUnion u;
};

View File

@ -6047,11 +6047,7 @@ ffecom_get_external_identifier_ (ffesymbol s)
if (!ffe_is_underscoring ()
|| (strcmp (name, FFETARGET_nameBLANK_COMMON) == 0)
#if FFETARGET_isENFORCED_MAIN_NAME
|| (strcmp (name, FFETARGET_nameENFORCED_NAME) == 0)
#else
|| (strcmp (name, FFETARGET_nameUNNAMED_MAIN) == 0)
#endif
|| (strcmp (name, FFETARGET_nameUNNAMED_BLOCK_DATA) == 0))
return get_identifier (name);

View File

@ -1,5 +1,6 @@
/* com.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 2000, 2003
Free Software Foundation, Inc.
Contributed by James Craig Burley.
This file is part of GNU Fortran.
@ -128,17 +129,11 @@ typedef enum
#endif
typedef tree ffecomConstant;
#define FFECOM_constantHOOK
typedef tree ffecomNonter;
#define FFECOM_nonterHOOK
typedef tree ffecomLabel;
#define FFECOM_globalHOOK
typedef tree ffecomGlobal;
#define FFECOM_labelHOOK
typedef tree ffecomStorage;
#define FFECOM_storageHOOK
typedef struct _ffecom_symbol_ ffecomSymbol;
#define FFECOM_symbolHOOK
struct _ffecom_symbol_
{

View File

@ -1,5 +1,5 @@
/* global.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995, 1997 Free Software Foundation, Inc.
Copyright (C) 1995, 1997, 2003 Free Software Foundation, Inc.
Contributed by James Craig Burley.
This file is part of GNU Fortran.
@ -110,9 +110,7 @@ ffeglobal_new_ (ffename n)
g = (ffeglobal) malloc_new_ks (malloc_pool_image (), "FFEGLOBAL",
sizeof (*g));
g->n = n;
#ifdef FFECOM_globalHOOK
g->hook = FFECOM_globalNULL;
#endif
g->tick = 0;
ffename_set_global (n, g);
@ -1430,9 +1428,7 @@ ffeglobal_ref_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type)
/* We've learned more, so point to where we learned it. */
g->t = ffelex_token_use (t);
g->type = type;
#ifdef FFECOM_globalHOOK
g->hook = FFECOM_globalNULL; /* Discard previous _DECL. */
#endif
g->u.proc.n_args = -1;
}

View File

@ -1,5 +1,5 @@
/* global.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995, 1997 Free Software Foundation, Inc.
Copyright (C) 1995, 1997, 2003 Free Software Foundation, Inc.
Contributed by James Craig Burley.
This file is part of GNU Fortran.
@ -89,9 +89,7 @@ struct _ffeglobal_
{
ffelexToken t;
ffename n;
#ifdef FFECOM_globalHOOK
ffecomGlobal hook;
#endif
ffeCounter tick; /* Recent transition in this progunit. */
ffeglobalType type;
bool intrinsic; /* Known as intrinsic? */

View File

@ -1,5 +1,5 @@
/* lab.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
Copyright (C) 1995, 2003 Free Software Foundation, Inc.
Contributed by James Craig Burley.
This file is part of GNU Fortran.
@ -143,9 +143,7 @@ ffelab_new (ffelabValue v)
++ffelab_num_news_;
l = (ffelab) malloc_new_ks (ffe_pool_any_unit (), "FFELAB label", sizeof (*l));
l->next = ffelab_list_;
#ifdef FFECOM_labelHOOK
l->hook = FFECOM_labelNULL;
#endif
l->value = v;
l->firstref_line = ffewhere_line_unknown ();
l->firstref_col = ffewhere_column_unknown ();

View File

@ -1,5 +1,5 @@
/* lab.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
Copyright (C) 1995, 2003 Free Software Foundation, Inc.
Contributed by James Craig Burley.
This file is part of GNU Fortran.
@ -70,9 +70,7 @@ typedef unsigned long ffelabValue;
struct _ffelab_
{
ffelab next;
#ifdef FFECOM_labelHOOK
ffecomLabel hook;
#endif
ffelabValue value; /* 1 through 99999, or 100000+ for temp
labels. */
unsigned long blocknum; /* Managed entirely by user of module. */

View File

@ -1,5 +1,5 @@
/* storag.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 2003 Free Software Foundation, Inc.
Contributed by James Craig Burley.
This file is part of GNU Fortran.
@ -420,9 +420,7 @@ ffestorag_new (ffestoragList sl)
sizeof (*s));
s->next = (ffestorag) &sl->first;
s->previous = sl->last;
#ifdef FFECOM_storageHOOK
s->hook = FFECOM_storageNULL;
#endif
s->previous->next = s;
sl->last = s;
s->equivs_.first = s->equivs_.last = (ffestorag) &s->equivs_.first;

View File

@ -1,5 +1,5 @@
/* storag.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 2003 Free Software Foundation, Inc.
Contributed by James Craig Burley.
This file is part of GNU Fortran.
@ -83,9 +83,7 @@ struct _ffestorag_
LOCAL. */
ffetargetAlign alignment; /* Initial alignment for entity. */
ffetargetAlign modulo; /* Modulo within alignment. */
#ifdef FFECOM_storageHOOK
ffecomStorage hook; /* Whatever the backend needs here. */
#endif
ffestoragType type;
ffeinfoBasictype basic_type;/* NONE= >1 non-CHARACTER; ANY=
CHAR+non-CHAR. */

View File

@ -1,5 +1,6 @@
/* Implementation of Fortran symbol manager
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 2003
Free Software Foundation, Inc.
Contributed by James Craig Burley.
This file is part of GNU Fortran.
@ -230,9 +231,7 @@ ffesymbol_new_ (ffename n)
s->common = NULL;
s->equiv = NULL;
s->storage = NULL;
#ifdef FFECOM_symbolHOOK
s->hook = FFECOM_symbolNULL;
#endif
s->sfa_dummy_parent = NULL;
s->func_result = NULL;
s->value = 0;

View File

@ -1,5 +1,5 @@
/* Interface definitions for Fortran symbol manager
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 2003 Free Software Foundation, Inc.
Contributed by James Craig Burley.
This file is part of GNU Fortran.
@ -121,9 +121,7 @@ struct _ffesymbol_
ffeequiv equiv; /* Who have I been equivalenced with? */
ffestorag storage; /* Where am I in relation to my outside
world? */
#ifdef FFECOM_symbolHOOK
ffecomSymbol hook; /* Whatever the compiler/backend wants! */
#endif
ffesymbol sfa_dummy_parent; /* "X" outside sfunc "CIRC(X) = 3.14 * X". */
ffesymbol func_result; /* FUN sym's corresponding RES sym, & vice
versa. */