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

Issue 68733006: IDL compiler: Refactor attribute configuration from Python CG to Jinja template (Closed)

Created:
7 years, 1 month ago by Nils Barth (inactive)
Modified:
7 years, 1 month ago
Reviewers:
haraken
CC:
blink-reviews, Nils Barth (inactive), kojih, arv+blink, jsbell+bindings_chromium.org, abarth-chromium, marja+watch_chromium.org, adamk+blink_chromium.org, haraken, Nate Chapin, Inactive, kouhei (in TOK)
Visibility:
Public.

Description

IDL compiler: Refactor attribute configuration from Python CG to Jinja template Most of the attribute configuration is simple enough to compute in the templates (via {% set %}), which avoids having to look back and forth between the template and Python code to figure out what's going on. This reduces the complexity of the CG, and puts the logic right where it's actually being used. setter_callback_name in the one exception -- it's complex and going to get more complex when we support [PutForwards]. This also makes the naming clearer, as it's all lined up, and makes the actual attribute line more legible without all the |attribute.| noise. BUG=239771 NOTRY=true Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=162078

Patch Set 1 #

Patch Set 2 : Tweak #

Total comments: 7

Patch Set 3 : Revised #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -38 lines) Patch
M Source/bindings/scripts/unstable/v8_attributes.py View 5 chunks +2 lines, -32 lines 0 comments Download
M Source/bindings/scripts/unstable/v8_interface.py View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/templates/interface.cpp View 1 2 2 chunks +26 lines, -4 lines 0 comments Download
M Source/bindings/templates/interface_base.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
Nils Barth (inactive)
Refactoring to reduce indirection and flatten logic, putting simple configuration logic right where it's used. ...
7 years, 1 month ago (2013-11-15 05:13:34 UTC) #1
haraken
LGTM https://codereview.chromium.org/68733006/diff/30001/Source/bindings/templates/interface.cpp File Source/bindings/templates/interface.cpp (right): https://codereview.chromium.org/68733006/diff/30001/Source/bindings/templates/interface.cpp#newcode34 Source/bindings/templates/interface.cpp:34: {% set callback_name = callback_name => method_callback_name https://codereview.chromium.org/68733006/diff/30001/Source/bindings/templates/interface.cpp#newcode180 ...
7 years, 1 month ago (2013-11-15 06:16:59 UTC) #2
Nils Barth (inactive)
Thanks, will do SetXXX methods in followup. https://codereview.chromium.org/68733006/diff/30001/Source/bindings/templates/interface.cpp File Source/bindings/templates/interface.cpp (right): https://codereview.chromium.org/68733006/diff/30001/Source/bindings/templates/interface.cpp#newcode34 Source/bindings/templates/interface.cpp:34: {% set ...
7 years, 1 month ago (2013-11-15 06:26:49 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nbarth@chromium.org/68733006/30002
7 years, 1 month ago (2013-11-15 06:27:02 UTC) #4
commit-bot: I haz the power
7 years, 1 month ago (2013-11-15 06:55:44 UTC) #5
Message was sent while issue was closed.
Change committed as 162078

Powered by Google App Engine
This is Rietveld 408576698