From 364a232c4c0d90d27260331eaeee5817f64e2839 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 18 Aug 2020 18:10:35 -0700 Subject: [PATCH] Revert "Optimize source mapping into external source map sources (#40055)" This reverts commit 1e84ffc70313aae70c1cee9ce928a9fff022cabb. --- src/compiler/sourcemap.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/compiler/sourcemap.ts b/src/compiler/sourcemap.ts index 1c9ef5f55b645..0db89a5830fd2 100644 --- a/src/compiler/sourcemap.ts +++ b/src/compiler/sourcemap.ts @@ -13,7 +13,6 @@ namespace ts { const rawSources: string[] = []; const sources: string[] = []; const sourceToSourceIndexMap = new Map(); - const fileNameToSourceIndexMap = new Map(); let sourcesContent: (string | null)[] | undefined; const names: string[] = []; @@ -52,10 +51,6 @@ namespace ts { function addSource(fileName: string) { enter(); - const sourceIndexByFileName = fileNameToSourceIndexMap.get(fileName); - if (sourceIndexByFileName !== undefined) { - return sourceIndexByFileName; - } const source = getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, fileName, host.getCurrentDirectory(), @@ -69,7 +64,6 @@ namespace ts { rawSources.push(fileName); sourceToSourceIndexMap.set(source, sourceIndex); } - fileNameToSourceIndexMap.set(fileName, sourceIndex); exit(); return sourceIndex; }