API Wrappers for Independently Compiled JavaScript Binaries
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing technologies face challenges in interfacing independently compiled JAVASCRIPT binary files due to non-deterministic renaming of objects, leading to compatibility issues and increased code redundancy, which hinders optimization and execution speed.
Innovation Solution
Implementing API wrappers in both compiled codes to proxy calls between them, allowing the second compiled code to predict and call the renamed objects in the first compiled code, thereby establishing a compatible interface and reducing redundancy.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If JAVASCRIPT code is compiled with non-deterministic renaming for optimization, then download and execution speed is improved, but compatibility between independently compiled codes deteriorates
Solution Approach 1:
The patent introduces an intermediary mechanism (interface specification or contract) that mediates between independently compiled code modules. This interface acts as a mediator that defines stable, deterministic naming conventions and calling conventions that both compiled modules must adhere to, allowing them to interact correctly despite non-deterministic internal renaming. The interface specification serves as the intermediary layer that resolves the compatibility issue while preserving the performance benefits of compilation.
Solution Approach 2:
The patent changes the parameters of the compilation process by introducing configurable options for naming conventions. Specifically, it allows the compiler to use deterministic naming for interface elements (functions, classes, variables that interact between modules) while maintaining non-deterministic renaming for internal implementation details. This parameter change enables compatibility at the interface level while preserving optimization benefits internally.
2Productivity
If JAVASCRIPT code is compiled independently for faster execution, then execution speed is improved, but code redundancy increases
Solution Approach 1:
The patent uses copying by generating interface specification templates that can be reused across multiple independently compiled modules. Instead of each module containing redundant interface definitions, the interface specification is copied and adapted to each module's context, reducing overall code redundancy while maintaining the ability to compile independently for performance.
3Quantity of substance
If non-deterministic renaming is used during compilation for optimization, then code size is reduced, but interface prediction between modules becomes difficult
Solution Approach 1:
The patent applies preliminary action by generating interface specifications during the compilation process before the actual module implementation is finalized. These interface specifications are created in advance and serve as a guide for how modules should interact, allowing the compiler to optimize internal naming while maintaining predictable external interfaces. The interface specification is prepared beforehand to guide the compilation and linking process.
Data Source
AI summary
Systems, servers, methods, and media for interfacing first compiled code of first code with second compiled code of second code are provided. The first compiled code includes a first compiled object that corresponds to an original object in the first code, and includes a first API wrapper that associates the first compiled object with the original object. The second compiled code includes a second compiled object that corresponds to a reference in the second code to the original object, and includes a second API wrapper that associates the second compiled object with the reference. When the second compiled object in the second compiled code is executed, the second compiled code calls the second API wrapper, the second API wrapper proxies the call to the first API wrapper, and the first API wrapper proxies the call to the first compiled object in the first compiled code.


