mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +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
|
//stream.writeVaruint32( pages ); // maximum length
|
||||||
}
|
}
|
||||||
wasm.writeSection( SectionType.Memory, stream );
|
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;
|
int pages = (dataSize + 0xFFFF) / 0x10000;
|
||||||
newline( textOutput );
|
newline( textOutput );
|
||||||
String pagesStr = Integer.toString( pages );
|
String pagesStr = Integer.toString( pages );
|
||||||
textOutput.append( "(memory (export \"memory\") " ).append( pagesStr ).append( ' ' ).append( pagesStr ).append( ')' );
|
textOutput.append( "(memory " ).append( pagesStr ).append( ')' );
|
||||||
newline( textOutput );
|
newline( textOutput );
|
||||||
textOutput.append( "(data (i32.const 0) \"" );
|
textOutput.append( "(data (i32.const 0) \"" );
|
||||||
byte[] data = dataStream.toByteArray();
|
byte[] data = dataStream.toByteArray();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user