-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not work in AOT(IL2CPP) #15
Comments
@dzmitry-lahoda to be honest, I'm not 100% sure what is the question:(( |
I have found that for I propose |
@SergeyTeplyakov, would you accept a patch with |
I think it would be a nice addition and I will definitely appreciate such kind of change. |
I guess I can support classes either, but need find out how to access no blittable classes on the heap |
@SergeyTeplyakov would you mind to look into my pull? |
@dzmitry-lahoda I've added a bunch of comments. None of them are critical, but I would like to address at least some of them. And I'll take a look at other changes because I reviewed the PR yesterday and you've pushed a bunch of changes after that. |
thanks. I will fix these. Want to add that nullables totally broken recursion and need double level of it to pass all info (may be wrap - field and property into something) - so it looks not good (but needed to support nullables - test commented out now). |
I do not know now how to differentiate what structure owns padding for all types (inluding not blittable) in portable way. See padding 2 and 4. Such padding are irrelevant for some purpose (my main is serialization), but for showing layout may have some meaning.
|
Interesting methods Unity: https://docs.unity3d.com/2018.3/Documentation/ScriptReference/Unity.Collections.LowLevel.Unsafe.UnsafeUtility.GetFieldOffset.html (somehow should work in AOT I guess) https://docs.unity3d.com/2018.3/Documentation/ScriptReference/Unity.Collections.LowLevel.Unsafe.UnsafeUtility.PinGCObjectAndGetAddress.html (I guess somehow may work with non blittable, unlike GCHandle, but I may be wrong). |
Recursive is no much slower than flat. So will be on by default always. As then goes to flat as needed. Will simplify code. Will have real tree inside (need to exected FieldLayoutBase to support parent child?). For crossed paddings (as there is no need to be 100% sure where to split - will 2 default padding rulse for x86 or ARM - somthing like to next 4 bytes split (or use Explicit layout if exists)).
|
i am testing |
Combo of |
May be create separate method for structs? Or may be there is general method to work with all types?
UPDATE: moved code into pull
The text was updated successfully, but these errors were encountered: