You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[MERGE #5727@sharmasuraj0123] Fixes#5201: Implemented StringTemplate Caching based on location in source Code.
Merge pull request #5727 from sharmasuraj0123:StringTemplateCaching
Changed the earlier implementation of caching the StringTemplates based
on Raw String Literals to their location in the source code.
Old Behavior:
```js
function getCallsite(c) { return c; }
function getFooCallsite() { return getCallsite`foo`; }
print(getFooCallsite() === getFooCallsite()); // true
print(getCallsite`foo` === getCallsite`foo`); // true
print(getCallsite`foo` === eval('getCallsite`foo`')); // true
```
New Behavior:
```js
function getCallsite(c) { return c; }
function getFooCallsite() { return getCallsite`foo`; }
print(getFooCallsite() === getFooCallsite()); // true
print(getCallsite`foo` === getCallsite`foo`); // false
print(getCallsite`foo` === eval('getCallsite`foo`')); // false
```
Deleted the added mapping that would compare and ensure that the two callsite objects are equal based on their raw String literals.
Now it store every diferent pnode object it comes accross and assigns it a register.
Fixes#5201
0 commit comments