Method of adding local variables in place of global in JavaScript
Abstract
The present invention, in some embodiments thereof comprises a computer implemented method of detecting global variables in JavaScript code, and adding local variables in place of the global variables, comprising receiving a JavaScript code containing at least one of a plurality of globally defined functions, identifying at least one of: one or more confined global variables which receive a value within a first JavaScript scope wherein the value is not referenced outside of the first JavaScript scope, and one or more repeating global variables accessed repeatedly within a second JavaScript scope, and adding local variables in place of at least one of the confined global variables and the repeating global variables.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 18 · Forward citations: 2.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A computer implemented method of detecting global variables in JAVASCRIPT code, and adding local variables in place of said global variables, comprising: receiving by a processor a JAVASCRIPT code containing at least one of a plurality of globally defined functions; generating by the processor at least one call flow graph for each one of said at least one of globally defined functions; generating by the processor an inter-procedural control flow graph for each one of said call flow graph; generating by the processor an inter-procedural dominator graph for each one of said inter-procedural cont
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (2 of 2 total)
References Cited — Backward Prior Art (18)
Non-Patent Literature (5)
- Abadi et al., A Parallel On-Demand Algorithm for Computing Interprocedural Dominators, © 2014 IEEE.
- Allen, "Control Flow Analysis," 1970.
- De Sutter et al., "A Practical Interprocedural Dominance Algorithm," ACM Transactions on Programming Languages and Systems,vol. 29, No. 4,Article 19, Publication date: Aug. 2007.
- D'Souza, "nterprocedural Analysis: Sharir-Pnueli's Call-strings Approach," Sep. 4, 2013.
- Lee et al., "Global Variable Localization and Transformation for Hardware Synthesis from High-Level Programming Language Description," IEEE 2001.