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

Unified Diff: src/cmd/6g/gsubr.c

Issue 6922048: code review 6922048: cmd/{5,6,8}g: reduce size of Prog and Addr (Closed)
Patch Set: diff -r 8ea9d438b64e https://go.googlecode.com/hg/ Created 12 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/cmd/6g/gobj.c ('k') | src/cmd/6g/list.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmd/6g/gsubr.c
===================================================================
--- a/src/cmd/6g/gsubr.c
+++ b/src/cmd/6g/gsubr.c
@@ -117,7 +117,7 @@
p = prog(as);
p->to.type = D_BRANCH;
- p->to.branch = P;
+ p->to.u.branch = P;
if(as != AJMP && likely != 0) {
p->from.type = D_CONST;
p->from.offset = likely > 0;
@@ -133,7 +133,7 @@
{
if(p->to.type != D_BRANCH)
fatal("patch: not a branch");
- p->to.branch = to;
+ p->to.u.branch = to;
p->to.offset = to->loc;
}
@@ -144,8 +144,8 @@
if(p->to.type != D_BRANCH)
fatal("unpatch: not a branch");
- q = p->to.branch;
- p->to.branch = P;
+ q = p->to.u.branch;
+ p->to.u.branch = P;
p->to.offset = 0;
return q;
}
@@ -1202,7 +1202,7 @@
break;
case CTFLT:
a->type = D_FCONST;
- a->dval = mpgetflt(n->val.u.fval);
+ a->u.dval = mpgetflt(n->val.u.fval);
break;
case CTINT:
case CTRUNE:
« no previous file with comments | « src/cmd/6g/gobj.c ('k') | src/cmd/6g/list.c » ('j') | no next file with comments »

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