summaryrefslogtreecommitdiff
path: root/src/shell-interface.h
Commit message (Collapse)AuthorAgeFilesLines
...
* standardize on 'template<' over 'template <' (i.e., remove a space) (#1782)Alon Zakai2018-11-291-3/+3
|
* Remove default cases (#1757)Thomas Lively2018-11-271-1/+2
| | | | | | Where reasonable from a readability perspective, remove default cases in switches over types and instructions. This makes future feature additions easier by making the compiler complain about each location where new types and instructions are not yet handled.
* Unify imported and non-imported things (#1678)Alon Zakai2018-09-191-9/+15
| | | | | | | | | | | | | | Fixes #1649 This moves us to a single object for functions, which can be imported or nor, and likewise for globals (as a result, GetGlobals do not need to check if the global is imported or not, etc.). All imported things now inherit from Importable, which has the module and base of the import, and if they are set then it is an import. For convenient iteration, there are a few helpers like ModuleUtils::iterDefinedGlobals(wasm, [&](Global* global) { .. use global .. }); as often iteration only cares about imported or defined (non-imported) things.
* Print Stack IR in proper .wat format (#1630)Alon Zakai2018-08-141-1/+1
| | | This now makes --generate-stack-ir --print-stack-ir emit a fully valid .wat wasm file, in stacky format.
* afl-fuzz fixes for table/memory instantiation (#1460)Alon Zakai2018-03-061-4/+8
| | | | | | | | | | * replace assert with a proper trap for an invalid offset in table initialization * fix offset handling in initial table size computation: it is an unsigned value * handle traps in fuzz-exec when creating instance * optimization may remove imports - and imported table init may trap, so opts may remove that trap. check for result comparisons in the right order, so we don't get bothered by that
* Rename WasmType => Type (#1398)Alon Zakai2018-02-021-1/+1
| | | | * rename WasmType to Type. it's in the wasm:: namespace anyhow, and without Wasm- it fits in better alongside Index, Address, Expression, Module, etc.
* Make several derived classes final (#1180)Derek Schuff2017-09-121-1/+1
| | | | | | | Recent versions of clang turn on -Wdelete-non-virtual-dtor at our warning level, which fires when deleting a non-final class that has virtual functions but a non-virtual destructor. Pre-C++11 standard rule of thumb is to just always have a virtual destructor if there are virtual functions, but C++11 final is even better since it may allow for devirtualization optimizations.
* Log callImport fatal error to cerr so it is not buffered. (#1036)Sam Clegg2017-06-121-2/+2
| | | | | | | Use Fatal() rather than stdout or report callImport error Without this the write to stdout can be lost (Since the following line aborts)
* trap on bad result types in shell-interface callTableAlon Zakai (kripken)2017-06-011-0/+3
|
* ctor evaller (#982)Alon Zakai2017-04-281-57/+16
| | | | | Add wasm-ctor-eval, which evaluates functions at compile time - typically static constructor functions - and applies their effects into memory, saving work at startup. If we encounter something we can't evaluate at compile time in our interpreter, stop there. This is similar to ctor_evaller.py in emscripten (which was for asm.js).
* Wasm h to cpp (#926)jgravelle-google2017-03-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * Move WasmType function implementations to wasm.cpp * Move Literal methods to wasm.cpp * Reorder wasm.cpp shared constants back to top * Move expression functions to wasm.cpp * Finish moving things to wasm.cpp * Split out Literal into its own .h/.cpp. Also factor out common wasm-type module * Remove unneeded/transitive includes from wasm.h * Add comment to try/check methods * Rename tryX/checkX methods to getXOrNull * Add missing include that should fix appveyor build breakage * More appveyor
* Fully handle EM_ASM in s2wasm (#910)jgravelle-google2017-02-231-0/+1
| | | | | | | | | | | | * Fully handle EM_ASM in s2wasm * Iterate with size_ts, remember to erase from importsMap as well * Fix dot_s test EM_ASM signatures * Move Name out to its own file, support/name.h * Move removeImportsWithSubstring out of Module class
* Refactor Import::Kind and Export::Kind into an ExternalKind enum class (#725)Alon Zakai2016-10-031-2/+2
|
* error on putting spectest.print in a tableAlon Zakai2016-09-211-0/+4
|
* table parsing and executing fixesAlon Zakai2016-09-201-1/+2
|
* support spectest.globalAlon Zakai2016-09-201-1/+14
|
* use globals in asm2wasmAlon Zakai2016-09-071-3/+5
|
* call_indirect is now structural, so no need to pass the type name aroundAlon Zakai2016-09-071-2/+1
|
* add drop and tee expressionsAlon Zakai2016-09-071-1/+1
|
* offset support in tableAlon Zakai2016-08-151-0/+24
|
* support expressions in segment offsetsAlon Zakai2016-08-121-2/+3
|
* add shared-constants.h for wasm constantsAlon Zakai2016-06-261-0/+1
|
* refactor interpreter code to provide expression executors for both ↵Alon Zakai2016-06-181-1/+1
| | | | standalone and full funtime execution
* parse error detailsAlon Zakai2016-05-121-1/+0
|
* use exceptions consistently to report input errorsAlon Zakai2016-05-121-0/+5
|
* Introduce a separate type for linear memory addresses (#477)Derek Schuff2016-05-111-3/+3
| | | | | | | We've been using size_t (and other things) for addresses, which is generally wrong because it depends on the host, when it should in fact depend on the target. This is a partial fix for #278 (i.e. it's the right fix, I don't think it's applied quite everywhere yet).
* just use a simple vector in data segmentsAlon Zakai2016-04-271-3/+3
|
* Split construction, scanning, and building phases of S2WasmBuilder (#400)Derek Schuff2016-04-271-2/+1
| | | | | | | | | | | Instead of doing all of the S2Wasm work in the constructor, split construction, scanning (to determine implemented functions) and building of the wasm module. This allows the linker to get the symbol information (e.g. implemented functions) without having to build an entire module (which will be useful for archives) and to allow the linker to link a new object into the existing one by building the wasm module in place on the existing module.
* refactor shell interface into its own fileAlon Zakai2016-04-041-0/+180