From e877cc86e47c88cb3c20d690f203f24e9c7bc208 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Mon, 13 Nov 2023 10:46:06 +0100 Subject: [PATCH] JS: remove unused runtime function --- .../teavm/backend/javascript/rendering/StatementRenderer.java | 2 +- core/src/main/resources/org/teavm/backend/javascript/array.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/core/src/main/java/org/teavm/backend/javascript/rendering/StatementRenderer.java b/core/src/main/java/org/teavm/backend/javascript/rendering/StatementRenderer.java index d0bc72970..120ef474e 100644 --- a/core/src/main/java/org/teavm/backend/javascript/rendering/StatementRenderer.java +++ b/core/src/main/java/org/teavm/backend/javascript/rendering/StatementRenderer.java @@ -1300,7 +1300,7 @@ public class StatementRenderer implements ExprVisitor, StatementVisitor { } writer.append("("); } else { - writer.appendFunction("$rt_createArrayFromData").append("("); + writer.appendFunction("$rt_wrapArray").append("("); context.typeToClsString(writer, expr.getType()); writer.append(",").ws(); } diff --git a/core/src/main/resources/org/teavm/backend/javascript/array.js b/core/src/main/resources/org/teavm/backend/javascript/array.js index dd79d3eb5..4e121ecc4 100644 --- a/core/src/main/resources/org/teavm/backend/javascript/array.js +++ b/core/src/main/resources/org/teavm/backend/javascript/array.js @@ -20,7 +20,6 @@ let $rt_createArray = (cls, sz) => { data.fill(null); return new ($rt_arraycls(cls))(data); } -let $rt_createArrayFromData = (cls, init) => $rt_wrapArray(cls, init); let $rt_wrapArray = (cls, data) => new ($rt_arraycls(cls))(data); let $rt_createUnfilledArray = (cls, sz) => new ($rt_arraycls(cls))(new teavm_globals.Array(sz)); let $rt_createLongArray;