Patent ID: 8924927
Filing Date: 2014-12-30
Classification: G06F

Abstract:
1. A machine-implemented method of representing an array in dynamically-typed program code at runtime, the method comprising: accessing program code at runtime, the program code corresponding to a dynamically-typed programming language; detecting, within the program code, an instruction for adding, updating or deleting one or more elements for an array, wherein the array is associated with a first kind of element, the first kind of element comprising a first representation format and a first packing format; determining a second kind of element based on at least one of the instruction or the one or more elements, the second kind of element comprising a second representation format and a second packing format; determining that the first kind of element is not consistent with the second kind of element, based on an inconsistency between the first and second representation formats or the first and second packing formats; converting the array so that the first kind of element is consistent with the second kind of element; and adding, updating or deleting one or more elements for the converted array based on the instruction, wherein each of the first and second packing formats corresponds to an indicator value indicating whether the array is either in a packed format in which the array has no deleted or uninitialized elements, or in a nonpacked format in which the array has at least one deleted or uninitialized element, the first packing format being different than the second packing format.