aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/GlobalGen.py
Commit message (Collapse)AuthorAgeFilesLines
* WebIDL codegen: Replace cmake with a single Python scriptSimon Sapin2019-09-271-143/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | When playing around with Cargo’s new timing visualization: https://internals.rust-lang.org/t/exploring-crate-graph-build-times-with-cargo-build-ztimings/10975/21 … I was surprised to see the `script` crate’s build script take 76 seconds. I did not expect WebIDL bindings generation to be *that* computationally intensive. It turns out almost all of this time is overhead. The build script uses CMake to generate bindings for each WebIDL file in parallel, but that causes a lot of work to be repeated 366 times: * Starting up a Python VM * Importing (parts of) the Python standard library * Importing ~16k lines of our Python code * Recompiling the latter to bytecode, since we used `python -B` to disable writing `.pyc` file * Deserializing with `cPickle` and recreating in memory the results of parsing all WebIDL files ---- This commit remove the use of CMake and cPickle for the `script` crate. Instead, all WebIDL bindings generation is done sequentially in a single Python process. This takes 2 to 3 seconds.
* Generate apis.html and css-properties.json for docs as part of crates’ ↵Simon Sapin2019-07-301-23/+19
| | | | | | | | build scripts … rather than as an extra step after `cargo doc`. This helps always using the correct set of CSS properties (for layout 2013 v.s. 2020).
* Auto-generate CSSStyleDeclaration.webidl for CSS properties based on the ↵Simon Sapin2019-07-291-2/+59
| | | | style crate
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* script codegen: Avoid modifying in-place a generated file.Simon Sapin2017-01-191-0/+1
|
* Native MSVC windows build, convert to cmakeVladimir Vukicevic2016-08-171-1/+6
|
* Generate a list of supported DOM APIs from parsed WebIDLs.Josh Matthews2016-07-151-11/+19
|
* Lazily define interface objects on globals (fixes #6419)Anthony Ramine2016-02-251-0/+1
|
* Remove unused command-line Python codegen argumentsCorey Farwell2016-01-071-2/+0
|
* Use OS-agnostic filesystem paths in PythonCorey Farwell2015-09-081-3/+3
| | | | This will eventually need to be done for #1908
* Allow 'script' component to enter a 'built' stateCorey Farwell2015-09-021-1/+2
| | | | | | | | | | | | | After this pull request merged: https://github.com/servo/servo/pull/7209 the 'script' component would never enter a 'built' state. In other words, if one calls `mach build`, lets it complete, then calls `mach build` again, the 'script' component would rebuild even though we supposedly just built it. This was due to the `ParserResults.pkl` getting placed in the `components/script` directory instead of the output directory, causing cargo to think that there were unbuilt files.
* Auto merge of #7209 - frewsxcv:codegen-build-cleanup, r=metajackbors-servo2015-09-011-19/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup/refactor build scripts for DOM codegen Prior to this commit, the script codegen makefile relied on an intermediary pythonpath.py file that handled python dependencies and incorporated a couple hacks to get the codegen building working. This commit removes that intermediary file and attempts to make the script codegen build process cleaner. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7209) <!-- Reviewable:end -->
| * Cleanup/refactor build scripts for DOM codegenCorey Farwell2015-08-141-19/+15
| | | | | | | | | | | | | | | | Prior to this commit, the script codegen makefile relied on an intermediary pythonpath.py file that handled python dependencies and incorporated a couple hacks to get the codegen building working. This commit removes that intermediary file and attempts to make the script codegen build process cleaner.
| * Add missing parameter to usageString in GlobalGen.pyCorey Farwell2015-08-141-1/+1
| |
* | Utilize Python context managers for opening/closing filesCorey Farwell2015-08-211-6/+4
|/ | | | In some of these cases, files were not being closed
* Remove tidy blacklist for 'script/dom/bindings/*'Corey Farwell2015-07-091-4/+5
| | | | | | | | | | | | | | | | | | | | | Recently, I found myself reading through the Python codegen scripts that live in 'components/script/dom/bindings/*' and noticed that there were many tidy violations: unnecessary semicolons, weird spacing, unused variables, lack of license headers, etc. Considering these files are now living in our tree and mostly maintained directly by contributors of Servo (as opposed to being from upstream), I feel these files should not be excluded from our normal tidy process. This commit removes the blacklist on these files and fixes all tidy violations. I added these subdirectories to the blacklist because they appear to be maintained upstream somewhere else: * "components/script/dom/bindings/codegen/parser/*", * "components/script/dom/bindings/codegen/ply/*", Also, I added a '# noqa' comment which tells us to ignore the flake8 errors for that line. I chose to ignore this (instead of fixing it) to make the work for this commit simpler for me.
* Remove unused files in 'script/dom/bindings/'Corey Farwell2015-07-091-2/+0
| | | | | | As per this conversation: https://github.com/servo/servo/pull/6580
* Cargoify servoJack Moffitt2014-09-081-0/+83