summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-08-12 11:57:12 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-08-12 20:16:27 -0700
commit7e3917884152eda021cff9107b5f789aee92fb1b (patch)
tree1a48c04c52e6e7b1615b01e2c92e2d597fe30b3c /src/wasm.h
parent79029eb346b721eacdaa28326fe8e7b50042611c (diff)
downloadbinaryen-7e3917884152eda021cff9107b5f789aee92fb1b.tar.gz
binaryen-7e3917884152eda021cff9107b5f789aee92fb1b.tar.bz2
binaryen-7e3917884152eda021cff9107b5f789aee92fb1b.zip
support expressions in segment offsets
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wasm.h b/src/wasm.h
index 38a030e1a..c0129cf23 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -1441,14 +1441,14 @@ public:
static const Address::address_t kMaxSize = ~Address::address_t(0) / kPageSize;
static const Address::address_t kPageMask = ~(kPageSize - 1);
struct Segment {
- Address offset;
+ Expression* offset;
std::vector<char> data; // TODO: optimize
Segment() {}
- Segment(Address offset, const char *init, Address size) : offset(offset) {
+ Segment(Expression* offset, const char *init, Address size) : offset(offset) {
data.resize(size);
std::copy_n(init, size, data.begin());
}
- Segment(Address offset, std::vector<char>& init) : offset(offset) {
+ Segment(Expression* offset, std::vector<char>& init) : offset(offset) {
data.swap(init);
}
};