[es6] TemplateStrings call-site caching does not work
Opened this issue · 0 comments
t2ym commented
[es6] TemplateStrings call-site caching does not work
Root Cause
- Tagged template literals are hooked as Array literals, which are not cached
Reproducible Code
// TemplateStrings caching was changed from per-contents to
// per-call-site.
// https://github.com/tc39/ecma262/pull/890
function strings(array) {
return array;
}
function getStrings() {
return strings`foo`;
}
var original = getStrings();
var other = strings`foo`;
return original === getStrings() && original !== other;