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 pull request #1819 from jianchun:wbdict
BaseDictionary Key or Value can be of GC pointer type, potentially needs
write barrier on each entry item.
Use macro and template type traits to replace underlying entry Key/Value
type with WriteBarrierPtr when Key or Value is pointer type and used with
recycler allocators.
BaseDictionary methods still use original Key/Value types. Only the
underlying EntryType may contain swapped type. Most methods are not
affected. However, when WriteBarrierPtr is used, only immutable
TryGetReference should be used. (We cannot get a mutable reference and
possibly change the pointer underneath WriteBarrierPtr.)
Allow WriteBarrierPtr to take immutable address to support TryGetReference
(used a lot). Fixed a bunch of incorrect `const` usage.
Update: Apply template traits to field types to simplify write barrier field
annotations. Now most annotations are Field or FieldNoBarrier (for pointers
known not needing write barrier).
PointerNoBarrier(ScriptContext) m_scriptContext; // Memory context for this function body
1460
-
Pointer(Utf8SourceInfo) m_utf8SourceInfo;
1459
+
FieldNoBarrier(ScriptContext*) m_scriptContext; // Memory context for this function body
1460
+
Field(Utf8SourceInfo*) m_utf8SourceInfo;
1461
1461
// WriteBarrier-TODO: Consider changing this to NoWriteBarrierPtr, and skip tagging- also, tagging is likely unnecessary since that pointer in question is likely not resolvable
1462
-
PointerNoBarrier(FunctionProxyPtr) m_referenceInParentFunction; // Reference to nested function reference to this function in the parent function body (tagged to not be actual reference)
Pointer(ProxyEntryPointInfo) m_defaultEntryPointInfo; // The default entry point info for the function proxy
1462
+
FieldNoBarrier(FunctionProxyPtr*) m_referenceInParentFunction; // Reference to nested function reference to this function in the parent function body (tagged to not be actual reference)
1463
+
Field(ScriptFunctionType*) deferredPrototypeType;
1464
+
Field(ProxyEntryPointInfo*) m_defaultEntryPointInfo; // The default entry point info for the function proxy
1465
1465
1466
1466
Field(uint) m_functionNumber; // Per thread global function number
1467
1467
@@ -1771,7 +1771,7 @@ namespace Js
1771
1771
Field(bool) m_utf8SourceHasBeenSet; // start of UTF8-encoded source
1772
1772
Field(uint) m_sourceIndex; // index into the scriptContext's list of saved sources
1773
1773
#if DYNAMIC_INTERPRETER_THUNK
1774
-
PointerNoBarrier(void) m_dynamicInterpreterThunk; // Unique 'thunk' for every interpreted function - used for ETW symbol decoding.
1774
+
FieldNoBarrier(void*) m_dynamicInterpreterThunk; // Unique 'thunk' for every interpreted function - used for ETW symbol decoding.
1775
1775
#endif
1776
1776
Field(uint) m_cbStartOffset; // pUtf8Source is this many bytes from the start of the scriptContext's source buffer.
1777
1777
@@ -1783,10 +1783,10 @@ namespace Js
1783
1783
1784
1784
ULONG m_lineNumber;
1785
1785
ULONG m_columnNumber;
1786
-
Pointer(const char16) m_displayName; // Optional name
1786
+
Field(const char16*) m_displayName; // Optional name
0 commit comments