- # Try to get the position of the target type in source's structures
- var value = source.mclass.positions_methods.get_or_null(target.mclass)
-
- if value != null then
- if value != -1 then
- # Store informations for Cohen test
- position = target.mclass.color
- status = 1
- else
- # We use perfect hashing
- status = 2
- end
+ # If the value is positive, the target class has an invariant position in source's structures
+ var value = source.mclass.get_position_methods(target.mclass)
+
+ if value > 0 then
+ # `value - 2` is the position of the target identifier in source vtable
+ position = value - 2
+ status = 1
+ else
+ # We use perfect hashing
+ status = 2