LEFT | RIGHT |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 #include <bio.h> | 5 #include <bio.h> |
6 | 6 |
7 #undef OAPPEND | 7 #undef OAPPEND |
8 | 8 |
9 // avoid <ctype.h> | 9 // avoid <ctype.h> |
10 #undef isblank | 10 #undef isblank |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 171 |
172 // most nodes | 172 // most nodes |
173 Type* type; // actual type for TFIELD, element type for TARR
AY, TCHAN, TMAP, TPTRxx | 173 Type* type; // actual type for TFIELD, element type for TARR
AY, TCHAN, TMAP, TPTRxx |
174 vlong width; // offset in TFIELD, width in all others | 174 vlong width; // offset in TFIELD, width in all others |
175 | 175 |
176 // TFIELD | 176 // TFIELD |
177 Type* down; // next struct field, also key type in TMAP | 177 Type* down; // next struct field, also key type in TMAP |
178 Strlit* note; // literal string annotation | 178 Strlit* note; // literal string annotation |
179 | 179 |
180 // TARRAY | 180 // TARRAY |
181 » int32» bound;» » // negative is dynamic array | 181 » vlong» bound;» » // negative is dynamic array |
182 | 182 |
183 int32 maplineno; // first use of TFORW as map key | 183 int32 maplineno; // first use of TFORW as map key |
184 int32 embedlineno; // first use of TFORW as embedded type | 184 int32 embedlineno; // first use of TFORW as embedded type |
185 ········ | 185 ········ |
186 // for TFORW, where to copy the eventual value to | 186 // for TFORW, where to copy the eventual value to |
187 NodeList *copyto; | 187 NodeList *copyto; |
188 }; | 188 }; |
189 #define T ((Type*)0) | 189 #define T ((Type*)0) |
190 | 190 |
191 typedef struct InitEntry InitEntry; | 191 typedef struct InitEntry InitEntry; |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 Node* inlvar; | 299 Node* inlvar; |
300 | 300 |
301 // OPACK | 301 // OPACK |
302 Pkg* pkg; | 302 Pkg* pkg; |
303 ········ | 303 ········ |
304 // OARRAYLIT, OMAPLIT, OSTRUCTLIT. | 304 // OARRAYLIT, OMAPLIT, OSTRUCTLIT. |
305 InitPlan* initplan; | 305 InitPlan* initplan; |
306 | 306 |
307 // Escape analysis. | 307 // Escape analysis. |
308 NodeList* escflowsrc; // flow(this, src) | 308 NodeList* escflowsrc; // flow(this, src) |
309 » NodeList* escretval;» // on OCALLxxx, list of return values | 309 » NodeList* escretval;» // on OCALLxxx, list of dummy return values |
310 int escloopdepth; // -1: global, 0: return variables, 1:function t
op level, increased inside function for every loop or label to mark scopes | 310 int escloopdepth; // -1: global, 0: return variables, 1:function t
op level, increased inside function for every loop or label to mark scopes |
311 | 311 |
312 Sym* sym; // various | 312 Sym* sym; // various |
313 int32 vargen; // unique name for OTYPE/ONAME | 313 int32 vargen; // unique name for OTYPE/ONAME |
314 int32 lineno; | 314 int32 lineno; |
315 int32 endlineno; | 315 int32 endlineno; |
316 vlong xoffset; | 316 vlong xoffset; |
317 int32 stkdelta; // offset added by stack frame compaction phase. | 317 int32 stkdelta; // offset added by stack frame compaction phase. |
318 int32 ostk; | 318 int32 ostk; |
319 int32 iota; | 319 int32 iota; |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
974 void convconst(Node *con, Type *t, Val *val); | 974 void convconst(Node *con, Type *t, Val *val); |
975 void convlit(Node **np, Type *t); | 975 void convlit(Node **np, Type *t); |
976 void convlit1(Node **np, Type *t, int explicit); | 976 void convlit1(Node **np, Type *t, int explicit); |
977 void defaultlit(Node **np, Type *t); | 977 void defaultlit(Node **np, Type *t); |
978 void defaultlit2(Node **lp, Node **rp, int force); | 978 void defaultlit2(Node **lp, Node **rp, int force); |
979 void evconst(Node *n); | 979 void evconst(Node *n); |
980 int isconst(Node *n, int ct); | 980 int isconst(Node *n, int ct); |
981 Node* nodcplxlit(Val r, Val i); | 981 Node* nodcplxlit(Val r, Val i); |
982 Node* nodlit(Val v); | 982 Node* nodlit(Val v); |
983 long nonnegconst(Node *n); | 983 long nonnegconst(Node *n); |
| 984 int doesoverflow(Val v, Type *t); |
984 void overflow(Val v, Type *t); | 985 void overflow(Val v, Type *t); |
985 int smallintconst(Node *n); | 986 int smallintconst(Node *n); |
986 Val toint(Val v); | 987 Val toint(Val v); |
987 Mpflt* truncfltlit(Mpflt *oldv, Type *t); | 988 Mpflt* truncfltlit(Mpflt *oldv, Type *t); |
988 | 989 |
989 /* | 990 /* |
990 * cplx.c | 991 * cplx.c |
991 */ | 992 */ |
992 void complexadd(int op, Node *nl, Node *nr, Node *res); | 993 void complexadd(int op, Node *nl, Node *nr, Node *res); |
993 void complexbool(int op, Node *nl, Node *nr, int true, int likely, Prog *to); | 994 void complexbool(int op, Node *nl, Node *nr, int true, int likely, Prog *to); |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1445 #pragma varargck type "T" Type* | 1446 #pragma varargck type "T" Type* |
1446 #pragma varargck type "lT" Type* | 1447 #pragma varargck type "lT" Type* |
1447 #pragma varargck type "V" Val* | 1448 #pragma varargck type "V" Val* |
1448 #pragma varargck type "Y" char* | 1449 #pragma varargck type "Y" char* |
1449 #pragma varargck type "Z" Strlit* | 1450 #pragma varargck type "Z" Strlit* |
1450 | 1451 |
1451 /* | 1452 /* |
1452 * racewalk.c | 1453 * racewalk.c |
1453 */ | 1454 */ |
1454 void racewalk(Node *fn); | 1455 void racewalk(Node *fn); |
LEFT | RIGHT |