From f38d3033d8dd5b6b48854d52c2a6c2c5f70ffecf Mon Sep 17 00:00:00 2001 From: Volker Berlin Date: Sat, 11 Apr 2020 14:35:47 +0200 Subject: [PATCH] use table names --- .../inetsoftware/jwebassembly/text/TextModuleWriter.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/de/inetsoftware/jwebassembly/text/TextModuleWriter.java b/src/de/inetsoftware/jwebassembly/text/TextModuleWriter.java index f2dafc6..f358d22 100644 --- a/src/de/inetsoftware/jwebassembly/text/TextModuleWriter.java +++ b/src/de/inetsoftware/jwebassembly/text/TextModuleWriter.java @@ -134,7 +134,7 @@ public class TextModuleWriter extends ModuleWriter { int count = functions.size(); String countStr = Integer.toString( count ); newline( textOutput ); - textOutput.append( "(table " ).append( countStr ).append( " funcref)" ); + textOutput.append( "(table $functions " ).append( countStr ).append( " funcref)" ); newline( textOutput ); textOutput.append( "(elem (i32.const 0) " ); for( int i = 0; i < count; i++ ) { @@ -149,17 +149,17 @@ public class TextModuleWriter extends ModuleWriter { if( !callIndirect ) { // we need to create a placeholder table with index 0 if not exists newline( textOutput ); - textOutput.append( "(table 0 funcref)" ); + textOutput.append( "(table $functions 0 funcref)" ); } newline( textOutput ); - textOutput.append( "(table " ).append( Integer.toString( stringCount ) ).append( " anyref)" ); + textOutput.append( "(table $strings " ).append( Integer.toString( stringCount ) ).append( " anyref)" ); } // table with classes int typeCount = options.types.size(); if( typeCount > 0 ) { newline( textOutput ); - textOutput.append( "(table " ).append( Integer.toString( typeCount ) ).append( " anyref)" ); + textOutput.append( "(table $classes " ).append( Integer.toString( typeCount ) ).append( " anyref)" ); } int dataSize = dataStream.size();