发明名称 Representation and conversion of dynamically-typed arrays
摘要 Representation of an array in dynamically-typed program code at runtime is provided. Program code is accessed at runtime. An instruction for adding, updating or deleting one or more elements for an array is detected within the code. The array is associated with a first kind of element comprising a first representation and packing format. A second kind of element is determined based on at least one of the instruction or the one or more elements, the second kind of element comprising at least one of a second representation or packing format. A determination is made that the first and second kind of elements are not consistent, based on an inconsistency between the first and second representation formats or packing formats. The array is converted so that the first and second kind of elements are consistent. One or more array elements are added, updated or deleted based on the instruction.
申请公布号 US8924927(B2) 申请公布日期 2014.12.30
申请号 US201213487090 申请日期 2012.06.01
申请人 Google Inc. 发明人 Clifford Daniel Kenneth;Rüdiger Kummerow Jakob Martin;Guo Yang
分类号 G06F9/44 主分类号 G06F9/44
代理机构 McDermott Will & Emery LLP 代理人 McDermott Will & Emery LLP
主权项 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.
地址 Mountain View CA US