From d28ff73c513494c99b582f6eda37ef739aa3572a Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Tue, 13 Sep 2016 00:36:20 +0300 Subject: [PATCH] Fix bugs in GC --- core/src/main/java/org/teavm/backend/wasm/WasmRuntime.java | 2 +- .../org/teavm/backend/wasm/generate/WasmClassGenerator.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/teavm/backend/wasm/WasmRuntime.java b/core/src/main/java/org/teavm/backend/wasm/WasmRuntime.java index 93bfe1ba1..1ed670676 100644 --- a/core/src/main/java/org/teavm/backend/wasm/WasmRuntime.java +++ b/core/src/main/java/org/teavm/backend/wasm/WasmRuntime.java @@ -252,7 +252,7 @@ public final class WasmRuntime { } public static Address getStackGcRoots() { - return stack; + return stack != initStack() ? stack : null; } public static Address getNextStackRoots(Address address) { diff --git a/core/src/main/java/org/teavm/backend/wasm/generate/WasmClassGenerator.java b/core/src/main/java/org/teavm/backend/wasm/generate/WasmClassGenerator.java index 93f6912f4..b5b6f162d 100644 --- a/core/src/main/java/org/teavm/backend/wasm/generate/WasmClassGenerator.java +++ b/core/src/main/java/org/teavm/backend/wasm/generate/WasmClassGenerator.java @@ -119,7 +119,7 @@ public class WasmClassGenerator { break; case LONG: case DOUBLE: - size = 5; + size = 8; break; }