GCC with patches for OS216
Revision | cdbf48bed4e947f8d20c8c22d400fb52a407d46f (tree) |
---|---|
Time | 2020-06-17 06:37:55 |
Author | Iain Buclaw <ibuclaw@gdcp...> |
Commiter | Iain Buclaw |
d: Consistently format quotations in comments.
gcc/d/ChangeLog:
* d-builtins.cc: Update quotation formatting of comments.
* d-codegen.cc: Likewise.
* d-lang.cc: Likewise.
* decl.cc: Likewise.
* expr.cc: Likewise.
* imports.cc: Likewise.
* runtime.cc: Likewise.
* toir.cc: Likewise.
* typeinfo.cc: Likewise.
* types.cc: Likewise.
@@ -222,7 +222,7 @@ build_frontend_type (tree type) | ||
222 | 222 | Identifier::idPool (IDENTIFIER_POINTER (TYPE_IDENTIFIER (type))) : NULL; |
223 | 223 | |
224 | 224 | /* Neither the `object' and `gcc.builtins' modules will not exist when |
225 | - this is called. Use a stub 'object' module parent in the meantime. | |
225 | + this is called. Use a stub `object' module parent in the meantime. | |
226 | 226 | If `gcc.builtins' is later imported, the parent will be overridden |
227 | 227 | with the correct module symbol. */ |
228 | 228 | static Identifier *object = Identifier::idPool ("object"); |
@@ -82,7 +82,7 @@ d_decl_context (Dsymbol *dsym) | ||
82 | 82 | return build_import_decl (parent); |
83 | 83 | } |
84 | 84 | |
85 | - /* Declarations marked as 'static' or '__gshared' are never | |
85 | + /* Declarations marked as `static' or `__gshared' are never | |
86 | 86 | part of any context except at module level. */ |
87 | 87 | if (decl != NULL && decl->isDataseg ()) |
88 | 88 | continue; |
@@ -164,7 +164,7 @@ declaration_type (Declaration *decl) | ||
164 | 164 | if (declaration_reference_p (decl)) |
165 | 165 | return build_reference_type (type); |
166 | 166 | |
167 | - /* The 'this' parameter is always const. */ | |
167 | + /* The `this' parameter is always const. */ | |
168 | 168 | if (decl->isThisDeclaration ()) |
169 | 169 | return insert_type_modifiers (type, MODconst); |
170 | 170 |
@@ -1830,7 +1830,7 @@ call_by_alias_p (FuncDeclaration *caller, FuncDeclaration *callee) | ||
1830 | 1830 | } |
1831 | 1831 | |
1832 | 1832 | /* Entry point for call routines. Builds a function call to FD. |
1833 | - OBJECT is the 'this' reference passed and ARGS are the arguments to FD. */ | |
1833 | + OBJECT is the `this' reference passed and ARGS are the arguments to FD. */ | |
1834 | 1834 | |
1835 | 1835 | tree |
1836 | 1836 | d_build_call_expr (FuncDeclaration *fd, tree object, Expressions *arguments) |
@@ -1839,7 +1839,7 @@ d_build_call_expr (FuncDeclaration *fd, tree object, Expressions *arguments) | ||
1839 | 1839 | build_address (get_symbol_decl (fd)), object, arguments); |
1840 | 1840 | } |
1841 | 1841 | |
1842 | -/* Builds a CALL_EXPR of type TF to CALLABLE. OBJECT holds the 'this' pointer, | |
1842 | +/* Builds a CALL_EXPR of type TF to CALLABLE. OBJECT holds the `this' pointer, | |
1843 | 1843 | ARGUMENTS are evaluated in left to right order, saved and promoted |
1844 | 1844 | before passing. */ |
1845 | 1845 |
@@ -2044,7 +2044,7 @@ build_float_modulus (tree type, tree arg0, tree arg1) | ||
2044 | 2044 | } |
2045 | 2045 | |
2046 | 2046 | /* Build a function type whose first argument is a pointer to BASETYPE, |
2047 | - which is to be used for the 'vthis' context parameter for TYPE. | |
2047 | + which is to be used for the `vthis' context parameter for TYPE. | |
2048 | 2048 | The base type may be a record for member functions, or a void for |
2049 | 2049 | nested functions and delegates. */ |
2050 | 2050 |
@@ -2085,7 +2085,7 @@ get_frame_for_symbol (Dsymbol *sym) | ||
2085 | 2085 | /* Check that the nested function is properly defined. */ |
2086 | 2086 | if (!fd->fbody) |
2087 | 2087 | { |
2088 | - /* Should instead error on line that references 'fd'. */ | |
2088 | + /* Should instead error on line that references `fd'. */ | |
2089 | 2089 | error_at (make_location_t (fd->loc), "nested function missing body"); |
2090 | 2090 | return null_pointer_node; |
2091 | 2091 | } |
@@ -2181,7 +2181,7 @@ get_frame_for_symbol (Dsymbol *sym) | ||
2181 | 2181 | { |
2182 | 2182 | tree frame_ref = get_framedecl (thisfd, fdparent); |
2183 | 2183 | |
2184 | - /* If 'thisfd' is a derived member function, then 'fdparent' is the | |
2184 | + /* If `thisfd' is a derived member function, then `fdparent' is the | |
2185 | 2185 | overridden member function in the base class. Even if there's a |
2186 | 2186 | closure environment, we should give the original stack data as the |
2187 | 2187 | nested function frame. */ |
@@ -2195,12 +2195,12 @@ get_frame_for_symbol (Dsymbol *sym) | ||
2195 | 2195 | if (cdo->isBaseOf (cd, &offset) && offset != 0) |
2196 | 2196 | { |
2197 | 2197 | /* Generate a new frame to pass to the overriden function that |
2198 | - has the 'this' pointer adjusted. */ | |
2198 | + has the `this' pointer adjusted. */ | |
2199 | 2199 | gcc_assert (offset != OFFSET_RUNTIME); |
2200 | 2200 | |
2201 | 2201 | tree type = FRAMEINFO_TYPE (get_frameinfo (fdoverride)); |
2202 | 2202 | tree fields = TYPE_FIELDS (type); |
2203 | - /* The 'this' field comes immediately after the '__chain'. */ | |
2203 | + /* The `this' field comes immediately after the `__chain'. */ | |
2204 | 2204 | tree thisfield = chain_index (1, fields); |
2205 | 2205 | vec<constructor_elt, va_gc> *ve = NULL; |
2206 | 2206 |
@@ -2263,7 +2263,7 @@ d_nested_struct (StructDeclaration *sd) | ||
2263 | 2263 | |
2264 | 2264 | |
2265 | 2265 | /* Starting from the current function FD, try to find a suitable value of |
2266 | - 'this' in nested function instances. A suitable 'this' value is an | |
2266 | + `this' in nested function instances. A suitable `this' value is an | |
2267 | 2267 | instance of OCD or a class that has OCD as a base. */ |
2268 | 2268 | |
2269 | 2269 | static tree |
@@ -2301,7 +2301,7 @@ find_this_tree (ClassDeclaration *ocd) | ||
2301 | 2301 | return NULL_TREE; |
2302 | 2302 | } |
2303 | 2303 | |
2304 | -/* Retrieve the outer class/struct 'this' value of DECL from | |
2304 | +/* Retrieve the outer class/struct `this' value of DECL from | |
2305 | 2305 | the current function. */ |
2306 | 2306 | |
2307 | 2307 | tree |
@@ -2327,7 +2327,7 @@ build_vthis (AggregateDeclaration *decl) | ||
2327 | 2327 | outer = ((TemplateInstance *) outer->parent)->enclosing; |
2328 | 2328 | } |
2329 | 2329 | |
2330 | - /* For outer classes, get a suitable 'this' value. | |
2330 | + /* For outer classes, get a suitable `this' value. | |
2331 | 2331 | For outer functions, get a suitable frame/closure pointer. */ |
2332 | 2332 | ClassDeclaration *cdo = outer->isClassDeclaration (); |
2333 | 2333 | FuncDeclaration *fdo = outer->isFuncDeclaration (); |
@@ -2412,7 +2412,7 @@ build_frame_type (tree ffi, FuncDeclaration *fd) | ||
2412 | 2412 | } |
2413 | 2413 | } |
2414 | 2414 | |
2415 | - /* Also add hidden 'this' to outer context. */ | |
2415 | + /* Also add hidden `this' to outer context. */ | |
2416 | 2416 | if (fd->vthis) |
2417 | 2417 | { |
2418 | 2418 | for (size_t i = 0; i < fd->closureVars.length; i++) |
@@ -2542,7 +2542,7 @@ build_closure (FuncDeclaration *fd) | ||
2542 | 2542 | } |
2543 | 2543 | |
2544 | 2544 | /* Return the frame of FD. This could be a static chain or a closure |
2545 | - passed via the hidden 'this' pointer. */ | |
2545 | + passed via the hidden `this' pointer. */ | |
2546 | 2546 | |
2547 | 2547 | tree |
2548 | 2548 | get_frameinfo (FuncDeclaration *fd) |
@@ -337,7 +337,7 @@ d_init_options_struct (gcc_options *opts) | ||
337 | 337 | /* Avoid range issues for complex multiply and divide. */ |
338 | 338 | opts->x_flag_complex_method = 2; |
339 | 339 | |
340 | - /* Unlike C, there is no global 'errno' variable. */ | |
340 | + /* Unlike C, there is no global `errno' variable. */ | |
341 | 341 | opts->x_flag_errno_math = 0; |
342 | 342 | opts->frontend_set_flag_errno_math = true; |
343 | 343 |
@@ -859,7 +859,7 @@ public: | ||
859 | 859 | |
860 | 860 | /* Special arguments... */ |
861 | 861 | |
862 | - /* 'this' parameter: | |
862 | + /* `this' parameter: | |
863 | 863 | For nested functions, D still generates a vthis, but it |
864 | 864 | should not be referenced in any expression. */ |
865 | 865 | if (d->vthis) |
@@ -1205,7 +1205,7 @@ get_symbol_decl (Declaration *decl) | ||
1205 | 1205 | } |
1206 | 1206 | else if (fd->isThis ()) |
1207 | 1207 | { |
1208 | - /* Add an extra argument for the 'this' parameter. The handle type is | |
1208 | + /* Add an extra argument for the `this' parameter. The handle type is | |
1209 | 1209 | used even if there is no debug info. It is needed to make sure |
1210 | 1210 | virtual member functions are not called statically. */ |
1211 | 1211 | AggregateDeclaration *ad = fd->isMember2 (); |
@@ -1226,11 +1226,11 @@ get_symbol_decl (Declaration *decl) | ||
1226 | 1226 | } |
1227 | 1227 | else if (fd->isMain () || fd->isCMain ()) |
1228 | 1228 | { |
1229 | - /* The main function is named 'D main' to distinguish from C main. */ | |
1229 | + /* The main function is named `D main' to distinguish from C main. */ | |
1230 | 1230 | if (fd->isMain ()) |
1231 | 1231 | DECL_NAME (decl->csym) = get_identifier (fd->toPrettyChars (true)); |
1232 | 1232 | |
1233 | - /* 'void main' is implicitly converted to returning an int. */ | |
1233 | + /* `void main' is implicitly converted to returning an int. */ | |
1234 | 1234 | newfntype = build_function_type (d_int_type, TYPE_ARG_TYPES (fntype)); |
1235 | 1235 | } |
1236 | 1236 |
@@ -1253,14 +1253,14 @@ get_symbol_decl (Declaration *decl) | ||
1253 | 1253 | DECL_NO_INLINE_WARNING_P (decl->csym) = 1; |
1254 | 1254 | } |
1255 | 1255 | |
1256 | - /* In [pragma/inline], functions decorated with 'pragma(inline)' affects | |
1256 | + /* In [pragma/inline], functions decorated with `pragma(inline)' affects | |
1257 | 1257 | whether they are inlined or not. */ |
1258 | 1258 | if (fd->inlining == PINLINEalways) |
1259 | 1259 | DECL_DECLARED_INLINE_P (decl->csym) = 1; |
1260 | 1260 | else if (fd->inlining == PINLINEnever) |
1261 | 1261 | DECL_UNINLINABLE (decl->csym) = 1; |
1262 | 1262 | |
1263 | - /* Function was declared 'naked'. */ | |
1263 | + /* Function was declared `naked'. */ | |
1264 | 1264 | if (fd->naked) |
1265 | 1265 | { |
1266 | 1266 | insert_decl_attribute (decl->csym, "naked"); |
@@ -1466,7 +1466,7 @@ get_decl_tree (Declaration *decl) | ||
1466 | 1466 | DECL_LANG_FRAME_FIELD (t)); |
1467 | 1467 | } |
1468 | 1468 | |
1469 | - /* Get the non-local 'this' value by going through parent link | |
1469 | + /* Get the non-local `this' value by going through parent link | |
1470 | 1470 | of nested classes, this routine pretty much undoes what |
1471 | 1471 | getRightThis in the frontend removes from codegen. */ |
1472 | 1472 | if (vd->parent != fd && vd->isThisDeclaration ()) |
@@ -1501,9 +1501,9 @@ get_decl_tree (Declaration *decl) | ||
1501 | 1501 | fd = outer->isFuncDeclaration (); |
1502 | 1502 | while (fd != NULL) |
1503 | 1503 | { |
1504 | - /* If outer function creates a closure, then the 'this' | |
1504 | + /* If outer function creates a closure, then the `this' | |
1505 | 1505 | value would be the closure pointer, and the real |
1506 | - 'this' the first field of that closure. */ | |
1506 | + `this' the first field of that closure. */ | |
1507 | 1507 | tree ff = get_frameinfo (fd); |
1508 | 1508 | if (FRAMEINFO_CREATES_FRAME (ff)) |
1509 | 1509 | { |
@@ -1900,7 +1900,7 @@ start_function (FuncDeclaration *fd) | ||
1900 | 1900 | cfun->language = ggc_cleared_alloc<language_function> (); |
1901 | 1901 | cfun->language->function = fd; |
1902 | 1902 | |
1903 | - /* Default chain value is 'null' unless parent found. */ | |
1903 | + /* Default chain value is `null' unless parent found. */ | |
1904 | 1904 | cfun->language->static_chain = null_pointer_node; |
1905 | 1905 | |
1906 | 1906 | /* Find module for this function. */ |
@@ -2194,7 +2194,7 @@ build_new_class_expr (ClassReferenceExp *expr) | ||
2194 | 2194 | |
2195 | 2195 | /* Get the VAR_DECL of the static initializer symbol for the struct/class DECL. |
2196 | 2196 | If this does not yet exist, create it. The static initializer data is |
2197 | - accessible via TypeInfo, and is also used in 'new class' and default | |
2197 | + accessible via TypeInfo, and is also used in `new class' and default | |
2198 | 2198 | initializing struct literals. */ |
2199 | 2199 | |
2200 | 2200 | tree |
@@ -1739,7 +1739,7 @@ public: | ||
1739 | 1739 | thisexp = TREE_OPERAND (thisexp, 1); |
1740 | 1740 | } |
1741 | 1741 | |
1742 | - /* Want reference to 'this' object. */ | |
1742 | + /* Want reference to `this' object. */ | |
1743 | 1743 | if (!POINTER_TYPE_P (TREE_TYPE (thisexp))) |
1744 | 1744 | thisexp = build_address (thisexp); |
1745 | 1745 |
@@ -1770,7 +1770,7 @@ public: | ||
1770 | 1770 | { |
1771 | 1771 | /* This gets the true function type, getting the function type |
1772 | 1772 | from e1->type can sometimes be incorrect, such as when calling |
1773 | - a 'ref' return function. */ | |
1773 | + a `ref' return function. */ | |
1774 | 1774 | tf = get_function_type (e1b->isDotVarExp ()->var->type); |
1775 | 1775 | } |
1776 | 1776 | else |
@@ -1794,7 +1794,7 @@ public: | ||
1794 | 1794 | |
1795 | 1795 | if (fd->isNested ()) |
1796 | 1796 | { |
1797 | - /* Maybe re-evaluate symbol storage treating 'fd' as public. */ | |
1797 | + /* Maybe re-evaluate symbol storage treating `fd' as public. */ | |
1798 | 1798 | if (call_by_alias_p (d_function_chain->function, fd)) |
1799 | 1799 | TREE_PUBLIC (callee) = 1; |
1800 | 1800 |
@@ -2099,7 +2099,7 @@ public: | ||
2099 | 2099 | { |
2100 | 2100 | Type *ftype = e->type->toBasetype (); |
2101 | 2101 | |
2102 | - /* This check is for lambda's, remove 'vthis' as function isn't nested. */ | |
2102 | + /* This check is for lambda's, remove `vthis' as function isn't nested. */ | |
2103 | 2103 | if (e->fd->tok == TOKreserved && ftype->ty == Tpointer) |
2104 | 2104 | { |
2105 | 2105 | e->fd->tok = TOKfunction; |
@@ -202,7 +202,7 @@ build_import_decl (Dsymbol *d) | ||
202 | 202 | input_location = saved_location; |
203 | 203 | } |
204 | 204 | |
205 | - /* Not all visitors set 'isym'. */ | |
205 | + /* Not all visitors set `isym'. */ | |
206 | 206 | return d->isym ? d->isym : NULL_TREE; |
207 | 207 | } |
208 | 208 |
@@ -219,7 +219,7 @@ build_libcall_decl (const char *name, d_libcall_type return_type, | ||
219 | 219 | bool varargs = false; |
220 | 220 | tree fntype; |
221 | 221 | |
222 | - /* Add parameter types, using 'void' as the last parameter type | |
222 | + /* Add parameter types, using `void' as the last parameter type | |
223 | 223 | to mean this function accepts a variable list of arguments. */ |
224 | 224 | va_list ap; |
225 | 225 | va_start (ap, nparams); |
@@ -564,14 +564,14 @@ public: | ||
564 | 564 | { |
565 | 565 | this->start_scope (level_cond); |
566 | 566 | |
567 | - /* Build the outer 'if' condition, which may produce temporaries | |
567 | + /* Build the outer `if' condition, which may produce temporaries | |
568 | 568 | requiring scope destruction. */ |
569 | 569 | tree ifcond = convert_for_condition (build_expr_dtor (s->condition), |
570 | 570 | s->condition->type); |
571 | 571 | tree ifbody = void_node; |
572 | 572 | tree elsebody = void_node; |
573 | 573 | |
574 | - /* Build the 'then' branch. */ | |
574 | + /* Build the `then' branch. */ | |
575 | 575 | if (s->ifbody) |
576 | 576 | { |
577 | 577 | push_stmt_list (); |
@@ -579,7 +579,7 @@ public: | ||
579 | 579 | ifbody = pop_stmt_list (); |
580 | 580 | } |
581 | 581 | |
582 | - /* Now build the 'else' branch, which may have nested 'else if' parts. */ | |
582 | + /* Now build the `else' branch, which may have nested `else if' parts. */ | |
583 | 583 | if (s->elsebody) |
584 | 584 | { |
585 | 585 | push_stmt_list (); |
@@ -627,7 +627,7 @@ public: | ||
627 | 627 | this->pop_continue_label (lcontinue); |
628 | 628 | } |
629 | 629 | |
630 | - /* Build the outer 'while' condition, which may produce temporaries | |
630 | + /* Build the outer `while' condition, which may produce temporaries | |
631 | 631 | requiring scope destruction. */ |
632 | 632 | tree exitcond = convert_for_condition (build_expr_dtor (s->condition), |
633 | 633 | s->condition->type); |
@@ -885,7 +885,7 @@ public: | ||
885 | 885 | { |
886 | 886 | tree defaultlabel = this->lookup_label (s->sdefault); |
887 | 887 | |
888 | - /* The default label is the last 'else' block. */ | |
888 | + /* The default label is the last `else' block. */ | |
889 | 889 | if (s->hasVars) |
890 | 890 | { |
891 | 891 | this->do_jump (defaultlabel); |
@@ -917,7 +917,7 @@ public: | ||
917 | 917 | |
918 | 918 | SWITCH_BREAK_LABEL_P (lbreak) = 1; |
919 | 919 | |
920 | - /* If the switch had any 'break' statements, emit the label now. */ | |
920 | + /* If the switch had any `break' statements, emit the label now. */ | |
921 | 921 | this->pop_break_label (lbreak); |
922 | 922 | this->finish_scope (); |
923 | 923 | } |
@@ -968,7 +968,7 @@ public: | ||
968 | 968 | this->build_stmt (s->statement); |
969 | 969 | } |
970 | 970 | |
971 | - /* Implements 'goto default' by jumping to the label associated with | |
971 | + /* Implements `goto default' by jumping to the label associated with | |
972 | 972 | the DefaultStatement in a switch block. */ |
973 | 973 | |
974 | 974 | void visit (GotoDefaultStatement *s) |
@@ -977,7 +977,7 @@ public: | ||
977 | 977 | this->do_jump (label); |
978 | 978 | } |
979 | 979 | |
980 | - /* Implements 'goto case' by jumping to the label associated with the | |
980 | + /* Implements `goto case' by jumping to the label associated with the | |
981 | 981 | CaseStatement in a switch block. */ |
982 | 982 | |
983 | 983 | void visit (GotoCaseStatement *s) |
@@ -1112,7 +1112,7 @@ public: | ||
1112 | 1112 | |
1113 | 1113 | if (s->wthis) |
1114 | 1114 | { |
1115 | - /* Perform initialisation of the 'with' handle. */ | |
1115 | + /* Perform initialisation of the `with' handle. */ | |
1116 | 1116 | ExpInitializer *ie = s->wthis->_init->isExpInitializer (); |
1117 | 1117 | gcc_assert (ie != NULL); |
1118 | 1118 |
@@ -1127,7 +1127,7 @@ public: | ||
1127 | 1127 | this->finish_scope (); |
1128 | 1128 | } |
1129 | 1129 | |
1130 | - /* Implements 'throw Object'. Frontend already checks that the object | |
1130 | + /* Implements `throw Object'. Frontend already checks that the object | |
1131 | 1131 | thrown is a class type, but does not check if it is derived from |
1132 | 1132 | Object. Foreign objects are not currently supported at run-time. */ |
1133 | 1133 |
@@ -1432,7 +1432,7 @@ public: | ||
1432 | 1432 | optimization, this could be unset when building in release mode. */ |
1433 | 1433 | ASM_VOLATILE_P (exp) = 1; |
1434 | 1434 | |
1435 | - /* If the function has been annotated with 'pragma(inline)', then mark | |
1435 | + /* If the function has been annotated with `pragma(inline)', then mark | |
1436 | 1436 | the asm expression as being inline as well. */ |
1437 | 1437 | if (this->func_->inlining == PINLINEalways) |
1438 | 1438 | ASM_INLINE_P (exp) = 1; |
@@ -456,7 +456,7 @@ class TypeInfoVisitor : public Visitor | ||
456 | 456 | CONSTRUCTOR_APPEND_ELT (v, size_int (2), value); |
457 | 457 | } |
458 | 458 | |
459 | - /* The 'this' offset. */ | |
459 | + /* The `this' offset. */ | |
460 | 460 | CONSTRUCTOR_APPEND_ELT (v, size_int (3), size_int (b->offset)); |
461 | 461 | |
462 | 462 | /* Add to the array of interfaces. */ |
@@ -1483,7 +1483,7 @@ create_typeinfo (Type *type, Module *mod) | ||
1483 | 1483 | /* Kinds of TypeInfo that add one extra pointer field. */ |
1484 | 1484 | if (tk == TK_SHARED_TYPE) |
1485 | 1485 | { |
1486 | - /* Does both 'shared' and 'shared const'. */ | |
1486 | + /* Does both `shared' and `shared const'. */ | |
1487 | 1487 | t->vtinfo = TypeInfoSharedDeclaration::create (t); |
1488 | 1488 | ident = Identifier::idPool ("TypeInfo_Shared"); |
1489 | 1489 | } |
@@ -106,7 +106,7 @@ same_type_p (Type *t1, Type *t2) | ||
106 | 106 | return false; |
107 | 107 | } |
108 | 108 | |
109 | -/* Returns 'Object' type which all D classes are derived from. */ | |
109 | +/* Returns `Object' type which all D classes are derived from. */ | |
110 | 110 | |
111 | 111 | Type * |
112 | 112 | get_object_type (void) |
@@ -204,7 +204,7 @@ insert_type_modifiers (tree type, unsigned mod) | ||
204 | 204 | |
205 | 205 | tree qualtype = build_qualified_type (type, quals); |
206 | 206 | |
207 | - /* Mark whether the type is qualified 'shared'. */ | |
207 | + /* Mark whether the type is qualified `shared'. */ | |
208 | 208 | if (mod & MODshared) |
209 | 209 | TYPE_SHARED (qualtype) = 1; |
210 | 210 |