mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 10:44:47 +01:00
Does not export memory. No JavaScript access is needed.
This commit is contained in:
parent
7774b7c04a
commit
9a157b74a2
@ -213,9 +213,6 @@ public class BinaryModuleWriter extends ModuleWriter implements InstructionOpcod
|
||||
//stream.writeVaruint32( pages ); // maximum length
|
||||
}
|
||||
wasm.writeSection( SectionType.Memory, stream );
|
||||
|
||||
// export the memory with the name "memory"
|
||||
exports.add( new ExportEntry( "memory", ExternalKind.Memory, 0 ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ public class TextModuleWriter extends ModuleWriter {
|
||||
int pages = (dataSize + 0xFFFF) / 0x10000;
|
||||
newline( textOutput );
|
||||
String pagesStr = Integer.toString( pages );
|
||||
textOutput.append( "(memory (export \"memory\") " ).append( pagesStr ).append( ' ' ).append( pagesStr ).append( ')' );
|
||||
textOutput.append( "(memory " ).append( pagesStr ).append( ')' );
|
||||
newline( textOutput );
|
||||
textOutput.append( "(data (i32.const 0) \"" );
|
||||
byte[] data = dataStream.toByteArray();
|
||||
|
Loading…
x
Reference in New Issue
Block a user