fixnum
fixnum copied to clipboard
Make the native `Int64` class an extension type
In #117 we make Int64 class a wrapper around int on platforms that support 64-bit ints (VM, AOT, Wasm).
With extension classes we should also make the new wrapper class an extension class to eliminate the indirection to the actual int value.
This will be a breaking change as this new native Int64 extension class won't have a runtime type.
I don't think this will work as Int64 values are put in collections with objects of other types, e.g. the list of field values in a protobuf.
My understanding is you can pass extension types as generic arguments just fine. If you have a List<Int64>, the runtime type will be List<int> on the platforms where Int64 is an extension type, List<Int64> on others.
My understanding is you can pass extension types as generic arguments just fine. If you have a
List<Int64>, the runtime type will beList<int>on the platforms whereInt64is an extension type,List<Int64>on others.
This is true, but _FieldSet.values is a List<dynamic>.