diff --git a/lib/converter/converter.js b/lib/converter/converter.js index 7fe92a37..3e6e4135 100644 --- a/lib/converter/converter.js +++ b/lib/converter/converter.js @@ -1555,8 +1555,7 @@ const convertV8List = (v8list, options) => { decodedMappings: [], rangeCache: new Map(), diffCache: new Map(), - // cacheHits: 0, - // textLength: [], + // alignTextList: [], // coverage info @@ -1587,19 +1586,7 @@ const convertV8List = (v8list, options) => { const dataFiles = EC.cyan(`${dataList.v8DataList.length} files`); // stateList.forEach((st, i) => { - - // console.log('total', st.alignTextList.length); - - // console.log('got op', st.alignTextList.filter((it) => typeof it.op === 'number').length); - // Util.writeFileSync(`align-text-${i}.js`, `window.gridData = ${JSON.stringify(st.alignTextList, null, 4)}`); - - // console.log('diffCache', st.diffCache.size, 'cacheHits', st.cacheHits); - // const textLength = st.textLength; - // console.log('< 50', textLength.filter((v) => v < 50).length); - // console.log('< 80', textLength.filter((v) => v < 80).length); - // console.log('< 100', textLength.filter((v) => v < 100).length); - // console.log('< 500', textLength.filter((v) => v < 500).length); // }); Util.logTime(` ┌ [convert] converted data list (${dataFiles})`, time_start_convert); diff --git a/lib/converter/find-original-range.js b/lib/converter/find-original-range.js index d7e11f42..fe8cd7ef 100644 --- a/lib/converter/find-original-range.js +++ b/lib/converter/find-original-range.js @@ -46,7 +46,6 @@ const alignText = (gt, ot, info) => { if (diffCache.has(gt)) { const subMap = diffCache.get(gt); if (subMap.has(ot)) { - // info.state.cacheHits += 1; return subMap.get(ot); } } @@ -161,21 +160,7 @@ const getAlignPosition = (info, direction) => { const gp = info.generatedPos; const ot = info.originalText; - // left equal - // if (gt.slice(0, gp) === ot.slice(0, gp)) { - // return { - // pos: gp - // }; - // } - - // < 50 338819 - // < 80 359473 - // < 100 362796 - // < 500 366490 - // info.state.textLength.push(gt.length); - // info.state.textLength.push(ot.length); - - // const it = { + // const alignTextItem = { // gt, ot, gp // }; // info.state.alignTextList.push(it); @@ -197,9 +182,6 @@ const getAlignPosition = (info, direction) => { // generatedText: '1;else', // generatedLeft: '1;' - // generatedText: ' var id = options.base ? item[0] + options.base : item[0];\r\n', - // originalText: ' var id = options.base ? item[0] + options.base : item[0];\n', - // right matched // only for original first line text @@ -208,7 +190,7 @@ const getAlignPosition = (info, direction) => { const item = list[gp]; if (item && item.original) { - // it.op = item.original.index; + // alignTextItem.op = item.original.index; return { pos: item.original.index