Skip to content
This repository was archived by the owner on Apr 2, 2020. It is now read-only.

Conversation

@rintaro
Copy link
Member

@rintaro rintaro commented Jul 29, 2016

Depends on swiftlang/swift#3854

SE-0101 removes sizeof, sizeofValue and related functions from the stdlib.
This PR is migrating them to newly introduced MemoryLayout<T> values.


func doSomething(b: Int) {
a += strideof(b.dynamicType) //% self.expect("expr a", substrs=['Int', '= 1'])
a += MemoryLayout.of(b).stride //% self.expect("expr a", substrs=['Int', '= 1'])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this stride value means nothing here.
We might want to use simpler expression? e.g. a += 42

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I asked Jim and Sean about this test, and they suggested that we use a += b, as long as the test continues to pass.

@gribozavr
Copy link
Collaborator

Continuing in #39.

@gribozavr gribozavr closed this Jul 30, 2016
@rintaro rintaro deleted the SE-0101 branch August 1, 2016 07:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants