comparison dmd/declaration.h @ 92:70d6113eeb8c trunk

[svn r96] Updated to DMD 1.023. Regular bugfixes.
author lindquist
date Thu, 08 Nov 2007 19:13:28 +0100
parents fd32135dca3e
children 5071469303d4
comparison
equal deleted inserted replaced
91:3f949c6e2e9d 92:70d6113eeb8c
422 ILSyes, // can inline 422 ILSyes, // can inline
423 }; 423 };
424 424
425 /**************************************************************/ 425 /**************************************************************/
426 426
427 #if V2
428
429 enum BUILTIN
430 {
431 BUILTINunknown = -1, // not known if this is a builtin
432 BUILTINnot, // this is not a builtin
433 BUILTINsin, // std.math.sin
434 BUILTINcos, // std.math.cos
435 BUILTINtan, // std.math.tan
436 BUILTINsqrt, // std.math.sqrt
437 BUILTINfabs, // std.math.fabs
438 };
439
440 Expression *eval_builtin(enum BUILTIN builtin, Expressions *arguments);
441
442 #endif
443
427 struct FuncDeclaration : Declaration 444 struct FuncDeclaration : Declaration
428 { 445 {
429 Array *fthrows; // Array of Type's of exceptions (not used) 446 Array *fthrows; // Array of Type's of exceptions (not used)
430 Statement *frequire; 447 Statement *frequire;
431 Statement *fensure; 448 Statement *fensure;
451 int inlineAsm; // !=0 if has inline assembler 468 int inlineAsm; // !=0 if has inline assembler
452 ILS inlineStatus; 469 ILS inlineStatus;
453 int inlineNest; // !=0 if nested inline 470 int inlineNest; // !=0 if nested inline
454 int cantInterpret; // !=0 if cannot interpret function 471 int cantInterpret; // !=0 if cannot interpret function
455 int semanticRun; // !=0 if semantic3() had been run 472 int semanticRun; // !=0 if semantic3() had been run
456 int nestedFrameRef; // !=0 if nested variables referenced frame ptr
457 ForeachStatement *fes; // if foreach body, this is the foreach 473 ForeachStatement *fes; // if foreach body, this is the foreach
458 int introducing; // !=0 if 'introducing' function 474 int introducing; // !=0 if 'introducing' function
459 Type *tintro; // if !=NULL, then this is the type 475 Type *tintro; // if !=NULL, then this is the type
460 // of the 'introducing' function 476 // of the 'introducing' function
461 // this one is overriding 477 // this one is overriding
470 486
471 // Support for NRVO (named return value optimization) 487 // Support for NRVO (named return value optimization)
472 int nrvo_can; // !=0 means we can do it 488 int nrvo_can; // !=0 means we can do it
473 VarDeclaration *nrvo_var; // variable to replace with shidden 489 VarDeclaration *nrvo_var; // variable to replace with shidden
474 Symbol *shidden; // hidden pointer passed to function 490 Symbol *shidden; // hidden pointer passed to function
491
492 #if V2
493 enum BUILTIN builtin; // set if this is a known, builtin
494 // function we can evaluate at compile
495 // time
496
497 int tookAddressOf; // set if someone took the address of
498 // this function
499 Dsymbols closureVars; // local variables in this function
500 // which are referenced by nested
501 // functions
502 #else
503 int nestedFrameRef; // !=0 if nested variables referenced
504 #endif
475 505
476 FuncDeclaration(Loc loc, Loc endloc, Identifier *id, enum STC storage_class, Type *type); 506 FuncDeclaration(Loc loc, Loc endloc, Identifier *id, enum STC storage_class, Type *type);
477 Dsymbol *syntaxCopy(Dsymbol *); 507 Dsymbol *syntaxCopy(Dsymbol *);
478 void semantic(Scope *sc); 508 void semantic(Scope *sc);
479 void semantic2(Scope *sc); 509 void semantic2(Scope *sc);