- Proposal: SE-NNNN
- Author: Karoy Lorentey, Alejandro Alonso
- Review Manager: TBD
- Bug: SR-9144
- Implementation: swiftlang/swift#68857
- Version: 2023-09-18
- Status: Awaiting review
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension KeyPathObject: CustomStringConvertible { | |
public var description: String { | |
let components = self.components | |
assert(heapObject.metadata.kind == .class, | |
"KeyPath class object that's not a class?") | |
let classMetadata = heapObject.metadata as! ClassMetadata | |
assert(classMetadata.genericTypes.count == 2, | |
"KeyPath type without 2 generic types? Root and Leaf?") | |
let root = classMetadata.genericTypes[0] |
- Proposal: SE-NNNN
- Author: Alejandro Alonso
- Review Manager: TBD
- Status: Awaiting review
- Implementation Equatable: apple/swift#28833
- Implementation Comparable: Coming Soon
- Implementation Hashable: Coming Soon
- Proposal: SE-NNNN
- Author: Alejandro Alonso
- Review Manager: TBD
- Status: Awaiting review
- Implementation: apple/swift#28555
- Previous Review: SE-0262 Demangle Function, Returned for Revision
- Proposal: SE-NNNN
- Author: Alejandro Alonso
- Review Manager: TBD
- Status: Awaiting Review
- Implementation: apple/swift#25263
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sil_stage canonical | |
import Builtin | |
import Swift | |
import SwiftShims | |
func x() | |
// main | |
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sil_stage canonical | |
import Builtin | |
import Swift | |
import SwiftShims | |
func x() | |
// main | |
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// macOS x86_64 syscall works as follows: | |
// Syscall id is moved into rax | |
// 1st argument is moved into rdi | |
// 2nd argument is moved into rsi | |
// 3rd argument is moved into rdx | |
// ... plus some more | |
// Return value is stored in rax (where we put syscall value) | |
// Mac syscall enum that contains the value to correctly call it | |
enum Syscall: Int { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Part one | |
let input = """ | |
""" | |
print(input.split(separator: "\n").map { | |
Int($0)! | |
}.reduce(0, +)) | |
// Part Two |
Hello Evolution,
I want to discuss where we are with the current memberwise initializer for structures and where I wish to see this initializer evolve.
Refer to SE-0018 and SE-0018 Rationale. I do not speak for the author here, but I'm rathering pulling ideas and references from SE-0018 to formulate this post.
NewerOlder