Skip to content

Commit 35df2fc

Browse files
committed
Removed some unused var statements
1 parent 84fbfba commit 35df2fc

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

src/services/compiler/typescript.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ module TypeScript {
512512
for (var i = 0, n = fileNames.length; i < n; i++) {
513513
var fileName = fileNames[i];
514514

515-
var document = this.getDocument(fileNames[i]);
515+
var document = this.getDocument(fileName);
516516

517517
sharedEmitter = this._emitDocumentDeclarations(document, emitOptions,
518518
file => emitOutput.outputFiles.push(file), sharedEmitter);
@@ -578,7 +578,6 @@ module TypeScript {
578578
var sourceUnit = document.sourceUnit();
579579
Debug.assert(this._shouldEmit(document));
580580

581-
var typeScriptFileName = document.fileName;
582581
if (!emitter) {
583582
var javaScriptFileName = this.mapOutputFileName(document, emitOptions, TypeScriptCompiler.mapToJSFileName);
584583
var outFile = new TextWriter(javaScriptFileName, this.writeByteOrderMarkForDocument(document), OutputFileType.JavaScript);
@@ -799,8 +798,6 @@ module TypeScript {
799798
}
800799

801800
private extractResolutionContextFromAST(resolver: PullTypeResolver, ast: ISyntaxElement, document: Document, propagateContextualTypes: boolean): { ast: ISyntaxElement; enclosingDecl: PullDecl; resolutionContext: PullTypeResolutionContext; inContextuallyTypedAssignment: boolean; inWithBlock: boolean; } {
802-
var scriptName = document.fileName;
803-
804801
var enclosingDecl: PullDecl = null;
805802
var enclosingDeclAST: ISyntaxElement = null;
806803
var inContextuallyTypedAssignment = false;
@@ -981,7 +978,6 @@ module TypeScript {
981978

982979
case SyntaxKind.ReturnStatement:
983980
if (propagateContextualTypes) {
984-
var returnStatement = <ReturnStatementSyntax>current;
985981
var contextualType: PullTypeSymbol = null;
986982

987983
if (enclosingDecl && (enclosingDecl.kind & PullElementKind.SomeFunction)) {

src/services/core/integerUtilities.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ module TypeScript {
77
}
88

99
export function integerMultiplyLow32Bits(n1: number, n2: number): number {
10-
var n1Low16 = n1 & 0x0000ffff;
11-
var n1High16 = n1 >>> 16;
12-
13-
var n2Low16 = n2 & 0x0000ffff;
14-
var n2High16 = n2 >>> 16;
15-
1610
var resultLow32 = (((n1 & 0xffff0000) * n2) >>> 0) + (((n1 & 0x0000ffff) * n2) >>> 0) >>> 0;
1711
return resultLow32;
1812
}

src/services/syntax/syntaxTree.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ module TypeScript {
8484
private cacheSyntaxTreeInfo(): void {
8585
// If we're not keeping around the syntax tree, store the diagnostics and line
8686
// map so they don't have to be recomputed.
87-
var sourceUnit = this.sourceUnit();
8887
var firstToken = firstSyntaxTreeToken(this);
8988
var leadingTrivia = firstToken.leadingTrivia(this.text);
9089

0 commit comments

Comments
 (0)