嵌入式JavaScript脚本解释器的研究与实现
2009-08-27 08:50
507 查看
论文标题:嵌入式JavaScript脚本解释器的研究与实现
The Research and Implementation of an Embedded JavaScript Interpreter
论文作者 王宜春
论文导师 吴健,论文学位 硕士,论文专业 计算机软件与理论
论文单位 西北工业大学,点击次数 153,论文页数 52页File Size1917k
2003-03-01论文网 http://www.lw23.com/lunwen_41757/ 嵌入式Web浏览器,JavaScript解释器,对象模型,反馈制导优化
Embedded Web Browser,JavaScript Interpreter,Object Model,Feedback-Directed Optimization
论 文在深入研究C++对象模型的基础上,提出了一种针对嵌入式开发环境的低运行成本和维护成本的对象模型——OOC对象模型,其执行效率可以和C++对象模 型相比。我们选择了嵌入式开发环境中普遍支持的C语言实现了该模型的程序设计环境,并在此环境中实现了解释器的前端。 论文在考察了目前较先进的优化机制的基础上,考虑到嵌入式环境的资源限制,提出了适用于JavaScript解释器的优化框架。该框架利用后端程序动态运 行信息,制导前端进行优化决策,在不降低系统可用性的前提下,选择出最有效的优化策略,从而使性能得到提高。 论文中结合了嵌入式平台和JavaScript语言的特点,采用了前后端分离的架构以使解释器获得良好的移植性和扩展性。解释器前端的设计实现利用了面向 对象技术。其中采用了对象来表示抽象语法树的结点,用对象之间的关联关系来表示语法成分之间的嵌套关系,并在字节码的生成过程中充分利用多态机制。同时, 该解释器提供了良好的应用程序接口,不仅可以为嵌入式Web浏览器提供脚本支持,也可以为其他需要脚本支持的宿主环境提供支持。 最后,我们开发的解释器通过了Mozilla浏览器所采用的JavaScript Test Library测试库的严格测试,可以说其正确性和健壮性已经达到了商用程度。
The first contribution of this thesis is a new object model called OOC object model. The model is originally based on C++ object model, but with the embedded environment"s resources restriction concerned, the model has low runtime overhead and low maintenance cost, and its performance in execution is comparative to C++ object model. We choose the C language, which should be the most popular high-level language supported in all embedded development environments, to implement a programming environment of the model. The front-end of the interpreter, which will be addressed in next paragraph, is totally implemented in this programming environment.The second contribution of this thesis is the design and implementation of an embedded JavaScript interpreter for the embedded web browser. In the interpreter, a front-end/back-end architecture is used to achieve a good degree of portability and extendibility, and a feedback-directed optimization framework is used to improve the interpreter"s performance. Also, the interpreter provides the host environment with a set of well-defined APIs. At last, the interpreter has passed the strict test with JavaScript Test Library used by Mozilla browser. The testing results prove that the interpreter"s correctness and robustness have reached a high level.
The Research and Implementation of an Embedded JavaScript Interpreter
论文作者 王宜春
论文导师 吴健,论文学位 硕士,论文专业 计算机软件与理论
论文单位 西北工业大学,点击次数 153,论文页数 52页File Size1917k
2003-03-01论文网 http://www.lw23.com/lunwen_41757/ 嵌入式Web浏览器,JavaScript解释器,对象模型,反馈制导优化
Embedded Web Browser,JavaScript Interpreter,Object Model,Feedback-Directed Optimization
论 文在深入研究C++对象模型的基础上,提出了一种针对嵌入式开发环境的低运行成本和维护成本的对象模型——OOC对象模型,其执行效率可以和C++对象模 型相比。我们选择了嵌入式开发环境中普遍支持的C语言实现了该模型的程序设计环境,并在此环境中实现了解释器的前端。 论文在考察了目前较先进的优化机制的基础上,考虑到嵌入式环境的资源限制,提出了适用于JavaScript解释器的优化框架。该框架利用后端程序动态运 行信息,制导前端进行优化决策,在不降低系统可用性的前提下,选择出最有效的优化策略,从而使性能得到提高。 论文中结合了嵌入式平台和JavaScript语言的特点,采用了前后端分离的架构以使解释器获得良好的移植性和扩展性。解释器前端的设计实现利用了面向 对象技术。其中采用了对象来表示抽象语法树的结点,用对象之间的关联关系来表示语法成分之间的嵌套关系,并在字节码的生成过程中充分利用多态机制。同时, 该解释器提供了良好的应用程序接口,不仅可以为嵌入式Web浏览器提供脚本支持,也可以为其他需要脚本支持的宿主环境提供支持。 最后,我们开发的解释器通过了Mozilla浏览器所采用的JavaScript Test Library测试库的严格测试,可以说其正确性和健壮性已经达到了商用程度。
The first contribution of this thesis is a new object model called OOC object model. The model is originally based on C++ object model, but with the embedded environment"s resources restriction concerned, the model has low runtime overhead and low maintenance cost, and its performance in execution is comparative to C++ object model. We choose the C language, which should be the most popular high-level language supported in all embedded development environments, to implement a programming environment of the model. The front-end of the interpreter, which will be addressed in next paragraph, is totally implemented in this programming environment.The second contribution of this thesis is the design and implementation of an embedded JavaScript interpreter for the embedded web browser. In the interpreter, a front-end/back-end architecture is used to achieve a good degree of portability and extendibility, and a feedback-directed optimization framework is used to improve the interpreter"s performance. Also, the interpreter provides the host environment with a set of well-defined APIs. At last, the interpreter has passed the strict test with JavaScript Test Library used by Mozilla browser. The testing results prove that the interpreter"s correctness and robustness have reached a high level.
相关文章推荐
- 嵌入式JavaScript脚本解释器的研究与实现
- SQLite嵌入式数据库系统的研究与实现
- 如何实现从服务器端向页面动态加载JavaScript脚本?
- jsbeautifier + CScript/WScript/JavaScript 编程实现 JavaScript、HTML、CSS 代码格式化 js 脚本命令行工具 并集成到 EditPlus
- 基于JavaScript的公式解释器 - 5 【一元操作符的实现】
- WPF/Silverlight深度解决方案:(十一)与嵌入式脚本语言Lua & JavaScript的交互(下)
- 通过JavaScript脚本轻松实现视频通话
- python解释器实现及其嵌入式应用:7到11章总结
- [算法研究]の快速排序算法--javascript实现
- javascript下搜索子字符串的的实现代码(脚本之家修正版)
- 嵌入式Linux中I2C设备驱动程序的研究与实现
- JavaScript脚本轻松实现视频通话的开发
- WPF/Silverlight深度解决方案:(十)与嵌入式脚本语言Lua & Javascript的交互(上)
- 在C#中调用JavaScript等脚本的实现<转>
- 八、用JavaScript脚本实现Web页面信息交互
- [置顶] 通过JavaScript脚本来实现网页视频聊天室的快速制作
- 实现通用 Web CAPTCHA 图形验证码 JavaScript 脚本 API 服务 (JavaScript 脚本动态页面引用)
- 在C#中调用VBScript、JavaScript等脚本的实现
- 用JavaScript实现UrlEncode和UrlDecode的脚本代码
- javascript 原型模式实现OOP的再研究