|
|
@@ -392,14 +392,14 @@ namespace Js
|
|
|
}
|
|
|
|
|
|
FunctionBody * FunctionBody::NewFromRecycler(ScriptContext * scriptContext, const char16 * displayName, uint displayNameLength, uint displayShortNameOffset, uint nestedCount,
|
|
|
- Utf8SourceInfo* sourceInfo, uint uScriptId, Js::LocalFunctionId functionId, Js::PropertyRecordList* boundPropertyRecords, Attributes attributes
|
|
|
+ Utf8SourceInfo* sourceInfo, uint uScriptId, Js::LocalFunctionId functionId, Js::PropertyRecordList* boundPropertyRecords, Attributes attributes, FunctionBodyFlags flags
|
|
|
#ifdef PERF_COUNTERS
|
|
|
, bool isDeserializedFunction
|
|
|
#endif
|
|
|
)
|
|
|
{
|
|
|
return FunctionBody::NewFromRecycler(scriptContext, displayName, displayNameLength, displayShortNameOffset, nestedCount, sourceInfo,
|
|
|
- scriptContext->GetThreadContext()->NewFunctionNumber(), uScriptId, functionId, boundPropertyRecords, attributes
|
|
|
+ scriptContext->GetThreadContext()->NewFunctionNumber(), uScriptId, functionId, boundPropertyRecords, attributes, flags
|
|
|
#ifdef PERF_COUNTERS
|
|
|
, isDeserializedFunction
|
|
|
#endif
|
|
|
@@ -407,23 +407,23 @@ namespace Js
|
|
|
}
|
|
|
|
|
|
FunctionBody * FunctionBody::NewFromRecycler(ScriptContext * scriptContext, const char16 * displayName, uint displayNameLength, uint displayShortNameOffset, uint nestedCount,
|
|
|
- Utf8SourceInfo* sourceInfo, uint uFunctionNumber, uint uScriptId, Js::LocalFunctionId functionId, Js::PropertyRecordList* boundPropertyRecords, Attributes attributes
|
|
|
+ Utf8SourceInfo* sourceInfo, uint uFunctionNumber, uint uScriptId, Js::LocalFunctionId functionId, Js::PropertyRecordList* boundPropertyRecords, Attributes attributes, FunctionBodyFlags flags
|
|
|
#ifdef PERF_COUNTERS
|
|
|
, bool isDeserializedFunction
|
|
|
#endif
|
|
|
)
|
|
|
{
|
|
|
#ifdef PERF_COUNTERS
|
|
|
- return RecyclerNewWithBarrierFinalized(scriptContext->GetRecycler(), FunctionBody, scriptContext, displayName, displayNameLength, displayShortNameOffset, nestedCount, sourceInfo, uFunctionNumber, uScriptId, functionId, boundPropertyRecords, attributes, isDeserializedFunction);
|
|
|
+ return RecyclerNewWithBarrierFinalized(scriptContext->GetRecycler(), FunctionBody, scriptContext, displayName, displayNameLength, displayShortNameOffset, nestedCount, sourceInfo, uFunctionNumber, uScriptId, functionId, boundPropertyRecords, attributes, flags, isDeserializedFunction);
|
|
|
#else
|
|
|
- return RecyclerNewWithBarrierFinalized(scriptContext->GetRecycler(), FunctionBody, scriptContext, displayName, displayNameLength, displayShortNameOffset, nestedCount, sourceInfo, uFunctionNumber, uScriptId, functionId, boundPropertyRecords, attributes);
|
|
|
+ return RecyclerNewWithBarrierFinalized(scriptContext->GetRecycler(), FunctionBody, scriptContext, displayName, displayNameLength, displayShortNameOffset, nestedCount, sourceInfo, uFunctionNumber, uScriptId, functionId, boundPropertyRecords, attributes, flags);
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
|
|
|
FunctionBody::FunctionBody(ScriptContext* scriptContext, const char16* displayName, uint displayNameLength, uint displayShortNameOffset, uint nestedCount,
|
|
|
Utf8SourceInfo* utf8SourceInfo, uint uFunctionNumber, uint uScriptId,
|
|
|
- Js::LocalFunctionId functionId, Js::PropertyRecordList* boundPropertyRecords, Attributes attributes
|
|
|
+ Js::LocalFunctionId functionId, Js::PropertyRecordList* boundPropertyRecords, Attributes attributes, FunctionBodyFlags flags
|
|
|
#ifdef PERF_COUNTERS
|
|
|
, bool isDeserializedFunction
|
|
|
#endif
|
|
|
@@ -454,7 +454,7 @@ namespace Js
|
|
|
loopInterpreterLimit(CONFIG_FLAG(LoopInterpretCount)),
|
|
|
savedPolymorphicCacheState(0),
|
|
|
debuggerScopeIndex(0),
|
|
|
- flags(Flags_HasNoExplicitReturnValue),
|
|
|
+ flags(flags),
|
|
|
m_hasFinally(false),
|
|
|
#if ENABLE_PROFILE_INFO
|
|
|
dynamicProfileInfo(nullptr),
|
|
|
@@ -1717,7 +1717,8 @@ namespace Js
|
|
|
this->GetUtf8SourceInfo()->GetSrcInfo()->sourceContextInfo->sourceContextId, /* script id */
|
|
|
this->functionId, /* function id */
|
|
|
propertyRecordList,
|
|
|
- (Attributes)(this->GetAttributes() & ~(Attributes::DeferredDeserialize | Attributes::DeferredParse))
|
|
|
+ (Attributes)(this->GetAttributes() & ~(Attributes::DeferredDeserialize | Attributes::DeferredParse)),
|
|
|
+ Js::FunctionBody::FunctionBodyFlags::Flags_HasNoExplicitReturnValue
|
|
|
#ifdef PERF_COUNTERS
|
|
|
, false /* is function from deferred deserialized proxy */
|
|
|
#endif
|
|
|
@@ -1983,7 +1984,8 @@ namespace Js
|
|
|
this->GetUtf8SourceInfo()->GetSrcInfo()->sourceContextInfo->sourceContextId, /* script id */
|
|
|
this->functionId, /* function id */
|
|
|
propertyRecordList,
|
|
|
- (Attributes)(this->GetAttributes() & ~(Attributes::DeferredDeserialize | Attributes::DeferredParse))
|
|
|
+ (Attributes)(this->GetAttributes() & ~(Attributes::DeferredDeserialize | Attributes::DeferredParse)),
|
|
|
+ Js::FunctionBody::FunctionBodyFlags::Flags_HasNoExplicitReturnValue
|
|
|
#ifdef PERF_COUNTERS
|
|
|
, false /* is function from deferred deserialized proxy */
|
|
|
#endif
|