Commit Graph

20066 Commits

Author SHA1 Message Date
Anders Hejlsberg
ee10c247b7 Less aggressive logic for detecting circular mapped arrays and tuples 2019-02-04 17:36:09 -08:00
Sheetal Nandi
87bb6c9c90 Merge branch 'master' into usePrependToSkipBuild 2019-02-04 15:43:44 -08:00
Sheetal Nandi
3593685269 Use prologue directive information in buildInfo to emit prologues when manipulating js output bundle file 2019-02-04 15:31:10 -08:00
Nathan Shively-Sanders
2f9218f346 DOM update February 2019 (#29690)
* DOM update February 2019

* Update some baselines

* Update mappedTypeRecursiveInference baselines
2019-02-04 15:25:41 -08:00
Sheetal Nandi
a0a4e6b0c2 Update test baselines 2019-02-04 15:02:35 -08:00
Sheetal Nandi
16914cc940 Factor out unparsed source file for own creation 2019-02-04 15:02:29 -08:00
Sheetal Nandi
d9ead78e8c Map dts file to sections to write and fix from 2019-02-04 15:02:11 -08:00
Sheetal Nandi
a64e5ad3f3 Even though .d.ts doesnt change, the map file most likely changes, so emit that 2019-02-04 15:02:06 -08:00
Sheetal Nandi
acec3c193a Use stored helpers to emit incrementally 2019-02-04 15:02:00 -08:00
Sheetal Nandi
aa5d62a72c Perform only emit on js file if no decl file change 2019-02-04 15:01:54 -08:00
Sheetal Nandi
00917a4649 Store pologue information in bundle info 2019-02-04 15:00:17 -08:00
Ryan Cavanaugh
4ff71ecb98 Merge pull request #29696 from Microsoft/filter-unknown
Use unknown for array predicates' return types
2019-02-04 13:26:29 -08:00
Ron Buckton
55762271af Merge pull request #29695 from Microsoft/fixDtsTypeReferenceEmit
Fix type reference dts emit failure
2019-02-04 13:03:07 -08:00
Gabriela Britto
674800f25e implement refactor for functions with a rest parameter 2019-02-04 12:52:27 -08:00
Anders Hejlsberg
b7c5c073f8 Merge pull request #29714 from Microsoft/fixInstanceofTypeofControlFlow
Fix instanceof and typeof control flow
2019-02-04 12:22:52 -08:00
Anders Hejlsberg
f86b635122 Merge pull request #29705 from Microsoft/fixParametersAndReturnType
Less restrictive Parameters<T> and ReturnType<T>
2019-02-04 12:08:29 -08:00
Ron Buckton
4756373967 Merge branch 'master' into fixDtsTypeReferenceEmit 2019-02-04 11:39:16 -08:00
Benedikt Meurer
97c557eb04 Make modifierFlagsCache mandatory for Node objects
The `modifierFlagsCache` property is among the top properties that cause
megamorphic stub cache misses when having `tsc` build itself. This is
because it's added sort of randomly to a whole lot of different objects,
at arbitrary points after their initialization.

This also means that `modifierFlagsCache` is often not present on the
instances, which means that when missing on the megamorphic stub cache,
Node/V8 has to compute `NonExistent` handlers for the relevant inline
caches.

It's a lot cheaper to just make sure that the property is always
existent on the instance, and ideally also at the same offset. This
change ensures exactly that.

Drive-by-fix: Also make sure that `transformFlags` (and `parent`)
is always at the same offset for `Node` objects.
2019-02-04 14:46:27 +01:00
Anders Hejlsberg
415c725bb9 Make exception for synthetic 'this.x' in narrowTypeByInstanceof 2019-02-03 15:23:07 -08:00
Jack Williams
25f9a1fec2 Fix lint errors 2019-02-03 22:44:15 +00:00
Jack Williams
54801cbd17 Merge branch 'master' into switch-on-unknown 2019-02-03 22:36:40 +00:00
Anders Hejlsberg
343e0f7fd9 Fix NarrowTypeByTypeof, NarrowTypeByInstanceof, isPropertyInitializedInConstructor 2019-02-03 08:19:22 -08:00
Jack Williams
3d0c7f3156 Narrow unknown in switch 2019-02-03 16:07:21 +00:00
Ryan Cavanaugh
0a041ee536 Merge pull request #28270 from AnyhowStep/json-parse-reviver-stringify-replacer-better-declaration
JSON.parse(), JSON.stringify() more specific declarations for #6955
2019-02-02 12:10:56 -08:00
Anders Hejlsberg
e7ad76ddc8 Less restrictive constraints in Parameters and ReturnType types 2019-02-02 09:28:21 -08:00
Alan Pierce
942b020081 Merge remote-tracking branch 'origin/master' into enforce-const-enum-access-for-isolatedmodules 2019-02-01 18:52:22 -08:00
Sheetal Nandi
e3eb7bc4b7 Add helpers from source files to the bundleInfo to be used later 2019-02-01 17:52:01 -08:00
Sheetal Nandi
4050378819 Add source information to bundle info and use it to emit header information later on 2019-02-01 17:44:38 -08:00
Ryan Cavanaugh
efbe630a13 Use unknown for array predicates' return types 2019-02-01 17:05:04 -08:00
Gabriela Britto
bde97d1226 fix refactor to find super references 2019-02-01 16:43:44 -08:00
Ron Buckton
4b84f56b21 Fix type reference dts emit failure 2019-02-01 16:09:17 -08:00
Ryan Cavanaugh
a856a64a5c Merge pull request #29446 from fuafa/infer-js-doc
fix quick fix infer parameter types from usage in js file
2019-02-01 13:55:31 -08:00
Ryan Cavanaugh
f81ea89564 Merge pull request #29136 from ajafff/usedbeforedeclaration-objectspread
property is used before its initialization: check more nodes
2019-02-01 13:46:37 -08:00
Gabriela Britto
bf25ba4650 Don't refactor if variable declaration has type annotation 2019-02-01 13:09:53 -08:00
Anders Hejlsberg
607f2ea4de Merge pull request #29478 from Microsoft/fixContextualReturnTypes
Infer contextual types from generic return types
2019-02-01 12:31:08 -08:00
Sheetal Nandi
a41d546f6e Store commonSourceDirectory 2019-02-01 11:42:39 -08:00
Ryan Cavanaugh
9d3707d671 Merge pull request #29665 from ajafff/readonly-error-message
clarify error message for 'readonly' type operator
2019-02-01 11:24:38 -08:00
Anders Hejlsberg
8827bed0e7 Merge pull request #29647 from Microsoft/noConstraintsDuringInference
Only check constraints in final phase of type inference
2019-02-01 10:54:08 -08:00
Andy Hanson
ed277b8ee9 Handle GetAccessor and SetAccessor in isThisless (#27869) 2019-02-01 10:50:04 -08:00
Sheetal Nandi
66dab21565 More refactoring 2019-02-01 10:46:37 -08:00
Anders Hejlsberg
fffd77457a Merge branch 'master' into fixContextualReturnTypes
# Conflicts:
#	src/compiler/checker.ts
2019-02-01 10:28:50 -08:00
Anders Hejlsberg
84250e3888 Increase accuracy of remaining subtype reduction work estimate 2019-02-01 06:57:07 -08:00
kpreisser
97d2ea8f32 Minor improvements of code and comments. 2019-02-01 11:59:30 +01:00
kpreisser
9140cbc29e Correctly adjust the backward reference of the next entry when deleting an entry. 2019-02-01 11:59:28 +01:00
kpreisser
c4960d3c11 Adjust the unit test to spot a missed bug in the delete() implementation. 2019-02-01 11:59:26 +01:00
kpreisser
472157e523 Revert a few unneeded (stylistic) changes. 2019-02-01 11:59:25 +01:00
kpreisser
c8e329bcbc Rework the implementation of the shimMap to ensure iterators will behave the same as with native Maps.
This includes:
- Entries are visited in insertion order
- New entries added during iteration will be visited
- Entries that are removed during iteration (before being visited) will not be visited

Fixes #26090
2019-02-01 11:59:24 +01:00
kpreisser
b502ae98e1 Add a unit test for the shimMap (currently failing).
This will test that iteration is in insertion order, new entries added during iteration will be visited by the iterator, and values can be deleted while an iterator is running.
2019-02-01 11:59:22 +01:00
kpreisser
41bef5f77c PR review: Fix typo. 2019-02-01 11:59:20 +01:00
kpreisser
c0c71bf65e Fix lint issues. 2019-02-01 11:59:17 +01:00