Skip to content

Commit

Permalink
remove useless comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cenfun committed Jun 29, 2024
1 parent 72efeae commit 4ad9178
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 34 deletions.
15 changes: 1 addition & 14 deletions lib/converter/converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -1555,8 +1555,7 @@ const convertV8List = (v8list, options) => {
decodedMappings: [],
rangeCache: new Map(),
diffCache: new Map(),
// cacheHits: 0,
// textLength: [],

// alignTextList: [],

// coverage info
Expand Down Expand Up @@ -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);
Expand Down
22 changes: 2 additions & 20 deletions lib/converter/find-original-range.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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);
Expand All @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 4ad9178

Please sign in to comment.