Merged Delight changes to D1 into D2
[delight/core.git] / dmd2 / expression.h
blob6f0143c4cf91e82e9cf4fe4569f375c11f61178a
2 // Compiler implementation of the D programming language
3 // Copyright (c) 1999-2008 by Digital Mars
4 // All Rights Reserved
5 // written by Walter Bright
6 // http://www.digitalmars.com
7 // License for redistribution is by either the Artistic License
8 // in artistic.txt, or the GNU General Public License in gnu.txt.
9 // See the included readme.txt for details.
11 /* NOTE: This file has been patched from the original DMD distribution to
12 work with the GDC compiler.
14 Modified by David Friedman, September 2004
17 #ifndef DMD_EXPRESSION_H
18 #define DMD_EXPRESSION_H
20 #include "mars.h"
21 #include "identifier.h"
22 #include "lexer.h"
23 #include "arraytypes.h"
25 struct Type;
26 struct Scope;
27 struct TupleDeclaration;
28 struct VarDeclaration;
29 struct FuncDeclaration;
30 struct FuncLiteralDeclaration;
31 struct Declaration;
32 struct CtorDeclaration;
33 struct NewDeclaration;
34 struct Dsymbol;
35 struct Import;
36 struct Module;
37 struct ScopeDsymbol;
38 struct InlineCostState;
39 struct InlineDoState;
40 struct InlineScanState;
41 struct Expression;
42 struct Declaration;
43 struct AggregateDeclaration;
44 struct StructDeclaration;
45 struct TemplateInstance;
46 struct TemplateDeclaration;
47 struct ClassDeclaration;
48 struct HdrGenState;
49 struct BinExp;
50 struct InterState;
51 struct Symbol; // back end symbol
52 struct OverloadSet;
54 enum TOK;
56 // Back end
57 struct IRState;
58 struct dt_t;
60 #ifdef IN_GCC
61 union tree_node; typedef union tree_node elem;
62 #else
63 struct elem;
64 #endif
66 void initPrecedence();
68 Expression *resolveProperties(Scope *sc, Expression *e);
69 void accessCheck(Loc loc, Scope *sc, Expression *e, Declaration *d);
70 Expression *build_overload(Loc loc, Scope *sc, Expression *ethis, Expression *earg, Identifier *id);
71 Dsymbol *search_function(ScopeDsymbol *ad, Identifier *funcid);
72 void inferApplyArgTypes(enum TOK op, Arguments *arguments, Expression *aggr);
73 void argExpTypesToCBuffer(OutBuffer *buf, Expressions *arguments, HdrGenState *hgs);
74 void argsToCBuffer(OutBuffer *buf, Expressions *arguments, HdrGenState *hgs);
75 void expandTuples(Expressions *exps);
76 FuncDeclaration *hasThis(Scope *sc);
77 Expression *fromConstInitializer(int result, Expression *e);
78 int arrayExpressionCanThrow(Expressions *exps);
80 struct Expression : Object
82 Loc loc; // file location
83 enum TOK op; // handy to minimize use of dynamic_cast
84 Type *type; // !=NULL means that semantic() has been run
85 int size; // # of bytes in Expression so we can copy() it
87 Expression(Loc loc, enum TOK op, int size);
88 Expression *copy();
89 virtual Expression *syntaxCopy();
90 virtual Expression *semantic(Scope *sc);
92 int dyncast() { return DYNCAST_EXPRESSION; } // kludge for template.isExpression()
94 void print();
95 char *toChars();
96 virtual void dump(int indent);
97 void error(const char *format, ...);
98 virtual void rvalue();
100 static Expression *combine(Expression *e1, Expression *e2);
101 static Expressions *arraySyntaxCopy(Expressions *exps);
103 virtual integer_t toInteger();
104 virtual uinteger_t toUInteger();
105 virtual real_t toReal();
106 virtual real_t toImaginary();
107 virtual complex_t toComplex();
108 virtual void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
109 virtual void toMangleBuffer(OutBuffer *buf);
110 virtual Expression *toLvalue(Scope *sc, Expression *e);
111 virtual Expression *modifiableLvalue(Scope *sc, Expression *e);
112 Expression *implicitCastTo(Scope *sc, Type *t);
113 virtual MATCH implicitConvTo(Type *t);
114 virtual Expression *castTo(Scope *sc, Type *t);
115 virtual void checkEscape();
116 void checkScalar();
117 void checkNoBool();
118 Expression *checkIntegral();
119 Expression *checkArithmetic();
120 void checkDeprecated(Scope *sc, Dsymbol *s);
121 virtual Expression *checkToBoolean();
122 Expression *checkToPointer();
123 Expression *addressOf(Scope *sc);
124 Expression *deref();
125 Expression *integralPromotions(Scope *sc);
127 Expression *toDelegate(Scope *sc, Type *t);
128 virtual void scanForNestedRef(Scope *sc);
130 virtual Expression *optimize(int result);
131 #define WANTflags 1
132 #define WANTvalue 2
133 #define WANTinterpret 4
135 virtual Expression *interpret(InterState *istate);
137 virtual int isConst();
138 virtual int isBool(int result);
139 virtual int isBit();
140 virtual int checkSideEffect(int flag);
141 virtual int canThrow();
143 virtual int inlineCost(InlineCostState *ics);
144 virtual Expression *doInline(InlineDoState *ids);
145 virtual Expression *inlineScan(InlineScanState *iss);
147 // For operator overloading
148 virtual int isCommutative();
149 virtual Identifier *opId();
150 virtual Identifier *opId_r();
152 // Back end
153 virtual elem *toElem(IRState *irs);
154 virtual dt_t **toDt(dt_t **pdt);
157 struct IntegerExp : Expression
159 integer_t value;
161 IntegerExp(Loc loc, integer_t value, Type *type);
162 IntegerExp(integer_t value);
163 int equals(Object *o);
164 Expression *semantic(Scope *sc);
165 Expression *interpret(InterState *istate);
166 char *toChars();
167 void dump(int indent);
168 integer_t toInteger();
169 real_t toReal();
170 real_t toImaginary();
171 complex_t toComplex();
172 int isConst();
173 int isBool(int result);
174 MATCH implicitConvTo(Type *t);
175 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
176 void toMangleBuffer(OutBuffer *buf);
177 Expression *toLvalue(Scope *sc, Expression *e);
178 elem *toElem(IRState *irs);
179 dt_t **toDt(dt_t **pdt);
182 struct RealExp : Expression
184 real_t value;
186 RealExp(Loc loc, real_t value, Type *type);
187 int equals(Object *o);
188 Expression *semantic(Scope *sc);
189 Expression *interpret(InterState *istate);
190 char *toChars();
191 integer_t toInteger();
192 uinteger_t toUInteger();
193 real_t toReal();
194 real_t toImaginary();
195 complex_t toComplex();
196 Expression *castTo(Scope *sc, Type *t);
197 int isConst();
198 int isBool(int result);
199 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
200 void toMangleBuffer(OutBuffer *buf);
201 elem *toElem(IRState *irs);
202 dt_t **toDt(dt_t **pdt);
205 struct ComplexExp : Expression
207 complex_t value;
209 ComplexExp(Loc loc, complex_t value, Type *type);
210 int equals(Object *o);
211 Expression *semantic(Scope *sc);
212 Expression *interpret(InterState *istate);
213 char *toChars();
214 integer_t toInteger();
215 uinteger_t toUInteger();
216 real_t toReal();
217 real_t toImaginary();
218 complex_t toComplex();
219 Expression *castTo(Scope *sc, Type *t);
220 int isConst();
221 int isBool(int result);
222 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
223 void toMangleBuffer(OutBuffer *buf);
224 #ifdef _DH
225 OutBuffer hexp;
226 #endif
227 elem *toElem(IRState *irs);
228 dt_t **toDt(dt_t **pdt);
231 struct IdentifierExp : Expression
233 Identifier *ident;
234 Declaration *var;
236 IdentifierExp(Loc loc, Identifier *ident);
237 IdentifierExp(Loc loc, Declaration *var);
238 Expression *semantic(Scope *sc);
239 char *toChars();
240 void dump(int indent);
241 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
242 Expression *toLvalue(Scope *sc, Expression *e);
245 struct DollarExp : IdentifierExp
247 DollarExp(Loc loc);
250 struct DsymbolExp : Expression
252 Dsymbol *s;
253 int hasOverloads;
255 DsymbolExp(Loc loc, Dsymbol *s, int hasOverloads = 0);
256 Expression *semantic(Scope *sc);
257 char *toChars();
258 void dump(int indent);
259 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
260 Expression *toLvalue(Scope *sc, Expression *e);
263 struct GetLoggerExp : Expression
265 GetLoggerExp(Loc loc);
266 Expression *semantic(Scope *sc);
267 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
268 //void scanForNestedRef(Scope *sc);
271 struct ThisExp : Expression
273 Declaration *var;
275 ThisExp(Loc loc);
276 Expression *semantic(Scope *sc);
277 int isBool(int result);
278 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
279 Expression *toLvalue(Scope *sc, Expression *e);
280 void scanForNestedRef(Scope *sc);
282 int inlineCost(InlineCostState *ics);
283 Expression *doInline(InlineDoState *ids);
284 //Expression *inlineScan(InlineScanState *iss);
286 elem *toElem(IRState *irs);
289 struct SuperExp : ThisExp
291 SuperExp(Loc loc);
292 Expression *semantic(Scope *sc);
293 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
294 void scanForNestedRef(Scope *sc);
296 int inlineCost(InlineCostState *ics);
297 Expression *doInline(InlineDoState *ids);
298 //Expression *inlineScan(InlineScanState *iss);
301 struct NullExp : Expression
303 unsigned char committed; // !=0 if type is committed
305 NullExp(Loc loc);
306 Expression *semantic(Scope *sc);
307 int isBool(int result);
308 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
309 void toMangleBuffer(OutBuffer *buf);
310 MATCH implicitConvTo(Type *t);
311 Expression *castTo(Scope *sc, Type *t);
312 Expression *interpret(InterState *istate);
313 elem *toElem(IRState *irs);
314 dt_t **toDt(dt_t **pdt);
317 struct StringExp : Expression
319 void *string; // char, wchar, or dchar data
320 size_t len; // number of chars, wchars, or dchars
321 unsigned char sz; // 1: char, 2: wchar, 4: dchar
322 unsigned char committed; // !=0 if type is committed
323 unsigned char postfix; // 'c', 'w', 'd'
325 StringExp(Loc loc, char *s);
326 StringExp(Loc loc, void *s, size_t len);
327 StringExp(Loc loc, void *s, size_t len, unsigned char postfix);
328 //Expression *syntaxCopy();
329 int equals(Object *o);
330 char *toChars();
331 Expression *semantic(Scope *sc);
332 Expression *interpret(InterState *istate);
333 StringExp *toUTF8(Scope *sc);
334 MATCH implicitConvTo(Type *t);
335 Expression *castTo(Scope *sc, Type *t);
336 int compare(Object *obj);
337 int isBool(int result);
338 unsigned charAt(size_t i);
339 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
340 void toMangleBuffer(OutBuffer *buf);
341 elem *toElem(IRState *irs);
342 dt_t **toDt(dt_t **pdt);
345 // Tuple
347 struct TupleExp : Expression
349 Expressions *exps;
351 TupleExp(Loc loc, Expressions *exps);
352 TupleExp(Loc loc, TupleDeclaration *tup);
353 Expression *syntaxCopy();
354 int equals(Object *o);
355 Expression *semantic(Scope *sc);
356 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
357 void scanForNestedRef(Scope *sc);
358 void checkEscape();
359 int checkSideEffect(int flag);
360 Expression *optimize(int result);
361 Expression *interpret(InterState *istate);
362 Expression *castTo(Scope *sc, Type *t);
363 elem *toElem(IRState *irs);
364 int canThrow();
366 int inlineCost(InlineCostState *ics);
367 Expression *doInline(InlineDoState *ids);
368 Expression *inlineScan(InlineScanState *iss);
371 struct ArrayLiteralExp : Expression
373 Expressions *elements;
375 ArrayLiteralExp(Loc loc, Expressions *elements);
376 ArrayLiteralExp(Loc loc, Expression *e);
378 Expression *syntaxCopy();
379 Expression *semantic(Scope *sc);
380 int isBool(int result);
381 elem *toElem(IRState *irs);
382 int checkSideEffect(int flag);
383 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
384 void toMangleBuffer(OutBuffer *buf);
385 void scanForNestedRef(Scope *sc);
386 Expression *optimize(int result);
387 Expression *interpret(InterState *istate);
388 MATCH implicitConvTo(Type *t);
389 Expression *castTo(Scope *sc, Type *t);
390 dt_t **toDt(dt_t **pdt);
391 int canThrow();
393 int inlineCost(InlineCostState *ics);
394 Expression *doInline(InlineDoState *ids);
395 Expression *inlineScan(InlineScanState *iss);
398 struct AssocArrayLiteralExp : Expression
400 Expressions *keys;
401 Expressions *values;
403 AssocArrayLiteralExp(Loc loc, Expressions *keys, Expressions *values);
405 Expression *syntaxCopy();
406 Expression *semantic(Scope *sc);
407 int isBool(int result);
408 elem *toElem(IRState *irs);
409 int checkSideEffect(int flag);
410 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
411 void toMangleBuffer(OutBuffer *buf);
412 void scanForNestedRef(Scope *sc);
413 Expression *optimize(int result);
414 Expression *interpret(InterState *istate);
415 MATCH implicitConvTo(Type *t);
416 Expression *castTo(Scope *sc, Type *t);
417 int canThrow();
419 int inlineCost(InlineCostState *ics);
420 Expression *doInline(InlineDoState *ids);
421 Expression *inlineScan(InlineScanState *iss);
424 struct StructLiteralExp : Expression
426 StructDeclaration *sd; // which aggregate this is for
427 Expressions *elements; // parallels sd->fields[] with
428 // NULL entries for fields to skip
430 Symbol *sym; // back end symbol to initialize with literal
431 size_t soffset; // offset from start of s
432 int fillHoles; // fill alignment 'holes' with zero
434 StructLiteralExp(Loc loc, StructDeclaration *sd, Expressions *elements);
436 Expression *syntaxCopy();
437 Expression *semantic(Scope *sc);
438 Expression *getField(Type *type, unsigned offset);
439 int getFieldIndex(Type *type, unsigned offset);
440 elem *toElem(IRState *irs);
441 int checkSideEffect(int flag);
442 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
443 void toMangleBuffer(OutBuffer *buf);
444 void scanForNestedRef(Scope *sc);
445 Expression *optimize(int result);
446 Expression *interpret(InterState *istate);
447 dt_t **toDt(dt_t **pdt);
448 Expression *toLvalue(Scope *sc, Expression *e);
449 int canThrow();
450 MATCH implicitConvTo(Type *t);
452 int inlineCost(InlineCostState *ics);
453 Expression *doInline(InlineDoState *ids);
454 Expression *inlineScan(InlineScanState *iss);
457 struct TypeDotIdExp : Expression
459 Identifier *ident;
461 TypeDotIdExp(Loc loc, Type *type, Identifier *ident);
462 Expression *syntaxCopy();
463 Expression *semantic(Scope *sc);
464 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
465 elem *toElem(IRState *irs);
468 struct TypeExp : Expression
470 TypeExp(Loc loc, Type *type);
471 Expression *semantic(Scope *sc);
472 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
473 Expression *optimize(int result);
474 elem *toElem(IRState *irs);
477 struct ScopeExp : Expression
479 ScopeDsymbol *sds;
481 ScopeExp(Loc loc, ScopeDsymbol *sds);
482 Expression *syntaxCopy();
483 Expression *semantic(Scope *sc);
484 elem *toElem(IRState *irs);
485 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
488 struct TemplateExp : Expression
490 TemplateDeclaration *td;
492 TemplateExp(Loc loc, TemplateDeclaration *td);
493 void rvalue();
494 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
497 struct NewExp : Expression
499 /* thisexp.new(newargs) newtype(arguments)
501 Expression *thisexp; // if !NULL, 'this' for class being allocated
502 Expressions *newargs; // Array of Expression's to call new operator
503 Type *newtype;
504 Expressions *arguments; // Array of Expression's
506 CtorDeclaration *member; // constructor function
507 NewDeclaration *allocator; // allocator function
508 int onstack; // allocate on stack
510 NewExp(Loc loc, Expression *thisexp, Expressions *newargs,
511 Type *newtype, Expressions *arguments);
512 Expression *syntaxCopy();
513 Expression *semantic(Scope *sc);
514 elem *toElem(IRState *irs);
515 int checkSideEffect(int flag);
516 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
517 void scanForNestedRef(Scope *sc);
518 int canThrow();
520 //int inlineCost(InlineCostState *ics);
521 Expression *doInline(InlineDoState *ids);
522 //Expression *inlineScan(InlineScanState *iss);
525 struct NewAnonClassExp : Expression
527 /* thisexp.new(newargs) class baseclasses { } (arguments)
529 Expression *thisexp; // if !NULL, 'this' for class being allocated
530 Expressions *newargs; // Array of Expression's to call new operator
531 ClassDeclaration *cd; // class being instantiated
532 Expressions *arguments; // Array of Expression's to call class constructor
534 NewAnonClassExp(Loc loc, Expression *thisexp, Expressions *newargs,
535 ClassDeclaration *cd, Expressions *arguments);
536 Expression *syntaxCopy();
537 Expression *semantic(Scope *sc);
538 int checkSideEffect(int flag);
539 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
540 int canThrow();
543 struct SymbolExp : Expression
545 Declaration *var;
546 int hasOverloads;
548 SymbolExp(Loc loc, enum TOK op, int size, Declaration *var, int hasOverloads);
550 elem *toElem(IRState *irs);
553 // Offset from symbol
555 struct SymOffExp : SymbolExp
557 target_size_t offset;
559 SymOffExp(Loc loc, Declaration *var, target_size_t offset, int hasOverloads = 0);
560 Expression *semantic(Scope *sc);
561 void checkEscape();
562 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
563 int isConst();
564 int isBool(int result);
565 Expression *doInline(InlineDoState *ids);
566 MATCH implicitConvTo(Type *t);
567 Expression *castTo(Scope *sc, Type *t);
568 void scanForNestedRef(Scope *sc);
570 dt_t **toDt(dt_t **pdt);
573 // Variable
575 struct VarExp : SymbolExp
577 VarExp(Loc loc, Declaration *var, int hasOverloads = 0);
578 int equals(Object *o);
579 Expression *semantic(Scope *sc);
580 Expression *optimize(int result);
581 Expression *interpret(InterState *istate);
582 void dump(int indent);
583 char *toChars();
584 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
585 void checkEscape();
586 Expression *toLvalue(Scope *sc, Expression *e);
587 Expression *modifiableLvalue(Scope *sc, Expression *e);
588 dt_t **toDt(dt_t **pdt);
589 void scanForNestedRef(Scope *sc);
591 int inlineCost(InlineCostState *ics);
592 Expression *doInline(InlineDoState *ids);
593 //Expression *inlineScan(InlineScanState *iss);
596 // Overload Set
598 struct OverExp : Expression
600 OverloadSet *vars;
602 OverExp(OverloadSet *s);
603 Expression *toLvalue(Scope *sc, Expression *e);
607 // Function/Delegate literal
609 struct FuncExp : Expression
611 FuncLiteralDeclaration *fd;
613 FuncExp(Loc loc, FuncLiteralDeclaration *fd);
614 Expression *syntaxCopy();
615 Expression *semantic(Scope *sc);
616 void scanForNestedRef(Scope *sc);
617 char *toChars();
618 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
619 elem *toElem(IRState *irs);
621 int inlineCost(InlineCostState *ics);
622 //Expression *doInline(InlineDoState *ids);
623 //Expression *inlineScan(InlineScanState *iss);
626 // Declaration of a symbol
628 struct DeclarationExp : Expression
630 Dsymbol *declaration;
632 DeclarationExp(Loc loc, Dsymbol *declaration);
633 Expression *syntaxCopy();
634 Expression *semantic(Scope *sc);
635 Expression *interpret(InterState *istate);
636 int checkSideEffect(int flag);
637 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
638 elem *toElem(IRState *irs);
639 void scanForNestedRef(Scope *sc);
640 int canThrow();
642 int inlineCost(InlineCostState *ics);
643 Expression *doInline(InlineDoState *ids);
644 Expression *inlineScan(InlineScanState *iss);
647 struct TypeidExp : Expression
649 Type *typeidType;
651 TypeidExp(Loc loc, Type *typeidType);
652 Expression *syntaxCopy();
653 Expression *semantic(Scope *sc);
654 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
657 struct TraitsExp : Expression
659 Identifier *ident;
660 Objects *args;
662 TraitsExp(Loc loc, Identifier *ident, Objects *args);
663 Expression *syntaxCopy();
664 Expression *semantic(Scope *sc);
665 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
668 struct HaltExp : Expression
670 HaltExp(Loc loc);
671 Expression *semantic(Scope *sc);
672 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
673 int checkSideEffect(int flag);
675 elem *toElem(IRState *irs);
678 struct IsExp : Expression
680 /* is(targ id tok tspec)
681 * is(targ id == tok2)
683 Type *targ;
684 Identifier *id; // can be NULL
685 enum TOK tok; // ':' or '=='
686 Type *tspec; // can be NULL
687 enum TOK tok2; // 'struct', 'union', 'typedef', etc.
688 TemplateParameters *parameters;
690 IsExp(Loc loc, Type *targ, Identifier *id, enum TOK tok, Type *tspec,
691 enum TOK tok2, TemplateParameters *parameters);
692 Expression *syntaxCopy();
693 Expression *semantic(Scope *sc);
694 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
697 /****************************************************************/
699 struct UnaExp : Expression
701 Expression *e1;
703 UnaExp(Loc loc, enum TOK op, int size, Expression *e1);
704 Expression *syntaxCopy();
705 Expression *semantic(Scope *sc);
706 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
707 Expression *optimize(int result);
708 void dump(int indent);
709 void scanForNestedRef(Scope *sc);
710 Expression *interpretCommon(InterState *istate, Expression *(*fp)(Type *, Expression *));
711 int canThrow();
713 int inlineCost(InlineCostState *ics);
714 Expression *doInline(InlineDoState *ids);
715 Expression *inlineScan(InlineScanState *iss);
717 Expression *op_overload(Scope *sc); // doesn't need to be virtual
720 struct BinExp : Expression
722 Expression *e1;
723 Expression *e2;
725 BinExp(Loc loc, enum TOK op, int size, Expression *e1, Expression *e2);
726 Expression *syntaxCopy();
727 Expression *semantic(Scope *sc);
728 Expression *semanticp(Scope *sc);
729 Expression *commonSemanticAssign(Scope *sc);
730 Expression *commonSemanticAssignIntegral(Scope *sc);
731 int checkSideEffect(int flag);
732 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
733 Expression *scaleFactor(Scope *sc);
734 Expression *typeCombine(Scope *sc);
735 Expression *optimize(int result);
736 int isunsigned();
737 void incompatibleTypes();
738 void dump(int indent);
739 void scanForNestedRef(Scope *sc);
740 Expression *interpretCommon(InterState *istate, Expression *(*fp)(Type *, Expression *, Expression *));
741 Expression *interpretCommon2(InterState *istate, Expression *(*fp)(TOK, Type *, Expression *, Expression *));
742 Expression *interpretAssignCommon(InterState *istate, Expression *(*fp)(Type *, Expression *, Expression *), int post = 0);
743 int canThrow();
745 int inlineCost(InlineCostState *ics);
746 Expression *doInline(InlineDoState *ids);
747 Expression *inlineScan(InlineScanState *iss);
749 Expression *op_overload(Scope *sc);
751 elem *toElemBin(IRState *irs, int op);
754 struct BinAssignExp : BinExp
756 BinAssignExp(Loc loc, enum TOK op, int size, Expression *e1, Expression *e2);
757 int checkSideEffect(int flag);
760 /****************************************************************/
762 struct CompileExp : UnaExp
764 CompileExp(Loc loc, Expression *e);
765 Expression *semantic(Scope *sc);
766 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
769 struct FileExp : UnaExp
771 FileExp(Loc loc, Expression *e);
772 Expression *semantic(Scope *sc);
773 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
776 struct AssertExp : UnaExp
778 Expression *msg;
780 AssertExp(Loc loc, Expression *e, Expression *msg = NULL);
781 Expression *syntaxCopy();
782 Expression *semantic(Scope *sc);
783 Expression *interpret(InterState *istate);
784 int checkSideEffect(int flag);
785 int canThrow();
786 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
788 int inlineCost(InlineCostState *ics);
789 Expression *doInline(InlineDoState *ids);
790 Expression *inlineScan(InlineScanState *iss);
792 elem *toElem(IRState *irs);
795 struct DotIdExp : UnaExp
797 Identifier *ident;
799 DotIdExp(Loc loc, Expression *e, Identifier *ident);
800 Expression *semantic(Scope *sc);
801 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
802 void dump(int i);
805 struct DotTemplateExp : UnaExp
807 TemplateDeclaration *td;
809 DotTemplateExp(Loc loc, Expression *e, TemplateDeclaration *td);
810 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
813 struct DotVarExp : UnaExp
815 Declaration *var;
816 int hasOverloads;
818 DotVarExp(Loc loc, Expression *e, Declaration *var, int hasOverloads = 0);
819 Expression *semantic(Scope *sc);
820 Expression *toLvalue(Scope *sc, Expression *e);
821 Expression *modifiableLvalue(Scope *sc, Expression *e);
822 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
823 void dump(int indent);
824 elem *toElem(IRState *irs);
827 struct DotTemplateInstanceExp : UnaExp
829 TemplateInstance *ti;
831 DotTemplateInstanceExp(Loc loc, Expression *e, TemplateInstance *ti);
832 Expression *syntaxCopy();
833 Expression *semantic(Scope *sc);
834 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
835 void dump(int indent);
838 struct DelegateExp : UnaExp
840 FuncDeclaration *func;
841 int hasOverloads;
843 DelegateExp(Loc loc, Expression *e, FuncDeclaration *func, int hasOverloads = 0);
844 Expression *semantic(Scope *sc);
845 MATCH implicitConvTo(Type *t);
846 Expression *castTo(Scope *sc, Type *t);
847 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
848 void dump(int indent);
850 int inlineCost(InlineCostState *ics);
851 elem *toElem(IRState *irs);
854 struct DotTypeExp : UnaExp
856 Dsymbol *sym; // symbol that represents a type
858 DotTypeExp(Loc loc, Expression *e, Dsymbol *sym);
859 Expression *semantic(Scope *sc);
860 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
861 elem *toElem(IRState *irs);
864 struct CallExp : UnaExp
866 Expressions *arguments; // function arguments
868 CallExp(Loc loc, Expression *e, Expressions *exps);
869 CallExp(Loc loc, Expression *e);
870 CallExp(Loc loc, Expression *e, Expression *earg1);
871 CallExp(Loc loc, Expression *e, Expression *earg1, Expression *earg2);
873 Expression *syntaxCopy();
874 Expression *semantic(Scope *sc);
875 Expression *optimize(int result);
876 Expression *interpret(InterState *istate);
877 int checkSideEffect(int flag);
878 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
879 void dump(int indent);
880 elem *toElem(IRState *irs);
881 void scanForNestedRef(Scope *sc);
882 Expression *toLvalue(Scope *sc, Expression *e);
883 int canThrow();
885 int inlineCost(InlineCostState *ics);
886 Expression *doInline(InlineDoState *ids);
887 Expression *inlineScan(InlineScanState *iss);
890 struct AddrExp : UnaExp
892 AddrExp(Loc loc, Expression *e);
893 Expression *semantic(Scope *sc);
894 elem *toElem(IRState *irs);
895 MATCH implicitConvTo(Type *t);
896 Expression *castTo(Scope *sc, Type *t);
897 Expression *optimize(int result);
900 struct PtrExp : UnaExp
902 PtrExp(Loc loc, Expression *e);
903 PtrExp(Loc loc, Expression *e, Type *t);
904 Expression *semantic(Scope *sc);
905 Expression *toLvalue(Scope *sc, Expression *e);
906 Expression *modifiableLvalue(Scope *sc, Expression *e);
907 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
908 elem *toElem(IRState *irs);
909 Expression *optimize(int result);
910 Expression *interpret(InterState *istate);
912 // For operator overloading
913 Identifier *opId();
916 struct NegExp : UnaExp
918 NegExp(Loc loc, Expression *e);
919 Expression *semantic(Scope *sc);
920 Expression *optimize(int result);
921 Expression *interpret(InterState *istate);
923 // For operator overloading
924 Identifier *opId();
926 elem *toElem(IRState *irs);
929 struct UAddExp : UnaExp
931 UAddExp(Loc loc, Expression *e);
932 Expression *semantic(Scope *sc);
934 // For operator overloading
935 Identifier *opId();
938 struct ComExp : UnaExp
940 ComExp(Loc loc, Expression *e);
941 Expression *semantic(Scope *sc);
942 Expression *optimize(int result);
943 Expression *interpret(InterState *istate);
945 // For operator overloading
946 Identifier *opId();
948 elem *toElem(IRState *irs);
951 struct NotExp : UnaExp
953 NotExp(Loc loc, Expression *e);
954 Expression *semantic(Scope *sc);
955 Expression *optimize(int result);
956 Expression *interpret(InterState *istate);
957 int isBit();
958 elem *toElem(IRState *irs);
961 struct BoolExp : UnaExp
963 BoolExp(Loc loc, Expression *e, Type *type);
964 Expression *semantic(Scope *sc);
965 Expression *optimize(int result);
966 Expression *interpret(InterState *istate);
967 int isBit();
968 elem *toElem(IRState *irs);
971 struct DeleteExp : UnaExp
973 DeleteExp(Loc loc, Expression *e);
974 Expression *semantic(Scope *sc);
975 Expression *checkToBoolean();
976 int checkSideEffect(int flag);
977 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
978 elem *toElem(IRState *irs);
981 struct CastExp : UnaExp
983 // Possible to cast to one type while painting to another type
984 Type *to; // type to cast to
985 enum TOK tok; // TOKconst or TOKinvariant
987 CastExp(Loc loc, Expression *e, Type *t);
988 CastExp(Loc loc, Expression *e, enum TOK tok);
989 Expression *syntaxCopy();
990 Expression *semantic(Scope *sc);
991 Expression *optimize(int result);
992 Expression *interpret(InterState *istate);
993 int checkSideEffect(int flag);
994 void checkEscape();
995 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
996 elem *toElem(IRState *irs);
998 // For operator overloading
999 Identifier *opId();
1003 struct SliceExp : UnaExp
1005 Expression *upr; // NULL if implicit 0
1006 Expression *lwr; // NULL if implicit [length - 1]
1007 VarDeclaration *lengthVar;
1009 SliceExp(Loc loc, Expression *e1, Expression *lwr, Expression *upr);
1010 Expression *syntaxCopy();
1011 Expression *semantic(Scope *sc);
1012 void checkEscape();
1013 Expression *toLvalue(Scope *sc, Expression *e);
1014 Expression *modifiableLvalue(Scope *sc, Expression *e);
1015 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
1016 Expression *optimize(int result);
1017 Expression *interpret(InterState *istate);
1018 void dump(int indent);
1019 elem *toElem(IRState *irs);
1020 void scanForNestedRef(Scope *sc);
1022 int inlineCost(InlineCostState *ics);
1023 Expression *doInline(InlineDoState *ids);
1024 Expression *inlineScan(InlineScanState *iss);
1027 struct ArrayLengthExp : UnaExp
1029 ArrayLengthExp(Loc loc, Expression *e1);
1030 Expression *semantic(Scope *sc);
1031 Expression *optimize(int result);
1032 Expression *interpret(InterState *istate);
1033 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
1034 elem *toElem(IRState *irs);
1037 // e1[a0,a1,a2,a3,...]
1039 struct ArrayExp : UnaExp
1041 Expressions *arguments; // Array of Expression's
1043 ArrayExp(Loc loc, Expression *e1, Expressions *arguments);
1044 Expression *syntaxCopy();
1045 Expression *semantic(Scope *sc);
1046 Expression *toLvalue(Scope *sc, Expression *e);
1047 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
1048 void scanForNestedRef(Scope *sc);
1050 // For operator overloading
1051 Identifier *opId();
1053 int inlineCost(InlineCostState *ics);
1054 Expression *doInline(InlineDoState *ids);
1055 Expression *inlineScan(InlineScanState *iss);
1058 /****************************************************************/
1060 struct DotExp : BinExp
1062 DotExp(Loc loc, Expression *e1, Expression *e2);
1063 Expression *semantic(Scope *sc);
1066 struct CommaExp : BinExp
1068 CommaExp(Loc loc, Expression *e1, Expression *e2);
1069 Expression *semantic(Scope *sc);
1070 void checkEscape();
1071 Expression *toLvalue(Scope *sc, Expression *e);
1072 Expression *modifiableLvalue(Scope *sc, Expression *e);
1073 int isBool(int result);
1074 int checkSideEffect(int flag);
1075 Expression *optimize(int result);
1076 Expression *interpret(InterState *istate);
1077 elem *toElem(IRState *irs);
1080 struct IndexExp : BinExp
1082 VarDeclaration *lengthVar;
1083 int modifiable;
1085 IndexExp(Loc loc, Expression *e1, Expression *e2);
1086 Expression *semantic(Scope *sc);
1087 Expression *toLvalue(Scope *sc, Expression *e);
1088 Expression *modifiableLvalue(Scope *sc, Expression *e);
1089 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
1090 Expression *optimize(int result);
1091 Expression *interpret(InterState *istate);
1092 Expression *doInline(InlineDoState *ids);
1093 void scanForNestedRef(Scope *sc);
1095 elem *toElem(IRState *irs);
1098 /* For both i++ and i--
1100 struct PostExp : BinExp
1102 PostExp(enum TOK op, Loc loc, Expression *e);
1103 Expression *semantic(Scope *sc);
1104 Expression *interpret(InterState *istate);
1105 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
1106 Identifier *opId(); // For operator overloading
1107 elem *toElem(IRState *irs);
1110 struct AssignExp : BinExp
1111 { int ismemset; // !=0 if setting the contents of an array
1113 AssignExp(Loc loc, Expression *e1, Expression *e2);
1114 Expression *semantic(Scope *sc);
1115 Expression *checkToBoolean();
1116 Expression *interpret(InterState *istate);
1117 Identifier *opId(); // For operator overloading
1118 elem *toElem(IRState *irs);
1121 #define ASSIGNEXP(op) \
1122 struct op##AssignExp : BinExp \
1124 op##AssignExp(Loc loc, Expression *e1, Expression *e2); \
1125 Expression *semantic(Scope *sc); \
1126 Expression *interpret(InterState *istate); \
1128 Identifier *opId(); /* For operator overloading */ \
1130 elem *toElem(IRState *irs); \
1133 ASSIGNEXP(Add)
1134 ASSIGNEXP(Min)
1135 ASSIGNEXP(Cat)
1136 ASSIGNEXP(Mul)
1137 ASSIGNEXP(Div)
1138 ASSIGNEXP(Mod)
1139 ASSIGNEXP(Shl)
1140 ASSIGNEXP(Shr)
1141 ASSIGNEXP(Ushr)
1142 ASSIGNEXP(And)
1143 ASSIGNEXP(Or)
1144 ASSIGNEXP(Xor)
1146 #undef ASSIGNEXP
1148 struct AddExp : BinExp
1150 AddExp(Loc loc, Expression *e1, Expression *e2);
1151 Expression *semantic(Scope *sc);
1152 Expression *optimize(int result);
1153 Expression *interpret(InterState *istate);
1155 // For operator overloading
1156 int isCommutative();
1157 Identifier *opId();
1158 Identifier *opId_r();
1160 elem *toElem(IRState *irs);
1163 struct MinExp : BinExp
1165 MinExp(Loc loc, Expression *e1, Expression *e2);
1166 Expression *semantic(Scope *sc);
1167 Expression *optimize(int result);
1168 Expression *interpret(InterState *istate);
1170 // For operator overloading
1171 Identifier *opId();
1172 Identifier *opId_r();
1174 elem *toElem(IRState *irs);
1177 struct CatExp : BinExp
1179 CatExp(Loc loc, Expression *e1, Expression *e2);
1180 Expression *semantic(Scope *sc);
1181 Expression *optimize(int result);
1182 Expression *interpret(InterState *istate);
1184 // For operator overloading
1185 Identifier *opId();
1186 Identifier *opId_r();
1188 elem *toElem(IRState *irs);
1191 struct MulExp : BinExp
1193 MulExp(Loc loc, Expression *e1, Expression *e2);
1194 Expression *semantic(Scope *sc);
1195 Expression *optimize(int result);
1196 Expression *interpret(InterState *istate);
1198 // For operator overloading
1199 int isCommutative();
1200 Identifier *opId();
1201 Identifier *opId_r();
1203 elem *toElem(IRState *irs);
1206 struct DivExp : BinExp
1208 DivExp(Loc loc, Expression *e1, Expression *e2);
1209 Expression *semantic(Scope *sc);
1210 Expression *optimize(int result);
1211 Expression *interpret(InterState *istate);
1213 // For operator overloading
1214 Identifier *opId();
1215 Identifier *opId_r();
1217 elem *toElem(IRState *irs);
1220 struct ModExp : BinExp
1222 ModExp(Loc loc, Expression *e1, Expression *e2);
1223 Expression *semantic(Scope *sc);
1224 Expression *optimize(int result);
1225 Expression *interpret(InterState *istate);
1227 // For operator overloading
1228 Identifier *opId();
1229 Identifier *opId_r();
1231 elem *toElem(IRState *irs);
1234 struct ShlExp : BinExp
1236 ShlExp(Loc loc, Expression *e1, Expression *e2);
1237 Expression *semantic(Scope *sc);
1238 Expression *optimize(int result);
1239 Expression *interpret(InterState *istate);
1241 // For operator overloading
1242 Identifier *opId();
1243 Identifier *opId_r();
1245 elem *toElem(IRState *irs);
1248 struct ShrExp : BinExp
1250 ShrExp(Loc loc, Expression *e1, Expression *e2);
1251 Expression *semantic(Scope *sc);
1252 Expression *optimize(int result);
1253 Expression *interpret(InterState *istate);
1255 // For operator overloading
1256 Identifier *opId();
1257 Identifier *opId_r();
1259 elem *toElem(IRState *irs);
1262 struct UshrExp : BinExp
1264 UshrExp(Loc loc, Expression *e1, Expression *e2);
1265 Expression *semantic(Scope *sc);
1266 Expression *optimize(int result);
1267 Expression *interpret(InterState *istate);
1269 // For operator overloading
1270 Identifier *opId();
1271 Identifier *opId_r();
1273 elem *toElem(IRState *irs);
1276 struct AndExp : BinExp
1278 AndExp(Loc loc, Expression *e1, Expression *e2);
1279 Expression *semantic(Scope *sc);
1280 Expression *optimize(int result);
1281 Expression *interpret(InterState *istate);
1283 // For operator overloading
1284 int isCommutative();
1285 Identifier *opId();
1286 Identifier *opId_r();
1288 elem *toElem(IRState *irs);
1291 struct OrExp : BinExp
1293 OrExp(Loc loc, Expression *e1, Expression *e2);
1294 Expression *semantic(Scope *sc);
1295 Expression *optimize(int result);
1296 Expression *interpret(InterState *istate);
1298 // For operator overloading
1299 int isCommutative();
1300 Identifier *opId();
1301 Identifier *opId_r();
1303 elem *toElem(IRState *irs);
1306 struct XorExp : BinExp
1308 XorExp(Loc loc, Expression *e1, Expression *e2);
1309 Expression *semantic(Scope *sc);
1310 Expression *optimize(int result);
1311 Expression *interpret(InterState *istate);
1313 // For operator overloading
1314 int isCommutative();
1315 Identifier *opId();
1316 Identifier *opId_r();
1318 elem *toElem(IRState *irs);
1321 struct OrOrExp : BinExp
1323 OrOrExp(Loc loc, Expression *e1, Expression *e2);
1324 Expression *semantic(Scope *sc);
1325 Expression *checkToBoolean();
1326 int isBit();
1327 Expression *optimize(int result);
1328 Expression *interpret(InterState *istate);
1329 int checkSideEffect(int flag);
1330 elem *toElem(IRState *irs);
1333 struct AndAndExp : BinExp
1335 AndAndExp(Loc loc, Expression *e1, Expression *e2);
1336 Expression *semantic(Scope *sc);
1337 Expression *checkToBoolean();
1338 int isBit();
1339 Expression *optimize(int result);
1340 Expression *interpret(InterState *istate);
1341 int checkSideEffect(int flag);
1342 elem *toElem(IRState *irs);
1345 struct CmpExp : BinExp
1347 CmpExp(enum TOK op, Loc loc, Expression *e1, Expression *e2);
1348 Expression *semantic(Scope *sc);
1349 Expression *optimize(int result);
1350 Expression *interpret(InterState *istate);
1351 int isBit();
1353 // For operator overloading
1354 int isCommutative();
1355 Identifier *opId();
1357 elem *toElem(IRState *irs);
1360 struct InExp : BinExp
1362 InExp(Loc loc, Expression *e1, Expression *e2);
1363 Expression *semantic(Scope *sc);
1364 int isBit();
1366 // For operator overloading
1367 Identifier *opId();
1368 Identifier *opId_r();
1370 elem *toElem(IRState *irs);
1373 struct RemoveExp : BinExp
1375 RemoveExp(Loc loc, Expression *e1, Expression *e2);
1376 elem *toElem(IRState *irs);
1379 // == and !=
1381 struct EqualExp : BinExp
1383 EqualExp(enum TOK op, Loc loc, Expression *e1, Expression *e2);
1384 Expression *semantic(Scope *sc);
1385 Expression *optimize(int result);
1386 Expression *interpret(InterState *istate);
1387 int isBit();
1389 // For operator overloading
1390 int isCommutative();
1391 Identifier *opId();
1393 elem *toElem(IRState *irs);
1396 // === and !===
1398 struct IdentityExp : BinExp
1400 IdentityExp(enum TOK op, Loc loc, Expression *e1, Expression *e2);
1401 Expression *semantic(Scope *sc);
1402 int isBit();
1403 Expression *optimize(int result);
1404 Expression *interpret(InterState *istate);
1405 elem *toElem(IRState *irs);
1408 /****************************************************************/
1410 struct CondExp : BinExp
1412 Expression *econd;
1414 CondExp(Loc loc, Expression *econd, Expression *e1, Expression *e2);
1415 Expression *syntaxCopy();
1416 Expression *semantic(Scope *sc);
1417 Expression *optimize(int result);
1418 Expression *interpret(InterState *istate);
1419 void checkEscape();
1420 Expression *toLvalue(Scope *sc, Expression *e);
1421 Expression *modifiableLvalue(Scope *sc, Expression *e);
1422 Expression *checkToBoolean();
1423 int checkSideEffect(int flag);
1424 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
1425 MATCH implicitConvTo(Type *t);
1426 Expression *castTo(Scope *sc, Type *t);
1427 void scanForNestedRef(Scope *sc);
1428 int canThrow();
1430 int inlineCost(InlineCostState *ics);
1431 Expression *doInline(InlineDoState *ids);
1432 Expression *inlineScan(InlineScanState *iss);
1434 elem *toElem(IRState *irs);
1438 /****************************************************************/
1440 struct DefaultInitExp : Expression
1442 enum TOK subop; // which of the derived classes this is
1444 DefaultInitExp(Loc loc, enum TOK subop, int size);
1445 virtual Expression *resolve(Loc loc, Scope *sc) = 0;
1446 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
1449 struct FileInitExp : DefaultInitExp
1451 FileInitExp(Loc loc);
1452 Expression *semantic(Scope *sc);
1453 Expression *resolve(Loc loc, Scope *sc);
1456 struct LineInitExp : DefaultInitExp
1458 LineInitExp(Loc loc);
1459 Expression *semantic(Scope *sc);
1460 Expression *resolve(Loc loc, Scope *sc);
1463 /****************************************************************/
1465 /* Special values used by the interpreter
1467 #define EXP_CANT_INTERPRET ((Expression *)1)
1468 #define EXP_CONTINUE_INTERPRET ((Expression *)2)
1469 #define EXP_BREAK_INTERPRET ((Expression *)3)
1470 #define EXP_GOTO_INTERPRET ((Expression *)4)
1471 #define EXP_VOID_INTERPRET ((Expression *)5)
1473 Expression *expType(Type *type, Expression *e);
1475 Expression *Neg(Type *type, Expression *e1);
1476 Expression *Com(Type *type, Expression *e1);
1477 Expression *Not(Type *type, Expression *e1);
1478 Expression *Bool(Type *type, Expression *e1);
1479 Expression *Cast(Type *type, Type *to, Expression *e1);
1480 Expression *ArrayLength(Type *type, Expression *e1);
1481 Expression *Ptr(Type *type, Expression *e1);
1483 Expression *Add(Type *type, Expression *e1, Expression *e2);
1484 Expression *Min(Type *type, Expression *e1, Expression *e2);
1485 Expression *Mul(Type *type, Expression *e1, Expression *e2);
1486 Expression *Div(Type *type, Expression *e1, Expression *e2);
1487 Expression *Mod(Type *type, Expression *e1, Expression *e2);
1488 Expression *Shl(Type *type, Expression *e1, Expression *e2);
1489 Expression *Shr(Type *type, Expression *e1, Expression *e2);
1490 Expression *Ushr(Type *type, Expression *e1, Expression *e2);
1491 Expression *And(Type *type, Expression *e1, Expression *e2);
1492 Expression *Or(Type *type, Expression *e1, Expression *e2);
1493 Expression *Xor(Type *type, Expression *e1, Expression *e2);
1494 Expression *Index(Type *type, Expression *e1, Expression *e2);
1495 Expression *Cat(Type *type, Expression *e1, Expression *e2);
1497 Expression *Equal(enum TOK op, Type *type, Expression *e1, Expression *e2);
1498 Expression *Cmp(enum TOK op, Type *type, Expression *e1, Expression *e2);
1499 Expression *Identity(enum TOK op, Type *type, Expression *e1, Expression *e2);
1501 Expression *Slice(Type *type, Expression *e1, Expression *lwr, Expression *upr);
1503 #endif /* DMD_EXPRESSION_H */