Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(182)

Delta Between Two Patch Sets: src/cmd/gc/walk.c

Issue 4964046: code review 4964046: src/cmd/gc/*: Adjustments for compilation using Plan 9 ... (Closed)
Left Patch Set: diff -r 88744261dd47 https://go.googlecode.com/hg/ Created 13 years, 7 months ago
Right Patch Set: diff -r 5e1053337103 https://go.googlecode.com/hg/ Created 13 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/cmd/gc/typecheck.c ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 <u.h> 5 #include <u.h>
6 #include <libc.h> 6 #include <libc.h>
7 #include "go.h" 7 #include "go.h"
8 8
9 static Node* walkprint(Node*, NodeList**, int); 9 static Node* walkprint(Node*, NodeList**, int);
10 static Node* conv(Node*, Type*); 10 static Node* conv(Node*, Type*);
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 377
378 if(n->typecheck != 1) { 378 if(n->typecheck != 1) {
379 dump("missed typecheck", n); 379 dump("missed typecheck", n);
380 fatal("missed typecheck"); 380 fatal("missed typecheck");
381 } 381 }
382 382
383 switch(n->op) { 383 switch(n->op) {
384 default: 384 default:
385 dump("walk", n); 385 dump("walk", n);
386 fatal("walkexpr: switch 1 unknown op %N", n); 386 fatal("walkexpr: switch 1 unknown op %N", n);
387 » » goto ret; 387 » » break;
388 388
389 case OTYPE: 389 case OTYPE:
390 case ONONAME: 390 case ONONAME:
391 case OINDREG: 391 case OINDREG:
392 case OEMPTY: 392 case OEMPTY:
393 goto ret; 393 goto ret;
394 394
395 case ONOT: 395 case ONOT:
396 case OMINUS: 396 case OMINUS:
397 case OPLUS: 397 case OPLUS:
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 goto ret; 1162 goto ret;
1163 1163
1164 case OSEND: 1164 case OSEND:
1165 n = mkcall1(chanfn("chansend1", 2, n->left->type), T, init, type name(n->left->type), n->left, n->right); 1165 n = mkcall1(chanfn("chansend1", 2, n->left->type), T, init, type name(n->left->type), n->left, n->right);
1166 goto ret; 1166 goto ret;
1167 1167
1168 case OCLOSURE: 1168 case OCLOSURE:
1169 n = walkclosure(n, init); 1169 n = walkclosure(n, init);
1170 goto ret; 1170 goto ret;
1171 } 1171 }
1172 fatal("missing switch %O", n->op);
1172 1173
1173 ret: 1174 ret:
1174 if(debug['w'] && n != N) 1175 if(debug['w'] && n != N)
1175 dump("walk", n); 1176 dump("walk", n);
1176 1177
1177 ullmancalc(n); 1178 ullmancalc(n);
1178 lineno = lno; 1179 lineno = lno;
1179 *np = n; 1180 *np = n;
1180 } 1181 }
1181 1182
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after
2158 l = list(l, nod(OAS, nx, a->n)); // s[n] = arg 2159 l = list(l, nod(OAS, nx, a->n)); // s[n] = arg
2159 if (a->next != nil) 2160 if (a->next != nil)
2160 l = list(l, nod(OAS, nn, nod(OADD, nn, nodintconst(1)))) ; // n = n + 1 2161 l = list(l, nod(OAS, nn, nod(OADD, nn, nodintconst(1)))) ; // n = n + 1
2161 } 2162 }
2162 2163
2163 typechecklist(l, Etop); 2164 typechecklist(l, Etop);
2164 walkstmtlist(l); 2165 walkstmtlist(l);
2165 *init = concat(*init, l); 2166 *init = concat(*init, l);
2166 return ns; 2167 return ns;
2167 } 2168 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b