diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2020-06-05 17:50:49 +0200 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2020-06-05 17:52:57 +0200 |
commit | 5905cbdbcf6d760303ca87f27e04824f26976de4 (patch) | |
tree | 16ea452b43613d027a78c18b033f7659f0cdbbbf /gcc/d/dmd/expressionsem.c | |
parent | 300452d7bf1d3a0ff3f7585a1166f3d473c70556 (diff) | |
download | gcc-5905cbdbcf6d760303ca87f27e04824f26976de4.zip gcc-5905cbdbcf6d760303ca87f27e04824f26976de4.tar.gz gcc-5905cbdbcf6d760303ca87f27e04824f26976de4.tar.bz2 |
d: Merge upstream dmd 56f0a65c4.
Updates the Target interface, removing static from all members, so all
field accesses and member function calls go through a single global
'target'. Information relating to extern ABI are now in TargetC,
TargetCPP, and TargetObjC for each supported language respectively.
Reviewed-on: https://github.com/dlang/dmd/pull/11228
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd 56f0a65c4.
* d-builtins.cc (build_frontend_type): Remove static.
(d_build_builtins_module): Use target.va_listType() to get front-end
type for va_list.
(d_init_builtins): Move creation of va_list to Target::va_listType.
* d-codegen.cc (build_interface_binfo): Use new target global.
(build_vindex_ref): Likewise.
(identity_compare_p): Likewise.
* d-ctfloat.cc (CTFloat::parse): Likewise.
* d-lang.cc (d_init): Likewise.
* d-port.cc (Port::isFloat32LiteralOutOfRange): Likewise.
(Port::isFloat64LiteralOutOfRange): Likewise.
* d-target.cc (define_float_constants): Initialize constants through a
reference, instead of setting globals.
(Target::_init): Initialize new fields instead of setting globals.
(Target::va_listType): Build front-end type from va_list_type_node.
(Target::toCppMangle): Renamed to ...
(TargetCPP::toMangle): ... this.
(Target::cppTypeInfoMangle): Renamed to ...
(TargetCPP::typeInfoMangle): ... this.
(Target::cppTypeMangle): Renamed to ...
(TargetCPP::typeMangle): this.
(Target::cppParameterType): Renamed to ...
(TargetCPP::parameterType): ... this. Use target.va_listType() to get
front-end type for va_list.
(Target::cppFundamentalType): Renamed to ...
(TargetCPP::fundamentalType): ... this.
* d-tree.h (build_frontend_type): Declare.
* decl.cc (base_vtable_offset): Use new target global.
* typeinfo.cc (layout_classinfo_interfaces): Likewise.
(layout_cpp_typeinfo): Likewise.
* types.cc (valist_array_p): Use target.va_listType() to get front-end
type for va_list.
(layout_aggregate_type): Use new target global.
Diffstat (limited to 'gcc/d/dmd/expressionsem.c')
-rw-r--r-- | gcc/d/dmd/expressionsem.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/gcc/d/dmd/expressionsem.c b/gcc/d/dmd/expressionsem.c index cec57d4a..ffcfeb4 100644 --- a/gcc/d/dmd/expressionsem.c +++ b/gcc/d/dmd/expressionsem.c @@ -2073,7 +2073,7 @@ public: * The results of this are highly platform dependent, and intended * primarly for use in implementing va_arg(). */ - tded = Target::toArgTypes(e->targ); + tded = target.toArgTypes(e->targ); if (!tded) goto Lno; // not valid for a parameter break; @@ -2295,7 +2295,7 @@ public: exp->e2 = exp->e2->castTo(sc, Type::tshiftcnt); } - if (!Target::isVectorOpSupported(exp->type->toBasetype(), exp->op, exp->e2->type->toBasetype())) + if (!target.isVectorOpSupported(exp->type->toBasetype(), exp->op, exp->e2->type->toBasetype())) { result = exp->incompatibleTypes(); return; @@ -3917,7 +3917,7 @@ public: return; } - if (!Target::isVectorOpSupported(tb, exp->op)) + if (!target.isVectorOpSupported(tb, exp->op)) { result = exp->incompatibleTypes(); return; @@ -3941,7 +3941,7 @@ public: return; } - if (!Target::isVectorOpSupported(exp->e1->type->toBasetype(), exp->op)) + if (!target.isVectorOpSupported(exp->e1->type->toBasetype(), exp->op)) { result = exp->incompatibleTypes(); return; @@ -3982,7 +3982,7 @@ public: return; } - if (!Target::isVectorOpSupported(tb, exp->op)) + if (!target.isVectorOpSupported(tb, exp->op)) { result = exp->incompatibleTypes(); return; @@ -4024,7 +4024,7 @@ public: return; } - if (!Target::isVectorOpSupported(e->e1->type->toBasetype(), e->op)) + if (!target.isVectorOpSupported(e->e1->type->toBasetype(), e->op)) { result = e->incompatibleTypes(); return; @@ -6410,7 +6410,7 @@ public: } tb1 = exp->e1->type->toBasetype(); - if (!Target::isVectorOpSupported(tb1, exp->op, tb2)) + if (!target.isVectorOpSupported(tb1, exp->op, tb2)) { result = exp->incompatibleTypes(); return; @@ -6543,7 +6543,7 @@ public: t1 = exp->e1->type->toBasetype(); t2 = exp->e2->type->toBasetype(); - if (!Target::isVectorOpSupported(t1, exp->op, t2)) + if (!target.isVectorOpSupported(t1, exp->op, t2)) { result = exp->incompatibleTypes(); return; @@ -6864,7 +6864,7 @@ public: exp->type = t1; // t1 is complex } } - else if (!Target::isVectorOpSupported(tb, exp->op, exp->e2->type->toBasetype())) + else if (!target.isVectorOpSupported(tb, exp->op, exp->e2->type->toBasetype())) { result = exp->incompatibleTypes(); return; @@ -6964,7 +6964,7 @@ public: exp->type = t1; // t1 is complex } } - else if (!Target::isVectorOpSupported(tb, exp->op, exp->e2->type->toBasetype())) + else if (!target.isVectorOpSupported(tb, exp->op, exp->e2->type->toBasetype())) { result = exp->incompatibleTypes(); return; @@ -7009,7 +7009,7 @@ public: result = exp; return; } - if (!Target::isVectorOpSupported(tb, exp->op, exp->e2->type->toBasetype())) + if (!target.isVectorOpSupported(tb, exp->op, exp->e2->type->toBasetype())) { result = exp->incompatibleTypes(); return; @@ -7091,7 +7091,7 @@ public: if (exp->checkArithmeticBin()) return setError(); - if (!Target::isVectorOpSupported(exp->e1->type->toBasetype(), exp->op, exp->e2->type->toBasetype())) + if (!target.isVectorOpSupported(exp->e1->type->toBasetype(), exp->op, exp->e2->type->toBasetype())) { result = exp->incompatibleTypes(); return; @@ -7191,7 +7191,7 @@ public: if (exp->checkIntegralBin()) return setError(); - if (!Target::isVectorOpSupported(exp->e1->type->toBasetype(), exp->op, exp->e2->type->toBasetype())) + if (!target.isVectorOpSupported(exp->e1->type->toBasetype(), exp->op, exp->e2->type->toBasetype())) { result = exp->incompatibleTypes(); return; @@ -7226,7 +7226,7 @@ public: if (exp->checkIntegralBin()) return setError(); - if (!Target::isVectorOpSupported(exp->e1->type->toBasetype(), exp->op, exp->e2->type->toBasetype())) + if (!target.isVectorOpSupported(exp->e1->type->toBasetype(), exp->op, exp->e2->type->toBasetype())) { result = exp->incompatibleTypes(); return; @@ -7261,7 +7261,7 @@ public: if (exp->checkIntegralBin()) return setError(); - if (!Target::isVectorOpSupported(exp->e1->type->toBasetype(), exp->op, exp->e2->type->toBasetype())) + if (!target.isVectorOpSupported(exp->e1->type->toBasetype(), exp->op, exp->e2->type->toBasetype())) { result = exp->incompatibleTypes(); return; @@ -7320,7 +7320,7 @@ public: return; } - if (!Target::isVectorOpSupported(tb, exp->op, exp->e2->type->toBasetype())) + if (!target.isVectorOpSupported(tb, exp->op, exp->e2->type->toBasetype())) { result = exp->incompatibleTypes(); return; @@ -7377,7 +7377,7 @@ public: return; } - if (!Target::isVectorOpSupported(tb, exp->op, exp->e2->type->toBasetype())) + if (!target.isVectorOpSupported(tb, exp->op, exp->e2->type->toBasetype())) { result = exp->incompatibleTypes(); return; @@ -7434,7 +7434,7 @@ public: return; } - if (!Target::isVectorOpSupported(tb, exp->op, exp->e2->type->toBasetype())) + if (!target.isVectorOpSupported(tb, exp->op, exp->e2->type->toBasetype())) { result = exp->incompatibleTypes(); return; @@ -7756,7 +7756,7 @@ public: exp->error("%s is not defined for associative arrays", Token::toChars(exp->op)); return setError(); } - else if (!Target::isVectorOpSupported(t1, exp->op, t2)) + else if (!target.isVectorOpSupported(t1, exp->op, t2)) { result = exp->incompatibleTypes(); return; @@ -7905,7 +7905,7 @@ public: Type *t1 = exp->e1->type->toBasetype(); Type *t2 = exp->e2->type->toBasetype(); - if (!Target::isVectorOpSupported(t1, exp->op, t2)) + if (!target.isVectorOpSupported(t1, exp->op, t2)) { result = exp->incompatibleTypes(); return; @@ -7958,7 +7958,7 @@ public: Type *tb1 = exp->e1->type->toBasetype(); Type *tb2 = exp->e2->type->toBasetype(); - if (!Target::isVectorOpSupported(tb1, exp->op, tb2)) + if (!target.isVectorOpSupported(tb1, exp->op, tb2)) { result = exp->incompatibleTypes(); return; |