File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ interface System {
14
14
createDirectory ( directoryName : string ) : void ;
15
15
getExecutingFilePath ( ) : string ;
16
16
getCurrentDirectory ( ) : string ;
17
- getMemoryUsage ( ) : number ;
17
+ getMemoryUsage ? ( ) : number ;
18
18
exit ( exitCode ?: number ) : void ;
19
19
}
20
20
@@ -128,9 +128,6 @@ var sys: System = (function () {
128
128
getCurrentDirectory ( ) {
129
129
return new ActiveXObject ( "WScript.Shell" ) . CurrentDirectory ;
130
130
} ,
131
- getMemoryUsage ( ) {
132
- return 0 ;
133
- } ,
134
131
exit ( exitCode ?: number ) : void {
135
132
try {
136
133
WScript . Quit ( exitCode ) ;
Original file line number Diff line number Diff line change @@ -337,14 +337,14 @@ module ts {
337
337
338
338
reportDiagnostics ( errors ) ;
339
339
if ( commandLine . options . diagnostics ) {
340
- var memoryUsed = sys . getMemoryUsage ( ) ;
340
+ var memoryUsed = sys . getMemoryUsage ? sys . getMemoryUsage ( ) : - 1 ;
341
341
reportCountStatistic ( "Files" , program . getSourceFiles ( ) . length ) ;
342
342
reportCountStatistic ( "Lines" , countLines ( program ) ) ;
343
343
reportCountStatistic ( "Nodes" , checker ? checker . getNodeCount ( ) : 0 ) ;
344
344
reportCountStatistic ( "Identifiers" , checker ? checker . getIdentifierCount ( ) : 0 ) ;
345
345
reportCountStatistic ( "Symbols" , checker ? checker . getSymbolCount ( ) : 0 ) ;
346
346
reportCountStatistic ( "Types" , checker ? checker . getTypeCount ( ) : 0 ) ;
347
- if ( memoryUsed ) {
347
+ if ( memoryUsed >= 0 ) {
348
348
reportStatisticalValue ( "Memory used" , Math . round ( memoryUsed / 1000 ) + "K" ) ;
349
349
}
350
350
reportTimeStatistic ( "Parse time" , bindStart - parseStart ) ;
You can’t perform that action at this time.
0 commit comments