mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
NFC: Expunge 'actor class' in comments
This commit is contained in:
@@ -40,7 +40,7 @@ public:
|
||||
/// The actor isolation has not been specified. It is assumed to be
|
||||
/// unsafe to interact with this declaration from any actor.
|
||||
Unspecified = 0,
|
||||
/// The declaration is isolated to the instance of an actor class.
|
||||
/// The declaration is isolated to the instance of an actor.
|
||||
/// For example, a mutable stored property or synchronous function within
|
||||
/// the actor is isolated to the instance of that actor.
|
||||
ActorInstance,
|
||||
|
||||
@@ -521,7 +521,7 @@ public:
|
||||
if (!printOptions.shouldPrint(nominal))
|
||||
return;
|
||||
|
||||
/// is this nominal specifically an 'actor class'?
|
||||
/// is this nominal specifically an 'actor'?
|
||||
bool actorClass = false;
|
||||
if (auto klass = dyn_cast<ClassDecl>(nominal))
|
||||
actorClass = klass->isActor();
|
||||
|
||||
@@ -2095,7 +2095,7 @@ const TypeInfo *TypeConverter::convertType(CanType ty) {
|
||||
}
|
||||
case TypeKind::BuiltinDefaultActorStorage: {
|
||||
// Builtin.DefaultActorStorage represents the extra storage
|
||||
// (beyond the heap header) of a default actor class. It is
|
||||
// (beyond the heap header) of a default actor. It is
|
||||
// fixed-size and totally opaque.
|
||||
auto numWords = NumWords_DefaultActor;
|
||||
|
||||
|
||||
@@ -290,18 +290,18 @@ bool IsActorRequest::evaluate(
|
||||
|
||||
bool IsDefaultActorRequest::evaluate(
|
||||
Evaluator &evaluator, ClassDecl *classDecl) const {
|
||||
// If the class isn't an actor class, it's not a default actor.
|
||||
// If the class isn't an actor, it's not a default actor.
|
||||
if (!classDecl->isActor())
|
||||
return false;
|
||||
|
||||
// If there is a superclass, and it's an actor class, we defer
|
||||
// If there is a superclass, and it's an actor, we defer
|
||||
// the decision to it.
|
||||
if (auto superclassDecl = classDecl->getSuperclassDecl()) {
|
||||
// If the superclass is an actor, we inherit its default-actor-ness.
|
||||
if (superclassDecl->isActor())
|
||||
return superclassDecl->isDefaultActor();
|
||||
|
||||
// If the superclass is not an actor class, it can only be
|
||||
// If the superclass is not an actor, it can only be
|
||||
// a default actor if it's NSObject. (For now, other classes simply
|
||||
// can't be actors at all.) We don't need to diagnose this; we
|
||||
// should've done that already in isActor().
|
||||
@@ -522,7 +522,7 @@ GlobalActorAttributeRequest::evaluate(
|
||||
// Nominal types are okay...
|
||||
if (auto classDecl = dyn_cast<ClassDecl>(nominal)){
|
||||
if (classDecl->isActor()) {
|
||||
// ... except for actor classes.
|
||||
// ... except for actors.
|
||||
nominal->diagnose(diag::global_actor_on_actor_class, nominal->getName())
|
||||
.highlight(globalActorAttr->getRangeWithAt());
|
||||
return None;
|
||||
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
return data.actorType;
|
||||
}
|
||||
|
||||
/// Retrieve the actor class that the declaration is within.
|
||||
/// Retrieve the actor that the declaration is within.
|
||||
Type getGlobalActor() const {
|
||||
assert(kind == GlobalActor || kind == GlobalActorUnsafe);
|
||||
return Type(data.globalActor);
|
||||
|
||||
@@ -118,7 +118,7 @@ static void computeLoweredStoredProperties(NominalTypeDecl *decl) {
|
||||
}
|
||||
}
|
||||
|
||||
// If this is an actor class, check conformance to the Actor protocol to
|
||||
// If this is an actor, check conformance to the Actor protocol to
|
||||
// ensure that the actor storage will get created (if needed).
|
||||
if (auto classDecl = dyn_cast<ClassDecl>(decl)) {
|
||||
if (classDecl->isActor()) {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
import Swift
|
||||
@_implementationOnly import _SwiftConcurrencyShims
|
||||
|
||||
/// Common protocol to which all actor classes conform.
|
||||
/// Common protocol to which all actors conform.
|
||||
///
|
||||
/// The \c Actor protocol generalizes over all actor types. Actor types
|
||||
/// implicitly conform to this protocol.
|
||||
|
||||
@@ -85,7 +85,7 @@ static void run(llvm::function_ref<void()> fn) {
|
||||
|
||||
namespace {
|
||||
|
||||
/// A simple actor class.
|
||||
/// A simple actor.
|
||||
class TestActor : public DefaultActor {
|
||||
public:
|
||||
TestActor();
|
||||
|
||||
Reference in New Issue
Block a user