0
|
1 module dmd.StructLiteralExp;
|
|
2
|
|
3 import dmd.Expression;
|
|
4 import dmd.StructDeclaration;
|
|
5 import dmd.backend.elem;
|
|
6 import dmd.InterState;
|
|
7 import dmd.MATCH;
|
|
8 import dmd.Type;
|
|
9 import dmd.OutBuffer;
|
|
10 import dmd.Loc;
|
|
11 import dmd.Scope;
|
|
12 import dmd.InlineCostState;
|
|
13 import dmd.IRState;
|
|
14 import dmd.InlineDoState;
|
|
15 import dmd.backend.Symbol;
|
|
16 import dmd.HdrGenState;
|
|
17 import dmd.backend.dt_t;
|
|
18 import dmd.InlineScanState;
|
|
19 import dmd.ArrayTypes;
|
|
20 import dmd.TOK;
|
|
21
|
|
22
|
|
23 class StructLiteralExp : Expression
|
|
24 {
|
|
25 StructDeclaration sd; // which aggregate this is for
|
|
26 Expressions elements; // parallels sd->fields[] with
|
|
27 // NULL entries for fields to skip
|
|
28
|
|
29 Symbol* sym; // back end symbol to initialize with literal
|
|
30 size_t soffset; // offset from start of s
|
|
31 int fillHoles; // fill alignment 'holes' with zero
|
|
32
|
|
33 this(Loc loc, StructDeclaration sd, Expressions elements)
|
|
34 {
|
|
35 assert(false);
|
|
36 super(loc, TOK.init, 0);
|
|
37 }
|
|
38
|
|
39 Expression syntaxCopy()
|
|
40 {
|
|
41 assert(false);
|
|
42 }
|
|
43
|
|
44 Expression semantic(Scope sc)
|
|
45 {
|
|
46 assert(false);
|
|
47 }
|
|
48
|
|
49 Expression getField(Type type, uint offset)
|
|
50 {
|
|
51 assert(false);
|
|
52 }
|
|
53
|
|
54 int getFieldIndex(Type type, uint offset)
|
|
55 {
|
|
56 assert(false);
|
|
57 }
|
|
58
|
|
59 elem* toElem(IRState* irs)
|
|
60 {
|
|
61 assert(false);
|
|
62 }
|
|
63
|
|
64 bool checkSideEffect(int flag)
|
|
65 {
|
|
66 assert(false);
|
|
67 }
|
|
68
|
|
69 void toCBuffer(OutBuffer buf, HdrGenState* hgs)
|
|
70 {
|
|
71 assert(false);
|
|
72 }
|
|
73
|
|
74 void toMangleBuffer(OutBuffer buf)
|
|
75 {
|
|
76 assert(false);
|
|
77 }
|
|
78
|
|
79 void scanForNestedRef(Scope sc)
|
|
80 {
|
|
81 assert(false);
|
|
82 }
|
|
83
|
|
84 Expression optimize(int result)
|
|
85 {
|
|
86 assert(false);
|
|
87 }
|
|
88
|
|
89 Expression interpret(InterState* istate)
|
|
90 {
|
|
91 assert(false);
|
|
92 }
|
|
93
|
|
94 dt_t** toDt(dt_t** pdt)
|
|
95 {
|
|
96 assert(false);
|
|
97 }
|
|
98
|
|
99 int isLvalue()
|
|
100 {
|
|
101 assert(false);
|
|
102 }
|
|
103
|
|
104 Expression toLvalue(Scope sc, Expression e)
|
|
105 {
|
|
106 assert(false);
|
|
107 }
|
|
108
|
|
109 bool canThrow()
|
|
110 {
|
|
111 assert(false);
|
|
112 }
|
|
113
|
|
114 MATCH implicitConvTo(Type t)
|
|
115 {
|
|
116 assert(false);
|
|
117 }
|
|
118
|
|
119 int inlineCost(InlineCostState* ics)
|
|
120 {
|
|
121 assert(false);
|
|
122 }
|
|
123
|
|
124 Expression doInline(InlineDoState ids)
|
|
125 {
|
|
126 assert(false);
|
|
127 }
|
|
128
|
|
129 Expression inlineScan(InlineScanState* iss)
|
|
130 {
|
|
131 assert(false);
|
|
132 }
|
|
133 }
|
|
134
|