diff options
author | Oliver Nguyen <olivernguyen@google.com> | 2020-08-17 22:03:21 +0000 |
---|---|---|
committer | Oliver Nguyen <olivernguyen@google.com> | 2020-08-17 22:03:21 +0000 |
commit | bf6088bd3a28237e8d7eb33579140fa17bcee57a (patch) | |
tree | ff121ba8fcc1140f854ff568722192877ffeae6a /org.jacoco.core/src/org/jacoco/core/internal | |
parent | d29cfbbb94ce3952e034af105dced62b6fc2c28c (diff) | |
download | jacoco-bf6088bd3a28237e8d7eb33579140fa17bcee57a.tar.gz |
Revert "Revert "Add IExecutionData interface and move all usage ..."
Revert "Revert "Update JavaCodeCoverageListenerTest to new IExec..."
Revert submission 1398750-revert-1364940-IExecutionData-FHXOSGWBLA
Reason for revert: Fixed build
Reverted Changes:
I609da053c:Revert "Add IExecutionData interface and move all ...
Iff176c367:Revert "Update JavaCodeCoverageListenerTest to new...
Change-Id: I2b1653276b15049c53c8f186a603cfc4b2015ed5
Diffstat (limited to 'org.jacoco.core/src/org/jacoco/core/internal')
-rw-r--r-- | org.jacoco.core/src/org/jacoco/core/internal/instr/InstrSupport.java | 8 | ||||
-rw-r--r-- | org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeInserter.java | 17 |
2 files changed, 12 insertions, 13 deletions
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/instr/InstrSupport.java b/org.jacoco.core/src/org/jacoco/core/internal/instr/InstrSupport.java index 85e83a3a..4d4e1ba1 100644 --- a/org.jacoco.core/src/org/jacoco/core/internal/instr/InstrSupport.java +++ b/org.jacoco.core/src/org/jacoco/core/internal/instr/InstrSupport.java @@ -77,7 +77,9 @@ public final class InstrSupport { * Data type of the field that stores coverage information for a class ( * <code>boolean[]</code>). */ - public static final String DATAFIELD_DESC = "[Z"; + // BEGIN android-change + public static final String DATAFIELD_DESC = "Lorg/jacoco/core/data/IExecutionData;"; + // END android-change // === Init Method === @@ -89,7 +91,9 @@ public final class InstrSupport { /** * Descriptor of the initialization method. */ - public static final String INITMETHOD_DESC = "()[Z"; + // BEGIN android-change + public static final String INITMETHOD_DESC = "()Lorg/jacoco/core/data/IExecutionData;"; + // END android-change /** * Access modifiers of the initialization method. diff --git a/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeInserter.java b/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeInserter.java index 63fbf765..0cac8f8f 100644 --- a/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeInserter.java +++ b/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeInserter.java @@ -67,25 +67,20 @@ class ProbeInserter extends MethodVisitor implements IProbeInserter { public void insertProbe(final int id) { - // For a probe we set the corresponding position in the boolean[] array - // to true. + // BEGIN android-change + // For a probe we call setProbe on the IExecutionData object. mv.visitVarInsn(Opcodes.ALOAD, variable); - // Stack[0]: [Z + // Stack[0]: Lorg/jacoco/core/data/IExecutionData; InstrSupport.push(mv, id); // Stack[1]: I - // Stack[0]: [Z + // Stack[0]: Lorg/jacoco/core/data/IExecutionData; - mv.visitInsn(Opcodes.ICONST_1); - - // Stack[2]: I - // Stack[1]: I - // Stack[0]: [Z - - mv.visitInsn(Opcodes.BASTORE); + mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "org/jacoco/core/data/IExecutionData", "setProbe", "(I)V", true); + // END android-change } @Override |