It feels like there's too much casting going on. For example, in src/pkg/runtime/mgc0.c:/^addstackroots you can ...
12 years, 10 months ago
(2012-05-26 10:41:07 UTC)
#5
It feels like there's too much casting going on.
For example, in src/pkg/runtime/mgc0.c:/^addstackroots
you can change the sp and guard variables to be uintptrs.
Then you would only need to change the current byte*
casts to uintptr casts and add one new cast.
What you have now adds five new casts in that function.
Cheers,
Anthony
This patch is controversial. I suggest we blindly ignore all the controversies. On Saturday, May ...
12 years, 10 months ago
(2012-05-26 11:21:51 UTC)
#7
This patch is controversial. I suggest we blindly ignore all the
controversies.
On Saturday, May 26, 2012 12:40:54 PM UTC+2, Anthony Martin wrote:
>
> It feels like there's too much casting going on.
>
> For example, in src/pkg/runtime/mgc0.c:/^addstackroots
> you can change the sp and guard variables to be uintptrs.
> Then you would only need to change the current byte* to uintptr casts and
> add one new cast.
>
> What you have now adds five new casts in that function.
>
> Cheers,
> Anthony
>
On Sat, May 26, 2012 at 6:40 AM, Anthony Martin <ality@pbrane.org> wrote: > It feels ...
12 years, 10 months ago
(2012-05-29 18:32:58 UTC)
#9
On Sat, May 26, 2012 at 6:40 AM, Anthony Martin <ality@pbrane.org> wrote:
> It feels like there's too much casting going on.
>
> For example, in src/pkg/runtime/mgc0.c:/^addstackroots
> you can change the sp and guard variables to be uintptrs.
> Then you would only need to change the current byte*
> casts to uintptr casts and add one new cast.
>
> What you have now adds five new casts in that function.
casts are free. I'm not worried about this.
Russ Cox <rsc@golang.org> once said: > casts are free. I'm not worried about this. Casts ...
12 years, 10 months ago
(2012-05-30 12:16:30 UTC)
#10
Russ Cox <rsc@golang.org> once said:
> casts are free. I'm not worried about this.
Casts are only free for the compiler.
Programmers still have to understand
why they're present.
Though, I agree it's a minor complaint.
Anthony
On Wed, May 30, 2012 at 8:16 AM, Anthony Martin <ality@pbrane.org> wrote: > Casts are ...
12 years, 10 months ago
(2012-05-30 13:06:20 UTC)
#11
On Wed, May 30, 2012 at 8:16 AM, Anthony Martin <ality@pbrane.org> wrote:
> Casts are only free for the compiler.
> Programmers still have to understand
> why they're present.
I'm confident that everything will turn out okay in the end.
Issue 6242061: code review 6242061: runtime: update field types in preparation for GC changes
(Closed)
Created 12 years, 10 months ago by atom
Modified 12 years, 10 months ago
Reviewers: rsc, remyoudompheng, minux1, ality
Base URL:
Comments: 11