Skip to content

Commit

Permalink
Merge branch 'master' into updateRwcAndTest262Runner
Browse files Browse the repository at this point in the history
  • Loading branch information
Yui T committed Feb 3, 2015
2 parents 2e73d45 + 35dde28 commit 78efa97
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 111 deletions.
10 changes: 8 additions & 2 deletions Jakefile
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ var compilerFilename = "tsc.js";
* @param keepComments: false to compile using --removeComments
* @param callback: a function to execute after the compilation process ends
*/
function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOutFile, generateDeclarations, outDir, preserveConstEnums, keepComments, noResolve, callback) {
function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOutFile, generateDeclarations, outDir, preserveConstEnums, keepComments, noResolve, stripInternal, callback) {
file(outFile, prereqs, function() {
var dir = useBuiltCompiler ? builtLocalDirectory : LKGDirectory;
var options = "--module commonjs -noImplicitAny";
Expand Down Expand Up @@ -227,6 +227,10 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOu
options += " -sourcemap -mapRoot file:///" + path.resolve(path.dirname(outFile));
}

if (stripInternal) {
options += " --stripInternal"
}

var cmd = host + " " + dir + compilerFilename + " " + options + " ";
cmd = cmd + sources.join(" ");
console.log(cmd + "\n");
Expand Down Expand Up @@ -331,7 +335,8 @@ compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].conca
/*outDir*/ undefined,
/*preserveConstEnums*/ true,
/*keepComments*/ false,
/*noResolve*/ false);
/*noResolve*/ false,
/*stripInternal*/ false);

var nodeDefinitionsFile = path.join(builtLocalDirectory, "typescript.d.ts");
var standaloneDefinitionsFile = path.join(builtLocalDirectory, "typescriptServices.d.ts");
Expand All @@ -347,6 +352,7 @@ compileFile(nodeDefinitionsFile, servicesSources,[builtLocalDirectory, copyright
/*preserveConstEnums*/ true,
/*keepComments*/ true,
/*noResolve*/ true,
/*stripInternal*/ true,
/*callback*/ function () {
function makeDefinitionFiles(definitionsRoots, standaloneDefinitionsFile, nodeDefinitionsFile) {
// Create the standalone definition file
Expand Down
29 changes: 16 additions & 13 deletions src/compiler/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -891,30 +891,33 @@ module ts {
amdModuleName: string;
referencedFiles: FileReference[];

hasNoDefaultLib: boolean;
externalModuleIndicator: Node; // The first node that causes this file to be an external module
nodeCount: number;
identifierCount: number;
symbolCount: number;
languageVersion: ScriptTarget;
identifiers: Map<string>;

// @internal
// Diagnostics reported about the "///<reference" comments in the file.
referenceDiagnostics: Diagnostic[];


// @internal
// Parse errors refer specifically to things the parser could not understand at all (like
// missing tokens, or tokens it didn't know how to deal with).
parseDiagnostics: Diagnostic[];

//getSyntacticDiagnostics(): Diagnostic[];


// @internal
// File level diagnostics reported by the binder.
semanticDiagnostics: Diagnostic[];


// @internal
// Returns all syntactic diagnostics (i.e. the reference, parser and grammar diagnostics).
// This field should never be used directly, use getSyntacticDiagnostics function instead.
syntacticDiagnostics: Diagnostic[];

hasNoDefaultLib: boolean;
externalModuleIndicator: Node; // The first node that causes this file to be an external module
nodeCount: number;
identifierCount: number;
symbolCount: number;
languageVersion: ScriptTarget;
identifiers: Map<string>;

// @internal
// Stores a line map for the file.
// This field should never be used directly to obtain line map, use getLineMap function instead.
lineMap: number[];
Expand Down
5 changes: 0 additions & 5 deletions tests/baselines/reference/APISample_compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -728,18 +728,13 @@ declare module "typescript" {
amdDependencies: string[];
amdModuleName: string;
referencedFiles: FileReference[];
referenceDiagnostics: Diagnostic[];
parseDiagnostics: Diagnostic[];
semanticDiagnostics: Diagnostic[];
syntacticDiagnostics: Diagnostic[];
hasNoDefaultLib: boolean;
externalModuleIndicator: Node;
nodeCount: number;
identifierCount: number;
symbolCount: number;
languageVersion: ScriptTarget;
identifiers: Map<string>;
lineMap: number[];
}
interface ScriptReferenceHost {
getCompilerOptions(): CompilerOptions;
Expand Down
19 changes: 0 additions & 19 deletions tests/baselines/reference/APISample_compile.types
Original file line number Diff line number Diff line change
Expand Up @@ -2219,22 +2219,6 @@ declare module "typescript" {
>referencedFiles : FileReference[]
>FileReference : FileReference

referenceDiagnostics: Diagnostic[];
>referenceDiagnostics : Diagnostic[]
>Diagnostic : Diagnostic

parseDiagnostics: Diagnostic[];
>parseDiagnostics : Diagnostic[]
>Diagnostic : Diagnostic

semanticDiagnostics: Diagnostic[];
>semanticDiagnostics : Diagnostic[]
>Diagnostic : Diagnostic

syntacticDiagnostics: Diagnostic[];
>syntacticDiagnostics : Diagnostic[]
>Diagnostic : Diagnostic

hasNoDefaultLib: boolean;
>hasNoDefaultLib : boolean

Expand All @@ -2258,9 +2242,6 @@ declare module "typescript" {
identifiers: Map<string>;
>identifiers : Map<string>
>Map : Map<T>

lineMap: number[];
>lineMap : number[]
}
interface ScriptReferenceHost {
>ScriptReferenceHost : ScriptReferenceHost
Expand Down
5 changes: 0 additions & 5 deletions tests/baselines/reference/APISample_linter.js
Original file line number Diff line number Diff line change
Expand Up @@ -757,18 +757,13 @@ declare module "typescript" {
amdDependencies: string[];
amdModuleName: string;
referencedFiles: FileReference[];
referenceDiagnostics: Diagnostic[];
parseDiagnostics: Diagnostic[];
semanticDiagnostics: Diagnostic[];
syntacticDiagnostics: Diagnostic[];
hasNoDefaultLib: boolean;
externalModuleIndicator: Node;
nodeCount: number;
identifierCount: number;
symbolCount: number;
languageVersion: ScriptTarget;
identifiers: Map<string>;
lineMap: number[];
}
interface ScriptReferenceHost {
getCompilerOptions(): CompilerOptions;
Expand Down
19 changes: 0 additions & 19 deletions tests/baselines/reference/APISample_linter.types
Original file line number Diff line number Diff line change
Expand Up @@ -2349,22 +2349,6 @@ declare module "typescript" {
>referencedFiles : FileReference[]
>FileReference : FileReference

referenceDiagnostics: Diagnostic[];
>referenceDiagnostics : Diagnostic[]
>Diagnostic : Diagnostic

parseDiagnostics: Diagnostic[];
>parseDiagnostics : Diagnostic[]
>Diagnostic : Diagnostic

semanticDiagnostics: Diagnostic[];
>semanticDiagnostics : Diagnostic[]
>Diagnostic : Diagnostic

syntacticDiagnostics: Diagnostic[];
>syntacticDiagnostics : Diagnostic[]
>Diagnostic : Diagnostic

hasNoDefaultLib: boolean;
>hasNoDefaultLib : boolean

Expand All @@ -2388,9 +2372,6 @@ declare module "typescript" {
identifiers: Map<string>;
>identifiers : Map<string>
>Map : Map<T>

lineMap: number[];
>lineMap : number[]
}
interface ScriptReferenceHost {
>ScriptReferenceHost : ScriptReferenceHost
Expand Down
5 changes: 0 additions & 5 deletions tests/baselines/reference/APISample_transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -758,18 +758,13 @@ declare module "typescript" {
amdDependencies: string[];
amdModuleName: string;
referencedFiles: FileReference[];
referenceDiagnostics: Diagnostic[];
parseDiagnostics: Diagnostic[];
semanticDiagnostics: Diagnostic[];
syntacticDiagnostics: Diagnostic[];
hasNoDefaultLib: boolean;
externalModuleIndicator: Node;
nodeCount: number;
identifierCount: number;
symbolCount: number;
languageVersion: ScriptTarget;
identifiers: Map<string>;
lineMap: number[];
}
interface ScriptReferenceHost {
getCompilerOptions(): CompilerOptions;
Expand Down
19 changes: 0 additions & 19 deletions tests/baselines/reference/APISample_transform.types
Original file line number Diff line number Diff line change
Expand Up @@ -2297,22 +2297,6 @@ declare module "typescript" {
>referencedFiles : FileReference[]
>FileReference : FileReference

referenceDiagnostics: Diagnostic[];
>referenceDiagnostics : Diagnostic[]
>Diagnostic : Diagnostic

parseDiagnostics: Diagnostic[];
>parseDiagnostics : Diagnostic[]
>Diagnostic : Diagnostic

semanticDiagnostics: Diagnostic[];
>semanticDiagnostics : Diagnostic[]
>Diagnostic : Diagnostic

syntacticDiagnostics: Diagnostic[];
>syntacticDiagnostics : Diagnostic[]
>Diagnostic : Diagnostic

hasNoDefaultLib: boolean;
>hasNoDefaultLib : boolean

Expand All @@ -2336,9 +2320,6 @@ declare module "typescript" {
identifiers: Map<string>;
>identifiers : Map<string>
>Map : Map<T>

lineMap: number[];
>lineMap : number[]
}
interface ScriptReferenceHost {
>ScriptReferenceHost : ScriptReferenceHost
Expand Down
5 changes: 0 additions & 5 deletions tests/baselines/reference/APISample_watcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -795,18 +795,13 @@ declare module "typescript" {
amdDependencies: string[];
amdModuleName: string;
referencedFiles: FileReference[];
referenceDiagnostics: Diagnostic[];
parseDiagnostics: Diagnostic[];
semanticDiagnostics: Diagnostic[];
syntacticDiagnostics: Diagnostic[];
hasNoDefaultLib: boolean;
externalModuleIndicator: Node;
nodeCount: number;
identifierCount: number;
symbolCount: number;
languageVersion: ScriptTarget;
identifiers: Map<string>;
lineMap: number[];
}
interface ScriptReferenceHost {
getCompilerOptions(): CompilerOptions;
Expand Down
19 changes: 0 additions & 19 deletions tests/baselines/reference/APISample_watcher.types
Original file line number Diff line number Diff line change
Expand Up @@ -2475,22 +2475,6 @@ declare module "typescript" {
>referencedFiles : FileReference[]
>FileReference : FileReference

referenceDiagnostics: Diagnostic[];
>referenceDiagnostics : Diagnostic[]
>Diagnostic : Diagnostic

parseDiagnostics: Diagnostic[];
>parseDiagnostics : Diagnostic[]
>Diagnostic : Diagnostic

semanticDiagnostics: Diagnostic[];
>semanticDiagnostics : Diagnostic[]
>Diagnostic : Diagnostic

syntacticDiagnostics: Diagnostic[];
>syntacticDiagnostics : Diagnostic[]
>Diagnostic : Diagnostic

hasNoDefaultLib: boolean;
>hasNoDefaultLib : boolean

Expand All @@ -2514,9 +2498,6 @@ declare module "typescript" {
identifiers: Map<string>;
>identifiers : Map<string>
>Map : Map<T>

lineMap: number[];
>lineMap : number[]
}
interface ScriptReferenceHost {
>ScriptReferenceHost : ScriptReferenceHost
Expand Down
1 change: 1 addition & 0 deletions tests/cases/compiler/APISample_compile.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @module: commonjs
// @includebuiltfile: typescript.d.ts
// @stripInternal:true

/*
* Note: This test is a public API sample. The sample sources can be found
Expand Down
1 change: 1 addition & 0 deletions tests/cases/compiler/APISample_linter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @module: commonjs
// @includebuiltfile: typescript.d.ts
// @stripInternal:true

/*
* Note: This test is a public API sample. The sample sources can be found
Expand Down
1 change: 1 addition & 0 deletions tests/cases/compiler/APISample_transform.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @module: commonjs
// @includebuiltfile: typescript.d.ts
// @stripInternal:true

/*
* Note: This test is a public API sample. The sample sources can be found
Expand Down
1 change: 1 addition & 0 deletions tests/cases/compiler/APISample_watcher.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @module: commonjs
// @includebuiltfile: typescript.d.ts
// @stripInternal:true

/*
* Note: This test is a public API sample. The sample sources can be found
Expand Down

0 comments on commit 78efa97

Please sign in to comment.