@@ -1592,7 +1592,7 @@ class ByteCodeBufferBuilder
1592
1592
return size;
1593
1593
}
1594
1594
1595
- uint32 AddPropertyIdsForScopeSlotArray (BufferBuilderList & builder, FunctionBody * function)
1595
+ uint32 AddPropertyIdsForScopeSlotArray (BufferBuilderList & builder, ParseableFunctionInfo * function)
1596
1596
{
1597
1597
if (function->scopeSlotArraySize == 0 )
1598
1598
{
@@ -2096,8 +2096,6 @@ class ByteCodeBufferBuilder
2096
2096
AddCacheIdToPropertyIdMap (builder, function);
2097
2097
AddReferencedPropertyIdMap (builder, function);
2098
2098
2099
- AddPropertyIdsForScopeSlotArray (builder, function);
2100
-
2101
2099
if (function->GetSlotIdInCachedScopeToNestedIndexArray () == nullptr )
2102
2100
{
2103
2101
definedFields.has_slotIdInCachedScopeToNestedIndexArray = false ;
@@ -2285,6 +2283,8 @@ class ByteCodeBufferBuilder
2285
2283
2286
2284
#include " SerializableFunctionFields.h"
2287
2285
2286
+ AddPropertyIdsForScopeSlotArray (builder, function);
2287
+
2288
2288
if (functionBody != nullptr )
2289
2289
{
2290
2290
AddFunctionBody (builder, functionBody, srcInfo, definedFields);
@@ -2383,7 +2383,7 @@ class ByteCodeBufferBuilder
2383
2383
if (scopeInfo->areNamesCached )
2384
2384
{
2385
2385
Assert (sym->name != nullptr );
2386
- // PropertyRecord* propertyRecord = ;
2386
+ symPropertyId = sym-> name -> GetPropertyId () ;
2387
2387
}
2388
2388
2389
2389
PropertyId propertyId = encodePossiblyBuiltInPropertyId (symPropertyId);
@@ -3270,7 +3270,7 @@ class ByteCodeBufferReader
3270
3270
return current;
3271
3271
}
3272
3272
3273
- const byte * ReadPropertyIdsForScopeSlotArray (const byte * current, FunctionBody * function)
3273
+ const byte * ReadPropertyIdsForScopeSlotArray (const byte * current, ByteCodeCache* cache, ParseableFunctionInfo * function)
3274
3274
{
3275
3275
if (function->scopeSlotArraySize == 0 )
3276
3276
{
@@ -3288,8 +3288,8 @@ class ByteCodeBufferReader
3288
3288
{
3289
3289
int value;
3290
3290
current = ReadInt32 (current, &value);
3291
- PropertyId propertyId = function-> GetByteCodeCache () ->LookupPropertyId (value);
3292
- function->GetPropertyIdsForScopeSlotArray ()[i] = propertyId;
3291
+ PropertyId propertyId = cache ->LookupPropertyId (value);
3292
+ function->GetPropertyIdsForScopeSlotArray ()[i] = propertyId;
3293
3293
}
3294
3294
3295
3295
#ifdef BYTE_CODE_MAGIC_CONSTANTS
@@ -4010,6 +4010,8 @@ class ByteCodeBufferReader
4010
4010
}
4011
4011
#include " SerializableFunctionFields.h"
4012
4012
4013
+ current = ReadPropertyIdsForScopeSlotArray (current, cache, *function);
4014
+
4013
4015
if (definedFields->has_ConstantCount )
4014
4016
{
4015
4017
FunctionBody **functionBody = (FunctionBody **)function;
@@ -4038,11 +4040,11 @@ class ByteCodeBufferReader
4038
4040
// that here.
4039
4041
if (definedFields->has_flags == false )
4040
4042
{
4041
- (*functionBody )->flags = FunctionBody::FunctionBodyFlags::Flags_None;
4043
+ (*function )->flags = FunctionBody::FunctionBodyFlags::Flags_None;
4042
4044
}
4043
4045
else
4044
4046
{
4045
- (*functionBody )->flags = (FunctionBody::FunctionBodyFlags)((*functionBody )->flags & ~FunctionBody::Flags_StackNestedFunc);
4047
+ (*function )->flags = (FunctionBody::FunctionBodyFlags)((*function )->flags & ~FunctionBody::Flags_StackNestedFunc);
4046
4048
}
4047
4049
4048
4050
if (definedFields->has_m_envDepth == false )
@@ -4144,8 +4146,6 @@ class ByteCodeBufferReader
4144
4146
current = ReadReferencedPropertyIdMap (current, *functionBody);
4145
4147
(*functionBody)->AllocateInlineCache ();
4146
4148
4147
- current = ReadPropertyIdsForScopeSlotArray (current, *functionBody);
4148
-
4149
4149
if (definedFields->has_slotIdInCachedScopeToNestedIndexArray )
4150
4150
{
4151
4151
current = ReadSlotIdInCachedScopeToNestedIndexArray (current, *functionBody);
0 commit comments