Skip to content

Correctly cache tagged template objects in modules #18300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Oct 3, 2017
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c4b1a9d
Update emit for tagged templates to use a per-site cached template ob…
DanielRosenwasser Sep 7, 2017
166af8c
Accepted baselines.
DanielRosenwasser Sep 7, 2017
aa634ba
Added printer test for 'new (f().x)'.
DanielRosenwasser Sep 14, 2017
4beb9b0
Accepted (incorrect) baselines.
DanielRosenwasser Sep 14, 2017
6a9fa83
Parenthesize new'd expressions based on the leftmost node (or the fir…
DanielRosenwasser Sep 14, 2017
c966059
Accepted baselines.
DanielRosenwasser Sep 14, 2017
8fbb304
Add a test case for conditional expressions just in case.
DanielRosenwasser Sep 14, 2017
7871e08
Accepted baselines.
DanielRosenwasser Sep 14, 2017
9f669d0
Explicit fall-through.
DanielRosenwasser Sep 14, 2017
e9c6dfe
Remove freezing behavior from tagged template helper.
DanielRosenwasser Sep 15, 2017
1656790
Accepted baselines.
DanielRosenwasser Sep 15, 2017
b137f24
%s/getTemplateObject/makeTemplateObject
DanielRosenwasser Sep 18, 2017
5565709
Accepted baselines.
DanielRosenwasser Sep 18, 2017
9907453
Merge branch 'master' into correctlyCacheTaggedTemplates
DanielRosenwasser Sep 21, 2017
1cb5eb9
Merge branch 'master' into correctlyCacheTaggedTemplates
DanielRosenwasser Sep 25, 2017
886a29b
Added tests for import helpers with & without a declared template obj…
DanielRosenwasser Sep 26, 2017
1841afe
Ensure that the import helper is checked for tagged templates, and up…
DanielRosenwasser Sep 28, 2017
0b7538d
Accepted baselines.
DanielRosenwasser Sep 28, 2017
b406d54
git Merge branch 'master' into correctlyCacheTaggedTemplates
DanielRosenwasser Sep 28, 2017
4ec1643
Fall back to old behavior for tagged template emit in global files.
DanielRosenwasser Sep 28, 2017
d039942
Accepted baselines.
DanielRosenwasser Sep 28, 2017
5da45fb
Addressed code review feedback.
DanielRosenwasser Sep 30, 2017
f94bded
Added test for module & global examples.
DanielRosenwasser Sep 30, 2017
81b3e85
Accepted baselines.
DanielRosenwasser Sep 30, 2017
a23d1bf
Updated helper for marginally better minification.
DanielRosenwasser Sep 30, 2017
e2c6aac
Accepted baselines.
DanielRosenwasser Sep 30, 2017
b80b2ee
Move first/last shortcuts closer to the end of the helper flags.
DanielRosenwasser Oct 2, 2017
babe3cb
Flatten the '__makeTemplateObject' helper to use less vertical screen…
DanielRosenwasser Oct 3, 2017
8fd638c
Accepted baselines.
DanielRosenwasser Oct 3, 2017
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into correctlyCacheTaggedTemplates
  • Loading branch information
DanielRosenwasser authored Sep 25, 2017
commit 1cb5eb968543c284456f756efbb3e093295ef8f4
22 changes: 22 additions & 0 deletions src/harness/unittests/printer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,28 @@ namespace ts {
createSourceFile("source.ts", "", ScriptTarget.ESNext))
);

printsCorrectly("emptyGlobalAugmentation", {}, printer => printer.printNode(
EmitHint.Unspecified,
createModuleDeclaration(
/*decorators*/ undefined,
/*modifiers*/ [createToken(SyntaxKind.DeclareKeyword)],
createIdentifier("global"),
createModuleBlock(emptyArray),
NodeFlags.GlobalAugmentation),
createSourceFile("source.ts", "", ScriptTarget.ES2015)
));

printsCorrectly("emptyGlobalAugmentationWithNoDeclareKeyword", {}, printer => printer.printNode(
EmitHint.Unspecified,
createModuleDeclaration(
/*decorators*/ undefined,
/*modifiers*/ undefined,
createIdentifier("global"),
createModuleBlock(emptyArray),
NodeFlags.GlobalAugmentation),
createSourceFile("source.ts", "", ScriptTarget.ES2015)
));

// https://github.com/Microsoft/TypeScript/issues/15971
printsCorrectly("classWithOptionalMethodAndProperty", {}, printer => printer.printNode(
EmitHint.Unspecified,
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.