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/toir.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/toir.cc')
-rw-r--r-- | gcc/d/toir.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gcc/d/toir.cc b/gcc/d/toir.cc index 074cde0..92d0ecd 100644 --- a/gcc/d/toir.cc +++ b/gcc/d/toir.cc @@ -812,12 +812,12 @@ public: /* Apparently the backend is supposed to sort and set the indexes on the case array, have to change them to be usable. */ - Type *satype = condtype->sarrayOf (s->cases->dim); + Type *satype = condtype->sarrayOf (s->cases->length); vec<constructor_elt, va_gc> *elms = NULL; s->cases->sort (); - for (size_t i = 0; i < s->cases->dim; i++) + for (size_t i = 0; i < s->cases->length; i++) { CaseStatement *cs = (*s->cases)[i]; cs->index = i; @@ -840,7 +840,7 @@ public: /* Pass it as a dynamic array. */ decl = d_array_value (build_ctype (condtype->arrayOf ()), - size_int (s->cases->dim), + size_int (s->cases->length), build_address (decl)); condition = build_libcall (libcall, Type::tint32, 2, decl, condition); @@ -858,7 +858,7 @@ public: Also checking the jump from the switch to the label is allowed. */ if (s->cases) { - for (size_t i = 0; i < s->cases->dim; i++) + for (size_t i = 0; i < s->cases->length; i++) { CaseStatement *cs = (*s->cases)[i]; tree caselabel = this->lookup_label (cs); @@ -1049,7 +1049,7 @@ public: if (s->statements == NULL) return; - for (size_t i = 0; i < s->statements->dim; i++) + for (size_t i = 0; i < s->statements->length; i++) { Statement *statement = (*s->statements)[i]; @@ -1070,7 +1070,7 @@ public: tree lbreak = this->push_break_label (s); this->start_scope (level_loop); - for (size_t i = 0; i < s->statements->dim; i++) + for (size_t i = 0; i < s->statements->length; i++) { Statement *statement = (*s->statements)[i]; @@ -1175,7 +1175,7 @@ public: if (s->catches) { - for (size_t i = 0; i < s->catches->dim; i++) + for (size_t i = 0; i < s->catches->length; i++) { Catch *vcatch = (*s->catches)[i]; @@ -1301,7 +1301,7 @@ public: /* Collect all arguments, which may be input or output operands. */ if (s->args) { - for (size_t i = 0; i < s->args->dim; i++) + for (size_t i = 0; i < s->args->length; i++) { Identifier *name = (*s->names)[i]; const char *sname = name ? name->toChars () : NULL; @@ -1331,7 +1331,7 @@ public: /* Collect all clobber arguments. */ if (s->clobbers) { - for (size_t i = 0; i < s->clobbers->dim; i++) + for (size_t i = 0; i < s->clobbers->length; i++) { StringExp *clobber = (StringExp *)(*s->clobbers)[i]; const char *cstring = (const char *)(clobber->len @@ -1346,7 +1346,7 @@ public: by the front-end, so pass down the label symbol to the back-end. */ if (s->labels) { - for (size_t i = 0; i < s->labels->dim; i++) + for (size_t i = 0; i < s->labels->length; i++) { Identifier *ident = (*s->labels)[i]; GotoStatement *gs = (*s->gotos)[i]; @@ -1372,7 +1372,7 @@ public: if (s->args) { unsigned noutputs = s->outputargs; - unsigned ninputs = (s->args->dim - noutputs); + unsigned ninputs = (s->args->length - noutputs); const char **oconstraints = XALLOCAVEC (const char *, noutputs); bool allows_mem, allows_reg, is_inout; size_t i; @@ -1447,7 +1447,7 @@ public: if (s->imports == NULL) return; - for (size_t i = 0; i < s->imports->dim; i++) + for (size_t i = 0; i < s->imports->length; i++) { Dsymbol *dsym = (*s->imports)[i]; |