Identifier::idPool (IDENTIFIER_POINTER (TYPE_IDENTIFIER (type))) : NULL;
/* Neither the `object' and `gcc.builtins' modules will not exist when
- this is called. Use a stub 'object' module parent in the meantime.
+ this is called. Use a stub `object' module parent in the meantime.
If `gcc.builtins' is later imported, the parent will be overridden
with the correct module symbol. */
static Identifier *object = Identifier::idPool ("object");
return build_import_decl (parent);
}
- /* Declarations marked as 'static' or '__gshared' are never
+ /* Declarations marked as `static' or `__gshared' are never
part of any context except at module level. */
if (decl != NULL && decl->isDataseg ())
continue;
if (declaration_reference_p (decl))
return build_reference_type (type);
- /* The 'this' parameter is always const. */
+ /* The `this' parameter is always const. */
if (decl->isThisDeclaration ())
return insert_type_modifiers (type, MODconst);
}
/* Entry point for call routines. Builds a function call to FD.
- OBJECT is the 'this' reference passed and ARGS are the arguments to FD. */
+ OBJECT is the `this' reference passed and ARGS are the arguments to FD. */
tree
d_build_call_expr (FuncDeclaration *fd, tree object, Expressions *arguments)
build_address (get_symbol_decl (fd)), object, arguments);
}
-/* Builds a CALL_EXPR of type TF to CALLABLE. OBJECT holds the 'this' pointer,
+/* Builds a CALL_EXPR of type TF to CALLABLE. OBJECT holds the `this' pointer,
ARGUMENTS are evaluated in left to right order, saved and promoted
before passing. */
}
/* Build a function type whose first argument is a pointer to BASETYPE,
- which is to be used for the 'vthis' context parameter for TYPE.
+ which is to be used for the `vthis' context parameter for TYPE.
The base type may be a record for member functions, or a void for
nested functions and delegates. */
/* Check that the nested function is properly defined. */
if (!fd->fbody)
{
- /* Should instead error on line that references 'fd'. */
+ /* Should instead error on line that references `fd'. */
error_at (make_location_t (fd->loc), "nested function missing body");
return null_pointer_node;
}
{
tree frame_ref = get_framedecl (thisfd, fdparent);
- /* If 'thisfd' is a derived member function, then 'fdparent' is the
+ /* If `thisfd' is a derived member function, then `fdparent' is the
overridden member function in the base class. Even if there's a
closure environment, we should give the original stack data as the
nested function frame. */
if (cdo->isBaseOf (cd, &offset) && offset != 0)
{
/* Generate a new frame to pass to the overriden function that
- has the 'this' pointer adjusted. */
+ has the `this' pointer adjusted. */
gcc_assert (offset != OFFSET_RUNTIME);
tree type = FRAMEINFO_TYPE (get_frameinfo (fdoverride));
tree fields = TYPE_FIELDS (type);
- /* The 'this' field comes immediately after the '__chain'. */
+ /* The `this' field comes immediately after the `__chain'. */
tree thisfield = chain_index (1, fields);
vec<constructor_elt, va_gc> *ve = NULL;
/* Starting from the current function FD, try to find a suitable value of
- 'this' in nested function instances. A suitable 'this' value is an
+ `this' in nested function instances. A suitable `this' value is an
instance of OCD or a class that has OCD as a base. */
static tree
return NULL_TREE;
}
-/* Retrieve the outer class/struct 'this' value of DECL from
+/* Retrieve the outer class/struct `this' value of DECL from
the current function. */
tree
outer = ((TemplateInstance *) outer->parent)->enclosing;
}
- /* For outer classes, get a suitable 'this' value.
+ /* For outer classes, get a suitable `this' value.
For outer functions, get a suitable frame/closure pointer. */
ClassDeclaration *cdo = outer->isClassDeclaration ();
FuncDeclaration *fdo = outer->isFuncDeclaration ();
}
}
- /* Also add hidden 'this' to outer context. */
+ /* Also add hidden `this' to outer context. */
if (fd->vthis)
{
for (size_t i = 0; i < fd->closureVars.length; i++)
}
/* Return the frame of FD. This could be a static chain or a closure
- passed via the hidden 'this' pointer. */
+ passed via the hidden `this' pointer. */
tree
get_frameinfo (FuncDeclaration *fd)
/* Avoid range issues for complex multiply and divide. */
opts->x_flag_complex_method = 2;
- /* Unlike C, there is no global 'errno' variable. */
+ /* Unlike C, there is no global `errno' variable. */
opts->x_flag_errno_math = 0;
opts->frontend_set_flag_errno_math = true;
/* Special arguments... */
- /* 'this' parameter:
+ /* `this' parameter:
For nested functions, D still generates a vthis, but it
should not be referenced in any expression. */
if (d->vthis)
}
else if (fd->isThis ())
{
- /* Add an extra argument for the 'this' parameter. The handle type is
+ /* Add an extra argument for the `this' parameter. The handle type is
used even if there is no debug info. It is needed to make sure
virtual member functions are not called statically. */
AggregateDeclaration *ad = fd->isMember2 ();
}
else if (fd->isMain () || fd->isCMain ())
{
- /* The main function is named 'D main' to distinguish from C main. */
+ /* The main function is named `D main' to distinguish from C main. */
if (fd->isMain ())
DECL_NAME (decl->csym) = get_identifier (fd->toPrettyChars (true));
- /* 'void main' is implicitly converted to returning an int. */
+ /* `void main' is implicitly converted to returning an int. */
newfntype = build_function_type (d_int_type, TYPE_ARG_TYPES (fntype));
}
DECL_NO_INLINE_WARNING_P (decl->csym) = 1;
}
- /* In [pragma/inline], functions decorated with 'pragma(inline)' affects
+ /* In [pragma/inline], functions decorated with `pragma(inline)' affects
whether they are inlined or not. */
if (fd->inlining == PINLINEalways)
DECL_DECLARED_INLINE_P (decl->csym) = 1;
else if (fd->inlining == PINLINEnever)
DECL_UNINLINABLE (decl->csym) = 1;
- /* Function was declared 'naked'. */
+ /* Function was declared `naked'. */
if (fd->naked)
{
insert_decl_attribute (decl->csym, "naked");
DECL_LANG_FRAME_FIELD (t));
}
- /* Get the non-local 'this' value by going through parent link
+ /* Get the non-local `this' value by going through parent link
of nested classes, this routine pretty much undoes what
getRightThis in the frontend removes from codegen. */
if (vd->parent != fd && vd->isThisDeclaration ())
fd = outer->isFuncDeclaration ();
while (fd != NULL)
{
- /* If outer function creates a closure, then the 'this'
+ /* If outer function creates a closure, then the `this'
value would be the closure pointer, and the real
- 'this' the first field of that closure. */
+ `this' the first field of that closure. */
tree ff = get_frameinfo (fd);
if (FRAMEINFO_CREATES_FRAME (ff))
{
cfun->language = ggc_cleared_alloc<language_function> ();
cfun->language->function = fd;
- /* Default chain value is 'null' unless parent found. */
+ /* Default chain value is `null' unless parent found. */
cfun->language->static_chain = null_pointer_node;
/* Find module for this function. */
/* Get the VAR_DECL of the static initializer symbol for the struct/class DECL.
If this does not yet exist, create it. The static initializer data is
- accessible via TypeInfo, and is also used in 'new class' and default
+ accessible via TypeInfo, and is also used in `new class' and default
initializing struct literals. */
tree
thisexp = TREE_OPERAND (thisexp, 1);
}
- /* Want reference to 'this' object. */
+ /* Want reference to `this' object. */
if (!POINTER_TYPE_P (TREE_TYPE (thisexp)))
thisexp = build_address (thisexp);
{
/* This gets the true function type, getting the function type
from e1->type can sometimes be incorrect, such as when calling
- a 'ref' return function. */
+ a `ref' return function. */
tf = get_function_type (e1b->isDotVarExp ()->var->type);
}
else
if (fd->isNested ())
{
- /* Maybe re-evaluate symbol storage treating 'fd' as public. */
+ /* Maybe re-evaluate symbol storage treating `fd' as public. */
if (call_by_alias_p (d_function_chain->function, fd))
TREE_PUBLIC (callee) = 1;
{
Type *ftype = e->type->toBasetype ();
- /* This check is for lambda's, remove 'vthis' as function isn't nested. */
+ /* This check is for lambda's, remove `vthis' as function isn't nested. */
if (e->fd->tok == TOKreserved && ftype->ty == Tpointer)
{
e->fd->tok = TOKfunction;
input_location = saved_location;
}
- /* Not all visitors set 'isym'. */
+ /* Not all visitors set `isym'. */
return d->isym ? d->isym : NULL_TREE;
}
bool varargs = false;
tree fntype;
- /* Add parameter types, using 'void' as the last parameter type
+ /* Add parameter types, using `void' as the last parameter type
to mean this function accepts a variable list of arguments. */
va_list ap;
va_start (ap, nparams);
{
this->start_scope (level_cond);
- /* Build the outer 'if' condition, which may produce temporaries
+ /* Build the outer `if' condition, which may produce temporaries
requiring scope destruction. */
tree ifcond = convert_for_condition (build_expr_dtor (s->condition),
s->condition->type);
tree ifbody = void_node;
tree elsebody = void_node;
- /* Build the 'then' branch. */
+ /* Build the `then' branch. */
if (s->ifbody)
{
push_stmt_list ();
ifbody = pop_stmt_list ();
}
- /* Now build the 'else' branch, which may have nested 'else if' parts. */
+ /* Now build the `else' branch, which may have nested `else if' parts. */
if (s->elsebody)
{
push_stmt_list ();
this->pop_continue_label (lcontinue);
}
- /* Build the outer 'while' condition, which may produce temporaries
+ /* Build the outer `while' condition, which may produce temporaries
requiring scope destruction. */
tree exitcond = convert_for_condition (build_expr_dtor (s->condition),
s->condition->type);
{
tree defaultlabel = this->lookup_label (s->sdefault);
- /* The default label is the last 'else' block. */
+ /* The default label is the last `else' block. */
if (s->hasVars)
{
this->do_jump (defaultlabel);
SWITCH_BREAK_LABEL_P (lbreak) = 1;
- /* If the switch had any 'break' statements, emit the label now. */
+ /* If the switch had any `break' statements, emit the label now. */
this->pop_break_label (lbreak);
this->finish_scope ();
}
this->build_stmt (s->statement);
}
- /* Implements 'goto default' by jumping to the label associated with
+ /* Implements `goto default' by jumping to the label associated with
the DefaultStatement in a switch block. */
void visit (GotoDefaultStatement *s)
this->do_jump (label);
}
- /* Implements 'goto case' by jumping to the label associated with the
+ /* Implements `goto case' by jumping to the label associated with the
CaseStatement in a switch block. */
void visit (GotoCaseStatement *s)
if (s->wthis)
{
- /* Perform initialisation of the 'with' handle. */
+ /* Perform initialisation of the `with' handle. */
ExpInitializer *ie = s->wthis->_init->isExpInitializer ();
gcc_assert (ie != NULL);
this->finish_scope ();
}
- /* Implements 'throw Object'. Frontend already checks that the object
+ /* Implements `throw Object'. Frontend already checks that the object
thrown is a class type, but does not check if it is derived from
Object. Foreign objects are not currently supported at run-time. */
optimization, this could be unset when building in release mode. */
ASM_VOLATILE_P (exp) = 1;
- /* If the function has been annotated with 'pragma(inline)', then mark
+ /* If the function has been annotated with `pragma(inline)', then mark
the asm expression as being inline as well. */
if (this->func_->inlining == PINLINEalways)
ASM_INLINE_P (exp) = 1;
CONSTRUCTOR_APPEND_ELT (v, size_int (2), value);
}
- /* The 'this' offset. */
+ /* The `this' offset. */
CONSTRUCTOR_APPEND_ELT (v, size_int (3), size_int (b->offset));
/* Add to the array of interfaces. */
/* Kinds of TypeInfo that add one extra pointer field. */
if (tk == TK_SHARED_TYPE)
{
- /* Does both 'shared' and 'shared const'. */
+ /* Does both `shared' and `shared const'. */
t->vtinfo = TypeInfoSharedDeclaration::create (t);
ident = Identifier::idPool ("TypeInfo_Shared");
}
return false;
}
-/* Returns 'Object' type which all D classes are derived from. */
+/* Returns `Object' type which all D classes are derived from. */
Type *
get_object_type (void)
tree qualtype = build_qualified_type (type, quals);
- /* Mark whether the type is qualified 'shared'. */
+ /* Mark whether the type is qualified `shared'. */
if (mod & MODshared)
TYPE_SHARED (qualtype) = 1;