diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-01-15 20:33:24 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-01-15 20:37:10 +0800 |
commit | 63a63543be74d9e8822b7b111aa46350a5f524d8 (patch) | |
tree | 054119646cd9994351b67552b4402af009d7fb66 /packages/sol-tracing-utils/src/source_maps.ts | |
parent | 75a4bbc5f2bf38c2ea8c18f21dc9b54eaf5bb422 (diff) | |
download | dexon-sol-tools-63a63543be74d9e8822b7b111aa46350a5f524d8.tar dexon-sol-tools-63a63543be74d9e8822b7b111aa46350a5f524d8.tar.gz dexon-sol-tools-63a63543be74d9e8822b7b111aa46350a5f524d8.tar.bz2 dexon-sol-tools-63a63543be74d9e8822b7b111aa46350a5f524d8.tar.lz dexon-sol-tools-63a63543be74d9e8822b7b111aa46350a5f524d8.tar.xz dexon-sol-tools-63a63543be74d9e8822b7b111aa46350a5f524d8.tar.zst dexon-sol-tools-63a63543be74d9e8822b7b111aa46350a5f524d8.zip |
Make mapping namings direct
Diffstat (limited to 'packages/sol-tracing-utils/src/source_maps.ts')
-rw-r--r-- | packages/sol-tracing-utils/src/source_maps.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/sol-tracing-utils/src/source_maps.ts b/packages/sol-tracing-utils/src/source_maps.ts index 0a2d3c88a..8c17652d9 100644 --- a/packages/sol-tracing-utils/src/source_maps.ts +++ b/packages/sol-tracing-utils/src/source_maps.ts @@ -1,7 +1,7 @@ import * as _ from 'lodash'; import { getPcToInstructionIndexMapping } from './instructions'; -import { OffsetToLocation, SourceRange } from './types'; +import { OffsetToLocation, SourceCodes, SourceRange, Sources } from './types'; const RADIX = 10; @@ -39,10 +39,10 @@ export function getOffsetToLocation(str: string): OffsetToLocation { * @param indexToSource index to source file path */ export function parseSourceMap( - sourceCodes: { [fileIndex: number]: string }, + sourceCodes: SourceCodes, srcMap: string, bytecodeHex: string, - sources: { [fileIndex: number]: string }, + sources: Sources, ): { [programCounter: number]: SourceRange } { const bytecode = Uint8Array.from(Buffer.from(bytecodeHex, 'hex')); const pcToInstructionIndex: { [programCounter: number]: number } = getPcToInstructionIndexMapping(bytecode); |