Commit Graph
6 Commits
Author SHA1 Message Date
Benedikt Meurer d3e23884c4 Fix linter warnings. 2019-02-07 20:39:03 +01:00
Benedikt Meurer 0ee8b9d2e9 Ran gulp baseline-accept again to rebaseline the JSDoc tests 2019-02-07 19:59:57 +01:00
Benedikt Meurer 0c7a7df09d Also initialize transformFlags properly in NodeObjects. 2019-02-06 20:57:02 +01:00
Benedikt Meurer edc9b35e1f Ran gulp baseline-accept to rebaseline the JSDoc tests 2019-02-06 20:05:11 +01:00
Benedikt Meurer fb65adbd23 Fix initialization of TokenOrIdentifierObject#transformFlags.
This should start with `TransformFlags.None` just like in the `Node`
constructor in `src/compiler/utilities.ts`.
2019-02-06 16:51:32 +01: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