aboutsummaryrefslogtreecommitdiffstats
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
parent2345a3bdfe5be9ea2d13ed98b889e01286ddaab2 (diff)
downloaddexon-sol-tools-8b62783f4876594ad350175b12a85321e9d1a3fc.tar
dexon-sol-tools-8b62783f4876594ad350175b12a85321e9d1a3fc.tar.gz
dexon-sol-tools-8b62783f4876594ad350175b12a85321e9d1a3fc.tar.bz2
dexon-sol-tools-8b62783f4876594ad350175b12a85321e9d1a3fc.tar.lz
dexon-sol-tools-8b62783f4876594ad350175b12a85321e9d1a3fc.tar.xz
dexon-sol-tools-8b62783f4876594ad350175b12a85321e9d1a3fc.tar.zst
dexon-sol-tools-8b62783f4876594ad350175b12a85321e9d1a3fc.zip
Add utils.isRangeEqual to sol-profiler
-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____________________________