On Thu, Apr 23, 2020 at 3:10 PM キャロウ マーク <[email protected]> wrote:

> [ Sorry about the previous empty message. Finger slip.]
>
> Hi Alon,
>
> On Apr 23, 2020, at 11:09, Alon Zakai <[email protected]> wrote:
>
> It might be good to look at how it's used in the test suite,
>
>
> https://github.com/emscripten-core/emscripten/blob/9fd8eb088fa6795502e9bd2a2c92ff33390ef49d/tests/test_core.py#L7286
>
>
> Thanks. I tried to find this by working back from the test link given in
> the webidl_binder documentation but failed.
>
>
> Looks like it just does python and then the path to the binder. I agree
> that emsdk integration could be better, seems like right now you need to
> give it the full path into the subdirectory of the emsdk where it exists.
>
>
> I filed https://github.com/emscripten-core/emsdk/issues/478 about this.
>
>
> I also agree those temp files shouldn't be emitted. I'm not sure offhand
> why that happens, it could be due to the IDL parser library we use, which
> we didn't write ourselves. Worth filing an issue, hopefully someone can
> look into that.
>
> And https://github.com/emscripten-core/emscripten/issues/10986 about this.
>
> I also filed https://github.com/emscripten-core/emscripten/issues/10987 about
> the very, very low signal to noise ratio in webidl_binder’s output when
> reporting a syntax error.
>
> ...
>
>
>> The binder is emitting the following code into the .cpp file:
>>
>> void array_bounds_check(const int array_size, const int array_idx) {
>>   if (array_idx < 0 || array_idx >= array_size) {
>>     EM_ASM({
>>       throw 'Array index ' + $0 + ' out of bounds: [0,' + $1 + ')';
>>     }, array_idx, array_size);
>>   }
>> }
>>
>> emcc barfs on " '$' in identifier [-Wdollar-in-identifier-extension]”.
>> WebIDL-Binder.html says nothing about either EM_ASM or
>> ‘array_bounds_check’. And I don’t see any flag to emcc relevant to enabling
>> ASM_JS. How do I fix this?
>>
>>
> How can I stop this? the test runner doesn’t seem to set any special emcc
> options relevant to this.
>
>
I think we can fix that by avoiding an EM_ASM. Currently EM_ASMs need $'s
in their params. Instead, we could rewrite that to use an EM_JS which
avoids that.

I opened a PR for one of them here:
https://github.com/emscripten-core/emscripten/pull/10988

But there are others which are less trivial. Maybe if you have time you can
take a look, a PR would be very welcome. Or, meanwhile you can disable that
warning on that file maybe.


> I could turn off warnings as errors so I’d just get noise but I do not
> want to do that. At the moment this is blocking me from further progress.
>
> Regards
>
>     -Mark
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/5AE37AE3-6D21-4241-9E2F-8C573995E945%40callow.im
> <https://groups.google.com/d/msgid/emscripten-discuss/5AE37AE3-6D21-4241-9E2F-8C573995E945%40callow.im?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpQYBmxKeRZm1pBuo%2BJXBKkcLXdfrG%2BnO6QtEwp3M%3DpNjA%40mail.gmail.com.

Reply via email to