1、 1800 单词, 1 万英文字符, 3600 汉字 出处: Richards G, Lebresne S, Burg B, et al. An analysis of the dynamic behavior of JavaScript programsC/ Acm Sigplan Conference on Programming Language Design & Implementation. ACM, 2010:1-12. An Analysis of the Dynamic Behavior of JavaScript Programs Gregor Richards Sylvai
2、n Lebresne Brian Burg Jan Vitek Abstract The JavaScript programming language is widely used for web programming and, increasingly, for general purpose computing. As such, improving the correctness, security and performance of JavaScript applications has been the driving force for research in type sy
3、stems, static analysis and compiler techniques for this language. Many of these techniques aim to reign in some of the most dynamic features of the language, yet little seems to be known about how programmers actually utilize the language or these features. In this paper we perform an empirical stud
4、y of the dynamic behavior of a corpus of widely-used JavaScript programs, and analyze how and why the dynamic features are used. We report on the degree of dynamism that is exhibited by these JavaScript programs and compare that with assumptions commonly made in the literature and accepted industry
5、benchmark suites. Keywords: Dynamic Behavior, Execution Tracing, Dynamic Metrics, Program Analysis, JavaScript 1. Introduction JavaScript is an object-oriented language designed in 1995 by Brendan Eich at Netscape to allow non-programmers to extend web sites with client-side executable code. Unlike
6、more traditional languages such as Java, C# or even Smalltalk, it does not have classes, and does not encourage encapsulation or even structured programming. Instead JavaScript strives to maximize flexibility. JavaScripts success is undeniable. As a data point, it is used by 97 out of the webs 100 most popular sites.2 The language is also becoming a general purpose computing platform with office applications, browsers and development environments being developed