mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 10:44:47 +01:00
API docu
This commit is contained in:
parent
af5f713a70
commit
d3e3c4ff5d
@ -29,7 +29,7 @@ import de.inetsoftware.jwebassembly.api.annotation.WasmTextCode;
|
||||
import de.inetsoftware.jwebassembly.wasm.ValueType;
|
||||
|
||||
/**
|
||||
* Handle all the constant strings. The constant strings will be write into the data section.
|
||||
* Handle all the constant strings. The constant strings will be write into the data section. At runtime the strings will be instantiate on the fly and hold in a table.
|
||||
*
|
||||
* @author Volker Berlin
|
||||
*/
|
||||
@ -233,7 +233,7 @@ public class StringManager extends LinkedHashMap<String, Integer> {
|
||||
|
||||
/**
|
||||
* WASM code<p>
|
||||
* Set a string from the string table. Should be inlined from the optimizer.
|
||||
* Set a string in the string table. Should be inlined from the optimizer.
|
||||
*
|
||||
* @param strIdx
|
||||
* the id/index of the string.
|
||||
@ -249,7 +249,7 @@ public class StringManager extends LinkedHashMap<String, Integer> {
|
||||
/**
|
||||
* WASM code<p>
|
||||
* Placeholder for a synthetic function. Should be inlined from the optimizer.
|
||||
* @return the memory offset of the string data in the element section
|
||||
* @return the memory offset of the serialized string data in the element section
|
||||
*/
|
||||
private static native int stringsMemoryOffset();
|
||||
|
||||
|
@ -486,19 +486,25 @@ public class TypeManager {
|
||||
public void writeToStream( ByteArrayOutputStream dataStream, ToIntFunction<FunctionName> getFunctionsID ) throws IOException {
|
||||
/*
|
||||
┌───────────────────────────────────────┐
|
||||
| Offset to the interfaces (4 bytes) |
|
||||
| Offset to the interfaces [4 bytes] |
|
||||
├───────────────────────────────────────┤
|
||||
| Offset to the instanceof (4 bytes) |
|
||||
| Offset to the instanceof [4 bytes] |
|
||||
├───────────────────────────────────────┤
|
||||
| String id of the class name (4 bytes) |
|
||||
| String id of the class name [4 bytes] |
|
||||
├───────────────────────────────────────┤
|
||||
| first vtable entry (4 bytes) |
|
||||
| first vtable entry [4 bytes] |
|
||||
├───────────────────────────────────────┤
|
||||
| ..... |
|
||||
| ..... |
|
||||
├───────────────────────────────────────┤
|
||||
| interface calls (itable) |
|
||||
├───────────────────────────────────────┤
|
||||
| list of implemented interface |
|
||||
| list of instanceof [4*(n+1) bytes] |
|
||||
├───────────────────────────────────────┤
|
||||
| count of entries [4 bytes] |
|
||||
├───────────────────────────────────────┤
|
||||
| own class id [4 bytes] |
|
||||
├───────────────────────────────────────┤
|
||||
| ..... [4*(n-1) bytes] |
|
||||
└───────────────────────────────────────┘
|
||||
*/
|
||||
this.vtableOffset = dataStream.size();
|
||||
|
Loading…
x
Reference in New Issue
Block a user