OLD | NEW |
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 #undef EXTERN | 5 #undef EXTERN |
6 #define EXTERN | 6 #define EXTERN |
7 #include "gg.h" | 7 #include "gg.h" |
8 #include "opt.h" | 8 #include "opt.h" |
9 | 9 |
10 void | 10 void |
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1131 { | 1131 { |
1132 Node nodes[5]; | 1132 Node nodes[5]; |
1133 Node n1, n2, nres, nnode0, ntemp; | 1133 Node n1, n2, nres, nnode0, ntemp; |
1134 vlong v; | 1134 vlong v; |
1135 int i, narg, bad; | 1135 int i, narg, bad; |
1136 | 1136 |
1137 if(n->op != OCALLFUNC) | 1137 if(n->op != OCALLFUNC) |
1138 goto no; | 1138 goto no; |
1139 if(!n->left->addable) | 1139 if(!n->left->addable) |
1140 goto no; | 1140 goto no; |
1141 » if(strcmp(n->left->sym->package, "runtime") != 0) | 1141 » if(n->left->sym->pkg != runtimepkg) |
1142 goto no; | 1142 goto no; |
1143 if(strcmp(n->left->sym->name, "slicearray") == 0) | 1143 if(strcmp(n->left->sym->name, "slicearray") == 0) |
1144 goto slicearray; | 1144 goto slicearray; |
1145 if(strcmp(n->left->sym->name, "sliceslice") == 0) { | 1145 if(strcmp(n->left->sym->name, "sliceslice") == 0) { |
1146 narg = 4; | 1146 narg = 4; |
1147 goto sliceslice; | 1147 goto sliceslice; |
1148 } | 1148 } |
1149 if(strcmp(n->left->sym->name, "sliceslice1") == 0) { | 1149 if(strcmp(n->left->sym->name, "sliceslice1") == 0) { |
1150 narg = 3; | 1150 narg = 3; |
1151 goto sliceslice; | 1151 goto sliceslice; |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1361 } | 1361 } |
1362 | 1362 |
1363 if(!sleasy(res)) { | 1363 if(!sleasy(res)) { |
1364 cgen(&nres, res); | 1364 cgen(&nres, res); |
1365 } | 1365 } |
1366 return 1; | 1366 return 1; |
1367 | 1367 |
1368 no: | 1368 no: |
1369 return 0; | 1369 return 0; |
1370 } | 1370 } |
OLD | NEW |