Refactor IR
AbandonedPublic

Authored by akreuzkamp on Sep 9 2015, 10:22 AM.

Details

Diff Detail

Repository
R18 QMLWeb
Lint
Lint Skipped
Unit
Unit Tests Skipped
pavelvasev updated this revision to Diff 836.Sep 9 2015, 10:22 AM
pavelvasev retitled this revision from to Refactor IR.
pavelvasev updated this object.
pavelvasev edited the test plan for this revision. (Show Details)
pavelvasev added reviewers: akreuzkamp, jangmarker.
pavelvasev set the repository for this revision to R18 QMLWeb.
pavelvasev added a project: QmlWeb.
pavelvasev changed the edit policy from "All Users" to "QmlWeb (Project)".
akreuzkamp edited edge metadata.Sep 9 2015, 12:49 PM

Thanks for your work! :)

Don't worry about the long list of comments, when Jan does reviews to my code (or the other way around), the list isn't shorter ;)

src/qmljsc/ir/ir.cpp
36

We should remove that, as well.

149

commented out code

164

?

206

Why are you commenting this out?

292

If it doesn't make sense anymore, remove it :)
We can still get it back using git, if we really turn out to need it ;)

366

if this accept method doesn't do anything different, than the method of the base class, then there's no reason to reimplement it ;)

387

I think we can remove that as well :)

src/qmljsc/ir/ir.h
87

Please put the implementation into the cpp file. :)

106

We should just delete that, rather than commenting it out.

125

Same as above, we should delete it.

153

We should not include outcommented code, so we should remove it for now.
(btw, you can just use Property *property = 0; here and then don't need to set it in the constructor, that's cool new C++11 :) )

162

Please put the implementation into the cpp file. :)

172

Please put the implementation into the cpp file. :)

182

Please put the implementation into the cpp file. :D

197

Please put the implementation into the cpp file. :) (Nooooo, I'm not copy&pasting that :D)

199

you accidentially added a few whitespaces here ;)

227

Please put the implementation into the cpp file. :)

257

Please put the implementation into the cpp file. :)

272

If you add a comment yourself, that this is bad, you shouldn't do it :)
Rather add a QHash<IR::Object *, QString> m_objectToInternalName; (or alike) member variable to the GeneratorPass.

277

Please put the implementation into the cpp file. :)

300

Why is class an object?

306

Guess what :D

320

I think we need Component to inherit from Object. But your implementation is much nearer to what we need, so let's just remove this :)

380

Please put the implementation into the cpp file. :)

390

we should keep dummy the last in the list

396

No, this isn't the right approach here.
We're going to load the same kind of thing from QtQmlModuleLoader, but it doesn't belong into the IR, imo.

If you need it as a polyfill until the QtQmlModuleLoader is available, please put it into prettygeneratorpass.cpp, for now. :)

430

I think a boolean flag is enough and it seems you successfully implemented it with a boolean flag. So we can remove that code :)

436

I think we must subclass it from Object, because the rootObject belongs to the Component-object, not to the class "Component".
We'll need to add a flag to "Class" as well, like "isComponent" (I added that to my branch, you won't need it for now)

448

Please put the implementation into the cpp file. :)

473

Yeah, you know, what to do :D

akreuzkamp commandeered this revision.Nov 14 2015, 11:24 AM
akreuzkamp abandoned this revision.
akreuzkamp edited reviewers, added: pavelvasev; removed: akreuzkamp.

Superseeded by D349.