summaryrefslogtreecommitdiff
path: root/src/binding-hash.cc
Commit message (Collapse)AuthorAgeFilesLines
* Move headers to include/wabt/ (#1998)Alex Reinking2022-09-281-2/+2
| | | This makes things easier for users and packagers of libwabt.
* [cleanup] Always use braces with if (#691)Ben Smith2017-12-091-3/+6
|
* Always include quoted headers like "src/foo.h" (#601)Ben Smith2017-08-301-2/+2
| | | This way the names won't conflict with other headers with the same name.
* Use std::string instead of StringSlice in Var (#556)Ben Smith2017-07-061-3/+3
| | | | | | | 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.
* Use CamelCase names and member functions in ir.h (#492)Ben Smith2017-06-121-0/+8
| | | | * Remove destroy_var; use destructor instead * Add Var copy/move constructor/assignment operator.
* Use C++ callbacks in BindingHash::FindDuplicates (#487)Ben Smith2017-06-091-11/+9
|
* Use std::unordered_multimap for BindingHash (#357)Ben Smith2017-03-161-144/+47
| | | | | | | | | | | | | | | 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. :-)
* Move loop variable into for loop header (#347)Ben Smith2017-03-091-5/+3
|
* Replace the Wabt/wabt prefix with a C++ namespace (#331)Ben Smith2017-03-021-38/+40
|
* Require C++-style casts, disallow C-style casts (#320)Ben Smith2017-02-271-2/+2
|
* Change NULL -> nullptr (#315)Ben Smith2017-02-241-5/+5
| | | Also switch to using C++11.
* Switch C files to CC files (#309)Ben Smith2017-02-231-0/+179
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++.