From 7e3917884152eda021cff9107b5f789aee92fb1b Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 12 Aug 2016 11:57:12 -0700 Subject: support expressions in segment offsets --- src/wasm-validator.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/wasm-validator.h') diff --git a/src/wasm-validator.h b/src/wasm-validator.h index 90930d8f4..3d9a0e1c3 100644 --- a/src/wasm-validator.h +++ b/src/wasm-validator.h @@ -281,12 +281,6 @@ public: void visitMemory(Memory *curr) { shouldBeFalse(curr->initial > curr->max, "memory", "memory max >= initial"); shouldBeTrue(curr->max <= Memory::kMaxSize, "memory", "max memory must be <= 4GB"); - size_t top = 0; - for (auto& segment : curr->segments) { - shouldBeFalse(segment.offset < top, "memory", "segment offset is small enough"); - top = segment.offset + segment.data.size(); - } - shouldBeFalse(top > curr->initial * Memory::kPageSize, "memory", "total segments must be small enough"); } void visitModule(Module *curr) { // exports -- cgit v1.2.3