Skip to content

Commit 270f5c6

Browse files
Fix some typos (#117)
No public **source** code change, comments mostly. Co-authored-by: Yuta Saito <[email protected]>
1 parent f8916c6 commit 270f5c6

File tree

9 files changed

+16
-16
lines changed

9 files changed

+16
-16
lines changed

FuzzTesting/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This subdirectory contains some [libFuzzer](https://www.llvm.org/docs/LibFuzzer.
77
88
## Requirements
99

10-
- [Open Source Swift Toolchain](https://swift.org/install) - Xcode toolchain does not contain fuzzing supoort, so you need to install the open source toolchain.
10+
- [Open Source Swift Toolchain](https://swift.org/install) - Xcode toolchain does not contain fuzzing support, so you need to install the open source toolchain.
1111
- [wasm-tools](https://github.com/bytecodealliance/wasm-tools) - Required to generate random seed corpora
1212

1313
## libFuzzer-based Fuzzing Targets

Sources/SystemExtras/FileAtOperations.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ extension FileDescriptor {
271271
/// Create a symbolic link relative to a directory file descriptor
272272
///
273273
/// - Parameters:
274-
/// - original: The path to be refered by the created symbolic link.
274+
/// - original: The path to be referred by the created symbolic link.
275275
/// - link: The relative location of the symbolic link to create
276276
///
277277
/// The corresponding C function is `symlinkat`.
@@ -287,7 +287,7 @@ extension FileDescriptor {
287287
/// Create a symbolic link relative to a directory file descriptor
288288
///
289289
/// - Parameters:
290-
/// - original: The path to be refered by the created symbolic link.
290+
/// - original: The path to be referred by the created symbolic link.
291291
/// - link: The relative location of the symbolic link to create
292292
///
293293
/// The corresponding C function is `symlinkat`.

Sources/SystemExtras/Vendor/Exports.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ internal func system_platform_strlen(_ s: UnsafePointer<CInterop.PlatformChar>)
8080
#endif
8181
}
8282

83-
// Interop between String and platfrom string
83+
// Interop between String and platform string
8484
extension String {
8585
internal func _withPlatformString<Result>(
8686
_ body: (UnsafePointer<CInterop.PlatformChar>) throws -> Result

Sources/WASI/Platform/Entry.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ extension FdWASIEntry {
7878
try WASIAbi.FileType(platformFileType: self.fd.attributes().fileType)
7979
}
8080

81-
/// Returns the current file desciptor status
81+
/// Returns the current file descriptor status
8282
func status() throws -> WASIAbi.Fdflags {
8383
return try WASIAbi.Errno.translatingPlatformErrno {
8484
WASIAbi.Fdflags(platformOpenOptions: try self.fd.status())

Sources/WASI/Platform/SandboxPrimitives/Open.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ struct PathResolution {
4040
let options: FileDescriptor.OpenOptions
4141
let mode: FileDescriptor.AccessMode
4242
if !self.components.isEmpty {
43-
var intermediateOtions: FileDescriptor.OpenOptions = []
43+
var intermediateOptions: FileDescriptor.OpenOptions = []
4444

4545
#if !os(Windows)
4646
// When trying to open an intermediate directory,
4747
// we can assume it's directory.
48-
intermediateOtions.insert(.directory)
48+
intermediateOptions.insert(.directory)
4949
// FIXME: Resolve symlink in safe way
50-
intermediateOtions.insert(.noFollow)
50+
intermediateOptions.insert(.noFollow)
5151
#endif
52-
options = intermediateOtions
52+
options = intermediateOptions
5353
mode = .readOnly
5454
} else {
5555
options = self.options

Sources/WITOverlayGenerator/CanonicalABI/StaticCanonicalDeallocation.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ struct StaticCanonicalDeallocation: CanonicalDeallocation {
1515
pointer: Operand, length: Operand, element: WITType,
1616
deallocateElement: (Pointer) throws -> Void
1717
) throws {
18-
let deallocElemenetVar = builder.variable("deallocElement")
19-
printer.write(line: "let \(deallocElemenetVar): (UnsafeMutableRawPointer) -> Void = {")
18+
let deallocElementVar = builder.variable("deallocElement")
19+
printer.write(line: "let \(deallocElementVar): (UnsafeMutableRawPointer) -> Void = {")
2020
try printer.indent {
2121
printer.write(line: "_ = $0")
2222
try deallocateElement(.init(basePointerVar: "$0", offset: 0))
2323
}
2424
printer.write(line: "}")
2525
printer.write(
26-
line: "Prelude.deallocateList(pointer: \(pointer), length: \(length), elementSize: \(CanonicalABI.size(type: element)), deallocateElement: \(deallocElemenetVar))"
26+
line: "Prelude.deallocateList(pointer: \(pointer), length: \(length), elementSize: \(CanonicalABI.size(type: element)), deallocateElement: \(deallocElementVar))"
2727
)
2828
}
2929

Sources/WITOverlayGenerator/CanonicalABI/StaticCanonicalLowering.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ extension StaticCanonicalLowering {
188188
return .accessField(value, name: "bitPattern")
189189

190190
case (.i64, .i32), (.i64, .f32), (.f64, .i32), (.f64, .f32):
191-
fatalError("Should not trucate while casting")
191+
fatalError("Should not truncate while casting")
192192
}
193193
}
194194
}

Sources/WITOverlayGenerator/HostGenerators/HostExportFunction.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ struct HostExportFunction {
259259
let optionsVar = builder.variable("options")
260260
printer.write(line: "let \(optionsVar) = CanonicalOptions._derive(from: instance, exportName: \"\(name.abiName)\")")
261261
printer.write(line: "let \(context.contextVar) = CanonicalCallContext(options: \(optionsVar), instance: instance, runtime: runtime)")
262-
// Supress unused variable warning for "context"
262+
// Suppress unused variable warning for "context"
263263
printer.write(line: "_ = \(context.contextVar)")
264264

265265
let arguments = try printLowerArguments(

Tests/WITTests/Semantics/ValidationTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class ValidationTests: XCTestCase {
112112
type a = u8
113113
type b = a
114114
}
115-
// a shoud not be visible here
115+
// a should not be visible here
116116
type c = a
117117
}
118118
""",
@@ -130,7 +130,7 @@ class ValidationTests: XCTestCase {
130130
type a = u8
131131
type b = a
132132
}
133-
// a shoud not be visible here
133+
// a should not be visible here
134134
type c = a
135135
}
136136
""",

0 commit comments

Comments
 (0)