~john-koepi/ubuntu/trusty/golang/default

« back to all changes in this revision

Viewing changes to src/cmd/gc/lex.c

  • Committer: Bazaar Package Importer
  • Author(s): Ondřej Surý
  • Date: 2011-08-03 17:04:59 UTC
  • mfrom: (14.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110803170459-wzd99m3567y80ila
Tags: 1:59-1
* Imported Upstream version 59
* Refresh patches to a new release
* Fix FTBFS on ARM (Closes: #634270)
* Update version.bash to work with Debian packaging and not hg
  repository

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
        // in the program, don't bother complaining
98
98
        // about the seg fault too; let the user clean up
99
99
        // the code and try again.
100
 
        if(nerrors > 0)
 
100
        if(nsavederrors + nerrors > 0)
101
101
                errorexit();
102
102
        fatal("fault");
103
103
}
256
256
        for(l=xtop; l; l=l->next)
257
257
                if(l->n->op == ODCLFUNC) {
258
258
                        curfn = l->n;
 
259
                        saveerrors();
259
260
                        typechecklist(l->n->nbody, Etop);
 
261
                        if(nerrors != 0)
 
262
                                l->n->nbody = nil;  // type errors; do not compile
260
263
                }
261
264
        curfn = nil;
262
265
 
264
267
                if(l->n->op == ODCLFUNC)
265
268
                        funccompile(l->n, 0);
266
269
 
267
 
        if(nerrors == 0)
 
270
        if(nsavederrors+nerrors == 0)
268
271
                fninit(xtop);
269
272
 
270
273
        while(closures) {
278
281
                if(l->n->op == ONAME)
279
282
                        typecheck(&l->n, Erv);
280
283
 
281
 
        if(nerrors)
 
284
        if(nerrors+nsavederrors)
282
285
                errorexit();
283
286
 
284
287
        dumpobj();
285
288
 
286
 
        if(nerrors)
 
289
        if(nerrors+nsavederrors)
287
290
                errorexit();
288
291
 
289
292
        flusherrors();
291
294
        return 0;
292
295
}
293
296
 
 
297
void
 
298
saveerrors(void)
 
299
{
 
300
        nsavederrors += nerrors;
 
301
        nerrors = 0;
 
302
}
 
303
 
294
304
static int
295
305
arsize(Biobuf *b, char *name)
296
306
{