Ignore:
Timestamp:
11/25/21 22:08:24 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
8d391a1
Parents:
59329aa
Message:

primeNG components

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trip-planner-front/node_modules/@babel/preset-modules/lib/plugins/transform-tagged-template-caching/index.js

    r59329aa re29cc2e  
    3232
    3333      if (!processed) {
    34         processed = new Map();
     34        processed = new WeakSet();
    3535        state.set("processed", processed);
    3636      }
     
    5555
    5656
    57       const template = t.taggedTemplateExpression(identity, t.templateLiteral(path.node.quasi.quasis, expressions.map(() => t.numericLiteral(0))));
    58       processed.set(template, true); // Install an inline cache at the callsite using the global variable:
     57      const template = t.taggedTemplateExpression(t.cloneNode(identity), t.templateLiteral(path.node.quasi.quasis, expressions.map(() => t.numericLiteral(0))));
     58      processed.add(template); // Install an inline cache at the callsite using the global variable:
    5959      //   _t || (_t = identity`a${0}`)
    6060
    6161      const ident = path.scope.getProgramParent().generateDeclaredUidIdentifier("t");
    6262      path.scope.getBinding(ident.name).path.parent.kind = "let";
    63       const inlineCache = t.logicalExpression("||", ident, t.assignmentExpression("=", ident, template)); // The original tag function becomes a plain function call.
     63      const inlineCache = t.logicalExpression("||", ident, t.assignmentExpression("=", t.cloneNode(ident), template)); // The original tag function becomes a plain function call.
    6464      // The expressions omitted from the cached Strings tag are directly applied as arguments.
    6565      //   tag(_t || (_t = Object`a${0}`), 'hello')
Note: See TracChangeset for help on using the changeset viewer.