mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Fix typos in comments.
This commit is contained in:
@@ -187,7 +187,7 @@ static void emitDeallocatingCall(IRGenFunction &IGF, llvm::Constant *fn,
|
||||
void IRGenFunction::emitDeallocRawCall(llvm::Value *pointer,
|
||||
llvm::Value *size,
|
||||
llvm::Value *alignMask) {
|
||||
// For now, all we have is swift_slowDelloc.
|
||||
// For now, all we have is swift_slowDealloc.
|
||||
return emitDeallocatingCall(*this, IGM.getSlowDeallocFn(),
|
||||
{pointer, size, alignMask});
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@ SILValue RCIdentityFunctionInfo::stripRCIdentityPreservingArgs(SILValue V,
|
||||
continue;
|
||||
}
|
||||
|
||||
// Try to strip off the RCIdentityPresrvingArg for IV. If it matches
|
||||
// Try to strip off the RCIdentityPreservingArg for IV. If it matches
|
||||
// FirstIV, we may be able to succeed here.
|
||||
if (FirstIV == stripOneRCIdentityIncomingValue(A, IV))
|
||||
continue;
|
||||
|
||||
@@ -197,9 +197,9 @@ static void redirectTerminator(SILBasicBlock *Latch, unsigned CurLoopIter,
|
||||
// We can either have a split backedge as our latch terminator.
|
||||
// HeaderBlock:
|
||||
// ...
|
||||
// cond_br %cond, ExitBlock, BackegdeBlock
|
||||
// cond_br %cond, ExitBlock, BackedgeBlock
|
||||
//
|
||||
// BackegdeBlock:
|
||||
// BackedgeBlock:
|
||||
// br HeaderBlock:
|
||||
//
|
||||
// Or a conditional branch back to the header.
|
||||
|
||||
@@ -849,7 +849,7 @@ static bool tryToSinkRefCountInst(SILBasicBlock::iterator T,
|
||||
|
||||
// Ok, it is legal for us to sink this increment to our successors. Create a
|
||||
// copy of this instruction in each one of our successors unless they are
|
||||
// ignoreable trap blocks.
|
||||
// ignorable trap blocks.
|
||||
DEBUG(llvm::dbgs() << " Sinking " << *I);
|
||||
SILBuilderWithScope Builder(T, &*I);
|
||||
for (auto &Succ : T->getParent()->getSuccessors()) {
|
||||
|
||||
@@ -187,7 +187,7 @@ static bool isKnownFinalClass(ClassDecl *CD, SILModule &M,
|
||||
break;
|
||||
}
|
||||
|
||||
// Take the ClassHieararchyAnalysis into account.
|
||||
// Take the ClassHierarchyAnalysis into account.
|
||||
// If a given class has no subclasses and
|
||||
// - private
|
||||
// - or internal and it is a WMO compilation
|
||||
|
||||
@@ -270,7 +270,7 @@ bool swift::computeMayBindDynamicSelf(SILFunction *F) {
|
||||
}
|
||||
|
||||
/// Find a new position for an ApplyInst's FuncRef so that it dominates its
|
||||
/// use. Not that FuncionRefInsts may be shared by multiple ApplyInsts.
|
||||
/// use. Not that FunctionRefInsts may be shared by multiple ApplyInsts.
|
||||
void swift::placeFuncRef(ApplyInst *AI, DominanceInfo *DT) {
|
||||
FunctionRefInst *FuncRef = cast<FunctionRefInst>(AI->getCallee());
|
||||
SILBasicBlock *DomBB =
|
||||
|
||||
@@ -4395,7 +4395,7 @@ bool FailureDiagnosis::visitArrayExpr(ArrayExpr *E) {
|
||||
diagnose(E->getStartLoc(), diag::type_is_not_array, contextualType)
|
||||
.highlight(E->getSourceRange());
|
||||
|
||||
// If the contextual type conforms to DicitonaryLiteralConvertible, then
|
||||
// If the contextual type conforms to DictionaryLiteralConvertible, then
|
||||
// they wrote "x = [1,2]" but probably meant "x = [1:2]".
|
||||
if ((E->getElements().size() & 1) == 0 && !E->getElements().empty() &&
|
||||
isDictionaryLiteralCompatible(contextualType, CS, E->getLoc())) {
|
||||
|
||||
@@ -11,7 +11,7 @@ func test() {
|
||||
var color: ColorKind = CT_red
|
||||
var colo2: ColorType = CT_Red // FIXME: should provide Fix-It expected-error{{use of undeclared type 'ColorType'}}
|
||||
|
||||
// Typedef-of-anonymous-type-name renamming
|
||||
// Typedef-of-anonymous-type-name renaming
|
||||
var p = Point()
|
||||
var p2 = PointType() // FIXME: should provide Fix-It expected-error{{use of unresolved identifier 'PointType'}}
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ define void @dont_optimize_retain_unowned(%swift.refcounted* %A) {
|
||||
%value = bitcast %swift.refcounted* %A to i64**
|
||||
|
||||
%L1 = load i64*, i64** %value, align 8
|
||||
; Use of a potential garbabe address from a load of %A.
|
||||
; Use of a potential garbage address from a load of %A.
|
||||
%L2 = load i64, i64* %L1, align 8
|
||||
|
||||
tail call void @swift_release(%swift.refcounted* %A)
|
||||
|
||||
@@ -139,7 +139,7 @@ FloatLiteralConvertible {
|
||||
/// For other values of `x`, `x.significand` is defined as follows:
|
||||
///
|
||||
/// - If `x` is zero, then `x.significand` is 0.0.
|
||||
/// - If `x` is infinity, then `x.signficand` is 1.0.
|
||||
/// - If `x` is infinity, then `x.significand` is 1.0.
|
||||
/// - If `x` is NaN, then `x.significand` is NaN.
|
||||
///
|
||||
/// For all floating-point `x`, if we define y by:
|
||||
@@ -154,14 +154,14 @@ FloatLiteralConvertible {
|
||||
/// the payload of NaN are preserved.
|
||||
var significand: Self { get }
|
||||
|
||||
/// Combines a signbit, exponent, and signficand to produce a floating-point
|
||||
/// Combines a signbit, exponent, and significand to produce a floating-point
|
||||
/// datum.
|
||||
///
|
||||
/// In common usage, `significand` will generally be a number in the range
|
||||
/// `[1,2)`, but this is not required; the initializer supports any valid
|
||||
/// floating-point datum. The result is:
|
||||
///
|
||||
/// `(-1)^signbit * signficand * 2^exponent`
|
||||
/// `(-1)^signbit * significand * 2^exponent`
|
||||
///
|
||||
/// (where ^ denotes the mathematical operation of exponentiation) computed
|
||||
/// as if by a single correctly-rounded floating-point operation. If this
|
||||
@@ -529,12 +529,12 @@ public protocol BinaryFloatingPointType: FloatingPointType {
|
||||
|
||||
/// The least-magnitude member of the binade of `self`.
|
||||
///
|
||||
/// If `x` is `+/-signficand * 2^exponent`, then `x.binade` is
|
||||
/// If `x` is `+/-significand * 2^exponent`, then `x.binade` is
|
||||
/// `+/- 2^exponent`; i.e. the floating point number with the same sign
|
||||
/// and exponent, but a significand of 1.0.
|
||||
var binade: Self { get }
|
||||
|
||||
/// Combines a signbit, exponent and signficand bit patterns to produce a
|
||||
/// Combines a signbit, exponent and significand bit patterns to produce a
|
||||
/// floating-point datum. No error-checking is performed by this function;
|
||||
/// the bit patterns are simply concatenated to produce the floating-point
|
||||
/// encoding of the result.
|
||||
@@ -1032,7 +1032,7 @@ extension Float80 : BinaryFloatingPointType {
|
||||
// If the exponent is non-zero and the leading bit of the significand
|
||||
// is clear, then we have an invalid operand (unnormal, pseudo-inf, or
|
||||
// pseudo-nan). All of these are treated as NaN by the hardware, so
|
||||
// we make sure that bit of the signficand field is set.
|
||||
// we make sure that bit of the significand field is set.
|
||||
return _representation.explicitSignificand | Float80._quietBitMask
|
||||
}
|
||||
// Otherwise we always get the "right" significand by simply clearing the
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// This is safe, because once assigned, these variables cannot change their value.
|
||||
|
||||
// Helper function, which models an external functions with unknown side-effects.
|
||||
// It is calle just to trigger flushing of all known stored in LoadStore optimizations.
|
||||
// It is called just to trigger flushing of all known stored in LoadStore optimizations.
|
||||
@inline(never)
|
||||
func action() {
|
||||
print("")
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
// Two select_enum instructions must not be considered as the same "condition",
|
||||
// even if they have the same enum operand.
|
||||
// This test checks that SimplifyCFG does not remove a dominated terminater with
|
||||
// This test checks that SimplifyCFG does not remove a dominated terminator with
|
||||
// such a condition.
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// functions for the @thick, @thin, and @objc_metatype metatypes.
|
||||
//
|
||||
// This can occur if we do not properly mangle in the metatype representation
|
||||
// into the name of functions and thus reuse the incorrect already specisalized
|
||||
// into the name of functions and thus reuse the incorrect already specialized
|
||||
// method instead of the new specialized method.
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
@@ -12,7 +12,7 @@ import SwiftPrivate
|
||||
|
||||
// Extend LoggingSequence to shadow the new operation. When
|
||||
// requirements are added to a protocol 'P', there should be an
|
||||
// implementation in 'InstrumentedP' that does some bookeeping for
|
||||
// implementation in 'InstrumentedP' that does some bookkeeping for
|
||||
// testing (like counting calls to the operation) and then dispatches
|
||||
// to the same operation on its 'base' member. InstrumentedSequence
|
||||
// already contains implementations of all the SequenceType
|
||||
|
||||
Reference in New Issue
Block a user