主权项 |
1. A method comprising:
receiving a request to access a first program component from a second program component at runtime of the second program component in a language runtime environment provided by a processing device wherein the first program component is in a first language, wherein the second program component and the language runtime environment are in a second language, and wherein the first language is different than the second language; in response to receiving the request,
automatically issuing an import command in the second program component and automatically importing, from a binder component file stored in persistent storage, a binder component in the second language into the language runtime environment in response to an import command in the second program component,during the importing of the binder component,
automatically initiating a process to access and analyze debug data of the first program component, wherein the debug data is stored in the persistent storage, the debug data is generated by a compiler for the first language during compilation of the first program component, and wherein the debug data comprises calling-convention information for one or more functions in the first program component, andautomatically creating, by the binder component in the language runtime environment, a binding component in the second language by iterating through the debug data of the first program component, wherein creating the binding component comprises determining, by the binder component, that a list of functions in the debug data identifies a first function and, in response, adding, by the binder component a second function to the calling-convention information of the first function in the debug data, wherein calling the second function in the binding component results in calling the first function in the first program component; and returning the binding component to the second program component, wherein the second function in the binding component is callable by the second program component at runtime. |