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

Issue 10392147: Move systems creation to dartdomgenerator.py. (Closed)

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

Description

Move systems creation to dartdomgenerator.py. Wrapperless htmldartium system should use a database with html renames for interface generation, and original database for c++ code generation. This is hard to achieve with current layout because specific knowledge about html/dom and frog/native is spread between dartdomgenerator and dartgenerator. This patch moves all system creation logic to dartdomgenerator while dartgenerator becomes a collection of helper methods for traversing idl database. R=antonm@google.com,sra@google.com Committed: https://code.google.com/p/dart/source/detail?r=7739

Patch Set 1 #

Total comments: 4

Patch Set 2 : Fix performance issue. #

Total comments: 2

Patch Set 3 : Fix output_dir #

Unified diffs Side-by-side diffs Delta from patch set Stats (+167 lines, -262 lines) Patch
M lib/dom/scripts/dartdomgenerator.py View 1 2 4 chunks +88 lines, -46 lines 0 comments Download
M lib/dom/scripts/dartgenerator.py View 12 chunks +34 lines, -192 lines 0 comments Download
M lib/dom/scripts/systemfrog.py View 1 chunk +2 lines, -2 lines 0 comments Download
M lib/dom/scripts/systemhtml.py View 9 chunks +41 lines, -20 lines 0 comments Download
M lib/dom/scripts/systeminterface.py View 1 chunk +1 line, -1 line 0 comments Download
M lib/dom/scripts/systemnative.py View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
podivilov
8 years, 7 months ago (2012-05-17 14:47:53 UTC) #1
Anton Muhin
My main concern: with this change the build will apparently become slower: we'll reread database ...
8 years, 7 months ago (2012-05-17 15:46:24 UTC) #2
podivilov
I lifted database processing out of the loop. Now generation speed is exactly the same ...
8 years, 7 months ago (2012-05-17 17:44:01 UTC) #3
Anton Muhin
Almost there https://chromiumcodereview.appspot.com/10392147/diff/8/lib/dom/scripts/dartdomgenerator.py File lib/dom/scripts/dartdomgenerator.py (right): https://chromiumcodereview.appspot.com/10392147/diff/8/lib/dom/scripts/dartdomgenerator.py#newcode116 lib/dom/scripts/dartdomgenerator.py:116: output_dir = os.path.join(current_dir, '../../html/generated') that will overwrite ...
8 years, 7 months ago (2012-05-17 18:05:38 UTC) #4
podivilov
PTAL. https://chromiumcodereview.appspot.com/10392147/diff/8/lib/dom/scripts/dartdomgenerator.py File lib/dom/scripts/dartdomgenerator.py (right): https://chromiumcodereview.appspot.com/10392147/diff/8/lib/dom/scripts/dartdomgenerator.py#newcode116 lib/dom/scripts/dartdomgenerator.py:116: output_dir = os.path.join(current_dir, '../../html/generated') On 2012/05/17 18:05:38, antonmuhin ...
8 years, 7 months ago (2012-05-17 18:20:36 UTC) #5
Anton Muhin
lgtm
8 years, 7 months ago (2012-05-17 18:31:02 UTC) #6
sra1
Prior to this change I could run the generator with ALL possible systems. I find ...
8 years, 7 months ago (2012-05-18 20:29:20 UTC) #7
sra1
On 2012/05/17 15:46:24, antonmuhin wrote: > My main concern: with this change the build will ...
8 years, 7 months ago (2012-05-18 20:49:24 UTC) #8
podivilov
8 years, 7 months ago (2012-05-21 10:30:52 UTC) #9
On 2012/05/18 20:49:24, sra1 wrote:
> On 2012/05/17 15:46:24, antonmuhin wrote:
> > My main concern: with this change the build will apparently become slower:
> we'll
> > reread database for each system, etc.  This greatly reduces hackability. 
Can
> we
> > do something about it in this CL?
> 
> This is my concern too.  For example, this CL has stalled my work on the
> dispatch as I have to adjust my process.
> It is my fault for not sharing my process with you earlier.
> We need to have a one-stop generate-everything, even if it re-reads the
> database.
> Prior to this change, passing --systems=frog,htmlfrog would read the database
> twice since the merging processing for dart:html is incompatible with dart:dom

Stephen,

I believe this change is a pure refactoring and doesn't affect script's
behavior. You can still generate several or all systems in one pass. If you pass
--systems=frog,htmlfrog, dartdomgenerator will create two database instances -
original and with html renames and generate both systems.
Please note that if-then-else is inside of a "for system in systems" loop.

Could you please tell what command do you use for generation and what was
changed by this patch?

Powered by Google App Engine
This is Rietveld 408576698