- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Chapter 中间代码生成.ppt
北京化工大学信息科学与技术学院计算机系 北京化工大学信息科学与技术学院计算机系 Chapter 中间代码生成 7.1 Intermediate Code and Data Structures for Code Generation 中间代码和用于代码生成的数据结构 7.2 Basic Code Generation Techniques 基本的代码生成技术 7.3 Code Generation of Control Statements and Logical Expressions 控制语句和逻辑表达式的代码生成 7.4 Code Generation of Procedure and Function Calls 过程和函数调用的代码生成 7.1 Intermediate Code and Data Structures for Code Generation 中间代码和用于代码生成的数据结构 ● intermediate representation ( IR) ● Three-Address Code ● example ● Data Structures for the Implementation of Three-Address Code 实现三地址码的数据结构 ● example ● example ● C code defining possible data structures for the quadruples 四元式的数据结构 7.2 Basic Code Generation Techniques 基本的代码生成技术 ● Practical Code Generation 7.3 Code Generation of Control Statements and Logical Expressions 控制语句和逻辑表达式的代码生成 ● If Statements ● While Statements 7.4 Code Generation of Procedure and Function Calls 过程和函数调用的代码生成 ● example ● example Chapter 中间代码生成 7.1 Intermediate Code and Data Structures for Code Generation 中间代码和用于代码生成的数据结构 7.2 Basic Code Generation Techniques 基本的代码生成技术 7.3 Code Generation of Control Statements and Logical Expressions 控制语句和逻辑表达式的代码生成 7.4 Code Generation of Procedure and Function Calls 过程和函数调用的代码生成 Thank you. ? Beijing University of Chemical Technology Beijing,?P R China * * 7 A data structure that represents the source program during translation is called an intermediate representation, or IR, for short. 源程序的一种内部表示,不依赖目标机的结构,易于生成目标代码的中间表示。 ● two popular forms of intermediate code Three-Address Code三地址码 波兰式 P-code. P-代码 例1 请写出算术表达式 2*a+(b-3) 的三地址码 解: 2*a+(b-3) with syntax tree 2*a+(b-3) 的语法树 + b * - 3 2 a T1 = 2 * a T2 = b – 3 T3 = t1 + t2 (2) The corresponding three-address code is 三地址码 例2 请写出Sample TINY program的三地址码 read x ; { input an integer } if 0 x then { don’t compute if x = 0 } fact:=1; repeat fact:=fact*x; x:=x-1 until x=0; write fact { output factorial of x } ends 解:Three-address code for the
您可能关注的文档
- Blood gas analysis and acid-basic disorder.ppt
- Body Parts.ppt
- Botulism.ppt
- Boundary Value Testing Example.ppt
- Brad MotleyCSCI392Spring 2010.ppt
- Brief Introduction to Citrus Limonoids.ppt
- Bringing XBRL tax filing to the UK.ppt
- Britain attractions.ppt
- Business Process Reengineering.ppt
- By Ian Jeffrey.ppt
- Chapter1 Stocks and Inventories.ppt
- China DRIs 2000.ppt
- Cholesterol and Heart Disease.ppt
- Cisco Networking Academy Program.ppt
- CIT 380 Securing Computer Systems.ppt
- Class 19 Undecidability in Theory and Practice.ppt
- Classroom Management First Week Activities.ppt
- Cleaning and Shaping of the Root Canal System. Part II.ppt
- Cleveland, OhioJune 17, 2008.ppt
- CMS User Group Meeting April 19, 2007.ppt
最近下载
- 蔬菜配送合同.docx VIP
- 2024年3月16日四川省绵阳市直遴选笔试真题及解析.docx VIP
- 2025年新人教版数学二年级上册全册课件.pptx
- 电气测量技术(完整课件).pdf VIP
- 中国国家标准 GB/T 22749-2022饮食加工设备 电动设备 切片机.pdf
- 2022变应性支气管肺曲霉病诊治专家共识修订版(完整版).docx VIP
- 高中班级管理制度以及实施细则.doc
- 《HBZ112-1986-材料疲劳试验统计分析方法》.pdf VIP
- 个人简历——【标准模板】.doc VIP
- 2013 kid box 3 yle单元测试答案键test answer key.pdf VIP
文档评论(0)