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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 | 402 |
403 EXTERN Sym* dclstack; | 403 EXTERN Sym* dclstack; |
404 | 404 |
405 struct Pkg | 405 struct Pkg |
406 { | 406 { |
407 char* name; // package name | 407 char* name; // package name |
408 Strlit* path; // string literal used in import statement | 408 Strlit* path; // string literal used in import statement |
409 Sym* pathsym; | 409 Sym* pathsym; |
410 char* prefix; // escaped path for use in symbol table | 410 char* prefix; // escaped path for use in symbol table |
411 Pkg* link; | 411 Pkg* link; |
| 412 uchar imported; // export data of this package was parsed |
412 char exported; // import line written in export data | 413 char exported; // import line written in export data |
413 char direct; // imported directly | 414 char direct; // imported directly |
414 }; | 415 }; |
415 | 416 |
416 typedef struct Iter Iter; | 417 typedef struct Iter Iter; |
417 struct Iter | 418 struct Iter |
418 { | 419 { |
419 int done; | 420 int done; |
420 Type* tfunc; | 421 Type* tfunc; |
421 Type* t; | 422 Type* t; |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 EXTERN char* infile; | 855 EXTERN char* infile; |
855 EXTERN char* outfile; | 856 EXTERN char* outfile; |
856 EXTERN Biobuf* bout; | 857 EXTERN Biobuf* bout; |
857 EXTERN int nerrors; | 858 EXTERN int nerrors; |
858 EXTERN int nsavederrors; | 859 EXTERN int nsavederrors; |
859 EXTERN int nsyntaxerrors; | 860 EXTERN int nsyntaxerrors; |
860 EXTERN int safemode; | 861 EXTERN int safemode; |
861 EXTERN char namebuf[NSYMB]; | 862 EXTERN char namebuf[NSYMB]; |
862 EXTERN char lexbuf[NSYMB]; | 863 EXTERN char lexbuf[NSYMB]; |
863 EXTERN char litbuf[NSYMB]; | 864 EXTERN char litbuf[NSYMB]; |
864 EXTERN» char» debug[256]; | 865 EXTERN» int» debug[256]; |
865 EXTERN Sym* hash[NHASH]; | 866 EXTERN Sym* hash[NHASH]; |
866 EXTERN Sym* importmyname; // my name for package | 867 EXTERN Sym* importmyname; // my name for package |
867 EXTERN Pkg* localpkg; // package being compiled | 868 EXTERN Pkg* localpkg; // package being compiled |
868 EXTERN Pkg* importpkg; // package being imported | 869 EXTERN Pkg* importpkg; // package being imported |
869 EXTERN Pkg* structpkg; // package that declared struct, during import | 870 EXTERN Pkg* structpkg; // package that declared struct, during import |
870 EXTERN Pkg* builtinpkg; // fake package for builtins | 871 EXTERN Pkg* builtinpkg; // fake package for builtins |
871 EXTERN Pkg* gostringpkg; // fake pkg for Go strings | 872 EXTERN Pkg* gostringpkg; // fake pkg for Go strings |
872 EXTERN Pkg* itabpkg; // fake pkg for itab cache | 873 EXTERN Pkg* itabpkg; // fake pkg for itab cache |
873 EXTERN Pkg* runtimepkg; // package runtime | 874 EXTERN Pkg* runtimepkg; // package runtime |
874 EXTERN Pkg* racepkg; // package runtime/race | 875 EXTERN Pkg* racepkg; // package runtime/race |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
941 EXTERN Node* curfn; | 942 EXTERN Node* curfn; |
942 | 943 |
943 EXTERN int widthptr; | 944 EXTERN int widthptr; |
944 EXTERN int widthint; | 945 EXTERN int widthint; |
945 | 946 |
946 EXTERN Node* typesw; | 947 EXTERN Node* typesw; |
947 EXTERN Node* nblank; | 948 EXTERN Node* nblank; |
948 | 949 |
949 extern int thechar; | 950 extern int thechar; |
950 extern char* thestring; | 951 extern char* thestring; |
| 952 EXTERN int use_sse; |
951 | 953 |
952 EXTERN char* hunk; | 954 EXTERN char* hunk; |
953 EXTERN int32 nhunk; | 955 EXTERN int32 nhunk; |
954 EXTERN int32 thunk; | 956 EXTERN int32 thunk; |
955 | 957 |
956 EXTERN int funcdepth; | 958 EXTERN int funcdepth; |
957 EXTERN int typecheckok; | 959 EXTERN int typecheckok; |
958 EXTERN int compiling_runtime; | 960 EXTERN int compiling_runtime; |
959 EXTERN int compiling_wrappers; | 961 EXTERN int compiling_wrappers; |
| 962 EXTERN int pure_go; |
| 963 EXTERN int flag_race; |
960 | 964 |
961 EXTERN int nointerface; | 965 EXTERN int nointerface; |
962 EXTERN int fieldtrack_enabled; | 966 EXTERN int fieldtrack_enabled; |
963 | 967 |
964 /* | 968 /* |
965 * y.tab.c | 969 * y.tab.c |
966 */ | 970 */ |
967 int yyparse(void); | 971 int yyparse(void); |
968 | 972 |
969 /* | 973 /* |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1228 void typecheckrange(Node *n); | 1232 void typecheckrange(Node *n); |
1229 void walkrange(Node *n); | 1233 void walkrange(Node *n); |
1230 | 1234 |
1231 /* | 1235 /* |
1232 * reflect.c | 1236 * reflect.c |
1233 */ | 1237 */ |
1234 void dumptypestructs(void); | 1238 void dumptypestructs(void); |
1235 Type* methodfunc(Type *f, Type*); | 1239 Type* methodfunc(Type *f, Type*); |
1236 Node* typename(Type *t); | 1240 Node* typename(Type *t); |
1237 Sym* typesym(Type *t); | 1241 Sym* typesym(Type *t); |
| 1242 Sym* typenamesym(Type *t); |
1238 Sym* tracksym(Type *t); | 1243 Sym* tracksym(Type *t); |
1239 Sym* typesymprefix(char *prefix, Type *t); | 1244 Sym* typesymprefix(char *prefix, Type *t); |
1240 int haspointers(Type *t); | 1245 int haspointers(Type *t); |
1241 void usefield(Node*); | 1246 void usefield(Node*); |
1242 | 1247 |
1243 /* | 1248 /* |
1244 * select.c | 1249 * select.c |
1245 */ | 1250 */ |
1246 void typecheckselect(Node *sel); | 1251 void typecheckselect(Node *sel); |
1247 void walkselect(Node *sel); | 1252 void walkselect(Node *sel); |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1392 Node* mkcall(char *name, Type *t, NodeList **init, ...); | 1397 Node* mkcall(char *name, Type *t, NodeList **init, ...); |
1393 Node* mkcall1(Node *fn, Type *t, NodeList **init, ...); | 1398 Node* mkcall1(Node *fn, Type *t, NodeList **init, ...); |
1394 int vmatch1(Node *l, Node *r); | 1399 int vmatch1(Node *l, Node *r); |
1395 void walk(Node *fn); | 1400 void walk(Node *fn); |
1396 void walkexpr(Node **np, NodeList **init); | 1401 void walkexpr(Node **np, NodeList **init); |
1397 void walkexprlist(NodeList *l, NodeList **init); | 1402 void walkexprlist(NodeList *l, NodeList **init); |
1398 void walkexprlistsafe(NodeList *l, NodeList **init); | 1403 void walkexprlistsafe(NodeList *l, NodeList **init); |
1399 void walkstmt(Node **np); | 1404 void walkstmt(Node **np); |
1400 void walkstmtlist(NodeList *l); | 1405 void walkstmtlist(NodeList *l); |
1401 Node* conv(Node*, Type*); | 1406 Node* conv(Node*, Type*); |
| 1407 int candiscard(Node*); |
1402 | 1408 |
1403 /* | 1409 /* |
1404 * arch-specific ggen.c/gsubr.c/gobj.c/pgen.c | 1410 * arch-specific ggen.c/gsubr.c/gobj.c/pgen.c |
1405 */ | 1411 */ |
1406 #define P ((Prog*)0) | 1412 #define P ((Prog*)0) |
1407 | 1413 |
1408 typedef struct Plist Plist; | 1414 typedef struct Plist Plist; |
1409 struct Plist | 1415 struct Plist |
1410 { | 1416 { |
1411 Node* name; | 1417 Node* name; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1488 #pragma varargck type "T" Type* | 1494 #pragma varargck type "T" Type* |
1489 #pragma varargck type "lT" Type* | 1495 #pragma varargck type "lT" Type* |
1490 #pragma varargck type "V" Val* | 1496 #pragma varargck type "V" Val* |
1491 #pragma varargck type "Y" char* | 1497 #pragma varargck type "Y" char* |
1492 #pragma varargck type "Z" Strlit* | 1498 #pragma varargck type "Z" Strlit* |
1493 | 1499 |
1494 /* | 1500 /* |
1495 * racewalk.c | 1501 * racewalk.c |
1496 */ | 1502 */ |
1497 void racewalk(Node *fn); | 1503 void racewalk(Node *fn); |
LEFT | RIGHT |