Skip to content

Commit 4902d16

Browse files
committed
Merge pull request #898 from DickvdBrink/unused-vars2
Removed some unused var statements
2 parents 84fbfba + 648c697 commit 4902d16

File tree

4 files changed

+1
-28
lines changed

4 files changed

+1
-28
lines changed

src/services/compiler/declarationEmitter.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,6 @@ module TypeScript {
476476
//}
477477
}
478478

479-
var funcPullDecl = this.semanticInfoChain.getDeclForAST(funcDecl);
480-
var funcSignature = funcPullDecl.getSignatureSymbol(this.semanticInfoChain);
481479
this.emitDeclarationComments(funcDecl);
482480

483481
this.emitIndent();
@@ -603,11 +601,6 @@ module TypeScript {
603601
private emitConstructSignature(funcDecl: ConstructSignatureSyntax) {
604602
var funcPullDecl = this.semanticInfoChain.getDeclForAST(funcDecl);
605603

606-
var start = new Date().getTime();
607-
var funcSymbol = this.semanticInfoChain.getSymbolForAST(funcDecl);
608-
609-
TypeScript.declarationEmitFunctionDeclarationGetSymbolTime += new Date().getTime() - start;
610-
611604
this.emitDeclarationComments(funcDecl);
612605

613606
this.emitIndent();
@@ -633,11 +626,6 @@ module TypeScript {
633626
private emitMethodSignature(funcDecl: MethodSignatureSyntax) {
634627
var funcPullDecl = this.semanticInfoChain.getDeclForAST(funcDecl);
635628

636-
var start = new Date().getTime();
637-
var funcSymbol = this.semanticInfoChain.getSymbolForAST(funcDecl);
638-
639-
TypeScript.declarationEmitFunctionDeclarationGetSymbolTime += new Date().getTime() - start;
640-
641629
this.emitDeclarationComments(funcDecl);
642630

643631
this.emitIndent();
@@ -817,7 +805,6 @@ module TypeScript {
817805
var parameter = funcDecl.callSignature.parameterList.parameters[i];
818806
var parameterDecl = this.semanticInfoChain.getDeclForAST(parameter);
819807
if (hasFlag(parameterDecl.flags, PullElementFlags.PropertyParameter)) {
820-
var funcPullDecl = this.semanticInfoChain.getDeclForAST(funcDecl);
821808
this.emitDeclarationComments(parameter);
822809
this.declFile.Write(this.getIndentString());
823810
this.emitClassElementModifiers(parameter.modifiers);
@@ -838,7 +825,6 @@ module TypeScript {
838825

839826
var className = classDecl.identifier.text();
840827
this.emitDeclarationComments(classDecl);
841-
var classPullDecl = this.semanticInfoChain.getDeclForAST(classDecl);
842828
this.emitDeclFlags(classDecl, "class");
843829
this.declFile.Write(className);
844830

@@ -934,7 +920,6 @@ module TypeScript {
934920

935921
var interfaceName = interfaceDecl.identifier.text();
936922
this.emitDeclarationComments(interfaceDecl);
937-
var interfacePullDecl = this.semanticInfoChain.getDeclForAST(interfaceDecl);
938923
this.emitDeclFlags(interfaceDecl, "interface");
939924
this.declFile.Write(interfaceName);
940925

@@ -980,7 +965,6 @@ module TypeScript {
980965
}
981966

982967
this.emitDeclarationComments(moduleDecl);
983-
var modulePullDecl = this.semanticInfoChain.getDeclForAST(moduleDecl);
984968
this.emitDeclFlags(moduleDecl, "enum");
985969
this.declFile.WriteLine(moduleDecl.identifier.text() + " {");
986970

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)