Skip to content

Implementation default GetHashCode for value types #800

Description

@tgiphil

Here's the plan:

  • For value types without references fields or empty space between fields, return XOR all the bytes of the structure.
  • For all other value types, return the first non-reference field.

Implementation:

Emit the starting location and size of the value type data for the XOR computation within the runtime tables. Then the runtime would calculate the hash code given the information in the runtime tables.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status
Todo
Status
Todo
Status
Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions