Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Issue 10334003: Rework static method support. (Closed)

Created:
8 years, 7 months ago by Anton Muhin
Modified:
8 years, 7 months ago
Reviewers:
podivilov, sra1
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Rework static method support. For now I just nuke them from all generators except for systemnative. However, that remove two methods from DOMURL. One of those should probably be a ctor. The second one is funnier as it looks like legetimate static methods. R=podivilov@chromium.org,sra@google.com Committed: https://code.google.com/p/dart/source/detail?r=7320

Patch Set 1 #

Total comments: 4

Patch Set 2 : Addressing Pavel's comments #

Patch Set 3 : Minor fixes. #

Patch Set 4 : Introducing AddStaticOperation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -70 lines) Patch
M lib/dom/dom.dart View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M lib/dom/frog/dom_frog.dart View 1 2 3 2 chunks +0 lines, -8 lines 0 comments Download
M lib/dom/idl/dart/dart.idl View 1 2 3 1 chunk +0 lines, -11 lines 0 comments Download
M lib/dom/scripts/dartgenerator.py View 1 2 3 2 chunks +7 lines, -1 line 0 comments Download
M lib/dom/scripts/generator.py View 1 1 chunk +5 lines, -0 lines 0 comments Download
M lib/dom/scripts/idlnode.py View 1 2 chunks +1 line, -1 line 0 comments Download
M lib/dom/scripts/systemfrog.py View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M lib/dom/scripts/systemhtml.py View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M lib/dom/scripts/systeminterface.py View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M lib/dom/scripts/systemnative.py View 1 2 3 11 chunks +26 lines, -8 lines 0 comments Download
M lib/dom/scripts/systemwrapping.py View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M lib/dom/src/native_FactoryProvidersImplementation.dart View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M lib/html/dartium/html_dartium.dart View 2 chunks +0 lines, -22 lines 0 comments Download
M lib/html/frog/html_frog.dart View 2 chunks +0 lines, -10 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Anton Muhin
8 years, 7 months ago (2012-05-02 18:08:34 UTC) #1
Anton Muhin
of RFC kind
8 years, 7 months ago (2012-05-02 18:08:55 UTC) #2
Anton Muhin
And my stance on it: I think we should generate static methods on implementation classes ...
8 years, 7 months ago (2012-05-02 18:12:17 UTC) #3
podivilov
lgtm with comments. http://codereview.chromium.org/10334003/diff/1/lib/dom/scripts/systemnative.py File lib/dom/scripts/systemnative.py (right): http://codereview.chromium.org/10334003/diff/1/lib/dom/scripts/systemnative.py#newcode669 lib/dom/scripts/systemnative.py:669: self._GenerateParameterAdapter(parameter_definitions_emitter, argument, i) Please add start_index ...
8 years, 7 months ago (2012-05-03 09:05:42 UTC) #4
Anton Muhin
PTAL
8 years, 7 months ago (2012-05-03 18:41:29 UTC) #5
sra1
lgtm http://codereview.chromium.org/10334003/diff/1/lib/dom/scripts/systemnative.py File lib/dom/scripts/systemnative.py (right): http://codereview.chromium.org/10334003/diff/1/lib/dom/scripts/systemnative.py#newcode567 lib/dom/scripts/systemnative.py:567: def AddOperation(self, info): I think in many cases ...
8 years, 7 months ago (2012-05-03 19:12:34 UTC) #6
Anton Muhin
8 years, 7 months ago (2012-05-04 11:05:13 UTC) #7
Thanks a lot to everyone for review, submitting

http://codereview.chromium.org/10334003/diff/1/lib/dom/scripts/systemnative.py
File lib/dom/scripts/systemnative.py (right):

http://codereview.chromium.org/10334003/diff/1/lib/dom/scripts/systemnative.p...
lib/dom/scripts/systemnative.py:567: def AddOperation(self, info):
On 2012/05/03 19:12:35, sra1 wrote:
> I think in many cases we will want to handle statics specially.  Statics also
> don't inherit from interfaces/
> 
> Lets split the entry, AddOperation and AddStaticOperation and distinguish in
the
> driver.
> 
> You native version of AddStaticOperation is free to call AddOperation as an
> implementation detail, or both call a common _AddOperation
> It may want to do something extra, like make the global definition call the
> implementation class static.

Done.

Powered by Google App Engine
This is Rietveld 408576698