| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
This adds ref.eq, ref.null, ref.is_null, ref.func.
|
|
|
|
|
|
|
|
|
| |
(#5273)
When `-Wheader-hygiene` is enabled, C compiler will warn when using
namespace directive in global context in header file.
When `-Wimplicit-const-int-float-conversion` is enabled C compiler will
warn on implicit integer to double conversions that change values.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the goal of supporting null characters (i.e. zero bytes) in strings.
Rewrite the underlying interned `IString` to store a `std::string_view` rather
than a `const char*`, reduce the number of map lookups necessary to intern a
string, and present a more immutable interface.
Most importantly, replace the `c_str()` method that returned a `const char*`
with a `toString()` method that returns a `std::string`. This new method can
correctly handle strings containing null characters. A `const char*` can still
be had by calling `data()` on the `std::string_view`, although this usage should
be discouraged.
This change is NFC in spirit, although not in practice. It does not intend to
support any particular new functionality, but it is probably now possible to use
strings containing null characters in at least some cases. At least one parser
bug is also incidentally fixed. Follow-on PRs will explicitly support and test
strings containing nulls for particular use cases.
The C API still uses `const char*` to represent strings. As strings containing
nulls become better supported by the rest of Binaryen, this will no longer be
sufficient. Updating the C and JS APIs to use pointer, length pairs is left as
future work.
|
|
|
|
| |
NFC (#4090)
|
|
|
| |
Applies the changes in #2065, and temprarily disables the hook since it's too slow to run on a change this large. We should re-enable it in a later commit.
|
|
|
| |
Mass change to apply clang-format to everything. We are applying this in a PR by me so the (git) blame is all mine ;) but @aheejin did all the work to get clang-format set up and all the manual work to tidy up some things to make the output nicer in #2048
|
|
|
| |
Removes redundant | 0s and similar things. (Apparently closure compiler doesn't do that, so makes sense to do here.)
|
|
|
|
| |
* Use modern T p = v; notation to initialize class fields
* Use modern X() = default; notation for empty class constructors
|
|
|
|
| |
asm.js anyhow, so knowing where ;s are is unnecessary bloat
|
|
|
|
|
|
|
|
|
|
|
|
| |
* support i64 intrinsics from fastcomp, adding --wasm-only flag
* refactor callImport logic in asm2wasm to avoid recomputing wasm types again
* legalize illegal i64 params in exports and imports
* do safe i64 binary ops depending on precision
* fix addVar, only assert on names if we are using a name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This triggers 5 independent build / test runs:
- clang, no sanitizer;
- clang, UB sanitizer;
- clang, address sanitizer (disabled for now);
- clang, thread sanitizer (disabled for now);
- GCC.
Enabling UBSan led to these changes:
- Fix a bunch of undefined behavior throughout the code base.
- Fix some tests that relied on that undefined behavior.
- Make some of the tests easier to debug by printing their command line.
- Add ubsan blacklist to work around libstdc++ bug.
- Example testcase also needs sanitizer because libsupport.a uses it.
|
| |
|
|
|
|
| |
This applies Apache 2.0 properly (as far as our lawyers have told me). We can do this early since all of the code was written by Alon Zakai.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|