Skip to main content

Questions tagged [webassembly]

For questions about how programming languages target the WebAssembly virtual machine, or the WebAssembly text format itself

14 votes
1 answer
3k views

So, WebAssembly has two types of blocks of code, block and loop. When you break with br or <...
FlatAssembler's user avatar
0 votes
3 answers
334 views

So, I recently run into this bug in the compiler for my programming language that outputs WebAssembly Text Format. Here is what the output looked like: I fixed it by changing in my compiler: ...
FlatAssembler's user avatar
2 votes
1 answer
620 views

So, WebAssembly is planning to add the support for multiple linear memories (something like x86 sections). And some WebAssembly directives (such as data) are made ...
FlatAssembler's user avatar
4 votes
1 answer
280 views

My AEC-to-WebAssembly compiler often outputs WebAssembly code doing unaligned access, which is valid in WebAssembly (it's just not guaranteed to be as fast as aligned access, and, on ARM, it usually ...
FlatAssembler's user avatar
5 votes
1 answer
394 views

Assume that I have a simple language with the types I32 and F32, but also composite types like Tuples. I want to add Discriminated Union types, but I find it difficult to generate the wasm code in a ...
Jonas's user avatar
  • 715
0 votes
1 answer
438 views

So, here is how strings work in my AEC-to-WebAssembly compiler. After the program is parsed, all strings except inline assembly ones are gathered in a C++ ...
FlatAssembler's user avatar
2 votes
1 answer
341 views

In our front-end developer course at Algebra, we are being taught there are three different types of objects in JavaScript: Native objects - those that are defined by JavaScript itself, such as ...
FlatAssembler's user avatar
10 votes
2 answers
697 views

I am working on a new backend for a programming language using LLVM IR. This language makes a distinction between basic values and pointers to nodes on the heap, and uses a copying collector for ...
user65560's user avatar
  • 200
6 votes
2 answers
658 views

Consider the following pseudocode: ...
Aster's user avatar
  • 3,508
7 votes
2 answers
469 views

IIRC the WebAssembly text format (.wat) is not able to express everything .wasm can, such as binary (custom) sections. I'm not sure about the current state of WebAssembly text and binary formats now ...
Hydroper's user avatar
  • 1,047
5 votes
3 answers
807 views

In my programming language that compiles to WebAssembly, I am using the following syntax for inline assembly: ...
FlatAssembler's user avatar
13 votes
1 answer
696 views

I am building a compiler targeting WebAssembly for a language that makes heavy use of first-class coroutines. WASM doesn't have native coroutine support (yet), so I have to emulate it. Given the ...
Michael Homer's user avatar
  • 15.6k