- 博客(26)
- 资源 (22)
- 收藏
- 关注
原创 Studying note of GCC-3.4.6 source (106)
<br /><br />5.12.3.2.1.1.1. Parse class body – typedefdeclaration<br />5.12.3.2.1.1.4.1. Findout decl-specifier-spec and declarator<br />Exitting the definition of struct “Lock’, it goes back thedefinition of class “SingleThreaded” now.
2010-09-25 11:57:00 1087
原创 GCC-3.4.6源代码学习笔记 (106)
<br /><br />5.12.3.2.1.1.1. 解析类体– typedef声明<br />5.12.3.2.1.1.4.1. 找出decl-specifier-spec及declarator<br />退出结构体“Lock”的定义,现在回到类“SingleThreaded”的定义。接下来的声明是“typedef Host VolatileType;”。<br />对于这个声明,“typedef Host”部分是decl-specifier-seq,而“VolatileTy
2010-09-25 11:55:00 2343
原创 Studying note of GCC-3.4.6 source (105)
<br /><br />5.12.3.2.1.1.3.6.1. Exit nested class<br />Further, when consuming the tailing “;” of the class, it means weare going to exit the class scope and re-enter its containing scope. Thisoperation is done by popclass at line 5257.<b
2010-09-21 11:52:00 763
原创 GCC-3.4.6源代码学习笔记 (105)
<br /><br />5.12.3.2.1.1.3.6.1. 退出嵌套类<br />进一步的,当“消化”掉了类末尾的“;”的时候,它表示我们将要退出类的作用域,并重新进入包含它的作用域。这个操作由5257行的popclass执行。<br /> <br />5564 void<br />5565 popclass (void)
2010-09-21 11:50:00 1264
原创 Studying note of GCC-3.4.6 source (104)
<br /><br />5.12.3.2.1.1.3.5.3. Finish<br />With returned arg_typesand parms,at line 7601 in grokdeclarator, build_function_type createsnode of FUNCTION_TYPE as following.<br />(Clickhere for open)<br />Figure 81:FUNCTION_TY
2010-09-20 11:49:00 591
原创 GCC-3.4.6源代码学习笔记 (104)
<br /><br />5.12.3.2.1.1.3.5.3. 完成<br />根据返回的arg_types及parms,在grokdeclarator的7601行,build_function_type构建了如下的FUNCTION_TYPE节点。<br />(点此打开)<br />图81:构建的FUNCTION_TYPE节点<br />现在与CALL_EXPR相关的节点都没用了,因为已经没有到CALL_EXPR节点的引用。那么在grokdeclarator的8240行,build_
2010-09-20 11:48:00 936
原创 Studying note of GCC-3.4.6 source (103)
<br /><br />5.12.3.2.1.1.3.5.2. Create DECL nodes forparameter<br />Then after parsing the parameters list, at line 10492 in cp_parser_direct_declarator,make_call_declaratorcreates following tree nodes.<br />(Clickhere for open)<br
2010-09-17 11:56:00 1030
原创 GCC-3.4.6源代码学习笔记 (103)
<br /><br />5.12.3.2.1.1.3.5.2. 为参数构建DECL节点<br />在解析完参数列表后,在cp_parser_direct_declarator的10492行,make_call_declarator创建如下的树节点。<br />(点此打开)<br />图76:非默认构造函数的CALL_EXPR<br />沿着和默认构造函数相同的路径,然后在grokdeclarator中,以下对该声明符的处理有所不同。下面的CALL_DECLARATOR_PARMS访问
2010-09-17 11:53:00 1876
原创 Studying note of GCC-3.4.6 source (102)
<br /><br />5.12.3.2.1.1.3.5. Parseother constructors<br />After parsing the default constructor, it returns back cp_parser_member_specification_opt,it begins parsing next constructor: Lock(constHost&) {}<br />It is a very interesting one, as i
2010-09-16 11:54:00 680
原创 GCC-3.4.6源代码学习笔记 (102)
<br /><br />5.12.3.2.1.1.3.5. 解析其它构造函数<br />在解析了默认构造函数后,我们回到cp_parser_member_specification_opt,它开始解析下一个构造函数:Lock(const Host&) {}<br />这是一个很有趣的构造函数,因为它的参数是类模板的模板参数。既然我们已经看过解析默认构造函数的过程,在这里我们只看不同的部分。<br />5.12.3.2.1.1.3.5.1. 解析参数<br />对于这个构造
2010-09-16 11:50:00 989
原创 Studying note of GCC-3.4.6 source (101)
<br /><br />5.12.3.2.1.1.3.4.3. Cache body for inlinefunction<br />Routine start_method creates nodes for the declaratorof the method-declaration; after that if the method has default argument, this(these) argument(s) should be remember
2010-09-14 11:43:00 631
原创 GCC-3.4.6源代码学习笔记 (101)
<br /><br />5.12.3.2.1.1.3.4.3. 缓存内联函数体<br />函数start_method为这个method-declaration的声明符构建了节点,随后如果方法有缺省参数,这些参数将被parser的unparsed_functions_queues域所记录。而如果接下来的符号是“{”,表示适用function-definition规则,定义了内联函数。<br /> <br />cp_parser_save_member_function_body (c
2010-09-14 11:33:00 881
原创 Studying note of GCC-3.4.6 source (100 continue)
<br /><br /> <br />grokdeclarator (continue)<br /> <br />8163 {<br />8164 tree decl;<br />8165 <br />8166 if (decl_context == PARM)<br />8167 {<br />8168 decl =cp_build_parm_decl (declarator, type);<br />8169 <
2010-09-10 11:48:00 1195
原创 GCC-3.4.6源代码学习笔记 (100 续)
<br /><br /> <br />grokdeclarator (continue)<br /> <br />8163 {<br />8164 tree decl;<br />8165 <br />8166 if (decl_context == PARM)<br />8167 {<br />8168 decl =cp_build_parm_decl (declarator, type);<br />8169 <
2010-09-10 11:45:00 1769
原创 Studying note of GCC-3.4.6 source (100)
<br /><br />5.12.3.2.1.1.3.4.2. Build nodes for method<br />Clearly, now declarator is node of tree_list, and declares_class_or_enumremains zero and which if nonzero means seeing elaborate-type-specifier orclass-specifier or enum-specifie
2010-09-10 11:39:00 1277
原创 GCC-3.4.6源代码学习笔记 (100)
<br /><br />5.12.3.2.1.1.3.4.2. 为方法构建节点<br />显然,现在declarator是一个tree_list节点,并且declares_class_or_enum保存为0(如果它为非0,表示在decl-specifier中看到了elaborate-type-specifier或class-specifier或enum-specifier)。<br /> <br />cp_parser_member_declaration (continue)<br
2010-09-10 11:36:00 1648
原创 Studying note of GCC-3.4.6 source (99)
<br />5.12.3.2.1.1.3.4. Parse default constructor<br />Following the similar path of class “SingleThreaded” to parse its member, with call stack of cp_parser_class_specifier, cp_parser_member_specification_opt, cp_parser_member_declaration, cp_parser_de
2010-09-09 11:56:00 1043
原创 GCC-3.4.6源代码学习笔记(99)
<br />5.12.3.2.1.1.3.1. 解析默认构造函数<br />类似于类“SingleThreaded”解析其成员,依次调用cp_parser_class_specifier,cp_parser_member_specification_opt,cp_parser_member_declaration,cp_parser_decl_specifier_seq,在下面的代码片段中按照构造函数解析这个decl-specifier。<br /> <br />cp_parser_decl_spec
2010-09-09 11:51:00 1741
原创 Studying note of GCC-3.4.6 source (98)
<br />If valid, token follows class-head should be “{“, however when error occurs, it is no sure that token can appear. Taking a conservative approach, tokens before “}” will be abandoned with error. Otherwise, it can happily continue to parse member-speci
2010-09-06 12:04:00 719
原创 GCC-3.4.6源代码学习笔记(98)
<br />5.12.3.2.1.1.3. 解析类体<br />正常的话,跟在class-head后面的符号应该是“{”,不过要是发生了错误,就不能肯定该符号一定会出现。保险起见,“}”之前的符号都将丢弃,并触发错误。否则,就可以继续放心地解析member-specification部分。<br /> <br />cp_parser_class_specifier (continue)<br /> <br />11906 if (type == error_mark_node)<br
2010-09-06 11:55:00 946
原创 Studying note of GCC-3.4.6 source (97)
<br />5.12.3.2.1.1.2.1. Build self reference<br />At line 2082, routine build_self_reference builds a dummy reference to itself so Derived::Base (and A::A) works, according to ISO-IEC-14882-2003: <br />“The class-name is also inserted into the scope of
2010-09-03 11:38:00 825
原创 GCC-3.4.6源代码学习笔记(97)
<br />5.12.3.2.1.1.2.1. 构建对自己的引用<br />在2082行,根据ISO-IEC-14882-2003的要求,函数build_self_reference构建了一个对自己的伪引用,使得Derived::Base(及A::A)能够工作<br />“类名亦加入类作用域本身。出于访问检查的目的,加入的类名被视为公有成员名。”<br /> <br />6290void<br />6291build_self_reference (void)
2010-09-03 11:32:00 1025
原创 Studying note of GCC-3.4.6 source (96)
<br />5.12.3.2.1.1.2. Begin class definition<br />Following the class-head, should be the token of “{”; and below at line 11890, function cp_parser_check_type_definition checks if new type definition is allowed or not (by checking if type_definiti
2010-09-02 11:51:00 710
原创 GCC-3.4.6源代码学习笔记(96)
<br />5.12.3.2.1.1.2. 开始类定义<br />跟在class-head后,应该是符号“{”,那么在下面的11890行的函数cp_parser_check_type_definition检查定义新的类型在当前上下文是否允许(通过检查parser的type_definition_forbidden_message是否为non-null)。<br /> <br />cp_parser_class_specifier (continue)<br /> <br />11882 /
2010-09-02 11:49:00 1265 2
原创 Studying note of GCC-3.4.6 source (95)
<br />5.12.3.2.1.1.1.4. Push TYPE_DECL for the class<br />Now d is the TYPE_DECL refered by results slot of TEMPLATE_DECL, which is returned by push_template_decl_real. And b is the scope of namespace “Loki” found at the beginning of the function.<br />
2010-09-01 11:46:00 683
原创 GCC-3.4.6源代码学习笔记(95)
<br />5.12.3.2.1.1.1.4. 加入类的TYPE_DECL<br />现在d是被TEMPLATE_DECL的results域所指向的TYPE_DECL,并由push_template_decl_real所返回。而b是在函数开头就找到的名字空间“Loki”的作用域。<br /> <br />pushtag (continue)<br /> <br />4659 if (b->kind == sk_class)<br />4660 {<br />4661
2010-09-01 11:44:00 850
Introduction to Theory of Computation
2018-09-23
Survey on Instruction Selection
2018-09-23
Towards a Compilation infrastructure for network processors
2018-09-23
the art of multiprocessor programming
2018-09-23
Crafting a Compiler
2018-09-01
How Debuggers Work
2018-09-01
Elements of Compiler Design
2018-09-01
category-theory-for-programmers
2018-09-01
Language_Implementation_Patterns_C
2018-09-01
Compiler Construction-20th
2018-09-01
Compiler Construction-19th
2018-09-01
Compiler Construction-17th
2018-09-01
Compiler Construction-16th
2018-09-01
Compiler Construction-5th
2018-09-01
Construction and Evolution of Code Generator
2018-09-01
Modern Embedded Computing Designing Connected, Pervasive, Media-Rich Systems
2018-09-01
Compiler Construction-11th
2018-09-01
The compiler design handbook
2018-09-01
Data_Flow_Analysis_Theory_And_Practice(Bookos.org)
2018-09-01
The Compiler Design Handbook Optimizations and machine code generation
2018-09-01
instruction scheduling for instruction level parallel processor
2018-07-16
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人