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

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

Issue 7986043: code review 7986043: cmd/gc: instrument logical && and ||. (Closed)
Left Patch Set: Created 12 years ago
Right Patch Set: diff -r 17b2bed9d136 https://go.googlecode.com/hg/ Created 12 years 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/gc/racewalk.c ('k') | src/pkg/runtime/race/testdata/mop_test.go » ('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 // 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 #include "md5.h" 8 #include "md5.h"
9 #include "y.tab.h" 9 #include "y.tab.h"
10 #include "yerr.h" 10 #include "yerr.h"
(...skipping 1741 matching lines...) Expand 10 before | Expand all | Expand 10 after
1752 ul = 1; 1752 ul = 1;
1753 if(n->class == PPARAMREF || (n->class & PHEAP)) 1753 if(n->class == PPARAMREF || (n->class & PHEAP))
1754 ul++; 1754 ul++;
1755 goto out; 1755 goto out;
1756 case OCALL: 1756 case OCALL:
1757 case OCALLFUNC: 1757 case OCALLFUNC:
1758 case OCALLMETH: 1758 case OCALLMETH:
1759 case OCALLINTER: 1759 case OCALLINTER:
1760 ul = UINF; 1760 ul = UINF;
1761 goto out; 1761 goto out;
1762 case OANDAND:
1763 case OOROR:
1764 // hard with race detector
1765 if(flag_race) {
1766 ul = UINF;
1767 goto out;
1768 }
1762 } 1769 }
1763 ul = 1; 1770 ul = 1;
1764 if(n->left != N) 1771 if(n->left != N)
1765 ul = n->left->ullman; 1772 ul = n->left->ullman;
1766 ur = 1; 1773 ur = 1;
1767 if(n->right != N) 1774 if(n->right != N)
1768 ur = n->right->ullman; 1775 ur = n->right->ullman;
1769 if(ul == ur) 1776 if(ul == ur)
1770 ul += 1; 1777 ul += 1;
1771 if(ur > ul) 1778 if(ur > ul)
(...skipping 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after
3730 Node *n; 3737 Node *n;
3731 ········ 3738 ········
3732 if(isinter(x->type)) { 3739 if(isinter(x->type)) {
3733 x = nod(OITAB, x, N); 3740 x = nod(OITAB, x, N);
3734 typecheck(&x, Erv); 3741 typecheck(&x, Erv);
3735 } 3742 }
3736 n = nod(OCHECKNOTNIL, x, N); 3743 n = nod(OCHECKNOTNIL, x, N);
3737 n->typecheck = 1; 3744 n->typecheck = 1;
3738 *init = list(*init, n); 3745 *init = list(*init, n);
3739 } 3746 }
LEFTRIGHT

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