Skip to content

Commit bf171ed

Browse files
committed
assert that some implicitly async property/subscript references have not made it to SILGen
For the dynamic versions of LookupExprs, we do not expect these to be implicitly async. For the other cases, I simply haven't implemented them yet.
1 parent 74eb1a7 commit bf171ed

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/SILGen/SILGenExpr.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,7 @@ emitRValueForDecl(SILLocation loc, ConcreteDeclRef declRef, Type ncRefType,
927927
}
928928

929929
RValue RValueEmitter::visitDeclRefExpr(DeclRefExpr *E, SGFContext C) {
930+
assert(!E->isImplicitlyAsync() && "TODO: Implement SILGen lowering");
930931
return SGF.emitRValueForDecl(E, E->getDeclRef(), E->getType(),
931932
E->getAccessSemantics(), C);
932933
}
@@ -2182,6 +2183,7 @@ RValue RValueEmitter::visitMemberRefExpr(MemberRefExpr *e,
21822183
assert(!e->getType()->is<LValueType>() &&
21832184
"RValueEmitter shouldn't be called on lvalues");
21842185
assert(isa<VarDecl>(e->getMember().getDecl()));
2186+
assert(!e->isImplicitlyAsync() && "TODO: Implement SILGen lowering");
21852187

21862188
// Everything else should use the l-value logic.
21872189

@@ -2198,6 +2200,7 @@ RValue RValueEmitter::visitMemberRefExpr(MemberRefExpr *e,
21982200

21992201
RValue RValueEmitter::visitDynamicMemberRefExpr(DynamicMemberRefExpr *E,
22002202
SGFContext C) {
2203+
assert(!E->isImplicitlyAsync() && "actors do not have @objc members");
22012204
return SGF.emitDynamicMemberRefExpr(E, C);
22022205
}
22032206

@@ -2208,6 +2211,7 @@ visitDotSyntaxBaseIgnoredExpr(DotSyntaxBaseIgnoredExpr *E, SGFContext C) {
22082211
}
22092212

22102213
RValue RValueEmitter::visitSubscriptExpr(SubscriptExpr *E, SGFContext C) {
2214+
assert(!E->isImplicitlyAsync() && "TODO: Implement SILGen lowering");
22112215
// Any writebacks for this access are tightly scoped.
22122216
FormalEvaluationScope scope(SGF);
22132217

@@ -2219,6 +2223,7 @@ RValue RValueEmitter::visitSubscriptExpr(SubscriptExpr *E, SGFContext C) {
22192223

22202224
RValue RValueEmitter::visitDynamicSubscriptExpr(
22212225
DynamicSubscriptExpr *E, SGFContext C) {
2226+
assert(!E->isImplicitlyAsync() && "actors do not have @objc members");
22222227
return SGF.emitDynamicSubscriptExpr(E, C);
22232228
}
22242229

lib/SILGen/SILGenLValue.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2944,6 +2944,7 @@ LValue SILGenLValue::visitDiscardAssignmentExpr(DiscardAssignmentExpr *e,
29442944

29452945
LValue SILGenLValue::visitDeclRefExpr(DeclRefExpr *e, SGFAccessKind accessKind,
29462946
LValueOptions options) {
2947+
assert(!e->isImplicitlyAsync() && "TODO: Implement SILGen lowering");
29472948
return emitLValueForNonMemberVarDecl(SGF, e, e->getDeclRef(),
29482949
getSubstFormalRValueType(e),
29492950
accessKind, options,

0 commit comments

Comments
 (0)