Compressing source code written in a scripting language
AssigneeMicrosoft Corporation
InventorsBenjamin Livshits, Benjamin Goth Zorn, Martin Burtscher, Gaurav Sinha
Life of this patent
Estimating the term…
Abstract
A method described herein includes at a computing device, receiving, over a network connection, a data packet from an external source, wherein the data packet comprises a compressed abstract syntax tree (AST)-based representation of source code written in a scripting language. The method further includes decompressing the compressed AST-based representation of the source code to generate a decompressed AST. The method also includes causing at least one processor on the computing device to execute at least one instruction represented in the decompressed AST subsequent to the compressed AST-based representation of the source code being decompressed.
Claims20
A method comprising the following computer-executable acts:
- at a computing device, receiving, over a network connection, a data packet from an external source, wherein the data packet comprises a compressed abstract syntax tree (AST)-based representation of source code written in a scripting language;
- decompressing the compressed AST-based representation of the source code to generate a decompressed AST;
- causing at least one processor to execute at least one instruction represented in the decompressed AST subsequent to the compressed AST-based representation of the source code being decompressed.
A system comprising the following computer-executable components:
- a receiver component that receives a compressed Abstract Syntax Tree (AST)-based representation of source code written in a scripting language;
- and
- a decompressor component that decompresses the AST-based representation of source code to generate an AST, and wherein the decompressor component causes the AST to be retained in a computer-readable medium for execution by a processor.
A computer-readable medium comprising instructions that, when executed by a processor, cause the processor to perform acts comprising:
- receive a data packet that comprises a compressed Abstract Syntax Tree (AST)-based representation of source code written in a scripting language, wherein the compressed AST-based representation of the source code comprises a plurality of compressed streams, wherein the plurality of compressed streams comprise a compressed identifiers stream, a compressed productions stream, and a compressed literals stream, and wherein the plurality of compressed streams have been further compressed by a compression model;
- decompress the compressed AST-based representation of the source code to generate an AST through utilization of a first decompression algorithm and a second decompression algorithm, wherein the first decompression algorithm is utilized to decompress compression undertaken by the compression model and the second decompression algorithm is utilized to further decompress the three compressed streams;
- cause the decompressed AST to be placed in memory;
- and
- execute the decompressed AST in the memory.
Dependencies are inferred from the claim text.