HomePhorge

(PUP-3461) Make Variant assignable when contained types are assignable
cc90b5436c80Unpublished

Unpublished Commit · Learn More

Repository Importing: This repository is still importing.

Description

(PUP-3461) Make Variant assignable when contained types are assignable

This commit changes the assignable?(t1, t2) so that A Variant t2 is
assignable to t1 if all types contained in t2 are assignable to t1. A
test is also added to verify this behavior.

The commit also adds the method instance_of_PIntegerType(t, o) as
a performance improvement. There were several places where an integer
instance was checked against an existing PIntegerType. Creating an
interim type for that instance just to perform the check is expensive
and puts an unecessary load on the garbage collector.

Details

Provenance
Thomas Hallgren <thomas@tada.se>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUbc85aaffe1d8: Merge pull request #3479 from thallgren/issue/pup-3665/make-tagged-case…
Branches
Unknown
Tags
Unknown

Event Timeline

Thomas Hallgren <thomas@tada.se> committed rPUcc90b5436c80: (PUP-3461) Make Variant assignable when contained types are assignable (authored by Thomas Hallgren <thomas@tada.se>).Jan 16 2015, 3:20 PM