Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.354
 
1.355
 
MAIN:ragge:20120818154413
 
cgram.y
_>198198 static NODE *tymfix(NODE *p);
 199199 static NODE *namekill(NODE *p, int clr);
 200200 static NODE *aryfix(NODE *p);
<> 201+static void savlab(int);
  202+extern int *mkclabs(void);
201203 
 202204 #define TYMFIX(inp) { \
 203205         NODE *pp = inp; \
     
 !
11561158                                 s->soffset = -getlab();
 11571159                                 s->sclass = STATIC;
 11581160                         }
<> 1161+                        savlab(s->soffset);
11591162                         $$ = biop(ADDROF, bdty(GOTO, $2), NIL);
 11601163                 }
 11611164                 ;
     
 !
23232326         }
 23242327         return p;
 23252328 }
<_ 2329+
  2330+struct labs {
  2331+        struct labs *next;
  2332+        int lab;
  2333+} *labp;
  2334+
  2335+static void
  2336+savlab(int lab)
  2337+{
  2338+        struct labs *l = tmpalloc(sizeof(struct labs));
  2339+        l->lab = lab < 0 ? -lab : lab;
  2340+        l->next = labp;
  2341+        labp = l;
  2342+}
  2343+
  2344+int *
  2345+mkclabs(void)
  2346+{
  2347+        struct labs *l;
  2348+        int i, *rv;
  2349+
  2350+        for (i = 0, l = labp; l; l = l->next, i++)
  2351+                ;
  2352+        rv = tmpalloc((i+1)*sizeof(int));
  2353+        for (i = 0, l = labp; l; l = l->next, i++)
  2354+                rv[i] = l->lab;
  2355+        rv[i] = 0;
  2356+        labp = 0;
  2357+        return rv;
  2358+}
FishEye: Open Source License registered to PCC.
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-12-25 10:19 +0100