aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2019-01-14 18:50:05 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2019-01-14 18:50:05 +0800
commit8b62783f4876594ad350175b12a85321e9d1a3fc (patch)
treecc57e5b27d48a3b0b80551e09dd05db782c17830 /packages
parent2345a3bdfe5be9ea2d13ed98b889e01286ddaab2 (diff)
downloaddexon-0x-contracts-8b62783f4876594ad350175b12a85321e9d1a3fc.tar.gz
dexon-0x-contracts-8b62783f4876594ad350175b12a85321e9d1a3fc.tar.zst
dexon-0x-contracts-8b62783f4876594ad350175b12a85321e9d1a3fc.zip
Add utils.isRangeEqual to sol-profiler
Diffstat (limited to 'packages')
-rw-r--r--packages/sol-tracing-utils/src/utils.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/sol-tracing-utils/src/utils.ts b/packages/sol-tracing-utils/src/utils.ts
index d8bc65e73..644321f32 100644
--- a/packages/sol-tracing-utils/src/utils.ts
+++ b/packages/sol-tracing-utils/src/utils.ts
@@ -23,6 +23,12 @@ export const utils = {
utils.compareLineColumn(childRange.end, parentRange.end) <= 0
);
},
+ isRangeEqual(childRange: SingleFileSourceRange, parentRange: SingleFileSourceRange): boolean {
+ return (
+ utils.compareLineColumn(parentRange.start, childRange.start) === 0 &&
+ utils.compareLineColumn(childRange.end, parentRange.end) === 0
+ );
+ },
bytecodeToBytecodeRegex(bytecode: string): string {
const bytecodeRegex = bytecode
// Library linking placeholder: __ConvertLib____________________________