@@ -5692,20 +5692,13 @@ void ByteCodeGenerator::RecordAllStringTemplateCallsiteConstants(FuncInfo* funcI
5692
5692
funcInfo->stringTemplateCallsiteRegisterMap .Map ([byteCodeFunction](ParseNodePtr pnode, Js::RegSlot location)
5693
5693
{
5694
5694
Js::ScriptContext* scriptContext = byteCodeFunction->GetScriptContext ();
5695
- Js::JavascriptLibrary* library = scriptContext->GetLibrary ();
5696
- Js::RecyclableObject* callsiteObject = library->TryGetStringTemplateCallsiteObject (pnode);
5697
-
5698
- if (callsiteObject == nullptr )
5699
- {
5700
- Js::RecyclableObject* rawArray = ByteCodeGenerator::BuildArrayFromStringList (pnode->AsParseNodeStrTemplate ()->pnodeStringRawLiterals , pnode->AsParseNodeStrTemplate ()->countStringLiterals , scriptContext);
5701
- rawArray->Freeze ();
5702
-
5703
- callsiteObject = ByteCodeGenerator::BuildArrayFromStringList (pnode->AsParseNodeStrTemplate ()->pnodeStringLiterals , pnode->AsParseNodeStrTemplate ()->countStringLiterals , scriptContext);
5704
- callsiteObject->SetPropertyWithAttributes (Js::PropertyIds::raw, rawArray, PropertyNone, nullptr );
5705
- callsiteObject->Freeze ();
5695
+
5696
+ Js::RecyclableObject* rawArray = ByteCodeGenerator::BuildArrayFromStringList (pnode->AsParseNodeStrTemplate ()->pnodeStringRawLiterals , pnode->AsParseNodeStrTemplate ()->countStringLiterals , scriptContext);
5697
+ rawArray->Freeze ();
5706
5698
5707
- library->AddStringTemplateCallsiteObject (callsiteObject);
5708
- }
5699
+ Js::RecyclableObject* callsiteObject = ByteCodeGenerator::BuildArrayFromStringList (pnode->AsParseNodeStrTemplate ()->pnodeStringLiterals , pnode->AsParseNodeStrTemplate ()->countStringLiterals , scriptContext);
5700
+ callsiteObject->SetPropertyWithAttributes (Js::PropertyIds::raw, rawArray, PropertyNone, nullptr );
5701
+ callsiteObject->Freeze ();
5709
5702
5710
5703
byteCodeFunction->RecordConstant (byteCodeFunction->MapRegSlot (location), callsiteObject);
5711
5704
});
0 commit comments