On 2012/09/04 04:42:15, nigeltao wrote: > zero value of node->val.u.reg is the stack pointer: D_SP ...
11 years, 7 months ago
(2012-09-04 06:23:12 UTC)
#4
On 2012/09/04 04:42:15, nigeltao wrote:
> zero value of node->val.u.reg is the stack pointer: D_SP is 20, D_AL is 0.
Ah, I appear to be mistaken. Sorry about that.
I just thought of something. It might be helpful to use the naming of the ...
11 years, 7 months ago
(2012-09-04 08:32:50 UTC)
#5
I just thought of something. It might be helpful to use the naming of the
elements to convey how the nodes occur in the AST.
For example
// OADD l + r
// OAS2 l1, l2, l3 = r1, r2, r3
// OLEN len(l)
On the downside, It would throw away a bit of context in cases like OCMPSTR and
It's quite a bit more work.
On 4 September 2012 18:32, <daniel.morsing@gmail.com> wrote: > I just thought of something. It might ...
11 years, 7 months ago
(2012-09-04 23:34:14 UTC)
#7
On 4 September 2012 18:32, <daniel.morsing@gmail.com> wrote:
> I just thought of something. It might be helpful to use the naming of
> the elements to convey how the nodes occur in the AST.
>
> For example
> // OADD l + r
> // OAS2 l1, l2, l3 = r1, r2, r3
> // OLEN len(l)
>
> On the downside, It would throw away a bit of context in cases like
> OCMPSTR and It's quite a bit more work.
That might be useful, but they might be better as higher level
comments for groups of opcodes. For example, all binary ops are "l op
r", all unary ops are "op l", etc. I don't think that the order of the
values matter, apart from OXXX being first and OEND being last.
Something to consider for a follow-up CL, perhaps.
Issue 6495074: code review 6495074: cmd/gc: add commentary to the OXXX constants.
(Closed)
Created 11 years, 8 months ago by nigeltao
Modified 11 years, 7 months ago
Reviewers:
Base URL:
Comments: 2