<div dir="ltr">The man page for BridgeSupport claims that it describes API symbols which cannot be introspected at runtime.  It also says, "Only classes where additional metadata is needed are described."<div><br>
</div><div style>It seems the additional metadata is what kind of sentinel is used for variable-argument methods and which classes are toll-free bridged to which other types.</div><div style><br></div><div style>Also, no bridgesupport files appear for the iOS or iOS simulator platforms, though there is a tool which might generate this information based on headers.</div>
<div style><br></div><div style>IMHO, this does not solve the method dispatch problem, but it can add a lot of value for Mac OS X.</div><div style><br></div><div style>For my purposes - which is iOS development - I want to be able to call third-party class methods and even undocumented methods (in the simulator), so I'd like to keep the dynamic dispatch.</div>
<div style><br></div><div style>As an optimization on iOS, it would be cool to run some stats on the most commonly called function signatures and fast path those.</div><div style><br></div><div style>-Jason</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Feb 28, 2013 at 1:46 PM, mikel evins <span dir="ltr"><<a href="mailto:mevins@me.com" target="_blank">mevins@me.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
On Feb 28, 2013, at 1:36 PM, Marc Feeley <<a href="mailto:feeley@iro.umontreal.ca">feeley@iro.umontreal.ca</a>> wrote:<br>
<br>
><br>
> On 2013-02-28, at 10:59 AM, Jason Felice <<a href="mailto:jason.m.felice@gmail.com">jason.m.felice@gmail.com</a>> wrote:<br>
><br>
>> I've been thinking about this thread and my project, and it has re-energized me to put some time in.  I'm hoping this evening I will have that time to put in.<br>
>><br>
>> Some things which I've concluded:<br>
>><br>
>> 1. The dependency on libffi is fine for all platforms I know of except for iOS on the native device.  I'll investigate using libffi for most platforms and special-case ARM support.  If feasible (I expect it will be), that should remove a boat load of code.<br>

>> 2. I'll make it not require black hole.<br>
>><br>
><br>
> Couldn't we use Mike Evins' idea of parsing the BridgeSupport files and generating specific FFI code which covers all the available methods?  This approach would be completely portable.<br>
><br>
> To avoid code bloat, we could rely on an "import" declaration which indicates which of the methods we actually need (perhaps inferred from a static program analysis).<br>
<br>
</div></div>BridgeSupport files are XML. Parsing them is easy. Do `man BridgeSupport` to find out more.<br>
<br>
<br>
<br>
</blockquote></div><br></div>