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

Delta Between Two Patch Sets: src/cmd/5g/gsubr.c

Issue 91850043: code review 91850043: cmd/gc: alias more variables during register allocation (Closed)
Left Patch Set: Created 10 years, 11 months ago
Right Patch Set: diff -r e4248ed0037c https://code.google.com/p/go Created 10 years, 11 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:
Right: Side by side diff | Download
« no previous file with change/comment | « src/cmd/5g/cgen.c ('k') | src/cmd/6g/cgen.c » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Derived from Inferno utils/5c/txt.c 1 // Derived from Inferno utils/5c/txt.c
2 // http://code.google.com/p/inferno-os/source/browse/utils/5c/txt.c 2 // http://code.google.com/p/inferno-os/source/browse/utils/5c/txt.c
3 // 3 //
4 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. 4 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved.
5 // Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net) 5 // Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
6 // Portions Copyright © 1997-1999 Vita Nuova Limited 6 // Portions Copyright © 1997-1999 Vita Nuova Limited
7 // Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuov a.com) 7 // Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuov a.com)
8 // Portions Copyright © 2004,2006 Bruce Ellis 8 // Portions Copyright © 2004,2006 Bruce Ellis
9 // Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net) 9 // Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net)
10 // Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others 10 // Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after
1359 a->etype = TINT32; 1359 a->etype = TINT32;
1360 if(a->type == D_CONST && a->offset == 0) 1360 if(a->type == D_CONST && a->offset == 0)
1361 break; // len(nil) 1361 break; // len(nil)
1362 break; 1362 break;
1363 1363
1364 case OSPTR: 1364 case OSPTR:
1365 // pointer in a string or slice 1365 // pointer in a string or slice
1366 naddr(n->left, a, canemitcode); 1366 naddr(n->left, a, canemitcode);
1367 if(a->type == D_CONST && a->offset == 0) 1367 if(a->type == D_CONST && a->offset == 0)
1368 break; // ptr(nil) 1368 break; // ptr(nil)
1369 » » a->etype = simtype[TUINTPTR]; 1369 » » a->etype = simtype[tptr];
1370 a->offset += Array_array; 1370 a->offset += Array_array;
1371 a->width = widthptr; 1371 a->width = widthptr;
1372 break; 1372 break;
1373 1373
1374 case OLEN: 1374 case OLEN:
1375 // len of string or slice 1375 // len of string or slice
1376 naddr(n->left, a, canemitcode); 1376 naddr(n->left, a, canemitcode);
1377 a->etype = TINT32; 1377 a->etype = TINT32;
1378 if(a->type == D_CONST && a->offset == 0) 1378 if(a->type == D_CONST && a->offset == 0)
1379 break; // len(nil) 1379 break; // len(nil)
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1585 a = AMOVD; 1585 a = AMOVD;
1586 break; 1586 break;
1587 1587
1588 case CASE(OADD, TINT8): 1588 case CASE(OADD, TINT8):
1589 case CASE(OADD, TUINT8): 1589 case CASE(OADD, TUINT8):
1590 case CASE(OADD, TINT16): 1590 case CASE(OADD, TINT16):
1591 case CASE(OADD, TUINT16): 1591 case CASE(OADD, TUINT16):
1592 case CASE(OADD, TINT32): 1592 case CASE(OADD, TINT32):
1593 case CASE(OADD, TUINT32): 1593 case CASE(OADD, TUINT32):
1594 case CASE(OADD, TPTR32): 1594 case CASE(OADD, TPTR32):
1595 case CASE(OADDPTR, TPTR32):
1595 a = AADD; 1596 a = AADD;
1596 break; 1597 break;
1597 1598
1598 case CASE(OADD, TFLOAT32): 1599 case CASE(OADD, TFLOAT32):
1599 a = AADDF; 1600 a = AADDF;
1600 break; 1601 break;
1601 1602
1602 case CASE(OADD, TFLOAT64): 1603 case CASE(OADD, TFLOAT64):
1603 a = AADDD; 1604 a = AADDD;
1604 break; 1605 break;
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
2076 naddr(&n2, a, 1); 2077 naddr(&n2, a, 1);
2077 goto yes; 2078 goto yes;
2078 2079
2079 yes: 2080 yes:
2080 return 1; 2081 return 1;
2081 2082
2082 no: 2083 no:
2083 sudoclean(); 2084 sudoclean();
2084 return 0; 2085 return 0;
2085 } 2086 }
LEFTRIGHT

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