Commit graph

449 commits

Author SHA1 Message Date
Mohamed Hegazy b7f4480656 unify file extension resolution logic 2015-05-04 22:46:31 -07:00
Daniel Rosenwasser 79bea92ed6 Merge branch 'master' into testPerf
Conflicts:
	src/harness/harness.ts
2015-05-04 15:16:36 -07:00
Mohamed Hegazy 91fedf4df1 Update description message and variable names 2015-05-04 13:21:39 -07:00
kmashint 2e0a55c4d3 Compiler flag to specify line ending #1693 unit tests 2015-05-03 02:07:39 -04:00
kmashint c783e3781a Compiler flag to specify line ending #1693 code review adjustments 2015-05-03 02:07:28 -04:00
kmashint c1d2aeab84 Compiler flag to specify line ending #1693 code review adjustments 2015-05-03 02:07:18 -04:00
Keith Mashinter 16d7e5cad7 Compiler flag to specify line ending #1693 fix whitespace 2015-05-03 02:07:13 -04:00
Keith Mashinter 532f92b88f Compiler flag to specify line ending #1693 2015-05-03 02:07:03 -04:00
Daniel Rosenwasser d5d7f9f504 Document/rename flag used in compiler. 2015-05-01 16:53:55 -07:00
Daniel Rosenwasser f988a11cfc Merge pull request #2949 from Microsoft/cleanupAndSpeedupFourslash
Cleanup and speedup fourslash
2015-04-28 17:50:25 -07:00
Daniel Rosenwasser 97cd07d1d4 Cache the emit of 'fourslash.ts'.
Yields a >25% decrease in running time for fourslash tests on my machine.
2015-04-28 17:20:38 -07:00
Anders Hejlsberg 4c5aeaf0c9 Merge branch 'master' into namespaces
Conflicts:
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
	src/compiler/program.ts
	tests/baselines/reference/constDeclarations-access5.errors.txt
	tests/baselines/reference/es6-amd.errors.txt
	tests/baselines/reference/es6-declaration-amd.errors.txt
	tests/baselines/reference/es6-sourcemap-amd.errors.txt
	tests/baselines/reference/es6-umd.errors.txt
	tests/baselines/reference/es6-umd2.errors.txt
	tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.errors.txt
	tests/baselines/reference/es6ImportNameSpaceImport.errors.txt
	tests/baselines/reference/es6ImportNamedImport.errors.txt
	tests/baselines/reference/es6ImportNamedImportInExportAssignment.errors.txt
	tests/baselines/reference/es6ModuleWithModuleGenTargetAmd.errors.txt
	tests/baselines/reference/es6ModuleWithModuleGenTargetCommonjs.errors.txt
2015-04-28 16:49:23 -07:00
Mohamed Hegazy 32409f9b9b Merge branch 'master' into inlineSourceMaps 2015-04-27 10:11:43 -07:00
Anders Hejlsberg 034e8b052c Adjusting error messages 2015-04-26 18:29:37 -07:00
Vladimir Matveev b1cc06e44c merge with master 2015-04-23 20:50:35 -07:00
Mohamed Hegazy ded0e398b4 update error messages 2015-04-23 10:53:19 -07:00
Mohamed Hegazy 658bba9eaf Add --inlineSources option 2015-04-20 20:33:31 -07:00
Mohamed Hegazy 7aee43b6da Merge branch 'master' into release-1.5 2015-04-20 15:48:15 -07:00
Mohamed Hegazy 08a869212b Respond to code review commmetns 2015-04-20 14:23:24 -07:00
Vladimir Matveev dcb4c24b43 merge with master 2015-04-20 13:40:13 -07:00
Mohamed Hegazy c940b1651a Merge branch 'master' into inlineSourceMaps 2015-04-19 13:33:50 -07:00
Mohamed Hegazy 021f309151 Merge branch 'master' into rootDir 2015-04-19 13:25:03 -07:00
Mohamed Hegazy b3fcae88b9 Fix typo 2015-04-19 13:24:39 -07:00
Mohamed Hegazy 2049684154 Update version 2015-04-19 12:46:38 -07:00
Mohamed Hegazy 3013aba309 Merge branch 'master' into release-1.5
Conflicts:
	bin/tsc.js
	bin/typescript.js
	bin/typescriptServices.js
	src/compiler/program.ts
2015-04-19 12:44:53 -07:00
Daniel Rosenwasser 79dc0f96d3 Merge pull request #1546 from Arnavion/fix-emithost-this-binding
Don't lose the this reference for compilerHost methods.
2015-04-18 11:29:44 -07:00
Mohamed Hegazy 8964b8e5b6 Merge branch 'master' into rootDir
Conflicts:
	tests/baselines/reference/APISample_compile.types
	tests/baselines/reference/APISample_linter.types
	tests/baselines/reference/APISample_transform.types
	tests/baselines/reference/APISample_watcher.types
2015-04-16 16:52:51 -07:00
Mohamed Hegazy b6ef32346b Respond to code review comments 2015-04-16 16:35:48 -07:00
Mohamed Hegazy 261adffe50 Add rootDir option 2015-04-14 22:11:25 -07:00
Mohamed Hegazy e7895c59d4 Move commonSourceDirectory computation to its own function 2015-04-14 15:05:08 -07:00
Cyrus Najmabadi 61951e5d94 Use a single scanner for all parsing tasks. 2015-04-12 14:02:58 -07:00
Vladimir Matveev 1781ce1bd8 Merge remote-tracking branch 'origin/master' into systemModule 2015-04-11 12:31:52 -07:00
Vladimir Matveev e8fcf8fa2a initial support for system module 2015-04-10 12:10:38 -07:00
Mohamed Hegazy e30f0d4ae6 Make version const 2015-04-09 14:18:43 -07:00
Mohamed Hegazy a998abb153 Add inlineSourceMap option 2015-04-08 00:14:23 -07:00
Mohamed Hegazy 9c4734901c Update version 2015-04-01 09:30:13 -07:00
Vladimir Matveev f239bbc3b1 Merge pull request #2550 from Microsoft/separateCompilation
Relax import/export elision rules for separate compilation
2015-03-31 14:51:39 -07:00
Vladimir Matveev c885f59d1b do not include declaration files in 'is external module' check 2015-03-30 22:41:49 -07:00
Vladimir Matveev 4b7e6cfc2e addressed CR feedback, accepted baselines 2015-03-30 20:16:50 -07:00
Mohamed Hegazy 83e8910dc1 update version in program 2015-03-26 10:44:44 -07:00
steveluc 48482071f6 Moved findConfigFile to program.ts. Addressed pull request comments. 2015-03-24 14:03:21 -07:00
Arnavion 0d6ce02405 Don't lose the this reference for compilerHost methods.
Fixes #1545
2015-03-24 10:05:24 -07:00
Cyrus Najmabadi 19517ac0dd Emit, even in the presence of declaration errors and noEmitOnError.
We're reverting to the previous behavior we had until there is more consensus
on the best way to deal with this issue.
2015-03-22 21:39:07 -07:00
Cyrus Najmabadi 791a0e4e39 Don't actually emit declarations when we just want the diagnostics for them. 2015-03-19 21:12:25 -07:00
Cyrus Najmabadi 85d71b2883 No emit should happen if there are declaration errors and noEmitOnErrors is specified. 2015-03-19 16:55:07 -07:00
Mohamed Hegazy 7462915baf Expose setParentNodes on createCompilerHost 2015-03-18 14:11:50 -07:00
Mohamed Hegazy a06ce61684 Merge branch 'master' into es6ImportExportEmit 2015-03-17 13:03:17 -07:00
Anders Hejlsberg ad75193528 Merge branch 'master' into cleanupDiagnostics
Conflicts:
	src/compiler/program.ts
2015-03-17 06:26:24 -07:00
Mohamed Hegazy b6a6d85e6b Merge branch 'master' into es6ImportExportEmit
Conflicts:
	src/compiler/checker.ts
	src/compiler/emitter.ts
	src/compiler/program.ts
2015-03-15 15:48:23 -07:00
Cyrus Najmabadi 2e8eb4e17a Use 'let' in the ompiler layer. 2015-03-13 15:03:17 -07:00
Anders Hejlsberg c4b0302acf Clean up diagnostic timers and -diagnostic output 2015-03-13 14:49:32 -07:00
Sheetal Nandi 4b7548487c Fix the checks with language version to use default es3 2015-03-12 00:36:14 -07:00
Mohamed Hegazy b52d9ec23e Report error if module gen target is specified in es6
Conflicts:
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
	src/compiler/program.ts
	tests/baselines/reference/constDeclarations-access5.errors.txt
	tests/baselines/reference/es6ExportAssignment.errors.txt
	tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.errors.txt
	tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.js
	tests/baselines/reference/es6ImportDefaultBindingMergeErrors.errors.txt
	tests/baselines/reference/es6ImportEqualsDeclaration.errors.txt
	tests/cases/compiler/es6ImportDefaultBinding.ts
	tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport.ts
	tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1.ts
	tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportDts.ts
	tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding.ts
	tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding1.ts
	tests/cases/compiler/es6ImportDefaultBindingMergeErrors.ts
	tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty.ts
	tests/cases/compiler/es6ImportNameSpaceImport.ts
	tests/cases/compiler/es6ImportNamedImport.ts
	tests/cases/compiler/es6ImportNamedImportMergeErrors.ts
	tests/cases/compiler/es6ImportNamedImportNoExportMember.ts
	tests/cases/compiler/es6ImportWithoutFromClause.ts
	tests/cases/compiler/es6ImportWithoutFromClauseNonInstantiatedModule.ts
2015-03-11 22:53:36 -07:00
Bill Ticehurst a6816fc128 Added description to version exports 2015-03-07 20:12:16 -08:00
Bill Ticehurst da5caf5f72 Made the 'version' string an exported property 2015-03-06 17:09:55 -08:00
Cyrus Najmabadi d3fbebf3fb Never use the entire span of a function declaration or function expression when reporting a checker error. 2015-03-04 18:15:55 -08:00
Cyrus Najmabadi 0be645943a Print times in a manner more consistent with the 1.3 compiler.
This allows us to more accurately compare and constrast times between that
compiler and the current one.
2015-02-26 14:51:04 -08:00
Cyrus Najmabadi a020a43216 Ensure that the cost for typechecking is not billed to the emit portion of the compiler. 2015-02-25 16:45:45 -08:00
Anders Hejlsberg 79be0a7d26 Support for ES6 export declarations (except export default and export *) 2015-02-12 18:05:02 -08:00
Anders Hejlsberg e47f64c510 Checking of ES6 import declarations 2015-02-08 17:33:45 -08:00
Anders Hejlsberg 69bd05946a CommonJS emit for ES6 import declarations 2015-02-08 08:03:15 -08:00
Anders Hejlsberg 7bd14a7895 Merge branch 'master' into es6importcheck
Conflicts:
	src/compiler/checker.ts
2015-02-06 14:36:36 -08:00
Anders Hejlsberg 35583e6694 Process ES6 imports when creating program 2015-02-06 06:15:03 -08:00
Cyrus Najmabadi c77f732762 CR feedback. 2015-02-05 17:24:46 -08:00
Cyrus Najmabadi 66a363f449 Simplify the API for emitting and reporting exit statuses to callers. 2015-02-05 15:50:18 -08:00
Cyrus Najmabadi b0061c1420 Emit both javascript and declarations in the presence of errors (*unless* -noEmitOnError is specified). 2015-02-05 14:41:04 -08:00
Cyrus Najmabadi ea4e3de91c Remove unnecessary diagnostics split on SourceFile. 2015-02-05 13:38:11 -08:00
Cyrus Najmabadi c1dfdaa436 Simplify code for getting diagnostics in the Program. 2015-02-05 02:15:38 -08:00
Cyrus Najmabadi 337a99f62a Change the API for getting diagnostics so that all calls go through a Program instance. 2015-02-05 01:47:29 -08:00
Cyrus Najmabadi b12be3db19 Remove dependency from the typechecker to the compiler host.
This also lets us not expose the compiler host from the Program instance.
The compiler host was only needed by the type checker to get the host newline.
The host newline was used for concatenating diagnostic message chains.  Now
we don't concatenate them up front.  Instead, we just store the message chain
in the diagnostic itself.  Then when we pass it to the host, it can then decide
what newline to use.
2015-02-04 23:20:26 -08:00
Cyrus Najmabadi 28c1a23e7c Track performance statistics in the ts module.
This allows us to greatly simplify the compile function in tsc.
2015-02-04 18:42:44 -08:00
Cyrus Najmabadi 3cadb3c30c Use a diagnostics collection inside the program instance. 2015-02-04 18:12:13 -08:00
Cyrus Najmabadi 476c8249ac Remove 'isEmitBlocked' from the program API.
If emitting is blocked, then calling .emit on the program will simply return
immediately with an appropriate reason given in the EmitResult.
2015-02-04 17:48:29 -08:00
Cyrus Najmabadi 2a1d78d9e3 Simplify the createProgram API.
Allow the host parameter to be optional to simplify command line programs.
2015-02-04 17:02:26 -08:00
Cyrus Najmabadi bb307f8163 Simplify the API for emitting code from the Program instance. 2015-02-04 16:53:14 -08:00
Cyrus Najmabadi b6d083fa40 Do not publicly expose a way on a Program instance to get typecheckers with differing behavior.
Now, you can only get the non-diagnostics, pull-type-checker from the Program instance.
If you want diagnostics, you simply ask the Program instance for the diagnostics you want.
2015-02-04 16:11:38 -08:00
Cyrus Najmabadi 5b049feb36 Hide the diagnostic producing methods from TypeChecker.
Instead, consumers should get these diagnostics through the Program instance.
2015-02-04 14:29:25 -08:00
Cyrus Najmabadi 95702a89a7 Fix spelling of 'Filename' to be 'FileName'. 2015-02-03 16:08:46 -08:00
Vladimir Matveev 288e38fa36 merge with master 2015-02-03 11:26:39 -08:00
Mohamed Hegazy d6bd9f74d2 Merge branch 'master' into LSAPICleanup 2015-02-02 18:49:13 -08:00
Cyrus Najmabadi d66e70a960 Emit even in the presence of parse errors. 2015-02-02 15:28:23 -08:00
Cyrus Najmabadi dd8d3535ff Remove the concept of early errors from the compiler.
Currently only parse errors prevent emitting (And this will be changed in the next
code review as well).
2015-02-02 15:14:19 -08:00
Mohamed Hegazy 0ce51e684f Fix #1871 by ensuring the at we get the canonical filename before we check the extension 2015-01-30 18:22:12 -08:00
Mohamed Hegazy 04d8f5af12 Merge branch 'master' into LSAPICleanup
Conflicts:
	src/services/services.ts
2015-01-27 20:11:16 -08:00
Sheetal Nandi e0581899fa Rename existing import declaration to ImportEqualsDeclaration 2015-01-27 14:42:20 -08:00
Mohamed Hegazy 0257acebd3 Respond to code review comments 2015-01-26 16:45:34 -08:00
Vladimir Matveev ad42afc4af resolve merge conflicts 2015-01-22 11:23:27 -08:00
Vladimir Matveev c40977c5fb move getSyntacticDiagnostics out of SourceFile 2015-01-16 12:32:37 -08:00
Anders Hejlsberg 65452aa011 Hardening compiler to accept empty CompilerOptions object 2015-01-15 15:57:08 -08:00
Anders Hejlsberg f9f95ba614 Support for tsconfig.json files in command-line compiler 2015-01-15 13:22:23 -08:00
Mohamed Hegazy 3c59b9fe9c Add getDefaultLibraryFilePath to retrive the default lib file path for node package consumers 2015-01-14 15:52:53 -08:00
Mohamed Hegazy a99b958484 Manual port of fixe for #1593 from release-1.4 2015-01-13 09:30:54 -08:00
Cyrus Najmabadi 67b2f13cce Merge branch 'master' into layering
Conflicts:
	src/compiler/parser.ts
2014-12-18 00:39:56 -08:00
Cyrus Najmabadi 71c82dd33f Remove obsolete comment. 2014-12-16 15:32:56 -08:00
Cyrus Najmabadi 5a2fb94a95 Clean things up so the services layer can easily emit without having to contort compiler hosts. 2014-12-16 14:42:58 -08:00
Cyrus Najmabadi f5ad79fe7a Remove the dependency that TypeChecker and Emitter have on Program.
Instead, these layers explicitly specify the functionality they need, and don't take in anything extra.
2014-12-16 14:12:17 -08:00
Cyrus Najmabadi b665323d45 Make the emitter no longer depend on the Program.
This breaks layering.  Also, it means the emitter depends on too large a surface area.
Now the emitter declares exactly what it needs, and only gets that.
2014-12-16 13:52:47 -08:00
Cyrus Najmabadi 96c3c90d9a Rename typechecker parameter related to whether or not we produce diagnostics.
Comment what the flag means.
2014-12-16 13:30:34 -08:00
Cyrus Najmabadi 4aa361d4bf Layer the compiler so that every layer only depends on hte layers below it.
The layering is now:

types
core
scanner
parser
binder
checker
emitter
program
2014-12-16 13:14:14 -08:00