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

Issue 670663002: IDL: Use IdlReader to compute interface_info_individual (Closed)

Created:
6 years, 2 months ago by bashi
Modified:
6 years, 2 months ago
CC:
blink-reviews, blink-reviews-bindings_chromium.org, arv+blink, Yuki
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

IDL: Use IdlReader to compute interface_info_individual Before this CL, we used regex to compute interface depenencies and other information which is required to generate bindings code. We now also want to gather all union types, but regex wouldn't work well to collect union types. Instead using regex, use IdlReader to compute them. This way, we can easily collect necessary information including union types. This CL doesn't change generated bindings code; follow-up CLs will add union types collection. BUG=240176 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=184138

Patch Set 1 #

Total comments: 2

Patch Set 2 : GN fix #

Patch Set 3 : Rebase #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -107 lines) Patch
M Source/bindings/core/generated.gyp View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M Source/bindings/modules/generated.gyp View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M Source/bindings/scripts/compute_interfaces_info_individual.py View 4 chunks +72 lines, -31 lines 2 comments Download
M Source/bindings/scripts/idl_definitions.py View 1 2 5 chunks +22 lines, -2 lines 0 comments Download
M Source/bindings/scripts/interfaces_info_individual.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/bindings/scripts/scripts.gni View 1 2 2 chunks +5 lines, -1 line 0 comments Download
M Source/bindings/scripts/utilities.py View 1 2 3 chunks +0 lines, -70 lines 0 comments Download
M Tools/Scripts/webkitpy/bindings/main.py View 1 2 5 chunks +12 lines, -3 lines 0 comments Download

Messages

Total messages: 12 (4 generated)
bashi
Haraken-san, tasak-san, PTAL? (shiino-san, FYI) This CL slows down run-bindings-tests. w/o this CL 2.22s user ...
6 years, 2 months ago (2014-10-21 05:46:56 UTC) #2
Jens Widell
https://codereview.chromium.org/670663002/diff/1/Source/bindings/core/generated.gyp File Source/bindings/core/generated.gyp (right): https://codereview.chromium.org/670663002/diff/1/Source/bindings/core/generated.gyp#newcode62 Source/bindings/core/generated.gyp:62: 'cache_directory': '<(bindings_core_output_dir)/../scripts', On 2014/10/21 05:46:55, bashi1 wrote: > 'cache_directory' ...
6 years, 2 months ago (2014-10-21 10:59:39 UTC) #4
bashi
On 2014/10/21 10:59:39, Jens Widell wrote: > https://codereview.chromium.org/670663002/diff/1/Source/bindings/core/generated.gyp > File Source/bindings/core/generated.gyp (right): > > https://codereview.chromium.org/670663002/diff/1/Source/bindings/core/generated.gyp#newcode62 ...
6 years, 2 months ago (2014-10-21 23:58:32 UTC) #5
haraken
LGTM (but I'm not familiar with how jinja cache works)
6 years, 2 months ago (2014-10-22 02:09:13 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/670663002/40001
6 years, 2 months ago (2014-10-22 02:18:37 UTC) #8
commit-bot: I haz the power
Committed patchset #3 (id:40001) as 184138
6 years, 2 months ago (2014-10-22 03:16:11 UTC) #9
Nils Barth (inactive)
bashi: Minor style nit BTW, this is quite exciting -- we'd thought about using the ...
6 years, 2 months ago (2014-10-22 14:19:52 UTC) #11
bashi
6 years, 2 months ago (2014-10-23 22:53:32 UTC) #12
Message was sent while issue was closed.
On 2014/10/22 14:19:52, Nils Barth (inactive) wrote:
> bashi: Minor style nit
> 
> BTW, this is quite exciting -- we'd thought about using the proper reader
> instead of regexes for these earlier steps, and it's great to see it actually
> being done -- thanks!
> This really helps with consistency, legibility, and correctness -- we've had
> endless subtle bugs with regex-based parsing, often missed for months or
years.
> 
>
https://codereview.chromium.org/670663002/diff/40001/Source/bindings/scripts/...
> File Source/bindings/scripts/compute_interfaces_info_individual.py (right):
> 
>
https://codereview.chromium.org/670663002/diff/40001/Source/bindings/scripts/...
> Source/bindings/scripts/compute_interfaces_info_individual.py:147: if
> len(definitions.interfaces) > 0:
> Style nit:
> Use implicit true/false (truthy/falsy):
>
https://google-styleguide.googlecode.com/svn/trunk/pyguide.html?showone=True/...
> 
> ...so this can simply be:
> if definitions.interfaces:
> 
>
https://codereview.chromium.org/670663002/diff/40001/Source/bindings/scripts/...
> Source/bindings/scripts/compute_interfaces_info_individual.py:160: elif
> len(definitions.dictionaries) > 0:
> Ditto.

Thank you! I uploaded a follow-up CL.
https://codereview.chromium.org/678453004

Powered by Google App Engine
This is Rietveld 408576698