From 04677d010383deaa3985b155d063dc81341ac5aa Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Wed, 4 Mar 2015 22:57:26 +0300 Subject: [PATCH] Minor fix --- .../java/org/teavm/common/DefaultGraphSplittingBackend.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/teavm-core/src/main/java/org/teavm/common/DefaultGraphSplittingBackend.java b/teavm-core/src/main/java/org/teavm/common/DefaultGraphSplittingBackend.java index b3aea9210..3a2453123 100644 --- a/teavm-core/src/main/java/org/teavm/common/DefaultGraphSplittingBackend.java +++ b/teavm-core/src/main/java/org/teavm/common/DefaultGraphSplittingBackend.java @@ -37,7 +37,7 @@ public class DefaultGraphSplittingBackend implements GraphSplittingBackend { index = graph.size(); for (int i = 0; i < graph.size(); ++i) { prototypeNodes.add(i); - copyIndexes.add(i); + copyIndexes.add(0); } } @@ -59,7 +59,7 @@ public class DefaultGraphSplittingBackend implements GraphSplittingBackend { IntIntMap map = new IntIntOpenHashMap(); for (int i = 0; i < nodes.length; ++i) { copies[i] = index++; - map.put(nodes[i], copies[i]); + map.put(nodes[i], copies[i] + 1); int proto = prototypeNodes.get(nodes[i]); prototypeNodes.add(proto); copyIndexes.add(++copyCount[proto]);