servo / rust-mozjs

DEPRECATED - moved to servo/mozjs instead.
Mozilla Public License 2.0
293 stars 122 forks source link

Regenerate bindings using the latest bindgen++ #198

Closed michaelwu closed 8 years ago

michaelwu commented 9 years ago

Need to test this a bit more, but it's structured roughly the way I want it and no manual edits of jsapi_*.rs are required.

Fixes #158

Review on Reviewable

michaelwu commented 9 years ago

Tested and working on 64 bit OSX and 64 bit Linux. Had to fix an issue with the mangled names on OSX where an extra underscore was being prefixed to the mangled name.

michaelwu commented 9 years ago

Tested and working on Gonk. Android is the only one left to check, I think.

michaelwu commented 9 years ago

Adjusted the bindings generation a bit after @larsbergstrom found missing symbols on Android. Need to test once more, but I think this is ready for review. r? @jdm

michaelwu commented 9 years ago

Works on Android.

jdm commented 8 years ago
<jdm> but yeah, I'd be inclined to rewrite all of the generated transmutes to be pointer casts instead
<jdm> let raw = &mut self._bindgen_data_1_ as *mut _ as *mut u8; raw.offset(0) as *mut _
jdm commented 8 years ago
* jdm is curious why FunctionClassPtr is a Class, while Int8ArrayClassPtr is a *const Class
 <mwu> jdm: looks like a bug. I think they should all be *const Class
<mwu> though.. this code is pretty clever, so I dunno
<mwu> probably a bug.
jdm commented 8 years ago

Ok, I've pointed out all of the things in the generated output for linux32 that made me scratch my head, and the stuff in the non-generated files that could be improved, so I think my part here is complete.

jdm commented 8 years ago

@bors-servo: r+

bors-servo commented 8 years ago

:pushpin: Commit 9e76ea6 has been approved by jdm

bors-servo commented 8 years ago

:hourglass: Testing commit 9e76ea6 with merge 01ff3cb...

bors-servo commented 8 years ago

:sunny: Test successful - travis