From eaf31c1309b6183ddd17a72d963b821049093f38 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Mon, 5 Sep 2016 00:09:03 +0300 Subject: [PATCH] Minor fixes --- .../teavm/backend/wasm/render/WasmBinaryRenderingVisitor.java | 2 -- .../java/org/teavm/backend/wasm/render/WasmBinaryWriter.java | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/core/src/main/java/org/teavm/backend/wasm/render/WasmBinaryRenderingVisitor.java b/core/src/main/java/org/teavm/backend/wasm/render/WasmBinaryRenderingVisitor.java index b715c0f0b..1c44331f9 100644 --- a/core/src/main/java/org/teavm/backend/wasm/render/WasmBinaryRenderingVisitor.java +++ b/core/src/main/java/org/teavm/backend/wasm/render/WasmBinaryRenderingVisitor.java @@ -69,7 +69,6 @@ class WasmBinaryRenderingVisitor implements WasmExpressionVisitor { @Override public void visit(WasmBlock expression) { depth += expression.isLoop() ? 2 : 1; - //depth++; blockDepths.put(expression, depth); writer.writeByte(expression.isLoop() ? 0x02 : 0x01); for (WasmExpression part : expression.getBody()) { @@ -78,7 +77,6 @@ class WasmBinaryRenderingVisitor implements WasmExpressionVisitor { writer.writeByte(0x0F); blockDepths.remove(expression); depth -= expression.isLoop() ? 2 : 1; - //depth--; } @Override diff --git a/core/src/main/java/org/teavm/backend/wasm/render/WasmBinaryWriter.java b/core/src/main/java/org/teavm/backend/wasm/render/WasmBinaryWriter.java index c6c244e58..5f6f8a6c9 100644 --- a/core/src/main/java/org/teavm/backend/wasm/render/WasmBinaryWriter.java +++ b/core/src/main/java/org/teavm/backend/wasm/render/WasmBinaryWriter.java @@ -122,7 +122,7 @@ public class WasmBinaryWriter { } public void writeSignedLEB(long v) { - alloc(5); + alloc(10); while (true) { int digit = (int) (v & 0x7F); v >>= 7;