;
}
+void
+pragtextflag(void)
+{
+ while(getnsc() != '\n')
+ ;
+}
+
#include "../cc/lexbody"
#include "../cc/macbody"
p->as = a;
p->from.type = D_EXTERN;
p->from.sym = s;
- p->from.scale = (profileflg ? 0 : NOPROF);
+ p->from.scale = textflag;
+ textflag = 0;
+
if(s->class == CSTATIC)
p->from.type = D_STATIC;
naddr(n, &p->to);
p->as = a;
p->from.type = D_EXTERN;
p->from.sym = s;
- p->from.scale = (profileflg ? 0 : NOPROF);
+ p->from.scale = textflag;
+ textflag = 0;
+
if(s->class == CSTATIC)
p->from.type = D_STATIC;
naddr(n, &p->to);
EXTERN int nterm;
EXTERN int packflg;
EXTERN int fproundflg;
-EXTERN int profileflg;
+EXTERN int textflag;
EXTERN int ncontin;
EXTERN int canreach;
EXTERN int warnreach;
void pragvararg(void);
void pragpack(void);
void pragfpround(void);
-void pragprofile(void);
+void pragtextflag(void);
void pragincomplete(void);
/*
}
void
-pragprofile(void)
+pragtextflag(void)
{
Sym *s;
- profileflg = 0;
+ textflag = 0;
s = getsym();
- if(s) {
- profileflg = atoi(s->name+1);
- if(strcmp(s->name, "on") == 0 ||
- strcmp(s->name, "yes") == 0)
- profileflg = 1;
- }
+ textflag = 7;
+ if(s)
+ textflag = atoi(s->name+1);
while(getnsc() != '\n')
;
if(debug['f'])
- if(profileflg)
- print("%4ld: profileflg %d\n", lineno, profileflg);
- else
- print("%4ld: profileflg off\n", lineno);
+ print("%4ld: textflag %d\n", lineno, textflag);
}
void
ginit();
arginit();
- profileflg = 1; /* #pragma can turn it off */
tufield = simplet((1L<<tfield->etype) | BUNSIGNED);
ndef = 0;
outfile = 0;
pragfpround();
return;
}
- if(s && strcmp(s->name, "profile") == 0) {
- pragprofile();
+ if(s && strcmp(s->name, "textflag") == 0) {
+ pragtextflag();
return;
}
if(s && strcmp(s->name, "varargck") == 0) {
return g;
}
+#pragma textflag 7
void
sys·newproc(int32 siz, byte* fn, byte* arg0)
{
//printf(" goid=%d\n", newg->goid);
}
+#pragma textflag 7
void
sys·deferproc(int32 siz, byte* fn, byte* arg0)
{
g->defer = d;
}
+#pragma textflag 7
void
sys·deferreturn(int32 arg0)
{
*(int32*)345 = 123; // never return
}
+#pragma textflag 7
void
sys·morestack(uint64 u)
{