Skip to content

Commit 58168f3

Browse files
committed
revert: "perf: attempt to slightly reduce the size of spline node"
This reverts commit 5869109
1 parent 9284260 commit 58168f3

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

c2me-opts-dfc/src/main/java/com/ishland/c2me/opts/dfc/common/ast/spline/SplineAstNode.java

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -262,17 +262,6 @@ private static String doBytecodeGenSpline(BytecodeGen.Context context, Spline<De
262262
Label defaultLabel = new Label();
263263
Label label3 = new Label();
264264

265-
m.load(0, InstructionAdapter.OBJECT_TYPE);
266-
m.load(1, Type.INT_TYPE);
267-
m.load(2, Type.INT_TYPE);
268-
m.load(3, Type.INT_TYPE);
269-
m.load(4, InstructionAdapter.OBJECT_TYPE);
270-
m.load(0, InstructionAdapter.OBJECT_TYPE);
271-
m.load(1, Type.INT_TYPE);
272-
m.load(2, Type.INT_TYPE);
273-
m.load(3, Type.INT_TYPE);
274-
m.load(4, InstructionAdapter.OBJECT_TYPE);
275-
276265
m.load(rangeForLocation, Type.INT_TYPE);
277266
m.tableswitch(
278267
0,
@@ -283,17 +272,14 @@ private static String doBytecodeGenSpline(BytecodeGen.Context context, Spline<De
283272

284273
for (int i = 0; i < valuesMethods.length - 1; i++) {
285274
m.visitLabel(jumpLabels[i]);
286-
m.invokevirtual(context.className, valuesMethods[i], SPLINE_METHOD_DESC, false);
275+
callSplineSingle(context, m, valuesMethods[i]);
287276
if (valuesMethods[i].equals(valuesMethods[i + 1])) { // splines are pure
288277
m.dup();
289278
m.store(n, Type.FLOAT_TYPE);
290279
m.store(o, Type.FLOAT_TYPE);
291-
m.pop2();
292-
m.pop2();
293-
m.pop();
294280
} else {
295281
m.store(n, Type.FLOAT_TYPE);
296-
m.invokevirtual(context.className, valuesMethods[i + 1], SPLINE_METHOD_DESC, false);
282+
callSplineSingle(context, m, valuesMethods[i + 1]);
297283
m.store(o, Type.FLOAT_TYPE);
298284
}
299285
m.goTo(label3);

0 commit comments

Comments
 (0)