DescriptionUse 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 #
Messages
Total messages: 6 (0 generated)
|