Commit Graph

34 Commits

Author SHA1 Message Date
Mark McCaskey
b3a765446a fix bug in stat, move lstat64 back to unix 2019-04-08 11:26:25 -07:00
losfair
08f4526b45 Merge remote-tracking branch 'origin/master' into feature/dynasm-backend 2019-03-17 21:14:01 +08:00
Mackenzie Clark
14104c2c8b fix lots of warnings
fix warnings
2019-03-15 14:10:17 -07:00
Brandon Fish
e5d67c9705 Add dynasm feature to emscripten tests 2019-03-13 20:16:07 -05:00
Ivan Enderlin
20d1023abe fix(emscripten) Various warning fixes and cleanups (#266)
* fix(emscripten) Remove unused imports.

This patch removes unused imports reported by `rustc` as warnings.

* fix(emscripten) Allow unreachable patterns in `_clock_gettime`.

The compiler thinks `CLOCK_MONOTONIC_COARSE` is unreachable, which is
not always the case. Add an attribute to allow unreachable patterns to
remove the warning.

* fix(emscripten) Rename unused variables.

This patch renames various unused variables by appending an underscore
to them.

* fix(emscripten) Declare `table` as immutable.

The `table` variable in `EmscriptenGlobals::new` was declared as
mutable, but it's never mutated.

* fix(emscripten) Remove an unnecessary `unsafe` block.

* fix(emscripten) Remove duplicate definition of `SO_NOSIGPIPE`.

The `SO_NOSIGPIPE` constant is defined in `syscalls/mod.rs` and
`syscalls/unix.rs`. It's never used in the first case. We can safely
remove it in this file, and keep it in `unix.rs`.

* fix(emscripten) `read_string_from_wasm` is used only on Windows.

Mark `read_string_from_wasm` as possible deadcode, since it's used
only on Windows.

* fix(emscripten) Remove `DYNAMICTOP_PTR_DIFF`, `stacktop`, `stack_max`,
`dynamic_base` and `dynamic_ptr`.

Four functions and one constant are used together but never used
inside or outside this file. They are deadcode.

* fix(emscripten) Remove `infinity` and `nan` fields of `EmscriptenGlobalsData`.

Those fields are never used.

* fix(emscripten) Allow non snake case in `emscripten_target.rs`.

Many functions in this file don't follow the snake case style for Rust
function names. The reason is that we want the names to match the
emscripten symbol names; even if a mapping is done in `lib.rs`, it's
easier to get the same names.

* fix(emscripten) Rename `STATIC_TOP` to `static_top`.

This variable is not a constant.
2019-03-12 14:00:33 -07:00
Brandon Fish
1957ddef53 Run emscripten tests with both compilers 2019-03-06 21:36:46 -06:00
Lachlan Sneff
9f40eedba8 Get caching working again 2019-02-20 16:41:41 -08:00
Syrus
f52c4ce5cc Merge branch 'master' into feature/ctx-first-arg 2019-02-12 10:28:25 -08:00
Syrus
6c7fd55b87 Moved ctx to be the first argument in emscripten 2019-02-09 13:58:18 -08:00
Mackenzie Clark
4ef7dc339c
optimize imports (#170) 2019-02-09 13:31:28 -08:00
Mackenzie Clark
ce03e4464c fill unsetenv for windows (#150)
* fill unsetenv

* update usage of read_string_from_wasm

* convert helper to return String

* correct usage of helper fn, cargo fmt, and check in lock file change
2019-02-07 10:51:19 -08:00
Mackenzie Clark
83df3ad35f
fix putenv and setenv for windows (#140) 2019-02-06 18:57:11 -08:00
Lachlan Sneff
8fe9b7eac2
Add caching. (#134)
* Allow a module to have a different signature registry than the process-specific

* Add core ability to build compiled code caches

* Remove timing printouts

* Serialize/Deserialize memories to reduce copies

* Work more on api

* Relocate local functions relatively before external functions

* Fix incorrect definition in test

* merge errors caused by merge

* Fix emscripten compile

* Fix review comments
2019-02-06 16:26:45 -08:00
Lachlan Sneff
eba66f3b33 Add typed functions and weird type parameter things 2019-02-02 15:28:50 -08:00
Brandon Fish
cf325f7cd6 Fixup/comment out to get things compiling 2019-01-29 23:08:03 -06:00
Brandon Fish
ee911092ea Use memory min and max values from module to generate environment memory 2019-01-25 20:12:36 -06:00
Brandon Fish
1a1958a0ce Use table min and max values from module to generate environment table 2019-01-25 19:55:33 -06:00
Syrus
6d8465721f Improved formatting 2019-01-24 15:30:13 -08:00
Syrus
fc1b255d40 Make emscripten work again 2019-01-24 13:04:12 -08:00
Brandon Fish
9970d2871b Add Debug impl for EmscriptenData 2019-01-24 00:17:43 -06:00
Brandon Fish
943fc3900a Addition build warning cleanup 2019-01-24 00:05:07 -06:00
Brandon Fish
99bc454c5b Add EmscriptenData to instance and update usages 2019-01-23 23:49:34 -06:00
Syrus
83d0c3e647 Formatted files 2019-01-23 12:35:14 -08:00
Brandon Fish
157183d212 Update to new runtime 2019-01-23 01:27:13 -06:00
Brandon Fish
74875ed554 Library restructure (#104)
* Move wasmer-runtime to wasmer-runtime-core

* Add the runtime library

* Fix issue with macros using wasmer_runtime, fmt

* Make default compiler dependency optional

* Add instantiate and validate functions
2019-01-22 11:02:06 -08:00
Brandon Fish
7fc892be07 Removing some unused imports, cleanup 2019-01-18 18:36:28 -06:00
Lachlan Sneff
8a9f5fa61a
Add special error types for compile, linking, and runtime errors. (#99)
* Add error types and convert most results to wasmer-runtime results

* Fix spectests

* Fix umbrella project to work with new error types
2019-01-18 10:54:16 -08:00
Brandon Fish
47f46be69c Ignore clippy error level 2019-01-18 00:33:46 -06:00
Brandon Fish
e43c3cb2eb cargo fmt 2019-01-18 00:18:13 -06:00
Steve Akinyemi
456a76a5e5 Fix emtest compilation issues 2019-01-18 01:25:05 +01:00
Steve Akinyemi
57fbfd58d3 Fix globals 2019-01-17 23:19:15 +01:00
Steve Akinyemi
0bf6ce49f6 Update emscripten to latest changes 2019-01-17 23:19:15 +01:00
Steve Akinyemi
927f6e4155 Fix other issues with emscripten integration 2019-01-17 23:19:14 +01:00
Syrus
de459fa5bd Isolated emscripten in new lib 2019-01-10 21:38:10 -08:00