Changeset 611
- Timestamp:
- 08/10/10 10:26:51 (14 years ago)
- Files:
-
- trunk/src/func.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/func.c
r610 r611 2377 2377 } 2378 2378 else 2379 2379 { 2380 2380 AggregateDeclaration *thiscd = s->isAggregateDeclaration(); 2381 2381 if (thiscd) 2382 2382 { if (!thiscd->isNested()) 2383 2383 goto Lerr; 2384 2384 } 2385 2385 else 2386 2386 goto Lerr; 2387 2387 } 2388 2388 2389 2389 s = s->toParent2(); 2390 2390 assert(s); 2391 2391 level++; 2392 2392 } 2393 2393 return level; 2394 2394 2395 2395 Lerr: 2396 2396 error(loc, "cannot access frame of function %s", fd->toPrettyChars()); 2397 halt();2398 2397 return 1; 2399 2398 } 2400 2399 2401 2400 void FuncDeclaration::appendExp(Expression *e) 2402 2401 { Statement *s; 2403 2402 2404 2403 s = new ExpStatement(0, e); 2405 2404 appendState(s); 2406 2405 } 2407 2406 2408 2407 void FuncDeclaration::appendState(Statement *s) 2409 2408 { 2410 2409 if (!fbody) 2411 2410 fbody = s; 2412 2411 else 2413 2412 { 2414 2413 CompoundStatement *cs = fbody->isCompoundStatement(); 2415 2414 if (cs) 2416 2415 { 2417 2416 if (!cs->statements)
