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

Issue 179423002: Use a class for CodeGeneratorV8 (Closed)

Created:
6 years, 10 months ago by Nils Barth (inactive)
Modified:
6 years, 10 months ago
Reviewers:
haraken
CC:
blink-reviews, Nils Barth (inactive), kojih, arv+blink, jsbell+bindings_chromium.org, sof, abarth-chromium, marja+watch_chromium.org, adamk+blink_chromium.org, Nate Chapin, Inactive, terry
Visibility:
Public.

Description

Use a class for CodeGeneratorV8 While writing up the design doc: http://www.chromium.org/developers/design-documents/idl-compiler ...and reviewing Terry's "speed up r-b-t" CL: https://codereview.chromium.org/169743005/ ...I realized that it was clearer and faster if we also made a (simple) object for the V8 code generator. (The actual contents-generating functions are still functions, so we don't have OO boilerplate everywhere: it's just initializing.) This encapsulates the library initialization and the interfaces_info handling, exactly as we currently do for idl_reader. The result is clearer code (separate initialization and call), and allows faster r-b-t (in Terry's CL) due to avoiding multiple initializations. 2 minor cleanups (good practice): * Classes all inherit from |object| (Python "new-style" classes, better behaved) * |frozenset| for header include sets The frozenset() is to emphasize that these are constants; we need to make copies of the header includes to make it safe to run repeatedly (otherwise modifies the "constant"). (Thanks Terry!) BUG=341748 R=haraken NOTRY=true Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167744

Patch Set 1 #

Patch Set 2 : Revised #

Patch Set 3 : Tweaks #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -74 lines) Patch
M Source/bindings/scripts/unstable/code_generator_v8.py View 1 2 1 chunk +66 lines, -57 lines 0 comments Download
M Source/bindings/scripts/unstable/idl_compiler.py View 1 2 2 chunks +8 lines, -6 lines 0 comments Download
M Source/bindings/scripts/unstable/idl_definitions.py View 1 3 chunks +3 lines, -3 lines 0 comments Download
M Source/bindings/scripts/unstable/idl_reader.py View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/scripts/unstable/interface_dependency_resolver.py View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/scripts/unstable/v8_callback_interface.py View 2 chunks +3 lines, -3 lines 0 comments Download
M Source/bindings/scripts/unstable/v8_interface.py View 2 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Nils Barth (inactive)
Cleanup: clearer design, will help with Terry's speedup
6 years, 10 months ago (2014-02-25 07:14:21 UTC) #1
Nils Barth (inactive)
+terry
6 years, 10 months ago (2014-02-25 07:15:23 UTC) #2
haraken
LGTM
6 years, 10 months ago (2014-02-25 07:25:01 UTC) #3
Nils Barth (inactive)
The CQ bit was checked by nbarth@chromium.org
6 years, 10 months ago (2014-02-25 07:34:35 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nbarth@chromium.org/179423002/40001
6 years, 10 months ago (2014-02-25 07:35:47 UTC) #5
commit-bot: I haz the power
6 years, 10 months ago (2014-02-25 07:36:45 UTC) #6
Message was sent while issue was closed.
Change committed as 167744

Powered by Google App Engine
This is Rietveld 408576698