diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-04-26 22:17:09 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-04-27 16:59:17 -0700 |
commit | de7f3480d1ba898bc5ec270ef24b69f5408de633 (patch) | |
tree | f01d7f1c4a7e1e3876c01e5d8b4f7b5291b780c5 | |
parent | 4a85f62e8a83117a081e9691d8830b6a7a876d1d (diff) | |
download | binaryen-de7f3480d1ba898bc5ec270ef24b69f5408de633.tar.gz binaryen-de7f3480d1ba898bc5ec270ef24b69f5408de633.tar.bz2 binaryen-de7f3480d1ba898bc5ec270ef24b69f5408de633.zip |
use arena allocation for s-expr Elements
-rw-r--r-- | src/wasm-s-parser.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index b6a532790..36dacc627 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -52,7 +52,7 @@ int unhex(char c) { // class Element { - typedef std::vector<Element*> List; + typedef ArenaVector<Element*> List; bool isList_; List list_; @@ -60,8 +60,7 @@ class Element { bool dollared_; public: - Element() : isList_(true) {} - Element(MixedArena& allocator) : Element() {} + Element(MixedArena& allocator) : isList_(true), list_(allocator) {} bool isList() { return isList_; } bool isStr() { return !isList_; } |