From 4776bebe8eaa40818848279d3e57cec919f5af18 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Wed, 22 Jan 2020 17:16:44 +0300 Subject: [PATCH] C/Wasm: fix incorrect removal of GC root in optimizer --- .../java/org/teavm/model/lowlevel/GCShadowStackContributor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/teavm/model/lowlevel/GCShadowStackContributor.java b/core/src/main/java/org/teavm/model/lowlevel/GCShadowStackContributor.java index 0d794264f..700d07786 100644 --- a/core/src/main/java/org/teavm/model/lowlevel/GCShadowStackContributor.java +++ b/core/src/main/java/org/teavm/model/lowlevel/GCShadowStackContributor.java @@ -307,7 +307,7 @@ public class GCShadowStackContributor { } for (int i = 0; i < newStates.length; ++i) { - if (newStates[i] >= 0 && autoSpilled[newStates[i]]) { + if (newStates[i] >= 0 && autoSpilled[definitionClasses[newStates[i]]]) { comparison[i] = -2; } }