Lazy load tagged template literal strings (#7855)
* Lazy load tagged template literal strings * Update snapshots to reflect lazy loading * Use pure annotation and remove unnecessary parenthesized expression * Update snapshots * Optimize lazy loading by doing assignment within logical expression * Update snapshots to reflect optimization * Use re-define function pattern to avoid hitting function size deopts * Update snapshots to reflect the usage of the redefining function pattern
This commit is contained in:
committed by
Justin Ridgewell
parent
25c3f0d689
commit
4260ffd7ec
@@ -4,6 +4,14 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
||||
|
||||
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
||||
|
||||
var _templateObject = /*#__PURE__*/ (0, _taggedTemplateLiteral2.default)(["foo"]);
|
||||
function _templateObject() {
|
||||
const data = /*#__PURE__*/ (0, _taggedTemplateLiteral2.default)(["foo"]);
|
||||
|
||||
tag(_templateObject);
|
||||
_templateObject = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
tag(_templateObject());
|
||||
|
||||
@@ -4,6 +4,14 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
||||
|
||||
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
||||
|
||||
var _templateObject = /*#__PURE__*/ (0, _taggedTemplateLiteral2.default)(["foo"]);
|
||||
function _templateObject() {
|
||||
const data = /*#__PURE__*/ (0, _taggedTemplateLiteral2.default)(["foo"]);
|
||||
|
||||
tag(_templateObject);
|
||||
_templateObject = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
tag(_templateObject());
|
||||
|
||||
Reference in New Issue
Block a user