Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stylo: Use the bindgen rewrite to generate the bindings. #13269

Merged
merged 3 commits into from Sep 21, 2016

Conversation

@emilio
Copy link
Member

emilio commented Sep 14, 2016


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes do not require tests because stylo ci is not there yet.

r? @Manishearth


This change is Reviewable

@highfive
Copy link

highfive commented Sep 14, 2016

Heads up! This PR modifies the following files:

  • @bholley: components/style/properties/gecko.mako.rs
@highfive
Copy link

highfive commented Sep 14, 2016

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
  • These commits modify style code, but no tests are modified. Please consider adding a test!
@emilio
Copy link
Member Author

emilio commented Sep 14, 2016

cc @upsuper @heycam, this allows us to bindgen nsINode and Element, so we can remove a lot of out of line calls for things like the flags, the parent, etc...

@upsuper
Copy link
Member

upsuper commented Sep 14, 2016

One extern "C" block for all functions becoming one block per function looks unfortunate.

@emilio
Copy link
Member Author

emilio commented Sep 14, 2016

@upsuper that's right, but it's a consequence of how the new bindgen code is structured (expects each item to generate its own rust ast item). This simplifies a lot of things, and we could definitely coalesce them, but I think that's not a huge priority.

Copy link
Member

Manishearth left a comment

Looks good to me. Haven't looked too closely at the generated structs, but everything else makes sense.

@@ -1640,7 +1640,7 @@ clip-path
fn init_shape(clip_path: &mut StyleClipPath, ty: StyleBasicShapeType) -> &mut StyleBasicShape {
unsafe {
// We have to be very careful to avoid a copy here!
let ref mut union = clip_path.StyleShapeSource_nsStyleStruct_h_unnamed_26;
let ref mut union = clip_path.__bindgen_anon_1;

This comment has been minimized.

Copy link
@Manishearth
@Manishearth
Copy link
Member

Manishearth commented Sep 15, 2016

(r=me when you need it)

@emilio
Copy link
Member Author

emilio commented Sep 21, 2016

The bindgen rewrite landed today.

@bors-servo: r=Manishearth

@bors-servo
Copy link
Contributor

bors-servo commented Sep 21, 2016

📌 Commit c49577d has been approved by Manishearth

@bors-servo
Copy link
Contributor

bors-servo commented Sep 21, 2016

Testing commit c49577d with merge 5559e8c...

bors-servo added a commit that referenced this pull request Sep 21, 2016
stylo: Use the bindgen rewrite to generate the bindings.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because stylo ci is not there yet.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

r? @Manishearth

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13269)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Sep 21, 2016

💔 Test failed - mac-rel-wpt

@emilio
Copy link
Member Author

emilio commented Sep 21, 2016

@emilio emilio force-pushed the emilio:new-bindgen branch from c49577d to 52aa87b Sep 21, 2016
@emilio
Copy link
Member Author

emilio commented Sep 21, 2016

Updated the bindgen script to run with -DMOZ_STYLO (whoops), and use the latest fixes from rust-lang/rust-bindgen#58.

@bors-servo: r=Manishearth

@bors-servo
Copy link
Contributor

bors-servo commented Sep 21, 2016

📌 Commit 52aa87b has been approved by Manishearth

@bors-servo
Copy link
Contributor

bors-servo commented Sep 21, 2016

Testing commit 52aa87b with merge 1472a46...

bors-servo added a commit that referenced this pull request Sep 21, 2016
stylo: Use the bindgen rewrite to generate the bindings.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because stylo ci is not there yet.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

r? @Manishearth

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13269)
<!-- Reviewable:end -->
@emilio
Copy link
Member Author

emilio commented Sep 21, 2016

@bors-servo: r=Manishearth

Pushed an OSX-only bindgen fix, as requested by @bholley.

@bors-servo
Copy link
Contributor

bors-servo commented Sep 21, 2016

📌 Commit cce67c9 has been approved by Manishearth

@bors-servo
Copy link
Contributor

bors-servo commented Sep 21, 2016

Testing commit cce67c9 with merge ecb44e7...

bors-servo added a commit that referenced this pull request Sep 21, 2016
stylo: Use the bindgen rewrite to generate the bindings.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because stylo ci is not there yet.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

r? @Manishearth

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13269)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Sep 21, 2016

@bors-servo bors-servo merged commit cce67c9 into servo:master Sep 21, 2016
1 of 3 checks passed
1 of 3 checks passed
continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
continuous-integration/appveyor/pr AppVeyor build failed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.