New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SE-0055: Making pointer nullability explicit #1878

Merged
merged 5 commits into from Apr 12, 2016

Conversation

Projects
None yet
8 participants
@jrose-apple
Member

jrose-apple commented Mar 25, 2016

What's in this pull request?

An implementation of SE-0055: Make unsafe pointer nullability explicit using Optional, which touches quite a few things across the compiler and standard library. I'm opening this pull request early even though the review session hasn't completed in anticipation of the proposal being accepted in some form.


Before merging this pull request to apple/swift repository:

  • The proposal needs to be accepted.
  • Tricky bits should be signed off by appropriate reviewers.
  • Test pull request on Swift continuous integration.
  • Have patches ready to go for the other projects (swiftpm, Foundation, etc)

Triggering Swift CI

The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
OS X platform @swift-ci Please test OS X platform
Linux platform @swift-ci Please test Linux platform

Note: Only members of the Apple organization can trigger swift-ci.

@jrose-apple jrose-apple self-assigned this Mar 26, 2016

// non-object, non-block pointers are never Optional in Swift; they
// just can have a value of 'nil' themselves.
hint = ImportHint::CustomNullablePointer;
} else if (type->isPointerType() || type->isBlockPointerType()) {

This comment has been minimized.

@jrose-apple

jrose-apple Mar 26, 2016

Member

Note for reviewers: the comment was wrong. Clang's isAnyPointerType includes pointers-to-ObjC-objects (covered above) and does not include block pointers.

@jrose-apple

jrose-apple Mar 26, 2016

Member

Note for reviewers: the comment was wrong. Clang's isAnyPointerType includes pointers-to-ObjC-objects (covered above) and does not include block pointers.

@jrose-apple

This comment has been minimized.

Show comment
Hide comment
@jrose-apple

jrose-apple Mar 26, 2016

Member

Review requests:

Member

jrose-apple commented Mar 26, 2016

Review requests:

(nil, nil, nil, nil)
}
var objects: [ObjectsBuffer]
var objects: [Unmanaged<AnyObject>?]

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

This code was using inline storage to prevent an extra allocation for the array. Could you change it back?

@gribozavr

gribozavr Mar 26, 2016

Collaborator

This code was using inline storage to prevent an extra allocation for the array. Could you change it back?

This comment has been minimized.

@jrose-apple

jrose-apple Mar 26, 2016

Member

I'm not sure what you mean. This is still inline storage.

@jrose-apple

jrose-apple Mar 26, 2016

Member

I'm not sure what you mean. This is still inline storage.

This comment has been minimized.

@jrose-apple

jrose-apple Mar 26, 2016

Member

Or do single-element arrays have some magic I don't know about?

@jrose-apple

jrose-apple Mar 26, 2016

Member

Or do single-element arrays have some magic I don't know about?

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Oh, sorry -- I didn't notice it was an array to begin with. I thought it used a struct of four pointers directly. Never mind then.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Oh, sorry -- I didn't notice it was an array to begin with. I thought it used a struct of four pointers directly. Never mind then.

This comment has been minimized.

@jrose-apple

jrose-apple Mar 28, 2016

Member

We could probably consider doing that (going back to that?), but I'd make it a separate patch.

@jrose-apple

jrose-apple Mar 28, 2016

Member

We could probably consider doing that (going back to that?), but I'd make it a separate patch.

Show outdated Hide outdated stdlib/public/SDK/Foundation/NSStringAPI.swift
) -> [String] {
var nsTokenRanges: NSArray? = nil
let result = tokenRanges._withBridgeObject(&nsTokenRanges) {
let op = {

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Why didn't you keep the _withBridgeObject API? You could add it to Optional.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Why didn't you keep the _withBridgeObject API? You could add it to Optional.

This comment has been minimized.

@jrose-apple

jrose-apple Mar 26, 2016

Member

I spent a good fifteen minutes trying to figure out what it did, and managed to replace all the similar APIs. I really think just expanding it out inline makes the code easier to read.

@jrose-apple

jrose-apple Mar 26, 2016

Member

I spent a good fifteen minutes trying to figure out what it did, and managed to replace all the similar APIs. I really think just expanding it out inline makes the code easier to read.

This comment has been minimized.

@dabrahams

dabrahams Mar 28, 2016

Member

@jrose-apple Making this instance easier to read is not good enough justification to repeat open-coded logic that is already encapsulated in an idiom we use throughout the library.

@dabrahams

dabrahams Mar 28, 2016

Member

@jrose-apple Making this instance easier to read is not good enough justification to repeat open-coded logic that is already encapsulated in an idiom we use throughout the library.

This comment has been minimized.

@jrose-apple

jrose-apple Mar 28, 2016

Member

I argue that it is a bad idiom, and that two tiny methods, each of which is only used twice, is not enough weight to be worth the encapsulation. Both instances of the related _withBridgeValue is easier to understand now; the two instances of _withBridgeObject are not quite as clear-cut but still seem like improvements to me. (At the very least my renamed helper function makes a lot more sense.)

@jrose-apple

jrose-apple Mar 28, 2016

Member

I argue that it is a bad idiom, and that two tiny methods, each of which is only used twice, is not enough weight to be worth the encapsulation. Both instances of the related _withBridgeValue is easier to understand now; the two instances of _withBridgeObject are not quite as clear-cut but still seem like improvements to me. (At the very least my renamed helper function makes a lot more sense.)

This comment has been minimized.

@jrose-apple

jrose-apple Mar 28, 2016

Member

The three of us talked about this offline. I'm going to take another look at the _withBridgeObject cases again to see if I can simplify the control flow, and I'll put back the helper method (with a better name) if I can't.

@jrose-apple

jrose-apple Mar 28, 2016

Member

The three of us talked about this offline. I'm going to take another look at the _withBridgeObject cases again to see if I can simplify the control flow, and I'll put back the helper method (with a better name) if I can't.

Show outdated Hide outdated stdlib/public/core/ArrayBuffer.swift
@@ -261,7 +261,7 @@ extension _ArrayBuffer {
// Tell Cocoa to copy the objects into our storage
cocoa.buffer.getObjects(
UnsafeMutablePointer(result.firstElementAddress),

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Seems like getObjects should accept an optional pointer, for the case when it is asked to copy zero objects.

Actually, you could add a fast path to the beginning of this function for that case. We shouldn't need to do a message send for that.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Seems like getObjects should accept an optional pointer, for the case when it is asked to copy zero objects.

Actually, you could add a fast path to the beginning of this function for that case. We shouldn't need to do a message send for that.

Show outdated Hide outdated stdlib/public/core/ArrayCast.swift
@@ -152,7 +156,7 @@ internal func _arrayConditionalBridgeElements<SourceElement, TargetElement>(
let buf = _ContiguousArrayBuffer<TargetElement>(
uninitializedCount: source.count, minimumCapacity: 0)
var p = buf.firstElementAddress
var p = buf.firstElementAddress!

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

subscriptBaseAddress?

@gribozavr

gribozavr Mar 26, 2016

Collaborator

subscriptBaseAddress?

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Actually, never mind. subscriptBaseAddress is adjusted for non-zero based indices of slices.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Actually, never mind. subscriptBaseAddress is adjusted for non-zero based indices of slices.

This comment has been minimized.

@jrose-apple

jrose-apple Mar 26, 2016

Member

I honestly wasn't sure when the distinction was important to the surrounding code. Do you want me to go back and reanalyze which ones make sense as firstElementAddress and which ones make sense as subscriptBaseAddress? If the rule is just "we're going to load from it unconditionally", then sure.

@jrose-apple

jrose-apple Mar 26, 2016

Member

I honestly wasn't sure when the distinction was important to the surrounding code. Do you want me to go back and reanalyze which ones make sense as firstElementAddress and which ones make sense as subscriptBaseAddress? If the rule is just "we're going to load from it unconditionally", then sure.

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

The rule is "we are going to load unconditionally" and "startIndex == 0". It is the latter part that makes the investigation tricky.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

The rule is "we are going to load unconditionally" and "startIndex == 0". It is the latter part that makes the investigation tricky.

This comment has been minimized.

@jrose-apple

jrose-apple Mar 28, 2016

Member

Right, I didn't want to use subscriptBaseAddress in ContiguousArray if the equivalent code in Slice couldn't.

@jrose-apple

jrose-apple Mar 28, 2016

Member

Right, I didn't want to use subscriptBaseAddress in ContiguousArray if the equivalent code in Slice couldn't.

This comment has been minimized.

@gribozavr

gribozavr Mar 28, 2016

Collaborator

Why not? To create more diamonds in the CFG for the optimizer?

@gribozavr

gribozavr Mar 28, 2016

Collaborator

Why not? To create more diamonds in the CFG for the optimizer?

This comment has been minimized.

@jrose-apple

jrose-apple Mar 28, 2016

Member

Dmitri, Dave, and I talked about this offline and we decided I should make firstElementAddress non-optional, replacing any potentially-nil pointers with the base address of the shared empty array.

@jrose-apple

jrose-apple Mar 28, 2016

Member

Dmitri, Dave, and I talked about this offline and we decided I should make firstElementAddress non-optional, replacing any potentially-nil pointers with the base address of the shared empty array.

Show outdated Hide outdated stdlib/public/core/ArrayCast.swift
@@ -170,7 +174,7 @@ ElementwiseBridging:
while false
// Don't destroy anything we never created.
buf.count = p - buf.firstElementAddress
buf.count = p - buf.firstElementAddress!

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

subscriptBaseAddress?

@gribozavr

gribozavr Mar 26, 2016

Collaborator

subscriptBaseAddress?

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Seems like this is a pattern, would you mind trying it everywhere?

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Seems like this is a pattern, would you mind trying it everywhere?

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Actually, never mind. subscriptBaseAddress is adjusted for non-zero based indices of slices.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Actually, never mind. subscriptBaseAddress is adjusted for non-zero based indices of slices.

/// Explicit construction from an UnsafeMutablePointer.
///
/// This is inherently unsafe; UnsafeMutablePointer assumes the
/// referenced memory has +1 strong ownership semantics, whereas

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

UMP does not assume +1.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

UMP does not assume +1.

This comment has been minimized.

@jrose-apple

jrose-apple Mar 26, 2016

Member

It does if it refers to something retain-counted and you try to store to it.

@jrose-apple

jrose-apple Mar 26, 2016

Member

It does if it refers to something retain-counted and you try to store to it.

This comment has been minimized.

@jrose-apple

jrose-apple Mar 26, 2016

Member

Maybe that just falls out of the language rules, but it's worth calling out in some form. (I didn't write this text; it's copied from the initializer above.)

@jrose-apple

jrose-apple Mar 26, 2016

Member

Maybe that just falls out of the language rules, but it's worth calling out in some form. (I didn't write this text; it's copied from the initializer above.)

Show outdated Hide outdated stdlib/public/core/CocoaArray.swift
// This function currently returns nil unless the first
// subRange.endIndex items are stored contiguously. This is an
// acceptable conservative behavior, but could potentially be
// optimized for other cases.
let contiguousCount = withUnsafeMutablePointer(&enumerationState) {
self.buffer.countByEnumeratingWith($0, objects: nil, count: 0)
self.buffer.countByEnumeratingWith(
$0, objects: &dummyBuffer, count: 0)

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

We shouldn't need to pass a dummy buffer here. The function should be annotated as accepting an optional.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

We shouldn't need to pass a dummy buffer here. The function should be annotated as accepting an optional.

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

I am concerned by the array allocation.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

I am concerned by the array allocation.

This comment has been minimized.

@jrose-apple

jrose-apple Mar 26, 2016

Member

It's not something that's normally invoked by hand, so I don't consider it important to fix. (This is the implementation behind ObjC for-in loops.)

@jrose-apple

jrose-apple Mar 26, 2016

Member

It's not something that's normally invoked by hand, so I don't consider it important to fix. (This is the implementation behind ObjC for-in loops.)

This comment has been minimized.

@jrose-apple

jrose-apple Mar 26, 2016

Member

(It's also part of Foundation, and I didn't want more dependencies.)

@jrose-apple

jrose-apple Mar 26, 2016

Member

(It's also part of Foundation, and I didn't want more dependencies.)

This comment has been minimized.

@jrose-apple

jrose-apple Mar 26, 2016

Member

I would also expect the array allocation to be a mere retain and release, since it's an empty array. But I could pass a dummy address here instead.

@jrose-apple

jrose-apple Mar 26, 2016

Member

I would also expect the array allocation to be a mere retain and release, since it's an empty array. But I could pass a dummy address here instead.

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

And it is not the implementation of ObjC for-in loops, it is contiguousStorage, which is called from a subscript in stdlib/public/core/ArrayBuffer.swift.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

And it is not the implementation of ObjC for-in loops, it is contiguousStorage, which is called from a subscript in stdlib/public/core/ArrayBuffer.swift.

This comment has been minimized.

@jrose-apple

jrose-apple Mar 28, 2016

Member

The shadow protocols are all supposed to match their original forms unless explicitly specified otherwise, and a mismatch in nullability seems dangerous.

(original method)

@jrose-apple

jrose-apple Mar 28, 2016

Member

The shadow protocols are all supposed to match their original forms unless explicitly specified otherwise, and a mismatch in nullability seems dangerous.

(original method)

This comment has been minimized.

@gribozavr

gribozavr Mar 28, 2016

Collaborator

So why can't we explicitly deviate from the original form? It is not like Foundation can change the behavior here -- there are a lot of Swift programs out there that already pass nil here.

I just don't see a reason to create more code for the optimizer to work with, and even possibly introducing a performance regression.

@gribozavr

gribozavr Mar 28, 2016

Collaborator

So why can't we explicitly deviate from the original form? It is not like Foundation can change the behavior here -- there are a lot of Swift programs out there that already pass nil here.

I just don't see a reason to create more code for the optimizer to work with, and even possibly introducing a performance regression.

This comment has been minimized.

@jrose-apple

jrose-apple Mar 28, 2016

Member

there are a lot of Swift programs out there that already pass nil here

Evidence? Because that's pretty disconcerting. Foundation could certainly change their behavior for new programs. They're unlikely to, but we should not rely on that. "This has always worked in the past" is not a valid reason to violate documented nullability constraints.

@jrose-apple

jrose-apple Mar 28, 2016

Member

there are a lot of Swift programs out there that already pass nil here

Evidence? Because that's pretty disconcerting. Foundation could certainly change their behavior for new programs. They're unlikely to, but we should not rely on that. "This has always worked in the past" is not a valid reason to violate documented nullability constraints.

This comment has been minimized.

@gribozavr

gribozavr Mar 28, 2016

Collaborator

Evidence?

This code in the current and all past versions of the library.

@gribozavr

gribozavr Mar 28, 2016

Collaborator

Evidence?

This code in the current and all past versions of the library.

Show outdated Hide outdated stdlib/public/core/ContiguousArrayBuffer.swift
@@ -256,7 +256,7 @@ public struct _ContiguousArrayBuffer<Element> : _ArrayBufferProtocol {
/// If the elements are stored contiguously, a pointer to the first
/// element. Otherwise, `nil`.
public var firstElementAddress: UnsafeMutablePointer<Element> {
public var firstElementAddress: UnsafeMutablePointer<Element>? {

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Isn't this always non-nil?

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Isn't this always non-nil?

This comment has been minimized.

@jrose-apple

jrose-apple Mar 26, 2016

Member

Unfortunately a non-Optional property will not satisfy an Optional protocol requirement.

@jrose-apple

jrose-apple Mar 26, 2016

Member

Unfortunately a non-Optional property will not satisfy an Optional protocol requirement.

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Oh, is there a bug for this?

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Oh, is there a bug for this?

This comment has been minimized.

@jrose-apple

jrose-apple Mar 28, 2016

Member

I think it falls under rdar://problem/17906373 [Protocol conformance] Allow a witness whose type is a subtype of the corresponding requirement's type.

@jrose-apple

jrose-apple Mar 28, 2016

Member

I think it falls under rdar://problem/17906373 [Protocol conformance] Allow a witness whose type is a subtype of the corresponding requirement's type.

This comment has been minimized.

@jckarter

jckarter Mar 28, 2016

Member

It might be better to define firstElementAddress in terms of a non-optional internal property to satisfy the conformance while allowing the implementation to directly use the non-optional property.

@jckarter

jckarter Mar 28, 2016

Member

It might be better to define firstElementAddress in terms of a non-optional internal property to satisfy the conformance while allowing the implementation to directly use the non-optional property.

Show outdated Hide outdated stdlib/public/core/HashedCollections.swift.gyb
) {
bridgeEverything()
// The user is expected to provide a buffer of the correct size
var i = 0 // Position in the input buffer
var position = 0 // Position in the dictionary storage
let capacity = bridgedNativeStorage.capacity
let count = bridgedNativeStorage.capacity

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Please keep capacity as the variable name. count implies that we have that many entries in the hash table. In reality, there can be no entries while capacity is non-zero.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Please keep capacity as the variable name. count implies that we have that many entries in the hash table. In reality, there can be no entries while capacity is non-zero.

This comment has been minimized.

@jrose-apple

jrose-apple Mar 26, 2016

Member

Good catch. I think I misread the loops below and thought it actually was a count.

@jrose-apple

jrose-apple Mar 26, 2016

Member

Good catch. I think I misread the loops below and thought it actually was a count.

Show outdated Hide outdated stdlib/public/core/HashedCollections.swift.gyb
unmanagedObjects[i] = bridgedNativeStorage.value(at: position)
unmanagedKeys[i] = bridgedNativeStorage.key(at: position)
unmanagedObjects![i] = bridgedNativeStorage.value(at: position)
unmanagedKeys![i] = bridgedNativeStorage.key(at: position)

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Do you really want to check every time around the loop? Maybe hoist the check out?

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Do you really want to check every time around the loop? Maybe hoist the check out?

@_transparent
@warn_unused_result
public // COMPILER_INTRINSIC
func _convertConstArrayToPointerArgument<

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Please add unit tests for the new behavior.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Please add unit tests for the new behavior.

desired: OpaquePointer?) -> Bool {
// Bit-cast directly from 'OpaquePointer?' to 'Builtin.Word' because
// Builtin.RawPointer can't be nil.

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

SE-0016?

@gribozavr

gribozavr Mar 26, 2016

Collaborator

SE-0016?

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

You can implement it in underscore land for now.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

You can implement it in underscore land for now.

Show outdated Hide outdated stdlib/public/core/Runtime.swift.gyb
target._rawValue,
unsafeBitCast(expected.pointee, to: Builtin.Word.self),
unsafeBitCast(desired, to: Builtin.Word.self))
expected.pointee = unsafeBitCast(oldValue, to: Optional<OpaquePointer>.self)

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Why not the bitPattern initializer?

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Why not the bitPattern initializer?

Show outdated Hide outdated test/1_stdlib/Runtime.swift
var mirror = Mirror(reflecting: sequence)
var child = mirror.children.first!
expectEqual("(Opaque Value)", "\(child.1)")
}

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Why not keep the test?

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Why not keep the test?

This comment has been minimized.

@jrose-apple

jrose-apple Mar 28, 2016

Member

I couldn't figure out a way to write it that wasn't vacuously true or immediately undefined behavior.

@jrose-apple

jrose-apple Mar 28, 2016

Member

I couldn't figure out a way to write it that wasn't vacuously true or immediately undefined behavior.

This comment has been minimized.

@gribozavr

gribozavr Mar 28, 2016

Collaborator

var sequence: OpaquePointer? = nil

@gribozavr

gribozavr Mar 28, 2016

Collaborator

var sequence: OpaquePointer? = nil

This comment has been minimized.

@jrose-apple

jrose-apple Mar 28, 2016

Member

Yes, but the mirror reflecting that isn't testing anything new. I guess it's still a likely input, though.

@jrose-apple

jrose-apple Mar 28, 2016

Member

Yes, but the mirror reflecting that isn't testing anything new. I guess it's still a likely input, though.

/// different from that to which it was initialized is undefined.
@_transparent
public init?<U>(_ from : UnsafeMutablePointer<U>?) {
guard let unwrapped = from else { return nil }

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Please add tests for new APIs and tests for new behavior in existing initializers.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Please add tests for new APIs and tests for new behavior in existing initializers.

This comment has been minimized.

@jrose-apple

jrose-apple Mar 28, 2016

Member

Yep, next commit. Deliberately not in this commit so that people can ignore test changes if they want.

@jrose-apple

jrose-apple Mar 28, 2016

Member

Yep, next commit. Deliberately not in this commit so that people can ignore test changes if they want.

@@ -73,29 +73,29 @@ func test_pointer() {
var f: CFloat = 0
var fa: [CFloat] = [1, 2, 3]
param_pointer(nil as UnsafeMutablePointer<CInt>)
param_pointer(nil as UnsafeMutablePointer<CInt>?)
param_pointer(&i)
param_pointer(&ia)

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

You probably want to add tests for annotated non-nullable pointers.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

You probably want to add tests for annotated non-nullable pointers.

Show outdated Hide outdated test/Parse/pointer_conversion.swift
func takesConstInt8Pointer(x: UnsafePointer<Int8>?) {}
func takesConstUInt8Pointer(x: UnsafePointer<UInt8>?) {}
func takesConstVoidPointer(x: UnsafePointer<Void>?) {}
func takesAutoreleasingPointer(x: AutoreleasingUnsafeMutablePointer<C>?) {}

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Tests for non-optional pointers?

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Tests for non-optional pointers?

Show outdated Hide outdated test/PrintAsObjC/classes.swift
// CHECK-NEXT: init
// CHECK-NEXT: @end
@objc class MethodsWithPointers {
func test(a: UnsafeMutablePointer<Int>) -> UnsafeMutablePointer<AnyObject> { return nil }
func test(a: UnsafeMutablePointer<Int>) -> UnsafeMutablePointer<AnyObject> {

This comment has been minimized.

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Tests for optional pointers?

@gribozavr

gribozavr Mar 26, 2016

Collaborator

Tests for optional pointers?

Show outdated Hide outdated stdlib/public/core/ContiguousArrayBuffer.swift
@@ -323,7 +323,7 @@ public struct _ContiguousArrayBuffer<Element> : _ArrayBufferProtocol {
@warn_unused_result
func getElement(i: Int) -> Element {
_sanityCheck(i >= 0 && i < count, "Array index out of range")
return firstElementAddress[i]
return firstElementAddress![i]

This comment has been minimized.

@gribozavr

gribozavr Mar 28, 2016

Collaborator

subscriptBaseAddress[i]

@gribozavr

gribozavr Mar 28, 2016

Collaborator

subscriptBaseAddress[i]

Show outdated Hide outdated stdlib/public/core/ContiguousArrayBuffer.swift
nv = firstElementAddress[i]
firstElementAddress[i] = tmp
nv = firstElementAddress![i]
firstElementAddress![i] = tmp

This comment has been minimized.

@gribozavr

gribozavr Mar 28, 2016

Collaborator

subscriptBaseAddress[i]

@gribozavr

gribozavr Mar 28, 2016

Collaborator

subscriptBaseAddress[i]

@jopamer

This comment has been minimized.

Show comment
Hide comment
@jopamer

jopamer Mar 29, 2016

Contributor

Sema changes look good to me.

Contributor

jopamer commented Mar 29, 2016

Sema changes look good to me.

@jrose-apple

This comment has been minimized.

Show comment
Hide comment
@jrose-apple

jrose-apple Mar 30, 2016

Member

@swift-ci Please benchmark

Member

jrose-apple commented Mar 30, 2016

@swift-ci Please benchmark

@swift-ci

This comment has been minimized.

Show comment
Hide comment
@swift-ci

swift-ci Mar 30, 2016

Contributor

Build comment file:

Optimized (O)

Regression (0)

Improvement (1)

TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
PopFrontArrayGeneric 1237 1132 -8.5% 1.09x

No Changes (114)

TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
Array2D 2100 1991 -5.2% 1.05x
SetIntersect_OfObjects 3412 3243 -5.0% 1.05x(?)
ObjectiveCBridgeToNSDictionary 16176 15342 -5.2% 1.05x(?)
ErrorHandling 2817 2773 -1.6% 1.02x
NSDictionaryCastToSwift 10796 10625 -1.6% 1.02x(?)
ObjectiveCBridgeFromNSSetAnyObjectToString 187717 183178 -2.4% 1.02x(?)
DictionaryBridge 3738 3703 -0.9% 1.01x(?)
ObjectiveCBridgeFromNSDictionaryAnyObject 221048 218925 -1.0% 1.01x(?)
ObjectAllocation 142 141 -0.7% 1.01x(?)
StrComplexWalk 2754 2721 -1.2% 1.01x(?)
NSError 355 353 -0.6% 1.01x(?)
SetExclusiveOr_OfObjects 12648 12562 -0.7% 1.01x(?)
ObjectiveCBridgeStubFromArrayOfNSString 106926 105437 -1.4% 1.01x(?)
ObjectiveCBridgeToNSString 1034 1033 -0.1% 1.00x(?)
StackPromo 20600 20602 +0.0% 1.00x(?)
PopFrontArray 1224 1224 +0.0% 1.00x
RecursiveOwnedParameter 1829 1829 +0.0% 1.00x
ObjectiveCBridgeStubToNSString 1371 1370 -0.1% 1.00x
ClassArrayGetter 12 12 +0.0% 1.00x
Histogram 654 654 +0.0% 1.00x
SortStrings 1650 1650 +0.0% 1.00x
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 4496 4508 +0.3% 1.00x(?)
MonteCarloPi 42554 42568 +0.0% 1.00x
StringWithCString 80988 81015 +0.0% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 3789 3794 +0.1% 1.00x(?)
ObjectiveCBridgeFromNSStringForced 2133 2141 +0.4% 1.00x(?)
SortLettersInPlace 1006 1001 -0.5% 1.00x
ArrayOfGenericPOD 208 208 +0.0% 1.00x
Dictionary3OfObjects 1246 1247 +0.1% 1.00x
SetUnion_OfObjects 10317 10284 -0.3% 1.00x(?)
RangeAssignment 278 278 +0.0% 1.00x
ByteSwap 1 1 +0.0% 1.00x
SuperChars 503214 503261 +0.0% 1.00x(?)
XorLoop 358 359 +0.3% 1.00x
StringInterpolation 9971 9940 -0.3% 1.00x(?)
Integrate 225 225 +0.0% 1.00x
ObjectiveCBridgeStubFromNSStringRef 327 327 +0.0% 1.00x
ObjectiveCBridgeStubFromNSString 704 705 +0.1% 1.00x(?)
ProtocolDispatch 2870 2871 +0.0% 1.00x(?)
TypeFlood 0 0 +0.0% 1.00x
ObjectiveCBridgeFromNSSetAnyObject 111691 112104 +0.4% 1.00x(?)
AngryPhonebook 0 0 +0.0% 1.00x
ProtocolDispatch2 151 151 +0.0% 1.00x
Walsh 309 309 +0.0% 1.00x
Dictionary3 741 743 +0.3% 1.00x(?)
Dictionary2 2357 2357 +0.0% 1.00x
Join 403 404 +0.2% 1.00x(?)
ObjectiveCBridgeToNSArray 29092 29175 +0.3% 1.00x(?)
DictionaryOfObjects 2766 2763 -0.1% 1.00x(?)
PopFrontUnsafePointer 8502 8502 +0.0% 1.00x
CaptureProp 4594 4596 +0.0% 1.00x(?)
PolymorphicCalls 61 61 +0.0% 1.00x
Calculator 34 34 +0.0% 1.00x
MapReduce 324 324 +0.0% 1.00x
DictionaryLiteral 3234 3248 +0.4% 1.00x(?)
Hanoi 3296 3289 -0.2% 1.00x(?)
OpenClose 48 48 +0.0% 1.00x
DictionaryRemoveOfObjects 22568 22552 -0.1% 1.00x(?)
UTF8Decode 268 268 +0.0% 1.00x
Dictionary 962 963 +0.1% 1.00x(?)
NopDeinit 34591 34602 +0.0% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObject 61450 61506 +0.1% 1.00x(?)
SetIntersect 1305 1304 -0.1% 1.00x
SetExclusiveOr 3724 3719 -0.1% 1.00x(?)
RGBHistogramOfObjects 24075 24152 +0.3% 1.00x(?)
StrToInt 5225 5229 +0.1% 1.00x(?)
ObjectiveCBridgeFromNSString 1512 1516 +0.3% 1.00x(?)
Phonebook 10438 10443 +0.1% 1.00x(?)
Sim2DArray 401 401 +0.0% 1.00x
MonteCarloE 10022 10030 +0.1% 1.00x(?)
114 2550512 2556747 +0.2% 1.00x
GlobalClass 0 0 +0.0% 1.00x
HashTest 1770 1770 +0.0% 1.00x
SetIsSubsetOf_OfObjects 614 613 -0.2% 1.00x
ArrayAppend 730 729 -0.1% 1.00x(?)
LinkedList 8988 8986 -0.0% 1.00x(?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 112227 112427 +0.2% 1.00x(?)
NSStringConversion 613 613 +0.0% 1.00x
RGBHistogram 3462 3455 -0.2% 1.00x(?)
ObjectiveCBridgeFromNSSetAnyObjectForced 4194 4203 +0.2% 1.00x(?)
ArrayValueProp4 5 5 +0.0% 1.00x
ArrayOfPOD 172 172 +0.0% 1.00x
SetUnion 3303 3312 +0.3% 1.00x(?)
Chars 655 657 +0.3% 1.00x
StringBuilder 1383 1383 +0.0% 1.00x
DeadArray 172 172 +0.0% 1.00x
BitCount 1 1 +0.0% 1.00x
ArrayLiteral 973 975 +0.2% 1.00x
SevenBoom 1285 1280 -0.4% 1.00x(?)
StringWalk 6341 6332 -0.1% 1.00x
ArrayValueProp 5 5 +0.0% 1.00x
RC4 268 268 +0.0% 1.00x
Memset 222 222 +0.0% 1.00x
Dictionary2OfObjects 3921 3914 -0.2% 1.00x(?)
ArrayAppendReserved 507 507 +0.0% 1.00x
TwoSum 1716 1708 -0.5% 1.00x(?)
ArrayValueProp2 5 5 +0.0% 1.00x
ArrayValueProp3 5 5 +0.0% 1.00x
ArraySubscript 1344 1354 +0.7% 0.99x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 154587 155897 +0.8% 0.99x(?)
Prims 753 760 +0.9% 0.99x(?)
StaticArray 2691 2716 +0.9% 0.99x(?)
ArrayOfRef 3388 3423 +1.0% 0.99x
ObjectiveCBridgeToNSSet 15412 15578 +1.1% 0.99x(?)
ArrayOfGenericRef 3438 3478 +1.2% 0.99x
DictionarySwapOfObjects 7654 7824 +2.2% 0.98x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 201586 205417 +1.9% 0.98x(?)
DictionarySwap 690 705 +2.2% 0.98x(?)
ObjectiveCBridgeStubToArrayOfNSString 28966 29570 +2.1% 0.98x
DictionaryRemove 4670 4747 +1.6% 0.98x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 126199 130876 +3.7% 0.96x
SetIsSubsetOf 476 495 +4.0% 0.96x
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 154618 160432 +3.8% 0.96x(?)
ArrayInClass 60 63 +5.0% 0.95x(?)
**Unoptimized (Onone)**

Regression (0)

Improvement (0)

No Changes (115)

TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 213259 208723 -2.1% 1.02x(?)
StaticArray 17139 16881 -1.5% 1.02x
DictionaryLiteral 20427 20043 -1.9% 1.02x(?)
ObjectiveCBridgeFromNSSetAnyObjectForced 7446 7291 -2.1% 1.02x
ObjectiveCBridgeToNSString 1047 1037 -1.0% 1.01x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 156506 155519 -0.6% 1.01x(?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 6997 6962 -0.5% 1.01x(?)
ObjectiveCBridgeFromNSStringForced 2541 2526 -0.6% 1.01x
ObjectiveCBridgeFromNSDictionaryAnyObject 231436 229280 -0.9% 1.01x(?)
SuperChars 679150 675129 -0.6% 1.01x(?)
ErrorHandling 7135 7035 -1.4% 1.01x(?)
ProtocolDispatch 4870 4839 -0.6% 1.01x
ObjectiveCBridgeFromNSSetAnyObject 118008 116992 -0.9% 1.01x(?)
DictionaryOfObjects 7085 6996 -1.3% 1.01x(?)
PolymorphicCalls 1112 1096 -1.4% 1.01x(?)
NopDeinit 56230 55938 -0.5% 1.01x
Phonebook 58493 58071 -0.7% 1.01x(?)
LinkedList 26401 26259 -0.5% 1.01x(?)
StringBuilder 8070 8016 -0.7% 1.01x(?)
BitCount 76 75 -1.3% 1.01x
ArraySubscript 4485 4488 +0.1% 1.00x(?)
DictionarySwapOfObjects 25760 25714 -0.2% 1.00x(?)
StackPromo 80372 80222 -0.2% 1.00x(?)
PopFrontArray 12187 12203 +0.1% 1.00x(?)
RecursiveOwnedParameter 10310 10330 +0.2% 1.00x(?)
ObjectiveCBridgeStubToNSString 1672 1668 -0.2% 1.00x(?)
ClassArrayGetter 1267 1265 -0.2% 1.00x(?)
Array2D 698552 698878 +0.1% 1.00x(?)
Histogram 13755 13799 +0.3% 1.00x(?)
SortStrings 5661 5667 +0.1% 1.00x(?)
DictionaryBridge 3808 3808 +0.0% 1.00x
ArrayOfGenericPOD 3236 3238 +0.1% 1.00x(?)
StringWithCString 533165 533260 +0.0% 1.00x(?)
Prims 13650 13660 +0.1% 1.00x(?)
SortLettersInPlace 2309 2305 -0.2% 1.00x
DictionarySwap 11725 11724 -0.0% 1.00x(?)
Dictionary3OfObjects 2729 2737 +0.3% 1.00x(?)
SetUnion_OfObjects 51322 51300 -0.0% 1.00x(?)
RangeAssignment 15703 15668 -0.2% 1.00x(?)
ByteSwap 9 9 +0.0% 1.00x
XorLoop 18447 18441 -0.0% 1.00x(?)
StringInterpolation 12652 12603 -0.4% 1.00x(?)
Integrate 341 341 +0.0% 1.00x
ObjectiveCBridgeStubFromNSStringRef 652 651 -0.1% 1.00x(?)
ObjectiveCBridgeStubFromNSString 1121 1122 +0.1% 1.00x(?)
ObjectAllocation 1295 1297 +0.1% 1.00x(?)
ArrayLiteral 1036 1036 +0.0% 1.00x
ProtocolDispatch2 416 416 +0.0% 1.00x
Walsh 12250 12234 -0.1% 1.00x(?)
Dictionary3 2094 2095 +0.1% 1.00x(?)
Dictionary2 5030 5029 -0.0% 1.00x(?)
StrComplexWalk 7573 7567 -0.1% 1.00x(?)
SetIntersect_OfObjects 18957 18953 -0.0% 1.00x(?)
Join 1332 1331 -0.1% 1.00x
ArrayOfRef 9923 9924 +0.0% 1.00x(?)
PopFrontArrayGeneric 12380 12403 +0.2% 1.00x(?)
CaptureProp 53358 53259 -0.2% 1.00x(?)
Calculator 906 906 +0.0% 1.00x
MapReduce 45089 44873 -0.5% 1.00x(?)
Hanoi 22635 22616 -0.1% 1.00x(?)
DictionaryRemoveOfObjects 61002 60942 -0.1% 1.00x(?)
UTF8Decode 39361 39324 -0.1% 1.00x(?)
SetIsSubsetOf 2977 2974 -0.1% 1.00x(?)
Dictionary 4417 4424 +0.2% 1.00x
ObjectiveCBridgeFromNSArrayAnyObject 65614 65404 -0.3% 1.00x(?)
SetIntersect 18888 18857 -0.2% 1.00x(?)
SetExclusiveOr 48711 48812 +0.2% 1.00x(?)
RGBHistogramOfObjects 97858 97610 -0.2% 1.00x(?)
StrToInt 18734 18705 -0.1% 1.00x(?)
ArrayInClass 3646 3648 +0.1% 1.00x(?)
ArrayOfGenericRef 10554 10575 +0.2% 1.00x(?)
ObjectiveCBridgeFromNSString 4864 4850 -0.3% 1.00x
Sim2DArray 13145 13141 -0.0% 1.00x
SetExclusiveOr_OfObjects 66999 66990 -0.0% 1.00x(?)
MonteCarloPi 50360 50364 +0.0% 1.00x(?)
MonteCarloE 98784 98789 +0.0% 1.00x(?)
114 5419340 5400253 -0.3% 1.00x
GlobalClass 0 0 +0.0% 1.00x
HashTest 5827 5827 +0.0% 1.00x
SetIsSubsetOf_OfObjects 2851 2852 +0.0% 1.00x(?)
ArrayAppend 2846 2847 +0.0% 1.00x(?)
DictionaryRemove 30381 30326 -0.2% 1.00x(?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 121534 121539 +0.0% 1.00x(?)
NSStringConversion 2592 2582 -0.4% 1.00x(?)
RGBHistogram 49640 49808 +0.3% 1.00x(?)
ArrayValueProp4 2504 2505 +0.0% 1.00x(?)
ArrayOfPOD 2257 2257 +0.0% 1.00x
SetUnion 34938 34793 -0.4% 1.00x
Chars 54471 54507 +0.1% 1.00x(?)
AngryPhonebook 3502 3501 -0.0% 1.00x(?)
SevenBoom 1426 1430 +0.3% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 156253 155803 -0.3% 1.00x(?)
StringWalk 48861 48856 -0.0% 1.00x(?)
ArrayValueProp 2206 2212 +0.3% 1.00x
RC4 8800 8802 +0.0% 1.00x(?)
Memset 20646 20649 +0.0% 1.00x(?)
Dictionary2OfObjects 6775 6762 -0.2% 1.00x(?)
ArrayAppendReserved 2615 2611 -0.1% 1.00x(?)
TwoSum 9228 9216 -0.1% 1.00x(?)
ArrayValueProp2 18285 18294 +0.1% 1.00x(?)
ArrayValueProp3 2546 2551 +0.2% 1.00x(?)
ObjectiveCBridgeToNSSet 16104 16338 +1.4% 0.99x(?)
ObjectiveCBridgeToNSArray 29436 29590 +0.5% 0.99x(?)
NSError 647 656 +1.4% 0.99x(?)
PopFrontUnsafePointer 93929 95357 +1.5% 0.99x(?)
OpenClose 434 438 +0.9% 0.99x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 130679 131547 +0.7% 0.99x(?)
NSDictionaryCastToSwift 11834 11907 +0.6% 0.99x(?)
ObjectiveCBridgeFromNSSetAnyObjectToString 197857 199806 +1.0% 0.99x(?)
DeadArray 113722 115389 +1.5% 0.99x(?)
ObjectiveCBridgeStubFromArrayOfNSString 107637 108472 +0.8% 0.99x(?)
TypeFlood 148 151 +2.0% 0.98x(?)
ObjectiveCBridgeStubToArrayOfNSString 29497 29958 +1.6% 0.98x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 6991 7243 +3.6% 0.97x(?)
ObjectiveCBridgeToNSDictionary 15684 16202 +3.3% 0.97x(?)
**Hardware Overview** Model Name: Mac mini Model Identifier: Macmini7,1 Processor Name: Intel Core i7 Processor Speed: 3 GHz Number of Processors: 1 Total Number of Cores: 2 L2 Cache (per Core): 256 KB L3 Cache: 4 MB Memory: 16 GB
Contributor

swift-ci commented Mar 30, 2016

Build comment file:

Optimized (O)

Regression (0)

Improvement (1)

TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
PopFrontArrayGeneric 1237 1132 -8.5% 1.09x

No Changes (114)

TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
Array2D 2100 1991 -5.2% 1.05x
SetIntersect_OfObjects 3412 3243 -5.0% 1.05x(?)
ObjectiveCBridgeToNSDictionary 16176 15342 -5.2% 1.05x(?)
ErrorHandling 2817 2773 -1.6% 1.02x
NSDictionaryCastToSwift 10796 10625 -1.6% 1.02x(?)
ObjectiveCBridgeFromNSSetAnyObjectToString 187717 183178 -2.4% 1.02x(?)
DictionaryBridge 3738 3703 -0.9% 1.01x(?)
ObjectiveCBridgeFromNSDictionaryAnyObject 221048 218925 -1.0% 1.01x(?)
ObjectAllocation 142 141 -0.7% 1.01x(?)
StrComplexWalk 2754 2721 -1.2% 1.01x(?)
NSError 355 353 -0.6% 1.01x(?)
SetExclusiveOr_OfObjects 12648 12562 -0.7% 1.01x(?)
ObjectiveCBridgeStubFromArrayOfNSString 106926 105437 -1.4% 1.01x(?)
ObjectiveCBridgeToNSString 1034 1033 -0.1% 1.00x(?)
StackPromo 20600 20602 +0.0% 1.00x(?)
PopFrontArray 1224 1224 +0.0% 1.00x
RecursiveOwnedParameter 1829 1829 +0.0% 1.00x
ObjectiveCBridgeStubToNSString 1371 1370 -0.1% 1.00x
ClassArrayGetter 12 12 +0.0% 1.00x
Histogram 654 654 +0.0% 1.00x
SortStrings 1650 1650 +0.0% 1.00x
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 4496 4508 +0.3% 1.00x(?)
MonteCarloPi 42554 42568 +0.0% 1.00x
StringWithCString 80988 81015 +0.0% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 3789 3794 +0.1% 1.00x(?)
ObjectiveCBridgeFromNSStringForced 2133 2141 +0.4% 1.00x(?)
SortLettersInPlace 1006 1001 -0.5% 1.00x
ArrayOfGenericPOD 208 208 +0.0% 1.00x
Dictionary3OfObjects 1246 1247 +0.1% 1.00x
SetUnion_OfObjects 10317 10284 -0.3% 1.00x(?)
RangeAssignment 278 278 +0.0% 1.00x
ByteSwap 1 1 +0.0% 1.00x
SuperChars 503214 503261 +0.0% 1.00x(?)
XorLoop 358 359 +0.3% 1.00x
StringInterpolation 9971 9940 -0.3% 1.00x(?)
Integrate 225 225 +0.0% 1.00x
ObjectiveCBridgeStubFromNSStringRef 327 327 +0.0% 1.00x
ObjectiveCBridgeStubFromNSString 704 705 +0.1% 1.00x(?)
ProtocolDispatch 2870 2871 +0.0% 1.00x(?)
TypeFlood 0 0 +0.0% 1.00x
ObjectiveCBridgeFromNSSetAnyObject 111691 112104 +0.4% 1.00x(?)
AngryPhonebook 0 0 +0.0% 1.00x
ProtocolDispatch2 151 151 +0.0% 1.00x
Walsh 309 309 +0.0% 1.00x
Dictionary3 741 743 +0.3% 1.00x(?)
Dictionary2 2357 2357 +0.0% 1.00x
Join 403 404 +0.2% 1.00x(?)
ObjectiveCBridgeToNSArray 29092 29175 +0.3% 1.00x(?)
DictionaryOfObjects 2766 2763 -0.1% 1.00x(?)
PopFrontUnsafePointer 8502 8502 +0.0% 1.00x
CaptureProp 4594 4596 +0.0% 1.00x(?)
PolymorphicCalls 61 61 +0.0% 1.00x
Calculator 34 34 +0.0% 1.00x
MapReduce 324 324 +0.0% 1.00x
DictionaryLiteral 3234 3248 +0.4% 1.00x(?)
Hanoi 3296 3289 -0.2% 1.00x(?)
OpenClose 48 48 +0.0% 1.00x
DictionaryRemoveOfObjects 22568 22552 -0.1% 1.00x(?)
UTF8Decode 268 268 +0.0% 1.00x
Dictionary 962 963 +0.1% 1.00x(?)
NopDeinit 34591 34602 +0.0% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObject 61450 61506 +0.1% 1.00x(?)
SetIntersect 1305 1304 -0.1% 1.00x
SetExclusiveOr 3724 3719 -0.1% 1.00x(?)
RGBHistogramOfObjects 24075 24152 +0.3% 1.00x(?)
StrToInt 5225 5229 +0.1% 1.00x(?)
ObjectiveCBridgeFromNSString 1512 1516 +0.3% 1.00x(?)
Phonebook 10438 10443 +0.1% 1.00x(?)
Sim2DArray 401 401 +0.0% 1.00x
MonteCarloE 10022 10030 +0.1% 1.00x(?)
114 2550512 2556747 +0.2% 1.00x
GlobalClass 0 0 +0.0% 1.00x
HashTest 1770 1770 +0.0% 1.00x
SetIsSubsetOf_OfObjects 614 613 -0.2% 1.00x
ArrayAppend 730 729 -0.1% 1.00x(?)
LinkedList 8988 8986 -0.0% 1.00x(?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 112227 112427 +0.2% 1.00x(?)
NSStringConversion 613 613 +0.0% 1.00x
RGBHistogram 3462 3455 -0.2% 1.00x(?)
ObjectiveCBridgeFromNSSetAnyObjectForced 4194 4203 +0.2% 1.00x(?)
ArrayValueProp4 5 5 +0.0% 1.00x
ArrayOfPOD 172 172 +0.0% 1.00x
SetUnion 3303 3312 +0.3% 1.00x(?)
Chars 655 657 +0.3% 1.00x
StringBuilder 1383 1383 +0.0% 1.00x
DeadArray 172 172 +0.0% 1.00x
BitCount 1 1 +0.0% 1.00x
ArrayLiteral 973 975 +0.2% 1.00x
SevenBoom 1285 1280 -0.4% 1.00x(?)
StringWalk 6341 6332 -0.1% 1.00x
ArrayValueProp 5 5 +0.0% 1.00x
RC4 268 268 +0.0% 1.00x
Memset 222 222 +0.0% 1.00x
Dictionary2OfObjects 3921 3914 -0.2% 1.00x(?)
ArrayAppendReserved 507 507 +0.0% 1.00x
TwoSum 1716 1708 -0.5% 1.00x(?)
ArrayValueProp2 5 5 +0.0% 1.00x
ArrayValueProp3 5 5 +0.0% 1.00x
ArraySubscript 1344 1354 +0.7% 0.99x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 154587 155897 +0.8% 0.99x(?)
Prims 753 760 +0.9% 0.99x(?)
StaticArray 2691 2716 +0.9% 0.99x(?)
ArrayOfRef 3388 3423 +1.0% 0.99x
ObjectiveCBridgeToNSSet 15412 15578 +1.1% 0.99x(?)
ArrayOfGenericRef 3438 3478 +1.2% 0.99x
DictionarySwapOfObjects 7654 7824 +2.2% 0.98x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 201586 205417 +1.9% 0.98x(?)
DictionarySwap 690 705 +2.2% 0.98x(?)
ObjectiveCBridgeStubToArrayOfNSString 28966 29570 +2.1% 0.98x
DictionaryRemove 4670 4747 +1.6% 0.98x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 126199 130876 +3.7% 0.96x
SetIsSubsetOf 476 495 +4.0% 0.96x
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 154618 160432 +3.8% 0.96x(?)
ArrayInClass 60 63 +5.0% 0.95x(?)
**Unoptimized (Onone)**

Regression (0)

Improvement (0)

No Changes (115)

TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 213259 208723 -2.1% 1.02x(?)
StaticArray 17139 16881 -1.5% 1.02x
DictionaryLiteral 20427 20043 -1.9% 1.02x(?)
ObjectiveCBridgeFromNSSetAnyObjectForced 7446 7291 -2.1% 1.02x
ObjectiveCBridgeToNSString 1047 1037 -1.0% 1.01x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 156506 155519 -0.6% 1.01x(?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 6997 6962 -0.5% 1.01x(?)
ObjectiveCBridgeFromNSStringForced 2541 2526 -0.6% 1.01x
ObjectiveCBridgeFromNSDictionaryAnyObject 231436 229280 -0.9% 1.01x(?)
SuperChars 679150 675129 -0.6% 1.01x(?)
ErrorHandling 7135 7035 -1.4% 1.01x(?)
ProtocolDispatch 4870 4839 -0.6% 1.01x
ObjectiveCBridgeFromNSSetAnyObject 118008 116992 -0.9% 1.01x(?)
DictionaryOfObjects 7085 6996 -1.3% 1.01x(?)
PolymorphicCalls 1112 1096 -1.4% 1.01x(?)
NopDeinit 56230 55938 -0.5% 1.01x
Phonebook 58493 58071 -0.7% 1.01x(?)
LinkedList 26401 26259 -0.5% 1.01x(?)
StringBuilder 8070 8016 -0.7% 1.01x(?)
BitCount 76 75 -1.3% 1.01x
ArraySubscript 4485 4488 +0.1% 1.00x(?)
DictionarySwapOfObjects 25760 25714 -0.2% 1.00x(?)
StackPromo 80372 80222 -0.2% 1.00x(?)
PopFrontArray 12187 12203 +0.1% 1.00x(?)
RecursiveOwnedParameter 10310 10330 +0.2% 1.00x(?)
ObjectiveCBridgeStubToNSString 1672 1668 -0.2% 1.00x(?)
ClassArrayGetter 1267 1265 -0.2% 1.00x(?)
Array2D 698552 698878 +0.1% 1.00x(?)
Histogram 13755 13799 +0.3% 1.00x(?)
SortStrings 5661 5667 +0.1% 1.00x(?)
DictionaryBridge 3808 3808 +0.0% 1.00x
ArrayOfGenericPOD 3236 3238 +0.1% 1.00x(?)
StringWithCString 533165 533260 +0.0% 1.00x(?)
Prims 13650 13660 +0.1% 1.00x(?)
SortLettersInPlace 2309 2305 -0.2% 1.00x
DictionarySwap 11725 11724 -0.0% 1.00x(?)
Dictionary3OfObjects 2729 2737 +0.3% 1.00x(?)
SetUnion_OfObjects 51322 51300 -0.0% 1.00x(?)
RangeAssignment 15703 15668 -0.2% 1.00x(?)
ByteSwap 9 9 +0.0% 1.00x
XorLoop 18447 18441 -0.0% 1.00x(?)
StringInterpolation 12652 12603 -0.4% 1.00x(?)
Integrate 341 341 +0.0% 1.00x
ObjectiveCBridgeStubFromNSStringRef 652 651 -0.1% 1.00x(?)
ObjectiveCBridgeStubFromNSString 1121 1122 +0.1% 1.00x(?)
ObjectAllocation 1295 1297 +0.1% 1.00x(?)
ArrayLiteral 1036 1036 +0.0% 1.00x
ProtocolDispatch2 416 416 +0.0% 1.00x
Walsh 12250 12234 -0.1% 1.00x(?)
Dictionary3 2094 2095 +0.1% 1.00x(?)
Dictionary2 5030 5029 -0.0% 1.00x(?)
StrComplexWalk 7573 7567 -0.1% 1.00x(?)
SetIntersect_OfObjects 18957 18953 -0.0% 1.00x(?)
Join 1332 1331 -0.1% 1.00x
ArrayOfRef 9923 9924 +0.0% 1.00x(?)
PopFrontArrayGeneric 12380 12403 +0.2% 1.00x(?)
CaptureProp 53358 53259 -0.2% 1.00x(?)
Calculator 906 906 +0.0% 1.00x
MapReduce 45089 44873 -0.5% 1.00x(?)
Hanoi 22635 22616 -0.1% 1.00x(?)
DictionaryRemoveOfObjects 61002 60942 -0.1% 1.00x(?)
UTF8Decode 39361 39324 -0.1% 1.00x(?)
SetIsSubsetOf 2977 2974 -0.1% 1.00x(?)
Dictionary 4417 4424 +0.2% 1.00x
ObjectiveCBridgeFromNSArrayAnyObject 65614 65404 -0.3% 1.00x(?)
SetIntersect 18888 18857 -0.2% 1.00x(?)
SetExclusiveOr 48711 48812 +0.2% 1.00x(?)
RGBHistogramOfObjects 97858 97610 -0.2% 1.00x(?)
StrToInt 18734 18705 -0.1% 1.00x(?)
ArrayInClass 3646 3648 +0.1% 1.00x(?)
ArrayOfGenericRef 10554 10575 +0.2% 1.00x(?)
ObjectiveCBridgeFromNSString 4864 4850 -0.3% 1.00x
Sim2DArray 13145 13141 -0.0% 1.00x
SetExclusiveOr_OfObjects 66999 66990 -0.0% 1.00x(?)
MonteCarloPi 50360 50364 +0.0% 1.00x(?)
MonteCarloE 98784 98789 +0.0% 1.00x(?)
114 5419340 5400253 -0.3% 1.00x
GlobalClass 0 0 +0.0% 1.00x
HashTest 5827 5827 +0.0% 1.00x
SetIsSubsetOf_OfObjects 2851 2852 +0.0% 1.00x(?)
ArrayAppend 2846 2847 +0.0% 1.00x(?)
DictionaryRemove 30381 30326 -0.2% 1.00x(?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 121534 121539 +0.0% 1.00x(?)
NSStringConversion 2592 2582 -0.4% 1.00x(?)
RGBHistogram 49640 49808 +0.3% 1.00x(?)
ArrayValueProp4 2504 2505 +0.0% 1.00x(?)
ArrayOfPOD 2257 2257 +0.0% 1.00x
SetUnion 34938 34793 -0.4% 1.00x
Chars 54471 54507 +0.1% 1.00x(?)
AngryPhonebook 3502 3501 -0.0% 1.00x(?)
SevenBoom 1426 1430 +0.3% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 156253 155803 -0.3% 1.00x(?)
StringWalk 48861 48856 -0.0% 1.00x(?)
ArrayValueProp 2206 2212 +0.3% 1.00x
RC4 8800 8802 +0.0% 1.00x(?)
Memset 20646 20649 +0.0% 1.00x(?)
Dictionary2OfObjects 6775 6762 -0.2% 1.00x(?)
ArrayAppendReserved 2615 2611 -0.1% 1.00x(?)
TwoSum 9228 9216 -0.1% 1.00x(?)
ArrayValueProp2 18285 18294 +0.1% 1.00x(?)
ArrayValueProp3 2546 2551 +0.2% 1.00x(?)
ObjectiveCBridgeToNSSet 16104 16338 +1.4% 0.99x(?)
ObjectiveCBridgeToNSArray 29436 29590 +0.5% 0.99x(?)
NSError 647 656 +1.4% 0.99x(?)
PopFrontUnsafePointer 93929 95357 +1.5% 0.99x(?)
OpenClose 434 438 +0.9% 0.99x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 130679 131547 +0.7% 0.99x(?)
NSDictionaryCastToSwift 11834 11907 +0.6% 0.99x(?)
ObjectiveCBridgeFromNSSetAnyObjectToString 197857 199806 +1.0% 0.99x(?)
DeadArray 113722 115389 +1.5% 0.99x(?)
ObjectiveCBridgeStubFromArrayOfNSString 107637 108472 +0.8% 0.99x(?)
TypeFlood 148 151 +2.0% 0.98x(?)
ObjectiveCBridgeStubToArrayOfNSString 29497 29958 +1.6% 0.98x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 6991 7243 +3.6% 0.97x(?)
ObjectiveCBridgeToNSDictionary 15684 16202 +3.3% 0.97x(?)
**Hardware Overview** Model Name: Mac mini Model Identifier: Macmini7,1 Processor Name: Intel Core i7 Processor Speed: 3 GHz Number of Processors: 1 Total Number of Cores: 2 L2 Cache (per Core): 256 KB L3 Cache: 4 MB Memory: 16 GB
@jrose-apple

This comment has been minimized.

Show comment
Hide comment
@jrose-apple

jrose-apple Mar 30, 2016

Member

@swift-ci Please test Linux platform

Member

jrose-apple commented Mar 30, 2016

@swift-ci Please test Linux platform

Show outdated Hide outdated lib/IRGen/GenType.cpp
APInt getFixedExtraInhabitantValue(IRGenModule &IGM, unsigned bits,
unsigned index) const override {
return APInt(bits, 0);

This comment has been minimized.

@rjmccall

rjmccall Mar 31, 2016

Member

Please assert that index == 0 here.

@rjmccall

rjmccall Mar 31, 2016

Member

Please assert that index == 0 here.

@rjmccall

This comment has been minimized.

Show comment
Hide comment
@rjmccall

rjmccall Mar 31, 2016

Member

Minor adjustment aside, the IRGen parts look good to me.

Member

rjmccall commented Mar 31, 2016

Minor adjustment aside, the IRGen parts look good to me.

@rjmccall

This comment has been minimized.

Show comment
Hide comment
@rjmccall

rjmccall Mar 31, 2016

Member

Runtime changes LGTM.

Member

rjmccall commented Mar 31, 2016

Runtime changes LGTM.

@jrose-apple

This comment has been minimized.

Show comment
Hide comment
@jrose-apple

jrose-apple Mar 31, 2016

Member

@swift-ci Please benchmark

@swift-ci Please test

Member

jrose-apple commented Mar 31, 2016

@swift-ci Please benchmark

@swift-ci Please test

@jrose-apple

This comment has been minimized.

Show comment
Hide comment
@jrose-apple

jrose-apple Mar 31, 2016

Member

@swift-ci Please benchmark

Member

jrose-apple commented Mar 31, 2016

@swift-ci Please benchmark

@swift-ci

This comment has been minimized.

Show comment
Hide comment
@swift-ci

swift-ci Mar 31, 2016

Contributor

Build comment file:

Optimized (O)

Regression (0)

Improvement (3)

TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
SetIntersect_OfObjects 3426 3238 -5.5% 1.06x(?)
PopFrontArrayGeneric 1236 1164 -5.8% 1.06x(?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 121356 113575 -6.4% 1.07x

No Changes (112)

TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 166295 158571 -4.6% 1.05x
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 208516 199944 -4.1% 1.04x
Array2D 2026 1987 -1.9% 1.02x(?)
ArraySubscript 1355 1348 -0.5% 1.01x(?)
DictionaryBridge 3765 3739 -0.7% 1.01x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 4511 4487 -0.5% 1.01x(?)
ObjectiveCBridgeFromNSDictionaryAnyObject 223557 221843 -0.8% 1.01x(?)
StringInterpolation 10044 9896 -1.5% 1.01x
StaticArray 2688 2658 -1.1% 1.01x(?)
ObjectiveCBridgeToNSSet 16634 16412 -1.3% 1.01x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 126978 125486 -1.2% 1.01x(?)
ObjectiveCBridgeStubToArrayOfNSString 29264 29054 -0.7% 1.01x(?)
SetExclusiveOr_OfObjects 12652 12566 -0.7% 1.01x(?)
ArrayOfPOD 172 171 -0.6% 1.01x
ObjectiveCBridgeStubFromArrayOfNSString 108872 107636 -1.1% 1.01x(?)
ObjectiveCBridgeToNSString 1032 1036 +0.4% 1.00x
DictionarySwapOfObjects 7821 7816 -0.1% 1.00x(?)
StackPromo 20579 20578 -0.0% 1.00x(?)
PopFrontArray 1226 1226 +0.0% 1.00x
RecursiveOwnedParameter 1828 1829 +0.1% 1.00x(?)
ObjectiveCBridgeStubToNSString 1365 1362 -0.2% 1.00x
ClassArrayGetter 12 12 +0.0% 1.00x
Histogram 654 654 +0.0% 1.00x
SortStrings 1651 1653 +0.1% 1.00x
MonteCarloPi 42552 42556 +0.0% 1.00x(?)
StringWithCString 81000 81027 +0.0% 1.00x(?)
ObjectiveCBridgeFromNSStringForced 2140 2137 -0.1% 1.00x
Prims 760 762 +0.3% 1.00x(?)
SortLettersInPlace 1006 1007 +0.1% 1.00x(?)
DictionarySwap 705 707 +0.3% 1.00x
ArrayOfGenericPOD 208 207 -0.5% 1.00x
Dictionary3OfObjects 1246 1247 +0.1% 1.00x
RangeAssignment 279 278 -0.4% 1.00x(?)
ByteSwap 1 1 +0.0% 1.00x
SuperChars 501565 502956 +0.3% 1.00x
XorLoop 359 359 +0.0% 1.00x
Integrate 225 225 +0.0% 1.00x
ErrorHandling 2808 2822 +0.5% 1.00x(?)
ObjectiveCBridgeStubFromNSStringRef 327 327 +0.0% 1.00x
ObjectiveCBridgeStubFromNSString 697 695 -0.3% 1.00x(?)
ProtocolDispatch 2872 2870 -0.1% 1.00x(?)
TypeFlood 0 0 +0.0% 1.00x
ObjectiveCBridgeFromNSSetAnyObject 112535 111986 -0.5% 1.00x(?)
AngryPhonebook 0 0 +0.0% 1.00x
ProtocolDispatch2 151 151 +0.0% 1.00x
Walsh 299 299 +0.0% 1.00x
Dictionary2 2360 2360 +0.0% 1.00x
Join 402 402 +0.0% 1.00x
ArrayOfRef 3403 3398 -0.1% 1.00x(?)
ObjectiveCBridgeToNSArray 29202 29087 -0.4% 1.00x(?)
NSError 355 355 +0.0% 1.00x
DictionaryOfObjects 2761 2757 -0.1% 1.00x
PopFrontUnsafePointer 8500 8504 +0.1% 1.00x(?)
CaptureProp 4594 4594 +0.0% 1.00x
PolymorphicCalls 61 61 +0.0% 1.00x
Calculator 34 34 +0.0% 1.00x
MapReduce 324 324 +0.0% 1.00x
114 2562052 2567612 +0.2% 1.00x
Hanoi 3208 3209 +0.0% 1.00x(?)
OpenClose 48 48 +0.0% 1.00x
DictionaryRemoveOfObjects 22590 22604 +0.1% 1.00x(?)
UTF8Decode 269 269 +0.0% 1.00x
SetIsSubsetOf 478 476 -0.4% 1.00x(?)
Dictionary 964 964 +0.0% 1.00x
NopDeinit 34585 34611 +0.1% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObject 61781 61758 -0.0% 1.00x(?)
SetIntersect 1306 1312 +0.5% 1.00x(?)
NSDictionaryCastToSwift 10706 10753 +0.4% 1.00x(?)
RGBHistogramOfObjects 24082 24075 -0.0% 1.00x(?)
StringBuilder 1380 1382 +0.1% 1.00x(?)
ObjectiveCBridgeFromNSString 1512 1511 -0.1% 1.00x(?)
Phonebook 10467 10456 -0.1% 1.00x
Sim2DArray 400 400 +0.0% 1.00x
MonteCarloE 10029 10022 -0.1% 1.00x(?)
SetUnion_OfObjects 10273 10269 -0.0% 1.00x(?)
GlobalClass 0 0 +0.0% 1.00x
HashTest 1766 1766 +0.0% 1.00x
SetIsSubsetOf_OfObjects 614 614 +0.0% 1.00x
ArrayAppend 730 731 +0.1% 1.00x(?)
LinkedList 9000 9005 +0.1% 1.00x(?)
NSStringConversion 597 596 -0.2% 1.00x(?)
RGBHistogram 3463 3453 -0.3% 1.00x
ObjectiveCBridgeFromNSSetAnyObjectForced 4178 4178 +0.0% 1.00x
ArrayValueProp4 5 5 +0.0% 1.00x
SetUnion 3295 3298 +0.1% 1.00x(?)
Chars 657 657 +0.0% 1.00x
StrToInt 5222 5218 -0.1% 1.00x
DeadArray 172 172 +0.0% 1.00x
BitCount 1 1 +0.0% 1.00x
ArrayLiteral 967 969 +0.2% 1.00x(?)
SevenBoom 1283 1289 +0.5% 1.00x(?)
StringWalk 6340 6335 -0.1% 1.00x(?)
ArrayValueProp 5 5 +0.0% 1.00x
RC4 268 268 +0.0% 1.00x
Memset 222 222 +0.0% 1.00x
Dictionary2OfObjects 3893 3906 +0.3% 1.00x(?)
ArrayAppendReserved 507 507 +0.0% 1.00x
ArrayValueProp2 5 5 +0.0% 1.00x
ArrayValueProp3 5 5 +0.0% 1.00x
ObjectiveCBridgeFromNSArrayAnyObjectToString 155722 157408 +1.1% 0.99x
Dictionary3 741 746 +0.7% 0.99x
StrComplexWalk 2724 2744 +0.7% 0.99x(?)
SetExclusiveOr 3704 3728 +0.7% 0.99x
ArrayOfGenericRef 3440 3466 +0.8% 0.99x
ObjectiveCBridgeToNSDictionary 16117 16257 +0.9% 0.99x(?)
DictionaryRemove 4678 4732 +1.1% 0.99x(?)
ObjectiveCBridgeFromNSSetAnyObjectToString 185752 188473 +1.5% 0.99x(?)
TwoSum 1707 1729 +1.3% 0.99x(?)
ObjectAllocation 143 146 +2.1% 0.98x(?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 3806 3939 +3.5% 0.97x
DictionaryLiteral 3253 3358 +3.2% 0.97x(?)
ArrayInClass 60 63 +5.0% 0.95x
**Unoptimized (Onone)**

Regression (0)

Improvement (0)

No Changes (115)

TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
OpenClose 431 417 -3.2% 1.03x(?)
StackPromo 81399 80188 -1.5% 1.02x(?)
DictionaryOfObjects 7171 7046 -1.7% 1.02x
DictionaryLiteral 20416 20056 -1.8% 1.02x(?)
DictionaryBridge 3887 3833 -1.4% 1.01x(?)
ObjectiveCBridgeFromNSDictionaryAnyObject 226955 225536 -0.6% 1.01x(?)
StaticArray 16777 16551 -1.4% 1.01x(?)
ObjectiveCBridgeToNSArray 29325 29071 -0.9% 1.01x(?)
PolymorphicCalls 1103 1094 -0.8% 1.01x
ObjectiveCBridgeStubToArrayOfNSString 29641 29334 -1.0% 1.01x(?)
BitCount 76 75 -1.3% 1.01x
ObjectiveCBridgeStubFromArrayOfNSString 109723 108118 -1.5% 1.01x(?)
ArraySubscript 4475 4480 +0.1% 1.00x(?)
ObjectiveCBridgeToNSString 1045 1045 +0.0% 1.00x
PopFrontArray 12185 12190 +0.0% 1.00x(?)
RecursiveOwnedParameter 10299 10304 +0.1% 1.00x(?)
Integrate 341 341 +0.0% 1.00x
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 209833 209487 -0.2% 1.00x(?)
ClassArrayGetter 1266 1266 +0.0% 1.00x
Array2D 699255 698933 -0.1% 1.00x(?)
SortStrings 5631 5629 -0.0% 1.00x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 6964 6998 +0.5% 1.00x(?)
MonteCarloPi 50356 50380 +0.1% 1.00x(?)
StringWithCString 533578 533645 +0.0% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 7034 7002 -0.5% 1.00x(?)
ObjectiveCBridgeFromNSStringForced 2535 2530 -0.2% 1.00x(?)
Prims 13710 13673 -0.3% 1.00x(?)
SortLettersInPlace 2306 2305 -0.0% 1.00x(?)
DictionarySwap 11737 11756 +0.2% 1.00x(?)
Dictionary3OfObjects 2736 2735 -0.0% 1.00x(?)
RangeAssignment 15674 15634 -0.3% 1.00x(?)
ByteSwap 9 9 +0.0% 1.00x
SuperChars 674783 675128 +0.1% 1.00x(?)
XorLoop 18442 18437 -0.0% 1.00x(?)
StringInterpolation 12527 12511 -0.1% 1.00x(?)
ObjectiveCBridgeStubFromNSStringRef 651 651 +0.0% 1.00x
ObjectiveCBridgeStubFromNSString 1114 1114 +0.0% 1.00x
ProtocolDispatch 4848 4832 -0.3% 1.00x(?)
ObjectAllocation 1303 1301 -0.1% 1.00x(?)
AngryPhonebook 3506 3505 -0.0% 1.00x(?)
ProtocolDispatch2 416 415 -0.2% 1.00x(?)
Walsh 12235 12250 +0.1% 1.00x(?)
Dictionary3 2094 2094 +0.0% 1.00x
Dictionary2 5029 5043 +0.3% 1.00x(?)
StrComplexWalk 7348 7327 -0.3% 1.00x(?)
SetIntersect_OfObjects 18939 18953 +0.1% 1.00x(?)
Join 1332 1332 +0.0% 1.00x
ArrayOfRef 9939 9927 -0.1% 1.00x(?)
PopFrontArrayGeneric 12290 12247 -0.3% 1.00x(?)
PopFrontUnsafePointer 93346 93354 +0.0% 1.00x(?)
CaptureProp 55486 55466 -0.0% 1.00x(?)
Calculator 907 906 -0.1% 1.00x
MapReduce 46268 46426 +0.3% 1.00x(?)
Hanoi 22606 22594 -0.1% 1.00x(?)
ArrayOfGenericPOD 3237 3237 +0.0% 1.00x
UTF8Decode 39327 39398 +0.2% 1.00x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 130112 130126 +0.0% 1.00x(?)
Dictionary 4419 4423 +0.1% 1.00x(?)
NopDeinit 56195 55963 -0.4% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObject 65508 65818 +0.5% 1.00x(?)
SetIntersect 18915 18895 -0.1% 1.00x(?)
NSDictionaryCastToSwift 11841 11881 +0.3% 1.00x(?)
RGBHistogramOfObjects 97803 97965 +0.2% 1.00x(?)
StrToInt 18848 18851 +0.0% 1.00x(?)
ArrayInClass 3648 3648 +0.0% 1.00x
ArrayOfGenericRef 10555 10561 +0.1% 1.00x(?)
ObjectiveCBridgeFromNSString 4890 4884 -0.1% 1.00x(?)
Sim2DArray 13141 13148 +0.1% 1.00x(?)
SetExclusiveOr_OfObjects 67195 67104 -0.1% 1.00x(?)
MonteCarloE 98849 98794 -0.1% 1.00x(?)
SetUnion_OfObjects 51257 51226 -0.1% 1.00x(?)
GlobalClass 0 0 +0.0% 1.00x
HashTest 5835 5830 -0.1% 1.00x(?)
SetIsSubsetOf_OfObjects 2850 2849 -0.0% 1.00x
ArrayAppend 2744 2747 +0.1% 1.00x(?)
DictionaryRemove 30512 30481 -0.1% 1.00x(?)
LinkedList 26316 26348 +0.1% 1.00x(?)
ObjectiveCBridgeStubToNSString 1670 1674 +0.2% 1.00x(?)
RGBHistogram 49639 49572 -0.1% 1.00x(?)
ArrayValueProp4 2502 2506 +0.2% 1.00x
ArrayOfPOD 2259 2258 -0.0% 1.00x
SetUnion 34824 34820 -0.0% 1.00x(?)
Chars 54424 54429 +0.0% 1.00x(?)
StringBuilder 7987 7992 +0.1% 1.00x(?)
ArrayLiteral 1032 1030 -0.2% 1.00x(?)
SevenBoom 1427 1427 +0.0% 1.00x
StringWalk 47846 47936 +0.2% 1.00x(?)
ArrayValueProp 2211 2209 -0.1% 1.00x(?)
RC4 8801 8799 -0.0% 1.00x(?)
Memset 20647 20660 +0.1% 1.00x
Dictionary2OfObjects 6789 6784 -0.1% 1.00x(?)
ArrayAppendReserved 2517 2513 -0.2% 1.00x
TwoSum 9233 9206 -0.3% 1.00x(?)
ArrayValueProp2 18320 18296 -0.1% 1.00x(?)
ArrayValueProp3 2545 2544 -0.0% 1.00x(?)
Histogram 13748 13927 +1.3% 0.99x(?)
114 5397560 5449088 +0.9% 0.99x
ErrorHandling 7054 7123 +1.0% 0.99x(?)
TypeFlood 152 153 +0.7% 0.99x(?)
ObjectiveCBridgeToNSSet 16634 16876 +1.4% 0.99x(?)
NSError 658 664 +0.9% 0.99x
DictionaryRemoveOfObjects 60611 61309 +1.1% 0.99x(?)
SetIsSubsetOf 2944 2976 +1.1% 0.99x(?)
SetExclusiveOr 48771 49489 +1.5% 0.99x
Phonebook 57583 58048 +0.8% 0.99x(?)
ObjectiveCBridgeToNSDictionary 16062 16304 +1.5% 0.99x(?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 122353 123223 +0.7% 0.99x(?)
DeadArray 114566 115277 +0.6% 0.99x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 157645 159180 +1.0% 0.99x(?)
DictionarySwapOfObjects 25359 25770 +1.6% 0.98x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 158495 161339 +1.8% 0.98x(?)
ObjectiveCBridgeFromNSSetAnyObjectToString 199515 203407 +1.9% 0.98x(?)
NSStringConversion 2560 2605 +1.8% 0.98x
ObjectiveCBridgeFromNSSetAnyObjectForced 7403 7525 +1.6% 0.98x(?)
ObjectiveCBridgeFromNSSetAnyObject 116103 122446 +5.5% 0.95x
**Hardware Overview** Model Name: Mac mini Model Identifier: Macmini7,1 Processor Name: Intel Core i7 Processor Speed: 3 GHz Number of Processors: 1 Total Number of Cores: 2 L2 Cache (per Core): 256 KB L3 Cache: 4 MB Memory: 16 GB
Contributor

swift-ci commented Mar 31, 2016

Build comment file:

Optimized (O)

Regression (0)

Improvement (3)

TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
SetIntersect_OfObjects 3426 3238 -5.5% 1.06x(?)
PopFrontArrayGeneric 1236 1164 -5.8% 1.06x(?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 121356 113575 -6.4% 1.07x

No Changes (112)

TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 166295 158571 -4.6% 1.05x
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 208516 199944 -4.1% 1.04x
Array2D 2026 1987 -1.9% 1.02x(?)
ArraySubscript 1355 1348 -0.5% 1.01x(?)
DictionaryBridge 3765 3739 -0.7% 1.01x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 4511 4487 -0.5% 1.01x(?)
ObjectiveCBridgeFromNSDictionaryAnyObject 223557 221843 -0.8% 1.01x(?)
StringInterpolation 10044 9896 -1.5% 1.01x
StaticArray 2688 2658 -1.1% 1.01x(?)
ObjectiveCBridgeToNSSet 16634 16412 -1.3% 1.01x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 126978 125486 -1.2% 1.01x(?)
ObjectiveCBridgeStubToArrayOfNSString 29264 29054 -0.7% 1.01x(?)
SetExclusiveOr_OfObjects 12652 12566 -0.7% 1.01x(?)
ArrayOfPOD 172 171 -0.6% 1.01x
ObjectiveCBridgeStubFromArrayOfNSString 108872 107636 -1.1% 1.01x(?)
ObjectiveCBridgeToNSString 1032 1036 +0.4% 1.00x
DictionarySwapOfObjects 7821 7816 -0.1% 1.00x(?)
StackPromo 20579 20578 -0.0% 1.00x(?)
PopFrontArray 1226 1226 +0.0% 1.00x
RecursiveOwnedParameter 1828 1829 +0.1% 1.00x(?)
ObjectiveCBridgeStubToNSString 1365 1362 -0.2% 1.00x
ClassArrayGetter 12 12 +0.0% 1.00x
Histogram 654 654 +0.0% 1.00x
SortStrings 1651 1653 +0.1% 1.00x
MonteCarloPi 42552 42556 +0.0% 1.00x(?)
StringWithCString 81000 81027 +0.0% 1.00x(?)
ObjectiveCBridgeFromNSStringForced 2140 2137 -0.1% 1.00x
Prims 760 762 +0.3% 1.00x(?)
SortLettersInPlace 1006 1007 +0.1% 1.00x(?)
DictionarySwap 705 707 +0.3% 1.00x
ArrayOfGenericPOD 208 207 -0.5% 1.00x
Dictionary3OfObjects 1246 1247 +0.1% 1.00x
RangeAssignment 279 278 -0.4% 1.00x(?)
ByteSwap 1 1 +0.0% 1.00x
SuperChars 501565 502956 +0.3% 1.00x
XorLoop 359 359 +0.0% 1.00x
Integrate 225 225 +0.0% 1.00x
ErrorHandling 2808 2822 +0.5% 1.00x(?)
ObjectiveCBridgeStubFromNSStringRef 327 327 +0.0% 1.00x
ObjectiveCBridgeStubFromNSString 697 695 -0.3% 1.00x(?)
ProtocolDispatch 2872 2870 -0.1% 1.00x(?)
TypeFlood 0 0 +0.0% 1.00x
ObjectiveCBridgeFromNSSetAnyObject 112535 111986 -0.5% 1.00x(?)
AngryPhonebook 0 0 +0.0% 1.00x
ProtocolDispatch2 151 151 +0.0% 1.00x
Walsh 299 299 +0.0% 1.00x
Dictionary2 2360 2360 +0.0% 1.00x
Join 402 402 +0.0% 1.00x
ArrayOfRef 3403 3398 -0.1% 1.00x(?)
ObjectiveCBridgeToNSArray 29202 29087 -0.4% 1.00x(?)
NSError 355 355 +0.0% 1.00x
DictionaryOfObjects 2761 2757 -0.1% 1.00x
PopFrontUnsafePointer 8500 8504 +0.1% 1.00x(?)
CaptureProp 4594 4594 +0.0% 1.00x
PolymorphicCalls 61 61 +0.0% 1.00x
Calculator 34 34 +0.0% 1.00x
MapReduce 324 324 +0.0% 1.00x
114 2562052 2567612 +0.2% 1.00x
Hanoi 3208 3209 +0.0% 1.00x(?)
OpenClose 48 48 +0.0% 1.00x
DictionaryRemoveOfObjects 22590 22604 +0.1% 1.00x(?)
UTF8Decode 269 269 +0.0% 1.00x
SetIsSubsetOf 478 476 -0.4% 1.00x(?)
Dictionary 964 964 +0.0% 1.00x
NopDeinit 34585 34611 +0.1% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObject 61781 61758 -0.0% 1.00x(?)
SetIntersect 1306 1312 +0.5% 1.00x(?)
NSDictionaryCastToSwift 10706 10753 +0.4% 1.00x(?)
RGBHistogramOfObjects 24082 24075 -0.0% 1.00x(?)
StringBuilder 1380 1382 +0.1% 1.00x(?)
ObjectiveCBridgeFromNSString 1512 1511 -0.1% 1.00x(?)
Phonebook 10467 10456 -0.1% 1.00x
Sim2DArray 400 400 +0.0% 1.00x
MonteCarloE 10029 10022 -0.1% 1.00x(?)
SetUnion_OfObjects 10273 10269 -0.0% 1.00x(?)
GlobalClass 0 0 +0.0% 1.00x
HashTest 1766 1766 +0.0% 1.00x
SetIsSubsetOf_OfObjects 614 614 +0.0% 1.00x
ArrayAppend 730 731 +0.1% 1.00x(?)
LinkedList 9000 9005 +0.1% 1.00x(?)
NSStringConversion 597 596 -0.2% 1.00x(?)
RGBHistogram 3463 3453 -0.3% 1.00x
ObjectiveCBridgeFromNSSetAnyObjectForced 4178 4178 +0.0% 1.00x
ArrayValueProp4 5 5 +0.0% 1.00x
SetUnion 3295 3298 +0.1% 1.00x(?)
Chars 657 657 +0.0% 1.00x
StrToInt 5222 5218 -0.1% 1.00x
DeadArray 172 172 +0.0% 1.00x
BitCount 1 1 +0.0% 1.00x
ArrayLiteral 967 969 +0.2% 1.00x(?)
SevenBoom 1283 1289 +0.5% 1.00x(?)
StringWalk 6340 6335 -0.1% 1.00x(?)
ArrayValueProp 5 5 +0.0% 1.00x
RC4 268 268 +0.0% 1.00x
Memset 222 222 +0.0% 1.00x
Dictionary2OfObjects 3893 3906 +0.3% 1.00x(?)
ArrayAppendReserved 507 507 +0.0% 1.00x
ArrayValueProp2 5 5 +0.0% 1.00x
ArrayValueProp3 5 5 +0.0% 1.00x
ObjectiveCBridgeFromNSArrayAnyObjectToString 155722 157408 +1.1% 0.99x
Dictionary3 741 746 +0.7% 0.99x
StrComplexWalk 2724 2744 +0.7% 0.99x(?)
SetExclusiveOr 3704 3728 +0.7% 0.99x
ArrayOfGenericRef 3440 3466 +0.8% 0.99x
ObjectiveCBridgeToNSDictionary 16117 16257 +0.9% 0.99x(?)
DictionaryRemove 4678 4732 +1.1% 0.99x(?)
ObjectiveCBridgeFromNSSetAnyObjectToString 185752 188473 +1.5% 0.99x(?)
TwoSum 1707 1729 +1.3% 0.99x(?)
ObjectAllocation 143 146 +2.1% 0.98x(?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 3806 3939 +3.5% 0.97x
DictionaryLiteral 3253 3358 +3.2% 0.97x(?)
ArrayInClass 60 63 +5.0% 0.95x
**Unoptimized (Onone)**

Regression (0)

Improvement (0)

No Changes (115)

TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
OpenClose 431 417 -3.2% 1.03x(?)
StackPromo 81399 80188 -1.5% 1.02x(?)
DictionaryOfObjects 7171 7046 -1.7% 1.02x
DictionaryLiteral 20416 20056 -1.8% 1.02x(?)
DictionaryBridge 3887 3833 -1.4% 1.01x(?)
ObjectiveCBridgeFromNSDictionaryAnyObject 226955 225536 -0.6% 1.01x(?)
StaticArray 16777 16551 -1.4% 1.01x(?)
ObjectiveCBridgeToNSArray 29325 29071 -0.9% 1.01x(?)
PolymorphicCalls 1103 1094 -0.8% 1.01x
ObjectiveCBridgeStubToArrayOfNSString 29641 29334 -1.0% 1.01x(?)
BitCount 76 75 -1.3% 1.01x
ObjectiveCBridgeStubFromArrayOfNSString 109723 108118 -1.5% 1.01x(?)
ArraySubscript 4475 4480 +0.1% 1.00x(?)
ObjectiveCBridgeToNSString 1045 1045 +0.0% 1.00x
PopFrontArray 12185 12190 +0.0% 1.00x(?)
RecursiveOwnedParameter 10299 10304 +0.1% 1.00x(?)
Integrate 341 341 +0.0% 1.00x
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 209833 209487 -0.2% 1.00x(?)
ClassArrayGetter 1266 1266 +0.0% 1.00x
Array2D 699255 698933 -0.1% 1.00x(?)
SortStrings 5631 5629 -0.0% 1.00x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 6964 6998 +0.5% 1.00x(?)
MonteCarloPi 50356 50380 +0.1% 1.00x(?)
StringWithCString 533578 533645 +0.0% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 7034 7002 -0.5% 1.00x(?)
ObjectiveCBridgeFromNSStringForced 2535 2530 -0.2% 1.00x(?)
Prims 13710 13673 -0.3% 1.00x(?)
SortLettersInPlace 2306 2305 -0.0% 1.00x(?)
DictionarySwap 11737 11756 +0.2% 1.00x(?)
Dictionary3OfObjects 2736 2735 -0.0% 1.00x(?)
RangeAssignment 15674 15634 -0.3% 1.00x(?)
ByteSwap 9 9 +0.0% 1.00x
SuperChars 674783 675128 +0.1% 1.00x(?)
XorLoop 18442 18437 -0.0% 1.00x(?)
StringInterpolation 12527 12511 -0.1% 1.00x(?)
ObjectiveCBridgeStubFromNSStringRef 651 651 +0.0% 1.00x
ObjectiveCBridgeStubFromNSString 1114 1114 +0.0% 1.00x
ProtocolDispatch 4848 4832 -0.3% 1.00x(?)
ObjectAllocation 1303 1301 -0.1% 1.00x(?)
AngryPhonebook 3506 3505 -0.0% 1.00x(?)
ProtocolDispatch2 416 415 -0.2% 1.00x(?)
Walsh 12235 12250 +0.1% 1.00x(?)
Dictionary3 2094 2094 +0.0% 1.00x
Dictionary2 5029 5043 +0.3% 1.00x(?)
StrComplexWalk 7348 7327 -0.3% 1.00x(?)
SetIntersect_OfObjects 18939 18953 +0.1% 1.00x(?)
Join 1332 1332 +0.0% 1.00x
ArrayOfRef 9939 9927 -0.1% 1.00x(?)
PopFrontArrayGeneric 12290 12247 -0.3% 1.00x(?)
PopFrontUnsafePointer 93346 93354 +0.0% 1.00x(?)
CaptureProp 55486 55466 -0.0% 1.00x(?)
Calculator 907 906 -0.1% 1.00x
MapReduce 46268 46426 +0.3% 1.00x(?)
Hanoi 22606 22594 -0.1% 1.00x(?)
ArrayOfGenericPOD 3237 3237 +0.0% 1.00x
UTF8Decode 39327 39398 +0.2% 1.00x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 130112 130126 +0.0% 1.00x(?)
Dictionary 4419 4423 +0.1% 1.00x(?)
NopDeinit 56195 55963 -0.4% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObject 65508 65818 +0.5% 1.00x(?)
SetIntersect 18915 18895 -0.1% 1.00x(?)
NSDictionaryCastToSwift 11841 11881 +0.3% 1.00x(?)
RGBHistogramOfObjects 97803 97965 +0.2% 1.00x(?)
StrToInt 18848 18851 +0.0% 1.00x(?)
ArrayInClass 3648 3648 +0.0% 1.00x
ArrayOfGenericRef 10555 10561 +0.1% 1.00x(?)
ObjectiveCBridgeFromNSString 4890 4884 -0.1% 1.00x(?)
Sim2DArray 13141 13148 +0.1% 1.00x(?)
SetExclusiveOr_OfObjects 67195 67104 -0.1% 1.00x(?)
MonteCarloE 98849 98794 -0.1% 1.00x(?)
SetUnion_OfObjects 51257 51226 -0.1% 1.00x(?)
GlobalClass 0 0 +0.0% 1.00x
HashTest 5835 5830 -0.1% 1.00x(?)
SetIsSubsetOf_OfObjects 2850 2849 -0.0% 1.00x
ArrayAppend 2744 2747 +0.1% 1.00x(?)
DictionaryRemove 30512 30481 -0.1% 1.00x(?)
LinkedList 26316 26348 +0.1% 1.00x(?)
ObjectiveCBridgeStubToNSString 1670 1674 +0.2% 1.00x(?)
RGBHistogram 49639 49572 -0.1% 1.00x(?)
ArrayValueProp4 2502 2506 +0.2% 1.00x
ArrayOfPOD 2259 2258 -0.0% 1.00x
SetUnion 34824 34820 -0.0% 1.00x(?)
Chars 54424 54429 +0.0% 1.00x(?)
StringBuilder 7987 7992 +0.1% 1.00x(?)
ArrayLiteral 1032 1030 -0.2% 1.00x(?)
SevenBoom 1427 1427 +0.0% 1.00x
StringWalk 47846 47936 +0.2% 1.00x(?)
ArrayValueProp 2211 2209 -0.1% 1.00x(?)
RC4 8801 8799 -0.0% 1.00x(?)
Memset 20647 20660 +0.1% 1.00x
Dictionary2OfObjects 6789 6784 -0.1% 1.00x(?)
ArrayAppendReserved 2517 2513 -0.2% 1.00x
TwoSum 9233 9206 -0.3% 1.00x(?)
ArrayValueProp2 18320 18296 -0.1% 1.00x(?)
ArrayValueProp3 2545 2544 -0.0% 1.00x(?)
Histogram 13748 13927 +1.3% 0.99x(?)
114 5397560 5449088 +0.9% 0.99x
ErrorHandling 7054 7123 +1.0% 0.99x(?)
TypeFlood 152 153 +0.7% 0.99x(?)
ObjectiveCBridgeToNSSet 16634 16876 +1.4% 0.99x(?)
NSError 658 664 +0.9% 0.99x
DictionaryRemoveOfObjects 60611 61309 +1.1% 0.99x(?)
SetIsSubsetOf 2944 2976 +1.1% 0.99x(?)
SetExclusiveOr 48771 49489 +1.5% 0.99x
Phonebook 57583 58048 +0.8% 0.99x(?)
ObjectiveCBridgeToNSDictionary 16062 16304 +1.5% 0.99x(?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 122353 123223 +0.7% 0.99x(?)
DeadArray 114566 115277 +0.6% 0.99x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 157645 159180 +1.0% 0.99x(?)
DictionarySwapOfObjects 25359 25770 +1.6% 0.98x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 158495 161339 +1.8% 0.98x(?)
ObjectiveCBridgeFromNSSetAnyObjectToString 199515 203407 +1.9% 0.98x(?)
NSStringConversion 2560 2605 +1.8% 0.98x
ObjectiveCBridgeFromNSSetAnyObjectForced 7403 7525 +1.6% 0.98x(?)
ObjectiveCBridgeFromNSSetAnyObject 116103 122446 +5.5% 0.95x
**Hardware Overview** Model Name: Mac mini Model Identifier: Macmini7,1 Processor Name: Intel Core i7 Processor Speed: 3 GHz Number of Processors: 1 Total Number of Cores: 2 L2 Cache (per Core): 256 KB L3 Cache: 4 MB Memory: 16 GB
@jrose-apple

This comment has been minimized.

Show comment
Hide comment
@jrose-apple

jrose-apple Mar 31, 2016

Member

@swift-ci Please test

Member

jrose-apple commented Mar 31, 2016

@swift-ci Please test

jrose-apple added a commit to jrose-apple/swift-package-manager that referenced this pull request Apr 1, 2016

jrose-apple added a commit to jrose-apple/swift-package-manager that referenced this pull request Apr 1, 2016

@jrose-apple jrose-apple referenced this pull request Apr 1, 2016

Merged

[Toolchains] Cygwin toolchain inherits from Unix #1908

0 of 1 task complete

jrose-apple added a commit to jrose-apple/swift-corelibs-foundation that referenced this pull request Apr 5, 2016

jrose-apple added a commit to jrose-apple/swift-corelibs-foundation that referenced this pull request Apr 5, 2016

jrose-apple added a commit to jrose-apple/swift-corelibs-foundation that referenced this pull request Apr 5, 2016

jrose-apple added a commit to jrose-apple/swift-corelibs-foundation that referenced this pull request Apr 5, 2016

jrose-apple added a commit to jrose-apple/swift-corelibs-foundation that referenced this pull request Apr 5, 2016

jrose-apple added a commit to jrose-apple/swift-corelibs-foundation that referenced this pull request Apr 5, 2016

jrose-apple added a commit to jrose-apple/swift-package-manager that referenced this pull request Apr 7, 2016

jrose-apple added a commit to jrose-apple/swift-corelibs-foundation that referenced this pull request Apr 7, 2016

jrose-apple added a commit to jrose-apple/swift-package-manager that referenced this pull request Apr 11, 2016

@jrose-apple jrose-apple changed the title from [WIP] SE-0055: Making pointer nullability explicit to SE-0055: Making pointer nullability explicit Apr 12, 2016

emitPointerToPointer(mainClass, ManagedValue::forUnmanaged(argv),
argv->getType().getSwiftRValueType(),
unwrappedTy.getSwiftRValueType());
argv = converted.getUnmanagedSingleValue(*this, mainClass);

This comment has been minimized.

@jrose-apple

jrose-apple Apr 12, 2016

Member

@slavapestov, here's the client code for the emitPointerToPointer change. Does this look right?

@jrose-apple

jrose-apple Apr 12, 2016

Member

@slavapestov, here's the client code for the emitPointerToPointer change. Does this look right?

@jrose-apple

This comment has been minimized.

Show comment
Hide comment
@jrose-apple

jrose-apple Apr 12, 2016

Member

@swift-ci Please smoke test

(full testing will fail because it tries to build other repos too)

Member

jrose-apple commented Apr 12, 2016

@swift-ci Please smoke test

(full testing will fail because it tries to build other repos too)

@jrose-apple

This comment has been minimized.

Show comment
Hide comment
@jrose-apple

jrose-apple Apr 12, 2016

Member

@swift-ci Please smoke test

Member

jrose-apple commented Apr 12, 2016

@swift-ci Please smoke test

jrose-apple added some commits Mar 30, 2016

Make pointer nullability explicit using Optional.
Implements SE-0055: https://github.com/apple/swift-evolution/blob/master/proposals/0055-optional-unsafe-pointers.md

- Add NULL as an extra inhabitant of Builtin.RawPointer (currently
  hardcoded to 0 rather than being target-dependent).
- Import non-object pointers as Optional/IUO when nullable/null_unspecified
  (like everything else).
- Change the type checker's *-to-pointer conversions to handle a layer of
  optional.
- Use 'AutoreleasingUnsafeMutablePointer<NSError?>?' as the type of error
  parameters exported to Objective-C.
- Drop NilLiteralConvertible conformance for all pointer types.
- Update the standard library and then all the tests.

I've decided to leave this commit only updating existing tests; any new
tests will come in the following commits. (That may mean some additional
implementation work to follow.)

The other major piece that's missing here is migration. I'm hoping we get
a lot of that with Swift 1.1's work for optional object references, but
I still need to investigate.
[test] Test invoking the ObjC entry point of a throwing method.
This previously blew up if the Objective-C client passed NULL for the
error parameter, but started working after the pointer nullability
change. Why? John had /already written and committed/ code to handle
NULL assuming pointer nullability was explicit, and that code was
/correct as is/.
[ClangImporter] Don't assume inner pointers are nullable.
Some inner pointers are explicitly annotated as _Nonnull, and we
should believe that. This is important when passing, say, pointers
to arrays.

@jrose-apple jrose-apple merged commit 9cdbec1 into apple:master Apr 12, 2016

jrose-apple added a commit to apple/swift-package-manager that referenced this pull request Apr 12, 2016

Merge pull request #232 from jrose-apple/optional-pointers
Update for SE-0055: Making pointer nullability explicit. See apple/swift#1878.

jrose-apple added a commit to jrose-apple/swift-lldb that referenced this pull request Apr 12, 2016

@lattner

This comment has been minimized.

Show comment
Hide comment
@lattner

lattner Apr 13, 2016

Collaborator

Awesome, congrats Jordan!

Collaborator

lattner commented on bc83940 Apr 13, 2016

Awesome, congrats Jordan!

@jrose-apple jrose-apple deleted the jrose-apple:optional-pointers branch Apr 13, 2016

@gribozavr

This comment has been minimized.

Show comment
Hide comment
@gribozavr

gribozavr Apr 15, 2016

Collaborator

I thought Slava fixed this issue. (These imports also appear in test/Interpreter/SDK/errors.swift.)

I thought Slava fixed this issue. (These imports also appear in test/Interpreter/SDK/errors.swift.)

This comment has been minimized.

Show comment
Hide comment
@jrose-apple

jrose-apple Apr 15, 2016

Member

Ah, you're right! Didn't realize that had gone in while this was in progress.

Member

jrose-apple replied Apr 15, 2016

Ah, you're right! Didn't realize that had gone in while this was in progress.

@gribozavr

This comment has been minimized.

Show comment
Hide comment
@gribozavr

gribozavr Apr 15, 2016

Collaborator

expectEqualSequence

expectEqualSequence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment