发明名称 Correlating class loader objects across execution environments
摘要 Updating a native class pointer in persisted compiled code for use in an execution environment other than the one in which the native class pointer was created. This is done by using an identifier, stored with the persisted compiled code, of the class first loaded by the class loader that also loaded the class to which the native class pointer refers. A table is maintained in the execution environment mapping class identifiers to class loaders, and the stored identifier is used to consult this table to find a candidate class loader from those in the current execution environment that can provide the correct updated pointer.
申请公布号 US9286085(B2) 申请公布日期 2016.03.15
申请号 US201414317077 申请日期 2014.06.27
申请人 International Business Machines Corporation 发明人 Stoodley Mark G.
分类号 G06F9/445 主分类号 G06F9/445
代理机构 代理人 Darrow Stephen
主权项 1. A method for use in a first program execution environment, the method comprising: creating a first map for looking up a class loader by a lookup identifier based, at least in part, on that class loader's first-loaded class; receiving code compiled in a second program execution environment, which code includes: (i) a native class pointer to a target class loaded by a class loader in the second program execution environment, and (ii) an associated lookup identifier based, at least in part, on a first-loaded class of the class loader in the second program execution environment; looking up in the first map, using the associated lookup identifier, a class loader in the first program execution environment; seeking, via a referential identifier of the found class loader, a current native class pointer to the target class; responsive to finding the current native class pointer, updating the native class pointer in the received code with the current native class pointer; and creating a second map of class loaders to first-loaded classes; wherein: the lookup identifier represents a first-loaded class, such that the first map is a map of first-loaded classes to their respective class loaders; and creating the first map and the second map includes: searching the second map, using an identifier of a class loader of a class being loaded, for a first-loaded class;responsive to a first-loaded class not being found, searching the first map, using an identifier of the class being loaded, for a class loader; andresponsive to a class loader not being found, adding to the first map an association between the class being loaded and the class loader of the class being loaded, and adding to the second map an association between the class loader of the class being loaded and the class being loaded.
地址 Armonk NY US