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

Issue 1847045: General cleanup to remove friends and comply to this-> policy (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years ago by ebo
Modified:
15 years ago
Reviewers:
Reid Kleckner
CC:
unladen-swallow_googlegroups.com
Base URL:
http://unladen-swallow.googlecode.com/svn/trunk/
Visibility:
Public.

Description

This patches changes most opcode files to comply to the this-> policy we have to access member variables in C++. It also removes all friend-statements from llvm_fbuilder.h

Patch Set 1 #

Total comments: 11

Patch Set 2 : 80 cols #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1252 lines, -1106 lines) Patch
M JIT/llvm_compile.cc View 1 chunk +1 line, -1 line 0 comments Download
M JIT/llvm_fbuilder.h View 5 chunks +62 lines, -41 lines 0 comments Download
M JIT/llvm_fbuilder.cc View 3 chunks +31 lines, -3 lines 0 comments Download
M JIT/opcodes/attributes.h View 3 chunks +7 lines, -2 lines 0 comments Download
M JIT/opcodes/attributes.cc View 1 12 chunks +57 lines, -55 lines 0 comments Download
M JIT/opcodes/binops.cc View 5 chunks +40 lines, -40 lines 0 comments Download
M JIT/opcodes/block.h View 3 chunks +7 lines, -0 lines 0 comments Download
M JIT/opcodes/block.cc View 6 chunks +182 lines, -177 lines 0 comments Download
M JIT/opcodes/call.h View 3 chunks +6 lines, -0 lines 0 comments Download
M JIT/opcodes/call.cc View 8 chunks +105 lines, -101 lines 0 comments Download
M JIT/opcodes/closure.h View 2 chunks +7 lines, -0 lines 0 comments Download
M JIT/opcodes/closure.cc View 1 1 chunk +79 lines, -74 lines 0 comments Download
M JIT/opcodes/cmpops.h View 3 chunks +6 lines, -0 lines 0 comments Download
M JIT/opcodes/cmpops.cc View 7 chunks +56 lines, -54 lines 0 comments Download
M JIT/opcodes/container.h View 3 chunks +5 lines, -3 lines 0 comments Download
M JIT/opcodes/container.cc View 11 chunks +121 lines, -118 lines 0 comments Download
M JIT/opcodes/control.h View 3 chunks +6 lines, -0 lines 0 comments Download
M JIT/opcodes/control.cc View 9 chunks +85 lines, -81 lines 0 comments Download
M JIT/opcodes/globals.h View 3 chunks +6 lines, -0 lines 0 comments Download
M JIT/opcodes/globals.cc View 4 chunks +73 lines, -71 lines 0 comments Download
M JIT/opcodes/locals.h View 3 chunks +6 lines, -0 lines 0 comments Download
M JIT/opcodes/locals.cc View 4 chunks +74 lines, -70 lines 0 comments Download
M JIT/opcodes/loop.h View 2 chunks +6 lines, -0 lines 0 comments Download
M JIT/opcodes/loop.cc View 3 chunks +70 lines, -65 lines 0 comments Download
M JIT/opcodes/name.cc View 1 chunk +20 lines, -17 lines 0 comments Download
M JIT/opcodes/slice.cc View 1 chunk +77 lines, -77 lines 0 comments Download
M JIT/opcodes/stack.cc View 1 chunk +43 lines, -43 lines 0 comments Download
M JIT/opcodes/unaryops.cc View 2 chunks +14 lines, -13 lines 0 comments Download

Messages

Total messages: 4
ebo
I need someone to review this patch, or give me a "commit for free"-card.
15 years ago (2010-07-27 07:37:10 UTC) #1
Reid Kleckner
Cool, thanks for working on this! http://codereview.appspot.com/1847045/diff/1/24 File JIT/opcodes/attributes.cc (right): http://codereview.appspot.com/1847045/diff/1/24#newcode92 JIT/opcodes/attributes.cc:92: llvm_data_(fbuilder->llvm_data()) It seems ...
15 years ago (2010-07-27 15:21:53 UTC) #2
ebo
http://codereview.appspot.com/1847045/diff/1/24 File JIT/opcodes/attributes.cc (right): http://codereview.appspot.com/1847045/diff/1/24#newcode92 JIT/opcodes/attributes.cc:92: llvm_data_(fbuilder->llvm_data()) On 2010/07/27 15:21:53, Reid Kleckner wrote: > It ...
15 years ago (2010-07-28 08:00:23 UTC) #3
Reid Kleckner (google)
15 years ago (2010-07-28 17:03:39 UTC) #4
Sure, LGTM.

Reid

On Wed, Jul 28, 2010 at 1:00 AM,  <ebo@4geeks.de> wrote:
>
> http://codereview.appspot.com/1847045/diff/1/24
> File JIT/opcodes/attributes.cc (right):
>
> http://codereview.appspot.com/1847045/diff/1/24#newcode92
> JIT/opcodes/attributes.cc:92: llvm_data_(fbuilder->llvm_data())
> On 2010/07/27 15:21:53, Reid Kleckner wrote:
>>
>> It seems like for all of these opcode helper classes it would be good
>
> to have a
>>
>> common base class to hold these fields and the BuilderT typedef.  The
>
> fields
>>
>> would be made protected, and all these initialization lists would just
>
> call the
>>
>> base constructor.
>
>> This would also help if/when we need to add fields to roughly all of
>
> the
>>
>> opcodes.
>
> Maybe I'll do that in a later patch. Problem is, that our coding
> guidelines do not allow protected members, so I would have to rename
> everything again, to use accessors. Ugh.
>
> http://codereview.appspot.com/1847045/diff/1/24#newcode345
> JIT/opcodes/attributes.cc:345:
> ConstantInt::get(PyTypeBuilder<long>::get(this->fbuilder_->context()),
> On 2010/07/27 15:21:53, Reid Kleckner wrote:
>>
>> We use the context all over for getting/creating types.  I think it
>
> would be
>>
>> best to move it into the opcode base class I described above so we can
>
> replace
>>
>> 'this->fbuilder_->context()' with 'this->context_'.  The PyTypeBuilder
>
> lines are
>>
>> the ones that tend to force us to line wrap.
>
> IMHO we don't use TypeBuilder that often ... If it is used more then
> twice you can always create a local reference.
>
> Design decision!
>
> http://codereview.appspot.com/1847045/diff/1/11
> File JIT/opcodes/closure.cc (right):
>
> http://codereview.appspot.com/1847045/diff/1/11#newcode66
> JIT/opcodes/closure.cc:66:
> PyTypeBuilder<Py_ssize_t>::get(this->fbuilder_->context()),
> num_defaults);
> On 2010/07/27 15:21:53, Reid Kleckner wrote:
>>
>> 80 cols
>
> Done.
>
> http://codereview.appspot.com/1847045/diff/1/11#newcode68
> JIT/opcodes/closure.cc:68: this->state_->GetGlobalFunction<PyObject
> *(Py_ssize_t)>("PyTuple_New");
> On 2010/07/27 15:21:53, Reid Kleckner wrote:
>>
>> 80 cols
>
> Done.
>
> http://codereview.appspot.com/1847045/diff/1/11#newcode135
> JIT/opcodes/closure.cc:135:
> ConstantInt::get(PyTypeBuilder<int>::get(this->fbuilder_->context()),
> index));
> On 2010/07/27 15:21:53, Reid Kleckner wrote:
>>
>> 80 cols
>
> Done.
>
> http://codereview.appspot.com/1847045/show
>
Sign in to reply to this message.

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