• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GCC with patches for OS216


Commit MetaInfo

Revisioncdbf48bed4e947f8d20c8c22d400fb52a407d46f (tree)
Time2020-06-17 06:37:55
AuthorIain Buclaw <ibuclaw@gdcp...>
CommiterIain Buclaw

Log Message

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.

Change Summary

Incremental Difference

--- a/gcc/d/d-builtins.cc
+++ b/gcc/d/d-builtins.cc
@@ -222,7 +222,7 @@ build_frontend_type (tree type)
222222 Identifier::idPool (IDENTIFIER_POINTER (TYPE_IDENTIFIER (type))) : NULL;
223223
224224 /* 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.
226226 If `gcc.builtins' is later imported, the parent will be overridden
227227 with the correct module symbol. */
228228 static Identifier *object = Identifier::idPool ("object");
--- a/gcc/d/d-codegen.cc
+++ b/gcc/d/d-codegen.cc
@@ -82,7 +82,7 @@ d_decl_context (Dsymbol *dsym)
8282 return build_import_decl (parent);
8383 }
8484
85- /* Declarations marked as 'static' or '__gshared' are never
85+ /* Declarations marked as `static' or `__gshared' are never
8686 part of any context except at module level. */
8787 if (decl != NULL && decl->isDataseg ())
8888 continue;
@@ -164,7 +164,7 @@ declaration_type (Declaration *decl)
164164 if (declaration_reference_p (decl))
165165 return build_reference_type (type);
166166
167- /* The 'this' parameter is always const. */
167+ /* The `this' parameter is always const. */
168168 if (decl->isThisDeclaration ())
169169 return insert_type_modifiers (type, MODconst);
170170
@@ -1830,7 +1830,7 @@ call_by_alias_p (FuncDeclaration *caller, FuncDeclaration *callee)
18301830 }
18311831
18321832 /* 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. */
18341834
18351835 tree
18361836 d_build_call_expr (FuncDeclaration *fd, tree object, Expressions *arguments)
@@ -1839,7 +1839,7 @@ d_build_call_expr (FuncDeclaration *fd, tree object, Expressions *arguments)
18391839 build_address (get_symbol_decl (fd)), object, arguments);
18401840 }
18411841
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,
18431843 ARGUMENTS are evaluated in left to right order, saved and promoted
18441844 before passing. */
18451845
@@ -2044,7 +2044,7 @@ build_float_modulus (tree type, tree arg0, tree arg1)
20442044 }
20452045
20462046 /* 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.
20482048 The base type may be a record for member functions, or a void for
20492049 nested functions and delegates. */
20502050
@@ -2085,7 +2085,7 @@ get_frame_for_symbol (Dsymbol *sym)
20852085 /* Check that the nested function is properly defined. */
20862086 if (!fd->fbody)
20872087 {
2088- /* Should instead error on line that references 'fd'. */
2088+ /* Should instead error on line that references `fd'. */
20892089 error_at (make_location_t (fd->loc), "nested function missing body");
20902090 return null_pointer_node;
20912091 }
@@ -2181,7 +2181,7 @@ get_frame_for_symbol (Dsymbol *sym)
21812181 {
21822182 tree frame_ref = get_framedecl (thisfd, fdparent);
21832183
2184- /* If 'thisfd' is a derived member function, then 'fdparent' is the
2184+ /* If `thisfd' is a derived member function, then `fdparent' is the
21852185 overridden member function in the base class. Even if there's a
21862186 closure environment, we should give the original stack data as the
21872187 nested function frame. */
@@ -2195,12 +2195,12 @@ get_frame_for_symbol (Dsymbol *sym)
21952195 if (cdo->isBaseOf (cd, &offset) && offset != 0)
21962196 {
21972197 /* Generate a new frame to pass to the overriden function that
2198- has the 'this' pointer adjusted. */
2198+ has the `this' pointer adjusted. */
21992199 gcc_assert (offset != OFFSET_RUNTIME);
22002200
22012201 tree type = FRAMEINFO_TYPE (get_frameinfo (fdoverride));
22022202 tree fields = TYPE_FIELDS (type);
2203- /* The 'this' field comes immediately after the '__chain'. */
2203+ /* The `this' field comes immediately after the `__chain'. */
22042204 tree thisfield = chain_index (1, fields);
22052205 vec<constructor_elt, va_gc> *ve = NULL;
22062206
@@ -2263,7 +2263,7 @@ d_nested_struct (StructDeclaration *sd)
22632263
22642264
22652265 /* 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
22672267 instance of OCD or a class that has OCD as a base. */
22682268
22692269 static tree
@@ -2301,7 +2301,7 @@ find_this_tree (ClassDeclaration *ocd)
23012301 return NULL_TREE;
23022302 }
23032303
2304-/* Retrieve the outer class/struct 'this' value of DECL from
2304+/* Retrieve the outer class/struct `this' value of DECL from
23052305 the current function. */
23062306
23072307 tree
@@ -2327,7 +2327,7 @@ build_vthis (AggregateDeclaration *decl)
23272327 outer = ((TemplateInstance *) outer->parent)->enclosing;
23282328 }
23292329
2330- /* For outer classes, get a suitable 'this' value.
2330+ /* For outer classes, get a suitable `this' value.
23312331 For outer functions, get a suitable frame/closure pointer. */
23322332 ClassDeclaration *cdo = outer->isClassDeclaration ();
23332333 FuncDeclaration *fdo = outer->isFuncDeclaration ();
@@ -2412,7 +2412,7 @@ build_frame_type (tree ffi, FuncDeclaration *fd)
24122412 }
24132413 }
24142414
2415- /* Also add hidden 'this' to outer context. */
2415+ /* Also add hidden `this' to outer context. */
24162416 if (fd->vthis)
24172417 {
24182418 for (size_t i = 0; i < fd->closureVars.length; i++)
@@ -2542,7 +2542,7 @@ build_closure (FuncDeclaration *fd)
25422542 }
25432543
25442544 /* 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. */
25462546
25472547 tree
25482548 get_frameinfo (FuncDeclaration *fd)
--- a/gcc/d/d-lang.cc
+++ b/gcc/d/d-lang.cc
@@ -337,7 +337,7 @@ d_init_options_struct (gcc_options *opts)
337337 /* Avoid range issues for complex multiply and divide. */
338338 opts->x_flag_complex_method = 2;
339339
340- /* Unlike C, there is no global 'errno' variable. */
340+ /* Unlike C, there is no global `errno' variable. */
341341 opts->x_flag_errno_math = 0;
342342 opts->frontend_set_flag_errno_math = true;
343343
--- a/gcc/d/decl.cc
+++ b/gcc/d/decl.cc
@@ -859,7 +859,7 @@ public:
859859
860860 /* Special arguments... */
861861
862- /* 'this' parameter:
862+ /* `this' parameter:
863863 For nested functions, D still generates a vthis, but it
864864 should not be referenced in any expression. */
865865 if (d->vthis)
@@ -1205,7 +1205,7 @@ get_symbol_decl (Declaration *decl)
12051205 }
12061206 else if (fd->isThis ())
12071207 {
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
12091209 used even if there is no debug info. It is needed to make sure
12101210 virtual member functions are not called statically. */
12111211 AggregateDeclaration *ad = fd->isMember2 ();
@@ -1226,11 +1226,11 @@ get_symbol_decl (Declaration *decl)
12261226 }
12271227 else if (fd->isMain () || fd->isCMain ())
12281228 {
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. */
12301230 if (fd->isMain ())
12311231 DECL_NAME (decl->csym) = get_identifier (fd->toPrettyChars (true));
12321232
1233- /* 'void main' is implicitly converted to returning an int. */
1233+ /* `void main' is implicitly converted to returning an int. */
12341234 newfntype = build_function_type (d_int_type, TYPE_ARG_TYPES (fntype));
12351235 }
12361236
@@ -1253,14 +1253,14 @@ get_symbol_decl (Declaration *decl)
12531253 DECL_NO_INLINE_WARNING_P (decl->csym) = 1;
12541254 }
12551255
1256- /* In [pragma/inline], functions decorated with 'pragma(inline)' affects
1256+ /* In [pragma/inline], functions decorated with `pragma(inline)' affects
12571257 whether they are inlined or not. */
12581258 if (fd->inlining == PINLINEalways)
12591259 DECL_DECLARED_INLINE_P (decl->csym) = 1;
12601260 else if (fd->inlining == PINLINEnever)
12611261 DECL_UNINLINABLE (decl->csym) = 1;
12621262
1263- /* Function was declared 'naked'. */
1263+ /* Function was declared `naked'. */
12641264 if (fd->naked)
12651265 {
12661266 insert_decl_attribute (decl->csym, "naked");
@@ -1466,7 +1466,7 @@ get_decl_tree (Declaration *decl)
14661466 DECL_LANG_FRAME_FIELD (t));
14671467 }
14681468
1469- /* Get the non-local 'this' value by going through parent link
1469+ /* Get the non-local `this' value by going through parent link
14701470 of nested classes, this routine pretty much undoes what
14711471 getRightThis in the frontend removes from codegen. */
14721472 if (vd->parent != fd && vd->isThisDeclaration ())
@@ -1501,9 +1501,9 @@ get_decl_tree (Declaration *decl)
15011501 fd = outer->isFuncDeclaration ();
15021502 while (fd != NULL)
15031503 {
1504- /* If outer function creates a closure, then the 'this'
1504+ /* If outer function creates a closure, then the `this'
15051505 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. */
15071507 tree ff = get_frameinfo (fd);
15081508 if (FRAMEINFO_CREATES_FRAME (ff))
15091509 {
@@ -1900,7 +1900,7 @@ start_function (FuncDeclaration *fd)
19001900 cfun->language = ggc_cleared_alloc<language_function> ();
19011901 cfun->language->function = fd;
19021902
1903- /* Default chain value is 'null' unless parent found. */
1903+ /* Default chain value is `null' unless parent found. */
19041904 cfun->language->static_chain = null_pointer_node;
19051905
19061906 /* Find module for this function. */
@@ -2194,7 +2194,7 @@ build_new_class_expr (ClassReferenceExp *expr)
21942194
21952195 /* Get the VAR_DECL of the static initializer symbol for the struct/class DECL.
21962196 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
21982198 initializing struct literals. */
21992199
22002200 tree
--- a/gcc/d/expr.cc
+++ b/gcc/d/expr.cc
@@ -1739,7 +1739,7 @@ public:
17391739 thisexp = TREE_OPERAND (thisexp, 1);
17401740 }
17411741
1742- /* Want reference to 'this' object. */
1742+ /* Want reference to `this' object. */
17431743 if (!POINTER_TYPE_P (TREE_TYPE (thisexp)))
17441744 thisexp = build_address (thisexp);
17451745
@@ -1770,7 +1770,7 @@ public:
17701770 {
17711771 /* This gets the true function type, getting the function type
17721772 from e1->type can sometimes be incorrect, such as when calling
1773- a 'ref' return function. */
1773+ a `ref' return function. */
17741774 tf = get_function_type (e1b->isDotVarExp ()->var->type);
17751775 }
17761776 else
@@ -1794,7 +1794,7 @@ public:
17941794
17951795 if (fd->isNested ())
17961796 {
1797- /* Maybe re-evaluate symbol storage treating 'fd' as public. */
1797+ /* Maybe re-evaluate symbol storage treating `fd' as public. */
17981798 if (call_by_alias_p (d_function_chain->function, fd))
17991799 TREE_PUBLIC (callee) = 1;
18001800
@@ -2099,7 +2099,7 @@ public:
20992099 {
21002100 Type *ftype = e->type->toBasetype ();
21012101
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. */
21032103 if (e->fd->tok == TOKreserved && ftype->ty == Tpointer)
21042104 {
21052105 e->fd->tok = TOKfunction;
--- a/gcc/d/imports.cc
+++ b/gcc/d/imports.cc
@@ -202,7 +202,7 @@ build_import_decl (Dsymbol *d)
202202 input_location = saved_location;
203203 }
204204
205- /* Not all visitors set 'isym'. */
205+ /* Not all visitors set `isym'. */
206206 return d->isym ? d->isym : NULL_TREE;
207207 }
208208
--- a/gcc/d/runtime.cc
+++ b/gcc/d/runtime.cc
@@ -219,7 +219,7 @@ build_libcall_decl (const char *name, d_libcall_type return_type,
219219 bool varargs = false;
220220 tree fntype;
221221
222- /* Add parameter types, using 'void' as the last parameter type
222+ /* Add parameter types, using `void' as the last parameter type
223223 to mean this function accepts a variable list of arguments. */
224224 va_list ap;
225225 va_start (ap, nparams);
--- a/gcc/d/toir.cc
+++ b/gcc/d/toir.cc
@@ -564,14 +564,14 @@ public:
564564 {
565565 this->start_scope (level_cond);
566566
567- /* Build the outer 'if' condition, which may produce temporaries
567+ /* Build the outer `if' condition, which may produce temporaries
568568 requiring scope destruction. */
569569 tree ifcond = convert_for_condition (build_expr_dtor (s->condition),
570570 s->condition->type);
571571 tree ifbody = void_node;
572572 tree elsebody = void_node;
573573
574- /* Build the 'then' branch. */
574+ /* Build the `then' branch. */
575575 if (s->ifbody)
576576 {
577577 push_stmt_list ();
@@ -579,7 +579,7 @@ public:
579579 ifbody = pop_stmt_list ();
580580 }
581581
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. */
583583 if (s->elsebody)
584584 {
585585 push_stmt_list ();
@@ -627,7 +627,7 @@ public:
627627 this->pop_continue_label (lcontinue);
628628 }
629629
630- /* Build the outer 'while' condition, which may produce temporaries
630+ /* Build the outer `while' condition, which may produce temporaries
631631 requiring scope destruction. */
632632 tree exitcond = convert_for_condition (build_expr_dtor (s->condition),
633633 s->condition->type);
@@ -885,7 +885,7 @@ public:
885885 {
886886 tree defaultlabel = this->lookup_label (s->sdefault);
887887
888- /* The default label is the last 'else' block. */
888+ /* The default label is the last `else' block. */
889889 if (s->hasVars)
890890 {
891891 this->do_jump (defaultlabel);
@@ -917,7 +917,7 @@ public:
917917
918918 SWITCH_BREAK_LABEL_P (lbreak) = 1;
919919
920- /* If the switch had any 'break' statements, emit the label now. */
920+ /* If the switch had any `break' statements, emit the label now. */
921921 this->pop_break_label (lbreak);
922922 this->finish_scope ();
923923 }
@@ -968,7 +968,7 @@ public:
968968 this->build_stmt (s->statement);
969969 }
970970
971- /* Implements 'goto default' by jumping to the label associated with
971+ /* Implements `goto default' by jumping to the label associated with
972972 the DefaultStatement in a switch block. */
973973
974974 void visit (GotoDefaultStatement *s)
@@ -977,7 +977,7 @@ public:
977977 this->do_jump (label);
978978 }
979979
980- /* Implements 'goto case' by jumping to the label associated with the
980+ /* Implements `goto case' by jumping to the label associated with the
981981 CaseStatement in a switch block. */
982982
983983 void visit (GotoCaseStatement *s)
@@ -1112,7 +1112,7 @@ public:
11121112
11131113 if (s->wthis)
11141114 {
1115- /* Perform initialisation of the 'with' handle. */
1115+ /* Perform initialisation of the `with' handle. */
11161116 ExpInitializer *ie = s->wthis->_init->isExpInitializer ();
11171117 gcc_assert (ie != NULL);
11181118
@@ -1127,7 +1127,7 @@ public:
11271127 this->finish_scope ();
11281128 }
11291129
1130- /* Implements 'throw Object'. Frontend already checks that the object
1130+ /* Implements `throw Object'. Frontend already checks that the object
11311131 thrown is a class type, but does not check if it is derived from
11321132 Object. Foreign objects are not currently supported at run-time. */
11331133
@@ -1432,7 +1432,7 @@ public:
14321432 optimization, this could be unset when building in release mode. */
14331433 ASM_VOLATILE_P (exp) = 1;
14341434
1435- /* If the function has been annotated with 'pragma(inline)', then mark
1435+ /* If the function has been annotated with `pragma(inline)', then mark
14361436 the asm expression as being inline as well. */
14371437 if (this->func_->inlining == PINLINEalways)
14381438 ASM_INLINE_P (exp) = 1;
--- a/gcc/d/typeinfo.cc
+++ b/gcc/d/typeinfo.cc
@@ -456,7 +456,7 @@ class TypeInfoVisitor : public Visitor
456456 CONSTRUCTOR_APPEND_ELT (v, size_int (2), value);
457457 }
458458
459- /* The 'this' offset. */
459+ /* The `this' offset. */
460460 CONSTRUCTOR_APPEND_ELT (v, size_int (3), size_int (b->offset));
461461
462462 /* Add to the array of interfaces. */
@@ -1483,7 +1483,7 @@ create_typeinfo (Type *type, Module *mod)
14831483 /* Kinds of TypeInfo that add one extra pointer field. */
14841484 if (tk == TK_SHARED_TYPE)
14851485 {
1486- /* Does both 'shared' and 'shared const'. */
1486+ /* Does both `shared' and `shared const'. */
14871487 t->vtinfo = TypeInfoSharedDeclaration::create (t);
14881488 ident = Identifier::idPool ("TypeInfo_Shared");
14891489 }
--- a/gcc/d/types.cc
+++ b/gcc/d/types.cc
@@ -106,7 +106,7 @@ same_type_p (Type *t1, Type *t2)
106106 return false;
107107 }
108108
109-/* Returns 'Object' type which all D classes are derived from. */
109+/* Returns `Object' type which all D classes are derived from. */
110110
111111 Type *
112112 get_object_type (void)
@@ -204,7 +204,7 @@ insert_type_modifiers (tree type, unsigned mod)
204204
205205 tree qualtype = build_qualified_type (type, quals);
206206
207- /* Mark whether the type is qualified 'shared'. */
207+ /* Mark whether the type is qualified `shared'. */
208208 if (mod & MODshared)
209209 TYPE_SHARED (qualtype) = 1;
210210