forked from bazelbuild/bazel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Jacoco 0.8.6 to third-party and upgrade asm to 9.1
Related to bazelbuild#11674
- Loading branch information
Showing
35 changed files
with
530 additions
and
277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,28 @@ | ||
******************************************************************************* | ||
* ASM: a very small and fast Java bytecode manipulation framework | ||
* Copyright (c) 2000-2011 INRIA, France Telecom | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions | ||
* are met: | ||
* 1. Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* 2. Redistributions in binary form must reproduce the above copyright | ||
* notice, this list of conditions and the following disclaimer in the | ||
* documentation and/or other materials provided with the distribution. | ||
* 3. Neither the name of the copyright holders nor the names of its | ||
* contributors may be used to endorse or promote products derived from | ||
* this software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF | ||
* THE POSSIBILITY OF SUCH DAMAGE. | ||
******************************************************************************* | ||
|
||
This directory contains the documentation of the product. | ||
ASM: a very small and fast Java bytecode manipulation framework | ||
Copyright (c) 2000-2011 INRIA, France Telecom | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions | ||
are met: | ||
1. Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
2. Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
3. Neither the name of the copyright holders nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF | ||
THE POSSIBILITY OF SUCH DAMAGE. |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+74.1 KB
third_party/asm/asm-tree-8.0-sources.jar → third_party/asm/asm-tree-9.1-sources.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
47 changes: 47 additions & 0 deletions
47
third_party/java/jacoco/0001-Disable-use-of-constant-dynamic-bytecode.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
From 3fc8dcb960e78d06a5db8b3d49b87eac2940280b Mon Sep 17 00:00:00 2001 | ||
From: Liam Miller-Cushon <cushon@google.com> | ||
Date: Thu, 28 Jan 2021 21:25:28 -0800 | ||
Subject: [PATCH 1/2] Disable use of 'constant dynamic' bytecode | ||
|
||
Ssee b/177688213 and https://github.com/jacoco/jacoco/issues/1151 | ||
--- | ||
.../instr/ProbeArrayStrategyFactory.java | 16 ++++++++-------- | ||
1 file changed, 8 insertions(+), 8 deletions(-) | ||
|
||
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactory.java b/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactory.java | ||
index 9df681b3..14bd7d4f 100644 | ||
--- a/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactory.java | ||
+++ b/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactory.java | ||
@@ -51,10 +51,10 @@ public final class ProbeArrayStrategyFactory { | ||
if (counter.getCount() == 0) { | ||
return new NoneProbeArrayStrategy(); | ||
} | ||
- if (version >= Opcodes.V11 && counter.hasMethods()) { | ||
- return new CondyProbeArrayStrategy(className, true, classId, | ||
- accessorGenerator); | ||
- } | ||
+ // if (version >= Opcodes.V11 && counter.hasMethods()) { | ||
+ // return new CondyProbeArrayStrategy(className, true, classId, | ||
+ // accessorGenerator); | ||
+ // } | ||
if (version >= Opcodes.V1_8 && counter.hasMethods()) { | ||
return new InterfaceFieldProbeArrayStrategy(className, classId, | ||
counter.getCount(), accessorGenerator); | ||
@@ -63,10 +63,10 @@ public final class ProbeArrayStrategyFactory { | ||
counter.getCount(), accessorGenerator); | ||
} | ||
} else { | ||
- if (version >= Opcodes.V11) { | ||
- return new CondyProbeArrayStrategy(className, false, classId, | ||
- accessorGenerator); | ||
- } | ||
+ // if (version >= Opcodes.V11) { | ||
+ // return new CondyProbeArrayStrategy(className, false, classId, | ||
+ // accessorGenerator); | ||
+ // } | ||
return new ClassFieldProbeArrayStrategy(className, classId, | ||
InstrSupport.needsFrames(version), accessorGenerator); | ||
} | ||
-- | ||
2.30.0.365.g02bc693789-goog | ||
|
96 changes: 96 additions & 0 deletions
96
third_party/java/jacoco/0002-Partially-revert-40c8fd89b0bc0c36e30e6a12f5b42d9da13.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
From ba1b0877135b31147abfdab44890e95403248c3b Mon Sep 17 00:00:00 2001 | ||
From: Liam Miller-Cushon <cushon@google.com> | ||
Date: Thu, 28 Jan 2021 22:18:36 -0800 | ||
Subject: [PATCH 2/2] Partially revert 40c8fd89b0bc0c36e30e6a12f5b42d9da13aca86 | ||
|
||
See b/177687001#comment5. | ||
--- | ||
.../org/jacoco/agent/rt/internal/Agent.java | 9 +++---- | ||
.../org/jacoco/agent/rt/internal/Offline.java | 24 +++++++------------ | ||
2 files changed, 11 insertions(+), 22 deletions(-) | ||
|
||
diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Agent.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Agent.java | ||
index c32294e4..b6b2af20 100644 | ||
--- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Agent.java | ||
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Agent.java | ||
@@ -44,11 +44,8 @@ public class Agent implements IAgent { | ||
* @param options | ||
* options to configure the instance | ||
* @return global instance | ||
- * @throws Exception | ||
- * in case something cannot be initialized | ||
*/ | ||
- public static synchronized Agent getInstance(final AgentOptions options) | ||
- throws Exception { | ||
+ public static synchronized Agent getInstance(final AgentOptions options) { | ||
if (singleton == null) { | ||
final Agent agent = new Agent(options, IExceptionLogger.SYSTEM_ERR); | ||
agent.startup(); | ||
@@ -117,8 +114,9 @@ public class Agent implements IAgent { | ||
* | ||
* @throws Exception | ||
* in case something cannot be initialized | ||
+ * | ||
*/ | ||
- public void startup() throws Exception { | ||
+ public void startup() { | ||
try { | ||
String sessionId = options.getSessionId(); | ||
if (sessionId == null) { | ||
@@ -132,7 +130,6 @@ public class Agent implements IAgent { | ||
} | ||
} catch (final Exception e) { | ||
logger.logExeption(e); | ||
- throw e; | ||
} | ||
} | ||
|
||
diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Offline.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Offline.java | ||
index 10a742bd..af83c769 100644 | ||
--- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Offline.java | ||
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Offline.java | ||
@@ -23,25 +23,17 @@ import org.jacoco.core.runtime.RuntimeData; | ||
*/ | ||
public final class Offline { | ||
|
||
+ private static final RuntimeData DATA; | ||
private static final String CONFIG_RESOURCE = "/jacoco-agent.properties"; | ||
|
||
- private Offline() { | ||
- // no instances | ||
+ static { | ||
+ final Properties config = ConfigLoader.load(CONFIG_RESOURCE, | ||
+ System.getProperties()); | ||
+ DATA = Agent.getInstance(new AgentOptions(config)).getData(); | ||
} | ||
|
||
- private static RuntimeData data; | ||
- | ||
- private static synchronized RuntimeData getRuntimeData() { | ||
- if (data == null) { | ||
- final Properties config = ConfigLoader.load(CONFIG_RESOURCE, | ||
- System.getProperties()); | ||
- try { | ||
- data = Agent.getInstance(new AgentOptions(config)).getData(); | ||
- } catch (final Exception e) { | ||
- throw new RuntimeException("Failed to initialize JaCoCo.", e); | ||
- } | ||
- } | ||
- return data; | ||
+ private Offline() { | ||
+ // no instances | ||
} | ||
|
||
/** | ||
@@ -57,7 +49,7 @@ public final class Offline { | ||
*/ | ||
public static boolean[] getProbes(final long classid, | ||
final String classname, final int probecount) { | ||
- return getRuntimeData() | ||
+ return DATA | ||
.getExecutionData(Long.valueOf(classid), classname, probecount) | ||
.getProbes(); | ||
} | ||
-- | ||
2.30.0.365.g02bc693789-goog | ||
|
Oops, something went wrong.