| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
This makes things easier for users and packagers of libwabt.
|
| |
|
|
|
| |
This way the names won't conflict with other headers with the same name.
|
|
|
|
|
|
|
| |
This change keeps the union, but hides it behind accessors. The
implementation is a bit complex since std::string requires constructors
and destructors to be called. As a result we have to use placement new
and explicit destructors.
|
|
|
|
| |
* Remove destroy_var; use destructor instead
* Add Var copy/move constructor/assignment operator.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change can't really be done in isolation, since once we add members
with constructors to a struct, it is no longer has a trivial
constructor. This propagates through all types that use it, etc.
There are a number of changes that are ugly, but hopefully reduced the
amount of code that needed to change. In particular, I changed some
union members to pointers so they would stay trivially constructible.
Another tricky change is the handling of duplicate bindings: previously
we just relied on the fact that our hash implementation would be
consistent. A nicer solution is to display the duplicated bindings in
source order. There's probably a nicer way to do this; bikeshedding
welcome. :-)
|
| |
|
| |
|
| |
|
|
|
| |
Also switch to using C++11.
|
|
Mostly this involves adding additional casts. Though there are a few
more substantial changes:
* The default method for relocating parser stacks no longer works
because Bison assumes that C++ values can't be memcpy'd. Ours can, but
there's no easy way to make the generated code do the right thing, so
we do it manually
* Removed all uses of WabtBool and replaced with bool
* Renamed all uses of export and mutable -> export_ and mutable_
* Casting an invalid value to an enum triggers ubsan, so we have to be a
little more careful about when we do it (see binary-reader.c:read_sections())
* It's illegal to forward-declare enums, so we just #include instead.
* Designated initializers are not allowed in g++, so we have to switch
them to lazily initialized structures instead. Pretty horrible, so it
will be nice to have a better solution for C++.
|