Skip to content

Instantly share code, notes, and snippets.

@yuri91
Last active April 14, 2019 18:44
Show Gist options
  • Save yuri91/4e0bae92318574e6a8038430cb8090c2 to your computer and use it in GitHub Desktop.
Save yuri91/4e0bae92318574e6a8038430cb8090c2 to your computer and use it in GitHub Desktop.
JavaScript WebAssembly

conditional
branching
if (cond()) {
  stuff();
} else {
  other_stuff();
}
call cond
if
  call stuff
else
  call other_stuff
end

jumping
backward
while(1){
  repeat();
  if(cond()){
    continue;
  }
  break;
}
loop
  call repeat
  call cond
  if
    br 1
  end
end

jumping
forward
do{
  if(cond()) {
    break;
  }
  skip();
}while(0);
block
  call cond
  if
    br 1
  end
  call skip
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment