mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-23 18:18:00 +02:00
Fixed Event<T> when allocator doesn't align (64-bit)
This commit is contained in:
parent
fc07561044
commit
837184e674
2 changed files with 12 additions and 5 deletions
|
@ -13,10 +13,17 @@ namespace System
|
||||||
// If we are enumerating then mData points to the enumerator.
|
// If we are enumerating then mData points to the enumerator.
|
||||||
int mData;
|
int mData;
|
||||||
|
|
||||||
|
#if BF_64_BIT
|
||||||
|
const int sIsEnumerating = (.)0x8000'0000'0000'0000;
|
||||||
|
const int sHadEnumRemoves = 0x4000'0000'0000'0000;
|
||||||
|
const int sFlagsMask = (.)0xC000'0000'0000'0000;
|
||||||
|
const int sDataMask = ~sFlagsMask;
|
||||||
|
#else
|
||||||
const int sIsEnumerating = 1;
|
const int sIsEnumerating = 1;
|
||||||
const int sHadEnumRemoves = 2;
|
const int sHadEnumRemoves = 2;
|
||||||
const int sFlagsMask = 3;
|
const int sFlagsMask = 3;
|
||||||
const int sDataMask = ~sFlagsMask;
|
const int sDataMask = ~sFlagsMask;
|
||||||
|
#endif
|
||||||
|
|
||||||
public bool HasListeners
|
public bool HasListeners
|
||||||
{
|
{
|
||||||
|
|
10
IDE/dist/BeefDbgVis.toml
vendored
10
IDE/dist/BeefDbgVis.toml
vendored
|
@ -21,18 +21,18 @@ ValuePointer = "/*(mMethodId < 0) ? &this :*/ __cast(\"_BF_DeferredData_\", mMet
|
||||||
|
|
||||||
[[Type]]
|
[[Type]]
|
||||||
Name = "System.Event<*>"
|
Name = "System.Event<*>"
|
||||||
DisplayString = "{{ data={__cast(\"System.Object\", mData & ~3)} }}"
|
DisplayString = "{{ data={__cast(\"System.Object\", mData & sDataMask)} }}"
|
||||||
[[Type.Expand.Item]]
|
[[Type.Expand.Item]]
|
||||||
Name = "[target]"
|
Name = "[target]"
|
||||||
Value = "__cast(\"System.Object\", mData)"
|
Value = "__cast(\"System.Object\", mData)"
|
||||||
Condition = "(mData & 1) == 0"
|
Condition = "(mData & sIsEnumerating) == 0"
|
||||||
[[Type.Expand.Item]]
|
[[Type.Expand.Item]]
|
||||||
Name = "[target]"
|
Name = "[target]"
|
||||||
Value = "((System.Event<$T1>.Enumerator*)(mData & ~3)).mTarget"
|
Value = "((System.Event<$T1>.Enumerator*)(mData & sDataMask)).mTarget"
|
||||||
Condition = "(mData & 1) != 0"
|
Condition = "(mData & sIsEnumerating) != 0"
|
||||||
[[Type.Expand.Item]]
|
[[Type.Expand.Item]]
|
||||||
Name = "[flags]"
|
Name = "[flags]"
|
||||||
Value = "mData & 3"
|
Value = "mData & sFlagsMask"
|
||||||
|
|
||||||
[[Type]]
|
[[Type]]
|
||||||
Name = "_BF_DeferredData_*"
|
Name = "_BF_DeferredData_*"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue