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 #include <link.h> | 6 #include <link.h> |
7 | 7 |
8 #undef OAPPEND | 8 #undef OAPPEND |
9 | 9 |
10 // avoid <ctype.h> | 10 // avoid <ctype.h> |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 NodeList* end; | 374 NodeList* end; |
375 }; | 375 }; |
376 | 376 |
377 enum | 377 enum |
378 { | 378 { |
379 SymExport = 1<<0, // to be exported | 379 SymExport = 1<<0, // to be exported |
380 SymPackage = 1<<1, | 380 SymPackage = 1<<1, |
381 SymExported = 1<<2, // already written out by export | 381 SymExported = 1<<2, // already written out by export |
382 SymUniq = 1<<3, | 382 SymUniq = 1<<3, |
383 SymSiggen = 1<<4, | 383 SymSiggen = 1<<4, |
384 SymGcgen = 1<<5, | |
385 }; | 384 }; |
386 | 385 |
387 struct Sym | 386 struct Sym |
388 { | 387 { |
389 ushort lexical; | 388 ushort lexical; |
390 uchar flags; | 389 uchar flags; |
391 uchar sym; // huffman encoding in object file | 390 uchar sym; // huffman encoding in object file |
392 Sym* link; | 391 Sym* link; |
393 int32 npkg; // number of imported packages with this name | 392 int32 npkg; // number of imported packages with this name |
394 uint32 uniqgen; | 393 uint32 uniqgen; |
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1010 | 1009 |
1011 /* | 1010 /* |
1012 * array.c | 1011 * array.c |
1013 */ | 1012 */ |
1014 Array* arraynew(int32 capacity, int32 size); | 1013 Array* arraynew(int32 capacity, int32 size); |
1015 void arrayfree(Array *array); | 1014 void arrayfree(Array *array); |
1016 int32 arraylength(Array *array); | 1015 int32 arraylength(Array *array); |
1017 void* arrayget(Array *array, int32 index); | 1016 void* arrayget(Array *array, int32 index); |
1018 void arrayset(Array *array, int32 index, void *element); | 1017 void arrayset(Array *array, int32 index, void *element); |
1019 void arrayadd(Array *array, void *element); | 1018 void arrayadd(Array *array, void *element); |
1020 int32 arrayindexof(Array* array, void *element); | |
1021 void arraysort(Array* array, int (*cmp)(const void*, const void*)); | 1019 void arraysort(Array* array, int (*cmp)(const void*, const void*)); |
1022 | 1020 |
1023 /* | 1021 /* |
1024 * bits.c | 1022 * bits.c |
1025 */ | 1023 */ |
1026 int Qconv(Fmt *fp); | 1024 int Qconv(Fmt *fp); |
1027 Bits band(Bits a, Bits b); | 1025 Bits band(Bits a, Bits b); |
1028 int bany(Bits *a); | 1026 int bany(Bits *a); |
1029 int beq(Bits a, Bits b); | 1027 int beq(Bits a, Bits b); |
1030 int bitno(int32 b); | 1028 int bitno(int32 b); |
1031 Bits blsh(uint n); | 1029 Bits blsh(uint n); |
1032 Bits bnot(Bits a); | 1030 Bits bnot(Bits a); |
1033 int bnum(Bits a); | 1031 int bnum(Bits a); |
1034 Bits bor(Bits a, Bits b); | 1032 Bits bor(Bits a, Bits b); |
1035 int bset(Bits a, uint n); | 1033 int bset(Bits a, uint n); |
1036 | 1034 |
1037 /* | 1035 /* |
1038 * bv.c | 1036 * bv.c |
1039 */ | 1037 */ |
1040 Bvec* bvalloc(int32 n); | 1038 Bvec* bvalloc(int32 n); |
1041 void bvandnot(Bvec *dst, Bvec *src1, Bvec *src2); | 1039 void bvandnot(Bvec *dst, Bvec *src1, Bvec *src2); |
1042 int bvcmp(Bvec *bv1, Bvec *bv2); | 1040 int bvcmp(Bvec *bv1, Bvec *bv2); |
1043 void bvcopy(Bvec *dst, Bvec *src); | 1041 void bvcopy(Bvec *dst, Bvec *src); |
1044 Bvec* bvconcat(Bvec *src1, Bvec *src2); | 1042 Bvec* bvconcat(Bvec *src1, Bvec *src2); |
1045 int bvget(Bvec *bv, int32 i); | 1043 int bvget(Bvec *bv, int32 i); |
| 1044 int32 bvnext(Bvec *bv, int32 i); |
1046 int bvisempty(Bvec *bv); | 1045 int bvisempty(Bvec *bv); |
1047 void bvnot(Bvec *bv); | 1046 void bvnot(Bvec *bv); |
1048 void bvor(Bvec *dst, Bvec *src1, Bvec *src2); | 1047 void bvor(Bvec *dst, Bvec *src1, Bvec *src2); |
1049 void bvand(Bvec *dst, Bvec *src1, Bvec *src2); | 1048 void bvand(Bvec *dst, Bvec *src1, Bvec *src2); |
1050 void bvprint(Bvec *bv); | 1049 void bvprint(Bvec *bv); |
1051 void bvreset(Bvec *bv, int32 i); | 1050 void bvreset(Bvec *bv, int32 i); |
1052 void bvresetall(Bvec *bv); | 1051 void bvresetall(Bvec *bv); |
1053 void bvset(Bvec *bv, int32 i); | 1052 void bvset(Bvec *bv, int32 i); |
1054 | 1053 |
1055 /* | 1054 /* |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1162 | 1161 |
1163 /* | 1162 /* |
1164 * gen.c | 1163 * gen.c |
1165 */ | 1164 */ |
1166 void addrescapes(Node *n); | 1165 void addrescapes(Node *n); |
1167 void cgen_as(Node *nl, Node *nr); | 1166 void cgen_as(Node *nl, Node *nr); |
1168 void cgen_callmeth(Node *n, int proc); | 1167 void cgen_callmeth(Node *n, int proc); |
1169 void cgen_eface(Node* n, Node* res); | 1168 void cgen_eface(Node* n, Node* res); |
1170 void cgen_slice(Node* n, Node* res); | 1169 void cgen_slice(Node* n, Node* res); |
1171 void clearlabels(void); | 1170 void clearlabels(void); |
| 1171 void clearslim(Node*); |
1172 void checklabels(void); | 1172 void checklabels(void); |
1173 int dotoffset(Node *n, int64 *oary, Node **nn); | 1173 int dotoffset(Node *n, int64 *oary, Node **nn); |
1174 void gen(Node *n); | 1174 void gen(Node *n); |
1175 void genlist(NodeList *l); | 1175 void genlist(NodeList *l); |
1176 Node* sysfunc(char *name); | 1176 Node* sysfunc(char *name); |
1177 void tempname(Node *n, Type *t); | 1177 void tempname(Node *n, Type *t); |
1178 Node* temp(Type*); | 1178 Node* temp(Type*); |
1179 | 1179 |
1180 /* | 1180 /* |
1181 * init.c | 1181 * init.c |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1356 Type** getoutarg(Type *t); | 1356 Type** getoutarg(Type *t); |
1357 Type* getoutargx(Type *t); | 1357 Type* getoutargx(Type *t); |
1358 Type** getthis(Type *t); | 1358 Type** getthis(Type *t); |
1359 Type* getthisx(Type *t); | 1359 Type* getthisx(Type *t); |
1360 int implements(Type *t, Type *iface, Type **missing, Type **have, int *ptr); | 1360 int implements(Type *t, Type *iface, Type **missing, Type **have, int *ptr); |
1361 void importdot(Pkg *opkg, Node *pack); | 1361 void importdot(Pkg *opkg, Node *pack); |
1362 int is64(Type *t); | 1362 int is64(Type *t); |
1363 int isbadimport(Strlit *s); | 1363 int isbadimport(Strlit *s); |
1364 int isblank(Node *n); | 1364 int isblank(Node *n); |
1365 int isblanksym(Sym *s); | 1365 int isblanksym(Sym *s); |
| 1366 int isdirectiface(Type*); |
1366 int isfixedarray(Type *t); | 1367 int isfixedarray(Type *t); |
1367 int isideal(Type *t); | 1368 int isideal(Type *t); |
1368 int isinter(Type *t); | 1369 int isinter(Type *t); |
1369 int isnil(Node *n); | 1370 int isnil(Node *n); |
1370 int isnilinter(Type *t); | 1371 int isnilinter(Type *t); |
1371 int isptrto(Type *t, int et); | 1372 int isptrto(Type *t, int et); |
1372 int isslice(Type *t); | 1373 int isslice(Type *t); |
1373 int istype(Type *t, int et); | 1374 int istype(Type *t, int et); |
1374 void linehist(char *file, int32 off, int relative); | 1375 void linehist(char *file, int32 off, int relative); |
1375 NodeList* list(NodeList *l, Node *n); | 1376 NodeList* list(NodeList *l, Node *n); |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1498 int dgostrlitptr(Sym*, int off, Strlit*); | 1499 int dgostrlitptr(Sym*, int off, Strlit*); |
1499 int dstringptr(Sym *s, int off, char *str); | 1500 int dstringptr(Sym *s, int off, char *str); |
1500 int dsymptr(Sym *s, int off, Sym *x, int xoff); | 1501 int dsymptr(Sym *s, int off, Sym *x, int xoff); |
1501 int duintxx(Sym *s, int off, uint64 v, int wid); | 1502 int duintxx(Sym *s, int off, uint64 v, int wid); |
1502 void dumpdata(void); | 1503 void dumpdata(void); |
1503 void fixautoused(Prog*); | 1504 void fixautoused(Prog*); |
1504 void gdata(Node*, Node*, int); | 1505 void gdata(Node*, Node*, int); |
1505 void gdatacomplex(Node*, Mpcplx*); | 1506 void gdatacomplex(Node*, Mpcplx*); |
1506 void gdatastring(Node*, Strlit*); | 1507 void gdatastring(Node*, Strlit*); |
1507 void ggloblnod(Node *nam); | 1508 void ggloblnod(Node *nam); |
1508 void» ggloblsym(Sym *s, int32 width, int dupok, int rodata); | 1509 void» ggloblsym(Sym *s, int32 width, int8 flags); |
1509 void gvardef(Node*); | 1510 void gvardef(Node*); |
1510 void gvarkill(Node*); | 1511 void gvarkill(Node*); |
1511 Prog* gjmp(Prog*); | 1512 Prog* gjmp(Prog*); |
1512 void gused(Node*); | 1513 void gused(Node*); |
1513 void movelarge(NodeList*); | 1514 void movelarge(NodeList*); |
1514 int isfat(Type*); | 1515 int isfat(Type*); |
1515 void linkarchinit(void); | 1516 void linkarchinit(void); |
1516 void liveness(Node*, Prog*, Sym*, Sym*); | 1517 void liveness(Node*, Prog*, Sym*, Sym*); |
| 1518 void twobitwalktype1(Type*, vlong*, Bvec*); |
1517 void markautoused(Prog*); | 1519 void markautoused(Prog*); |
1518 Plist* newplist(void); | 1520 Plist* newplist(void); |
1519 Node* nodarg(Type*, int); | 1521 Node* nodarg(Type*, int); |
1520 void nopout(Prog*); | 1522 void nopout(Prog*); |
1521 void patch(Prog*, Prog*); | 1523 void patch(Prog*, Prog*); |
1522 Prog* unpatch(Prog*); | 1524 Prog* unpatch(Prog*); |
1523 | 1525 |
1524 #pragma varargck type "B" Mpint* | 1526 #pragma varargck type "B" Mpint* |
1525 #pragma varargck type "E" int | 1527 #pragma varargck type "E" int |
1526 #pragma varargck type "E" uint | 1528 #pragma varargck type "E" uint |
(...skipping 11 matching lines...) Expand all Loading... |
1538 #pragma varargck type "lS" LSym* | 1540 #pragma varargck type "lS" LSym* |
1539 #pragma varargck type "T" Type* | 1541 #pragma varargck type "T" Type* |
1540 #pragma varargck type "lT" Type* | 1542 #pragma varargck type "lT" Type* |
1541 #pragma varargck type "V" Val* | 1543 #pragma varargck type "V" Val* |
1542 #pragma varargck type "Z" Strlit* | 1544 #pragma varargck type "Z" Strlit* |
1543 | 1545 |
1544 /* | 1546 /* |
1545 * racewalk.c | 1547 * racewalk.c |
1546 */ | 1548 */ |
1547 void racewalk(Node *fn); | 1549 void racewalk(Node *fn); |
LEFT | RIGHT |