LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2012 The Go Authors. All rights reserved. | 1 // Copyright 2012 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 // Rewrite tree to use separate statements to enforce | 5 // Rewrite tree to use separate statements to enforce |
6 // order of evaluation. Makes walk easier, because it | 6 // order of evaluation. Makes walk easier, because it |
7 // can (after this runs) reorder at will within an expression. | 7 // can (after this runs) reorder at will within an expression. |
8 | 8 |
9 #include <u.h> | 9 #include <u.h> |
10 #include <libc.h> | 10 #include <libc.h> |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 ········ | 337 ········ |
338 case OANDAND: | 338 case OANDAND: |
339 case OOROR: | 339 case OOROR: |
340 orderexpr(&n->left, out); | 340 orderexpr(&n->left, out); |
341 orderexprinplace(&n->right); | 341 orderexprinplace(&n->right); |
342 break; | 342 break; |
343 ········ | 343 ········ |
344 case OCALLFUNC: | 344 case OCALLFUNC: |
345 case OCALLMETH: | 345 case OCALLMETH: |
346 case OCALLINTER: | 346 case OCALLINTER: |
| 347 case OAPPEND: |
| 348 case OCOMPLEX: |
347 ordercall(n, out); | 349 ordercall(n, out); |
348 n = copyexpr(n, n->type, out); | 350 n = copyexpr(n, n->type, out); |
349 break; | 351 break; |
350 | 352 |
351 case ORECV: | 353 case ORECV: |
352 n = copyexpr(n, n->type, out); | 354 n = copyexpr(n, n->type, out); |
353 break; | 355 break; |
354 } | 356 } |
355 ········ | 357 ········ |
356 lineno = lno; | 358 lineno = lno; |
357 | 359 |
358 *np = n; | 360 *np = n; |
359 } | 361 } |
LEFT | RIGHT |