Skip to content

Commit 30f8f77

Browse files
committed
Swap back to alloc calls
1 parent 2cdba82 commit 30f8f77

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Runtime/Code/Luau/LuauCoreCallbacks.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,9 +659,9 @@ private static Delegate CreateSetter<T>(PropertyInfo propertyInfo, bool isStatic
659659
}
660660

661661
private static T GetValue<T>(object instance, PropertyGetReflectionCache cacheData) {
662-
if (typeof(T) == typeof(object)) {
662+
// if (typeof(T) == typeof(object)) {
663663
return (T) cacheData.propertyInfo.GetMethod.Invoke(instance, null);
664-
}
664+
// }
665665

666666
if (!cacheData.HasGetPropertyFunc) {
667667
var getMethod = cacheData.propertyInfo.GetGetMethod();
@@ -689,6 +689,9 @@ private static T GetValue<T>(object instance, PropertyGetReflectionCache cacheDa
689689
}
690690

691691
private static void SetValue<T>(object instance, T value, PropertyInfo pi) {
692+
pi.SetValue(instance, value);
693+
return;
694+
692695
var staticSet = instance == null;
693696
if (!_propertySetterCache.TryGetValue((staticSet, pi.DeclaringType, pi.Name), out var setter)) {
694697
setter = CreateSetter<T>(pi, staticSet);

0 commit comments

Comments
 (0)