diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-12-27 15:41:42 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-12-27 15:41:42 +0000 |
| commit | 12f23b59acc5ce9bfbf48accc71f32f282371e00 (patch) | |
| tree | f8a4150c0ea45a911f139c03ba7957b1333ba4bb /src/main/java | |
| parent | 617e4665e2411c00d4ae010d86f0c2f9e5da10ce (diff) | |
Add note on value encoding
Diffstat (limited to 'src/main/java')
| -rw-r--r-- | src/main/java/org/shedlang/compiler/backends/wasm/structure/binary/WasmBinaryWriter.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/shedlang/compiler/backends/wasm/structure/binary/WasmBinaryWriter.java b/src/main/java/org/shedlang/compiler/backends/wasm/structure/binary/WasmBinaryWriter.java index 614667da..4dc86a28 100644 --- a/src/main/java/org/shedlang/compiler/backends/wasm/structure/binary/WasmBinaryWriter.java +++ b/src/main/java/org/shedlang/compiler/backends/wasm/structure/binary/WasmBinaryWriter.java @@ -159,7 +159,10 @@ public class WasmBinaryWriter { } else if (unrelocatedIndex.isEmpty()) { throw new IllegalStateException("cannot write relocatable index outside of relocatable section"); } else { - // TODO: handle 64-bit values + // In principle, we should handle 64-bit values here. However, since + // the values we're encoding are only 32-bit, and we're not + // including any padding, encoding them as 32-bit values should be + // equivalent. if (relocationType.isSigned()) { writeSignedInt32(unrelocatedIndex.getAsInt()); } else { |
