From 098cf477f4572547358586c65a09127e5a6fa2e8 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Sun, 12 May 2013 16:05:47 +0200 Subject: [PATCH] Fix parameter indexing for longs and doubles --- .../instrumentation/InterceptionInstrumenter.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/compiler/preloader/instrumentation/src/org/jetbrains/jet/preloading/instrumentation/InterceptionInstrumenter.java b/compiler/preloader/instrumentation/src/org/jetbrains/jet/preloading/instrumentation/InterceptionInstrumenter.java index 700f2db3046..b35bd2ccea6 100644 --- a/compiler/preloader/instrumentation/src/org/jetbrains/jet/preloading/instrumentation/InterceptionInstrumenter.java +++ b/compiler/preloader/instrumentation/src/org/jetbrains/jet/preloading/instrumentation/InterceptionInstrumenter.java @@ -389,7 +389,7 @@ public class InterceptionInstrumenter { Type[] parameterTypes = Type.getArgumentTypes(instrumentedMethodDesc); boolean isStatic = (access & ACC_STATIC) != 0; int base = isStatic ? 0 : 1; - int parametersUsed = 0; + int parameterOffset = 0; for (int i = 0; i < parameterCount; i++) { if (i == methodData.getThisParameterIndex()) { if (isStatic) { @@ -408,8 +408,9 @@ public class InterceptionInstrumenter { ia.aconst(instrumentedMethodDesc); } else { - ia.load(base + parametersUsed, parameterTypes[parametersUsed]); - parametersUsed++; + Type type = parameterTypes[parameterOffset]; + ia.load(base + parameterOffset, type); + parameterOffset += type.getSize(); } }