HomePhabricator

[WebAssembly] Make assembler check for proper nesting of control flow.

Authored by aardappel on Dec 26 2018, 2:46 PM.

Description

[WebAssembly] Make assembler check for proper nesting of control flow.

Summary:
It does so using a simple nesting stack, and gives clear errors upon
violation. This is unique to wasm, since most CPUs do not have
any nested constructs.

Had to add an end of file check to the general assembler for this.

Note: if/else/end instructions are not currently supported in our
tablegen defs, so these tests will be enabled in a follow-up.
They already pass the nesting check.

Reviewers: dschuff, aheejin

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

Differential Revision: https://reviews.llvm.org/D55797

llvm-svn: 350078

Details

Committed
aardappelDec 26 2018, 2:46 PM
Differential Revision
D55797: [WebAssembly] Make assembler check for proper nesting of control flow.
Parents
rG82f43aab216a: manpages: Update the URL for https
Branches
Unknown
Tags
Unknown