mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
detab source code (#20962)
This commit is contained in:
parent
42619075eb
commit
4c4b9aef4d
1 changed files with 8 additions and 8 deletions
|
@ -4890,7 +4890,7 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
|
||||||
{
|
{
|
||||||
return setError();
|
return setError();
|
||||||
}
|
}
|
||||||
if (!exp.placement.type.isNaked())
|
if (!exp.placement.type.isNaked())
|
||||||
{
|
{
|
||||||
error(p.loc, "PlacementExpression `%s` of type `%s` be unshared and mutable", p.toChars(), toChars(p.type));
|
error(p.loc, "PlacementExpression `%s` of type `%s` be unshared and mutable", p.toChars(), toChars(p.type));
|
||||||
return setError();
|
return setError();
|
||||||
|
@ -5221,7 +5221,7 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (sc.needsCodegen() && // interpreter doesn't need this lowered
|
else if (sc.needsCodegen() && // interpreter doesn't need this lowered
|
||||||
!exp.placement &&
|
!exp.placement &&
|
||||||
!exp.onstack && !exp.type.isScopeClass()) // these won't use the GC
|
!exp.onstack && !exp.type.isScopeClass()) // these won't use the GC
|
||||||
{
|
{
|
||||||
/* replace `new T(arguments)` with `core.lifetime._d_newclassT!T(arguments)`
|
/* replace `new T(arguments)` with `core.lifetime._d_newclassT!T(arguments)`
|
||||||
|
@ -5327,8 +5327,8 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
|
||||||
}
|
}
|
||||||
|
|
||||||
exp.type = exp.type.pointerTo();
|
exp.type = exp.type.pointerTo();
|
||||||
if (!exp.placement)
|
if (!exp.placement)
|
||||||
tryLowerToNewItem(exp);
|
tryLowerToNewItem(exp);
|
||||||
}
|
}
|
||||||
else if (tb.ty == Tarray)
|
else if (tb.ty == Tarray)
|
||||||
{
|
{
|
||||||
|
@ -5407,9 +5407,9 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
|
||||||
goto LskipNewArrayLowering;
|
goto LskipNewArrayLowering;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (exp.placement) // no need to lower
|
if (exp.placement) // no need to lower
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
else if (nargs == 1)
|
else if (nargs == 1)
|
||||||
{
|
{
|
||||||
auto hook = global.params.tracegc ? Id._d_newarrayTTrace : Id._d_newarrayT;
|
auto hook = global.params.tracegc ? Id._d_newarrayTTrace : Id._d_newarrayT;
|
||||||
|
@ -5495,7 +5495,7 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
|
||||||
|
|
||||||
exp.type = exp.type.pointerTo();
|
exp.type = exp.type.pointerTo();
|
||||||
if (!exp.placement)
|
if (!exp.placement)
|
||||||
tryLowerToNewItem(exp);
|
tryLowerToNewItem(exp);
|
||||||
}
|
}
|
||||||
else if (tb.ty == Taarray)
|
else if (tb.ty == Taarray)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue