EXECUTION OF DYNAMIC LANGUAGES VIA METADATA EXTRACTION
First Claim
1. A method of processing a script written in a dynamic scripting language, comprising:
- pre-parsing the script to identify high level program structures within the script prior to execution;
generating metadata characterizing the identified high level structures;
using runtime information and metadata to determine parts of the script that need to execute;
fully parsing the parts of the script using the generated metadata to generate bytecode; and
executing the script.
1 Assignment
0 Petitions
Accused Products
Abstract
Methods and devices for executing scripts written in a dynamic scripting language include parsing scripts in two stages, a pre-parse using a simplified grammar to generate script metadata regarding the high level structure of the script, and a full parse using the grammar and syntax of the dynamic scripting language and generated script metadata. The generated metadata may describe the high level structure that is present in the language of the script such as functions, object methods, and a top level call graph. The script metadata may be used during the full parse to determine the parts of the code to be fully parsed. The aspects minimize processing time spent in the parsing at run-time, and may eliminate processing required to interpret or compile sections of code that will not be executed. Script metadata as well as results of full parsing may also be cached to provide further processing efficiencies.
-
Citations
44 Claims
-
1. A method of processing a script written in a dynamic scripting language, comprising:
-
pre-parsing the script to identify high level program structures within the script prior to execution; generating metadata characterizing the identified high level structures; using runtime information and metadata to determine parts of the script that need to execute; fully parsing the parts of the script using the generated metadata to generate bytecode; and executing the script. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A computing device, comprising:
-
a processor; and a memory coupled to the processor, wherein the processor is configured with processor-executable instructions to perform operations comprising; pre-parsing a script written in a dynamic scripting language to identify high level program structures within the script; generating metadata characterizing the identified high level structures, using runtime information and metadata to determine parts of the script that need to execute; fully parsing the parts of the script using the generated metadata to generate bytecode; and executing the script. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20, 21, 22)
-
-
23. A computing device, comprising:
-
means for pre-parsing a script written in a dynamic scripting language to identify high level program structures within the script prior to execution; means for generating metadata characterizing the identified high level structures; means for determining parts of the script that need to execute using runtime information and metadata; means for fully parsing the parts of the script using the generated metadata to generate bytecode; and means for executing the script. - View Dependent Claims (24, 25, 26, 27, 28, 29, 30, 31, 32, 33)
-
-
34. A non-transitory processor-readable storage medium having stored thereon processor-executable instructions comprising:
-
at least one instruction for pre-parsing a script written in a dynamic scripting language to identify high level program structures within the script prior to execution; at least one instruction for generating metadata characterizing the identified high level structures; at least one instruction for using runtime information and metadata to determine parts of the script that need to execute; at least one instruction for fully parsing the parts of the script using the generated metadata to generate bytecode; and at least one instruction for executing the script. - View Dependent Claims (35, 36, 37, 38, 39, 40, 41, 42, 43, 44)
-
Specification