From 3b4cb935f83c7fabacbf61146e56dabc0d65a441 Mon Sep 17 00:00:00 2001 From: Wouter van Oortmerssen Date: Fri, 18 Sep 2020 15:50:25 -0700 Subject: Initial implementation of "Memory64" proposal (#3130) Also includes a lot of new spec tests that eventually need to go into the spec repo --- src/wasm/wasm.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/wasm/wasm.cpp') diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp index 87488cfaf..6cc61a8a1 100644 --- a/src/wasm/wasm.cpp +++ b/src/wasm/wasm.cpp @@ -46,6 +46,7 @@ const char* TailCallFeature = "tail-call"; const char* ReferenceTypesFeature = "reference-types"; const char* MultivalueFeature = "multivalue"; const char* GCFeature = "gc"; +const char* Memory64Feature = "memory64"; } // namespace UserSections } // namespace BinaryConsts @@ -881,13 +882,15 @@ void Drop::finalize() { } } -void MemorySize::finalize() { type = Type::i32; } +void MemorySize::make64() { type = ptrType = Type::i64; } +void MemorySize::finalize() { type = ptrType; } +void MemoryGrow::make64() { type = ptrType = Type::i64; } void MemoryGrow::finalize() { if (delta->type == Type::unreachable) { type = Type::unreachable; } else { - type = Type::i32; + type = ptrType; } } -- cgit v1.2.3