tsc-ts 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -1
- package/dist/api/compiler/ast.d.ts +6 -0
- package/dist/api/compiler/ast.js +19 -3
- package/dist/api/compiler/checker-functions.js +5 -1
- package/dist/api/compiler/checker-grammar.d.ts +39 -4
- package/dist/api/compiler/checker-grammar.js +239 -75
- package/dist/api/compiler/checker-heritage.js +20 -14
- package/dist/api/compiler/checker-modules.js +4 -2
- package/dist/api/compiler/checker-narrowing.d.ts +7 -0
- package/dist/api/compiler/checker-narrowing.js +31 -4
- package/dist/api/compiler/checker-source-file.js +16 -1
- package/dist/api/compiler/checker-statements.js +11 -2
- package/dist/api/compiler/checker-type-factory.js +17 -7
- package/dist/api/compiler/checker-type-nodes.d.ts +1 -1
- package/dist/api/compiler/checker-type-nodes.js +5 -5
- package/dist/api/compiler/checker-unused.js +15 -10
- package/dist/api/compiler/checker.d.ts +4 -0
- package/dist/api/compiler/checker.js +6 -0
- package/dist/api/compiler/file-loader.d.ts +5 -0
- package/dist/api/compiler/file-loader.js +7 -0
- package/dist/api/compiler/program-checker.d.ts +18 -0
- package/dist/api/compiler/program-checker.js +27 -0
- package/package.json +14 -9
- package/src/compiler/ast.ts +20 -3
- package/src/compiler/checker-functions.ts +5 -0
- package/src/compiler/checker-grammar.ts +247 -88
- package/src/compiler/checker-heritage.ts +31 -17
- package/src/compiler/checker-modules.ts +4 -2
- package/src/compiler/checker-narrowing.ts +30 -4
- package/src/compiler/checker-source-file.ts +16 -1
- package/src/compiler/checker-statements.ts +10 -2
- package/src/compiler/checker-type-factory.ts +14 -7
- package/src/compiler/checker-type-nodes.ts +5 -5
- package/src/compiler/checker-unused.ts +13 -8
- package/src/compiler/checker.ts +6 -0
- package/src/compiler/file-loader.ts +8 -0
- package/src/compiler/parallel-check.ts +13 -1
- package/src/compiler/parse-thread.ts +24 -2
- package/src/compiler/program-checker.ts +28 -0
- package/src/compiler/run-records.ts +12 -5
- package/src/compiler/tsc-compile.ts +10 -1
|
@@ -878,6 +878,8 @@ export class Statistics {
|
|
|
878
878
|
rows.push([prefix + 'Types', String(this.types)]);
|
|
879
879
|
rows.push([prefix + 'Instantiations', String(this.instantiations)]);
|
|
880
880
|
rows.push([prefix + 'Memory used', `${Math.floor(this.memoryUsed / 1024)}K`]);
|
|
881
|
+
// The table has tsgo's rows. No runtime counter matches its allocation count (runtime.MemStats.Mallocs),
|
|
882
|
+
// so this one stays 0.
|
|
881
883
|
rows.push([prefix + 'Memory allocs', String(this.memoryAllocs)]);
|
|
882
884
|
const t = this.times;
|
|
883
885
|
if (t.configTime !== 0) rows.push([prefix + 'Config time', formatDuration(t.configTime)]);
|
|
@@ -916,7 +918,14 @@ export function statisticsOf(compilerProgram: CompilerProgram): Statistics {
|
|
|
916
918
|
statistics.identifiers += file.identifierCount;
|
|
917
919
|
statistics.symbols += file.symbolCount;
|
|
918
920
|
}
|
|
919
|
-
|
|
921
|
+
// Every checker's counts, the checker threads' included, as tsgo's statisticsFromProgram reports them.
|
|
922
|
+
const counts = compilerProgram.checked.checkerCounts();
|
|
923
|
+
statistics.symbols += counts.symbols;
|
|
924
|
+
statistics.types = counts.types;
|
|
925
|
+
statistics.instantiations = counts.instantiations;
|
|
926
|
+
// tsgo reports the Go heap in use (runtime.MemStats.Alloc); the closest this runtime has is the
|
|
927
|
+
// process's resident set, which includes the checker threads' heaps.
|
|
928
|
+
statistics.memoryUsed = process.memoryUsage.rss();
|
|
920
929
|
const t = statistics.times;
|
|
921
930
|
const source = compilerProgram.times;
|
|
922
931
|
t.configTime = source.configTime;
|