Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
566b15e
Implement IsSimpleCopy and CanAssignArrayType in managed code
huoyaoyuan May 27, 2024
8a592b9
Fold IsSimpleCopy back to CanAssignArrayType
huoyaoyuan May 27, 2024
0dce3d4
Delete FCall and QCall definitions for copy
huoyaoyuan May 27, 2024
d29e5d8
Convert InternalSetValue to managed
huoyaoyuan May 28, 2024
5dd0e3c
Setup FCalls
huoyaoyuan May 28, 2024
527021c
Remove FCall for GetCorElementTypeOfElementType
huoyaoyuan May 28, 2024
e7d843a
Complete TryUnBox
huoyaoyuan May 28, 2024
2bb5fe7
Fix FCall definition
huoyaoyuan May 28, 2024
f7da172
Implement InitializeArray in managed
huoyaoyuan May 28, 2024
0924555
Implement GetSpanDataFrom in managed
huoyaoyuan May 28, 2024
dc85381
Remove FCall definition
huoyaoyuan May 28, 2024
f99c553
Fix RVA field address
huoyaoyuan May 28, 2024
c5e6cc4
Fix RVA assert
huoyaoyuan May 28, 2024
470b86f
Do not use hydrated RtFieldInfo
huoyaoyuan May 28, 2024
c7821e6
Use QCall for LoadSize
huoyaoyuan May 29, 2024
5225203
Fix CanAssignArrayType condition
huoyaoyuan May 29, 2024
07293e3
Fix compilation
huoyaoyuan May 29, 2024
5da88c3
Simplify AssignType enum
huoyaoyuan May 29, 2024
5222bca
Fix I and U in CanPrimitiveWiden
huoyaoyuan May 29, 2024
335b2fb
CanCastTo should be QCall
huoyaoyuan May 30, 2024
93ec9d8
Remove ThrowHelper usages that not in hot path
huoyaoyuan May 31, 2024
c3f5097
Merge branch 'main' into array-fcall
huoyaoyuan Jun 6, 2024
481e4d4
Revert the known broken InternalSetValue
huoyaoyuan Jun 6, 2024
a266a30
Revert "Revert the known broken InternalSetValue"
huoyaoyuan Jun 6, 2024
b8e4584
Fix heap overwrite
huoyaoyuan Jun 7, 2024
5465a97
Add disabled test for RVA field reflection
huoyaoyuan Jun 9, 2024
4ce4f51
Push back changes around IsSimpleCopy and CanAssignArrayType
huoyaoyuan Jun 10, 2024
30b7d8f
Move PrimitiveWiden to InvokeUtils
huoyaoyuan Jun 12, 2024
8a9c5bc
Merge coreclr specific InvokeUtils
huoyaoyuan Jun 12, 2024
f95fa34
Revert "Merge coreclr specific InvokeUtils"
huoyaoyuan Jun 13, 2024
ebfd224
Move InvokeUtils to shared
huoyaoyuan Jun 13, 2024
d9205c6
Apply suggestions from code review
huoyaoyuan Jun 18, 2024
7eef724
Merge branch 'main' into array-fcall
huoyaoyuan Jun 18, 2024
8cfb58f
Fix trailing whitespace
huoyaoyuan Jun 18, 2024
fbb9d71
Reduce QCalls
huoyaoyuan Jun 18, 2024
324df76
Reduce CorElementType overhead
huoyaoyuan Jun 18, 2024
089ae12
Separate RVA reflection change out
huoyaoyuan Jun 19, 2024
a5e7441
Revert GetCorElementTypeOfElementType
huoyaoyuan Jun 19, 2024
5552d63
Change the MethodTable FCall to be optimal for primitive and share wi…
huoyaoyuan Jun 19, 2024
133cd8a
Return ref from GetSpanDataFrom
huoyaoyuan Jun 19, 2024
e17bf0e
Handle enum conversion to underlying type
huoyaoyuan Jun 19, 2024
dd1e2dd
Update exception message
huoyaoyuan Jun 19, 2024
32b8789
Add KeepAlive
huoyaoyuan Jun 20, 2024
582eaf1
Remove unnecessary qcall handle
huoyaoyuan Jun 20, 2024
1836ae5
Fix ref src
huoyaoyuan Jun 20, 2024
cb6aa00
Update FCall name and assert
huoyaoyuan Jun 24, 2024
49cf866
Remove unused changes
huoyaoyuan Jun 24, 2024
7a0c398
Use void* for address
huoyaoyuan Jun 24, 2024
db677ad
Apply suggestions from code review
huoyaoyuan Jun 25, 2024
353715e
Remove unused enum FCall
huoyaoyuan Jun 24, 2024
8fb1c96
Use sizeof
huoyaoyuan Jun 25, 2024
26d4c80
Add some comment
huoyaoyuan Jun 25, 2024
5f7263f
Add comment to lifetime
huoyaoyuan Jun 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add comment to lifetime
Co-authored-by: Aaron Robinson <[email protected]>
  • Loading branch information
huoyaoyuan and AaronRobinsonMSFT authored Jun 26, 2024
commit 5f7263f7fa9c2194f4362d939c145ff47e7b46fa
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static unsafe void InitializeArray(Array array, RuntimeFieldHandle fldHan
if (totalSize > size)
throw new ArgumentException(SR.Argument_BadFieldForInitializeArray);

ref byte src = ref *(byte*)address;
ref byte src = ref *(byte*)address; // Ref is extending the lifetime of the static field.
GC.KeepAlive(fldInfo);

ref byte dst = ref MemoryMarshal.GetArrayDataReference(array);
Expand Down Expand Up @@ -116,7 +116,7 @@ private static unsafe ref byte GetSpanDataFrom(
}

count = (int)(totalSize / targetTypeSize);
ref byte dataRef = ref *(byte*)data;
ref byte dataRef = ref *(byte*)data; // Ref is extending the lifetime of the static field.
GC.KeepAlive(fldInfo);

return ref dataRef;
Expand Down