|
|
|
|
|
by chadaustin
6067 days ago
|
|
Oh, I forgot about another huge case for writing assembly language... These days, we have tons of different languages talking to each other, all in the same program. In Mozilla, for example, JavaScript talks to C++ objects via XPCOM/XPIDL. Since the C++ objects expect data laid out on the C stack in a certain order and JavaScript has no notion of the C stack, there is a bit of platform-specific assembly code in the middle that takes the JavaScript values, places them on the stack, and jumps into the C++. I'm guessing that most languages with built-in foreign function interfaces (like Python's ctypes) have similar thunking layers. |
|
https://bugzilla.mozilla.org/buglist.cgi?query_format=advanc...