On Mon, Jun 27, 2011 at 13:06, Gabriel Charette <gchare@google.com> wrote: > Just wondering why ...
13 years, 10 months ago
(2011-06-27 17:08:56 UTC)
#3
On Mon, Jun 27, 2011 at 13:06, Gabriel Charette <gchare@google.com> wrote:
> Just wondering why you're naming x finishing by an underscore "x_",
> this is a valid name, but just thinking it's tricky syntax, does this
> test anything more? or is it just a preference for private members?
No real reason. Just a quick hack I was trying to compile with pph enabled.
On 6/27/11, Diego Novillo <dnovillo@google.com> wrote: > On Jun 27, 2011 Gabriel Charette <gchare@google.com> wrote: ...
13 years, 10 months ago
(2011-06-27 18:56:36 UTC)
#4
On 6/27/11, Diego Novillo <dnovillo@google.com> wrote:
> On Jun 27, 2011 Gabriel Charette <gchare@google.com> wrote:
> > Just wondering why you're naming x finishing by an underscore
> > "x_", this is a valid name, but just thinking it's tricky syntax,
> > does this test anything more? or is it just a preference for
> > private members?
>
> No real reason. Just a quick hack I was trying to compile with
> pph enabled.
There is a convention in Google (and elsewhere) to mark data member
fields with a trailing underscore in their name. This convention
makes it easy to identify field accesses, which helps avoid
performance problems (unnecessary reloads) and correctness problems
(missing reloads in the presence of aliasing).
--
Lawrence Crowl
On Mon, Jun 27, 2011 at 14:56, Lawrence Crowl <crowl@google.com> wrote: > On 6/27/11, Diego ...
13 years, 10 months ago
(2011-06-27 18:59:15 UTC)
#5
On Mon, Jun 27, 2011 at 14:56, Lawrence Crowl <crowl@google.com> wrote:
> On 6/27/11, Diego Novillo <dnovillo@google.com> wrote:
>> On Jun 27, 2011 Gabriel Charette <gchare@google.com> wrote:
>> > Just wondering why you're naming x finishing by an underscore
>> > "x_", this is a valid name, but just thinking it's tricky syntax,
>> > does this test anything more? or is it just a preference for
>> > private members?
>>
>> No real reason. Just a quick hack I was trying to compile with
>> pph enabled.
>
> There is a convention in Google (and elsewhere) to mark data member
> fields with a trailing underscore in their name. This convention
> makes it easy to identify field accesses, which helps avoid
> performance problems (unnecessary reloads) and correctness problems
> (missing reloads in the presence of aliasing).
That's probably where I picked it from. I wasn't really thinking
about the code itself. Just wanted to get some simple C++ executable
test.
Diego.
Issue 4629075: [pph] New test
(Closed)
Created 13 years, 10 months ago by Diego Novillo
Modified 13 years, 8 months ago
Reviewers:
Base URL:
Comments: 0