LEFT | RIGHT |
(no file at all) | |
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 "go.h" | 5 #include "go.h" |
6 | 6 |
7 /* | 7 /* |
8 * runtime interface and reflection data structures | 8 * runtime interface and reflection data structures |
9 */ | 9 */ |
10 | 10 |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 fatal("typestruct %lT", t); | 521 fatal("typestruct %lT", t); |
522 return nil; // silence gcc | 522 return nil; // silence gcc |
523 } | 523 } |
524 | 524 |
525 if(isslice(t)) | 525 if(isslice(t)) |
526 name = "*runtime.SliceType"; | 526 name = "*runtime.SliceType"; |
527 | 527 |
528 return pkglookup(name, typepkg); | 528 return pkglookup(name, typepkg); |
529 } | 529 } |
530 | 530 |
531 static int | 531 int |
532 haspointers(Type *t) | 532 haspointers(Type *t) |
533 { | 533 { |
534 Type *t1; | 534 Type *t1; |
535 | 535 |
536 switch(t->etype) { | 536 switch(t->etype) { |
537 case TINT: | 537 case TINT: |
538 case TUINT: | 538 case TUINT: |
539 case TINT8: | 539 case TINT8: |
540 case TUINT8: | 540 case TUINT8: |
541 case TINT16: | 541 case TINT16: |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 for(i=1; i<=TBOOL; i++) | 930 for(i=1; i<=TBOOL; i++) |
931 dtypesym(ptrto(types[i])); | 931 dtypesym(ptrto(types[i])); |
932 dtypesym(ptrto(types[TSTRING])); | 932 dtypesym(ptrto(types[TSTRING])); |
933 dtypesym(ptrto(types[TUNSAFEPTR])); | 933 dtypesym(ptrto(types[TUNSAFEPTR])); |
934 ················ | 934 ················ |
935 // add paths for runtime and main, which 6l imports implicitly. | 935 // add paths for runtime and main, which 6l imports implicitly. |
936 dimportpath(runtimepkg); | 936 dimportpath(runtimepkg); |
937 dimportpath(mkpkg(strlit("main"))); | 937 dimportpath(mkpkg(strlit("main"))); |
938 } | 938 } |
939 } | 939 } |
LEFT | RIGHT |