solidity-coverage
Advanced tools
Comparing version 0.8.9 to 0.8.10-rc.0
# Changelog | ||
0.8.9 / 2024-02-27 | ||
================== | ||
* Fix duplicate hash logic (https://github.com/sc-forks/solidity-coverage/issues/868) | ||
* Improve organization of edge case code in collector (https://github.com/sc-forks/solidity-coverage/issues/869) | ||
0.8.8 / 2024-02-21 | ||
@@ -4,0 +9,0 @@ ================== |
@@ -9,22 +9,3 @@ /** | ||
this.validOpcodes = { | ||
"PUSH1": true, | ||
"DUP1": viaIR, | ||
"DUP2": viaIR, | ||
"DUP3": viaIR, | ||
"DUP4": viaIR, | ||
"DUP5": viaIR, | ||
"DUP6": viaIR, | ||
"DUP7": viaIR, | ||
"DUP8": viaIR, | ||
"DUP9": viaIR, | ||
"DUP10": viaIR, | ||
"DUP11": viaIR, | ||
"DUP12": viaIR, | ||
"DUP13": viaIR, | ||
"DUP14": viaIR, | ||
"DUP15": viaIR, | ||
"DUP16": viaIR, | ||
} | ||
this.validOpcodes = this._getOpcodes(viaIR); | ||
this.lastHash = null; | ||
@@ -102,2 +83,25 @@ this.viaIR = viaIR; | ||
/** | ||
* Generates a list of all the opcodes to inspect for instrumentation hashes | ||
* When viaIR is true, it includes all DUPs and PUSHs, so things are a little slower. | ||
* @param {boolean} viaIR | ||
*/ | ||
_getOpcodes(viaIR) { | ||
let opcodes = { | ||
"PUSH1": true | ||
}; | ||
for (let i = 2; i <= 32; i++) { | ||
const key = "PUSH" + i; | ||
opcodes[key] = viaIR; | ||
}; | ||
for (let i = 1; i <= 16; i++ ) { | ||
const key = "DUP" + i; | ||
opcodes[key] = viaIR; | ||
} | ||
return opcodes; | ||
} | ||
/** | ||
@@ -104,0 +108,0 @@ * Unit test helper |
{ | ||
"name": "solidity-coverage", | ||
"version": "0.8.9", | ||
"version": "0.8.10-rc.0", | ||
"description": "Code coverage for Solidity testing", | ||
@@ -16,3 +16,3 @@ "main": "plugins/nomiclabs.plugin.js", | ||
"test:ci": "./scripts/ci.sh", | ||
"test:uint:viaIR": "VIA_IR=true ./scripts/unit.sh", | ||
"test:unit:viaIR": "VIA_IR=true ./scripts/unit.sh", | ||
"test:integration:viaIR": "VIA_IR=true ./scripts/integration.sh", | ||
@@ -19,0 +19,0 @@ "test:ci:viaIR": "VIA_IR=true ./scripts/ci.sh" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
142110
2897