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

Issue 10987019: Refactor file paths handling in generator. (Closed)

Created:
8 years, 2 months ago by podivilov
Modified:
8 years, 2 months ago
Reviewers:
vsm, Anton Muhin, podivilov1
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Refactor file paths handling in generator. Introduce DartLibraryGenerator and CPPLibraryGenerator classes that are responsible for creating per-interface files and importing them into single library file at the end. System and BaseGenerator implementations don't have to deal with file paths anymore. R=antonm@google.com,vsm@google.com Committed: https://code.google.com/p/dart/source/detail?r=12898

Patch Set 1 #

Total comments: 15

Patch Set 2 : . #

Total comments: 2

Patch Set 3 : Generator -> Emitter #

Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -157 lines) Patch
M lib/html/scripts/dartdomgenerator.py View 1 2 2 chunks +48 lines, -25 lines 0 comments Download
M lib/html/scripts/dartgenerator.py View 1 1 chunk +0 lines, -3 lines 0 comments Download
M lib/html/scripts/systembase.py View 4 chunks +1 line, -40 lines 0 comments Download
M lib/html/scripts/systemhtml.py View 1 2 3 chunks +29 lines, -16 lines 0 comments Download
M lib/html/scripts/systemnative.py View 1 2 6 chunks +48 lines, -70 lines 0 comments Download
M lib/html/templates/html/dartium/cpp_derived_sources.template View 1 chunk +1 line, -1 line 0 comments Download
M lib/html/templates/html/dartium/cpp_resolver.template View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
podivilov
8 years, 2 months ago (2012-09-25 14:42:06 UTC) #1
vsm
https://codereview.chromium.org/10987019/diff/1/lib/html/scripts/dartdomgenerator.py File lib/html/scripts/dartdomgenerator.py (right): https://codereview.chromium.org/10987019/diff/1/lib/html/scripts/dartdomgenerator.py#newcode72 lib/html/scripts/dartdomgenerator.py:72: def Generate(dart_library_template, dart_output_dir, dart_library_path, Can you use a different ...
8 years, 2 months ago (2012-09-25 16:06:14 UTC) #2
Anton Muhin
https://codereview.chromium.org/10987019/diff/1/lib/html/scripts/dartgenerator.py File lib/html/scripts/dartgenerator.py (right): https://codereview.chromium.org/10987019/diff/1/lib/html/scripts/dartgenerator.py#newcode192 lib/html/scripts/dartgenerator.py:192: process_interface, process_callback): why pass callbacks, not some generator? https://codereview.chromium.org/10987019/diff/1/lib/html/scripts/systemhtml.py ...
8 years, 2 months ago (2012-09-25 16:15:50 UTC) #3
podivilov1
PTAL. https://codereview.chromium.org/10987019/diff/1/lib/html/scripts/dartdomgenerator.py File lib/html/scripts/dartdomgenerator.py (right): https://codereview.chromium.org/10987019/diff/1/lib/html/scripts/dartdomgenerator.py#newcode72 lib/html/scripts/dartdomgenerator.py:72: def Generate(dart_library_template, dart_output_dir, dart_library_path, On 2012/09/25 16:06:14, vsm ...
8 years, 2 months ago (2012-09-25 16:40:28 UTC) #4
Anton Muhin
lgtm https://codereview.chromium.org/10987019/diff/1/lib/html/scripts/systemnative.py File lib/html/scripts/systemnative.py (right): https://codereview.chromium.org/10987019/diff/1/lib/html/scripts/systemnative.py#newcode865 lib/html/scripts/systemnative.py:865: class CPPLibraryGenerator(): Under lib/html/scripts preferred style is apparently ...
8 years, 2 months ago (2012-09-25 16:50:26 UTC) #5
vsm
lgtm, but i'm still finding the overuse of "Generate" confusing. A suggestion below. https://codereview.chromium.org/10987019/diff/7001/lib/html/scripts/dartdomgenerator.py File ...
8 years, 2 months ago (2012-09-25 17:27:45 UTC) #6
podivilov1
8 years, 2 months ago (2012-09-26 09:54:06 UTC) #7
https://codereview.chromium.org/10987019/diff/7001/lib/html/scripts/dartdomge...
File lib/html/scripts/dartdomgenerator.py (right):

https://codereview.chromium.org/10987019/diff/7001/lib/html/scripts/dartdomge...
lib/html/scripts/dartdomgenerator.py:83:
dart_library_generator.GenerateLibrary(dart_library_path, auxiliary_dir)
On 2012/09/25 17:27:45, vsm wrote:
> It's confusing to use "Generate" on both of these steps (i.e., "Generate" and
> "GenerateLibrary".  My understanding is that the first is generating code and
> the second is emitting.  If so, how about renaming to
> DartLibraryEmitter.EmitLibrary?  

Done.

Powered by Google App Engine
This is Rietveld 408576698