diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2020-06-04 22:36:26 +0200 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2020-06-04 23:27:12 +0200 |
commit | 2cbc99d18dc411ac3fdef94e22ce86859806e63c (patch) | |
tree | 82939940413c5e726889ccd97fa2afd33e0b06be /gcc/d/d-codegen.cc | |
parent | 4e05c918d28e3fa66f5baaf556f6886447c68c9a (diff) | |
download | gcc-2cbc99d18dc411ac3fdef94e22ce86859806e63c.zip gcc-2cbc99d18dc411ac3fdef94e22ce86859806e63c.tar.gz gcc-2cbc99d18dc411ac3fdef94e22ce86859806e63c.tar.bz2 |
d: Merge upstream dmd 48d704f08
Updates the Array interface in dmd/root/array.h to use a DArray<TYPE>
internally. Splits out BitArray into a separate header.
Reviewed-on: https://github.com/dlang/dmd/pull/11219
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd 48d704f08.
* d-attribs.cc (build_attributes): Use new field name.
* d-builtins.cc (build_frontend_type): Likewise.
(maybe_set_builtin_1): Likewise.
(d_maybe_set_builtin): Likewise.
* d-codegen.cc (build_interface_binfo): Likewise.
(identity_compare_p): Likewise.
(lower_struct_comparison): Likewise.
(build_struct_comparison): Likewise.
(d_build_call): Likewise.
(build_frame_type): Likewise.
(build_closure): Likewise.
* d-compiler.cc (Compiler::paintAsType): Likewise.
(Compiler::loadModule): Likewise.
* d-incpath.cc (add_globalpaths): Likewise.
(add_filepaths): Likewise.
(add_import_paths): Likewise.
* d-lang.cc (deps_write): Likewise.
(d_parse_file): Likewise.
* decl.cc (gcc_attribute_p): Likewise.
(base_vtable_offset): Likewise.
(get_vtable_decl): Likewise.
(build_class_instance): Likewise.
* expr.cc (class ExprVisitor): Likewise.
* modules.cc (layout_moduleinfo_fields): Likewise.
(layout_moduleinfo): Likewise.
(build_module_tree): Likewise.
* toir.cc (class IRVisitor): Likewise.
* typeinfo.cc (class TypeInfoVisitor): Likewise.
(layout_classinfo_interfaces): Likewise.
* types.cc (layout_aggregate_members): Likewise.
(layout_aggregate_type): Likewise.
Diffstat (limited to 'gcc/d/d-codegen.cc')
-rw-r--r-- | gcc/d/d-codegen.cc | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/gcc/d/d-codegen.cc b/gcc/d/d-codegen.cc index 5efd4b9..2337c1d 100644 --- a/gcc/d/d-codegen.cc +++ b/gcc/d/d-codegen.cc @@ -356,7 +356,7 @@ build_class_binfo (tree super, ClassDeclaration *cd) tree build_interface_binfo (tree super, ClassDeclaration *cd, unsigned& offset) { - tree binfo = make_tree_binfo (cd->baseclasses->dim); + tree binfo = make_tree_binfo (cd->baseclasses->length); tree ctype = build_ctype (cd->type); /* Want RECORD_TYPE, not POINTER_TYPE. */ @@ -365,7 +365,7 @@ build_interface_binfo (tree super, ClassDeclaration *cd, unsigned& offset) BINFO_OFFSET (binfo) = size_int (offset * Target::ptrsize); BINFO_VIRTUAL_P (binfo) = 1; - for (size_t i = 0; i < cd->baseclasses->dim; i++, offset++) + for (size_t i = 0; i < cd->baseclasses->length; i++, offset++) { BaseClass *bc = (*cd->baseclasses)[i]; BINFO_BASE_APPEND (binfo, build_interface_binfo (binfo, bc->sym, offset)); @@ -804,7 +804,7 @@ identity_compare_p (StructDeclaration *sd) unsigned offset = 0; - for (size_t i = 0; i < sd->fields.dim; i++) + for (size_t i = 0; i < sd->fields.length; i++) { VarDeclaration *vd = sd->fields[i]; Type *tb = vd->type->toBasetype (); @@ -864,7 +864,7 @@ lower_struct_comparison (tree_code code, StructDeclaration *sd, tree tmemcmp = NULL_TREE; /* We can skip the compare if the structs are empty. */ - if (sd->fields.dim == 0) + if (sd->fields.length == 0) { tmemcmp = build_boolop (code, integer_zero_node, integer_zero_node); if (TREE_SIDE_EFFECTS (t2)) @@ -885,7 +885,7 @@ lower_struct_comparison (tree_code code, StructDeclaration *sd, return build_boolop (code, tmemcmp, integer_zero_node); } - for (size_t i = 0; i < sd->fields.dim; i++) + for (size_t i = 0; i < sd->fields.length; i++) { VarDeclaration *vd = sd->fields[i]; Type *type = vd->type->toBasetype (); @@ -968,7 +968,7 @@ build_struct_comparison (tree_code code, StructDeclaration *sd, tree t1, tree t2) { /* We can skip the compare if the structs are empty. */ - if (sd->fields.dim == 0) + if (sd->fields.length == 0) { tree exp = build_boolop (code, integer_zero_node, integer_zero_node); if (TREE_SIDE_EFFECTS (t2)) @@ -1869,7 +1869,7 @@ d_build_call (TypeFunction *tf, tree callable, tree object, if (arguments) { /* First pass, evaluated expanded tuples in function arguments. */ - for (size_t i = 0; i < arguments->dim; ++i) + for (size_t i = 0; i < arguments->length; ++i) { Lagain: Expression *arg = (*arguments)[i]; @@ -1889,8 +1889,8 @@ d_build_call (TypeFunction *tf, tree callable, tree object, /* if _arguments[] is the first argument. */ size_t varargs = (tf->linkage == LINKd && tf->varargs == 1); - /* Assumes arguments->dim <= formal_args->dim if (!tf->varargs). */ - for (size_t i = 0; i < arguments->dim; ++i) + /* Assumes arguments->length <= formal_args->length if (!tf->varargs). */ + for (size_t i = 0; i < arguments->length; ++i) { Expression *arg = (*arguments)[i]; tree targ = build_expr (arg); @@ -2381,11 +2381,11 @@ build_frame_type (tree ffi, FuncDeclaration *fd) { if (fd->parameters) { - for (size_t i = 0; fd->parameters && i < fd->parameters->dim; i++) + for (size_t i = 0; fd->parameters && i < fd->parameters->length; i++) { VarDeclaration *v = (*fd->parameters)[i]; /* Remove if already in closureVars so can push to front. */ - for (size_t j = i; j < fd->closureVars.dim; j++) + for (size_t j = i; j < fd->closureVars.length; j++) { Dsymbol *s = fd->closureVars[j]; if (s == v) @@ -2401,7 +2401,7 @@ build_frame_type (tree ffi, FuncDeclaration *fd) /* Also add hidden 'this' to outer context. */ if (fd->vthis) { - for (size_t i = 0; i < fd->closureVars.dim; i++) + for (size_t i = 0; i < fd->closureVars.length; i++) { Dsymbol *s = fd->closureVars[i]; if (s == fd->vthis) @@ -2414,7 +2414,7 @@ build_frame_type (tree ffi, FuncDeclaration *fd) } } - for (size_t i = 0; i < fd->closureVars.dim; i++) + for (size_t i = 0; i < fd->closureVars.length; i++) { VarDeclaration *v = fd->closureVars[i]; tree vsym = get_symbol_decl (v); @@ -2507,7 +2507,7 @@ build_closure (FuncDeclaration *fd) } /* Copy parameters that are referenced nonlocally. */ - for (size_t i = 0; i < fd->closureVars.dim; i++) + for (size_t i = 0; i < fd->closureVars.length; i++) { VarDeclaration *v = fd->closureVars[i]; |