Commit Graph

6 Commits

Author SHA1 Message Date
Dan Gohman
c0f3eaafbc Publically declare GlobalValue.
It's used in the publically declared FuncEnvironment trait, so library
users should be able to name it.
2017-09-07 10:36:37 -07:00
Jakob Stoklund Olesen
062dd41c93 Don't export the 'Local' type from cton_wasm.
This type is not longer used in any public interface, it has become an
internal implementation detail.

Also remove some unused exported types from the crate.
2017-09-06 15:56:39 -07:00
Jakob Stoklund Olesen
dc2bee9cef Add a FuncEnvironment::make_direct_func() callback.
This allows the environment to control the signatures used for direct
function calls. The signature and calling convention may depend on
whether the function is imported or local.

Also add WasmRuntime::declare_func_{import,type} to notify the runtime
about imported and local functions. This is necessary so the runtime
knows what function indexes are referring to .

Since imported and local functions are now declared to the runtime, it
is no longer necessary to return hashes mapping between WebAssembly
indexes and Cretonne entities.

Also stop return null entries for the imported functions in the
TranslationResult. Just return a vector of local functions.
2017-09-06 12:36:19 -07:00
Jakob Stoklund Olesen
03939e4f9f Move TranslationState into its own module.
Add some convenience methods for common state access patterns.
2017-09-01 15:55:02 -07:00
Dan Gohman
f905dc914b Enable missing_docs errors in the wasm crate.
This adds `#![deny(missing_docs)]` to the wasm crate, and adds documentation
to several struct and enum fields, as needed.
2017-08-28 17:07:28 -07:00
Denis Merigoux
ee9989c4b9 Dumped code from the wasm2cretonne repo.
Integrated wasm test suite translation as cretonne test

Fixes #146.
Fixes #143.
2017-08-28 15:57:43 -07:00