Revert "Rename @transparent to @_transparent for now."

This reverts commit 90fcbfe9a6.

Seems there are still some tests that are left not modified.
This commit is contained in:
Xin Tong
2015-11-14 07:04:31 -08:00
parent 6b1328d059
commit 16843684b2
69 changed files with 671 additions and 671 deletions

View File

@@ -54,7 +54,7 @@ public protocol IntegerArithmeticType : _IntegerArithmeticType, Comparable {
% for name,op,Action,result in integerBinaryOps:
/// ${Action} `lhs` and `rhs`, returning ${result} and trapping in case of
/// arithmetic overflow (except in -Ounchecked builds).
@_transparent
@transparent
@warn_unused_result
public func ${op} <T : _IntegerArithmeticType>(lhs: T, rhs: T) -> T {
return _overflowChecked(T.${name}WithOverflow(lhs, rhs))
@@ -62,7 +62,7 @@ public func ${op} <T : _IntegerArithmeticType>(lhs: T, rhs: T) -> T {
% if (op != '/') and (op != '%'):
/// ${name} `lhs` and `rhs`, silently discarding any overflow.
@_transparent
@transparent
@warn_unused_result
public func &${op} <T : _IntegerArithmeticType>(lhs: T, rhs: T) -> T {
return T.${name}WithOverflow(lhs, rhs).0
@@ -71,7 +71,7 @@ public func &${op} <T : _IntegerArithmeticType>(lhs: T, rhs: T) -> T {
/// ${name} `lhs` and `rhs` and store the result in `lhs`, trapping in
/// case of arithmetic overflow (except in -Ounchecked builds).
@_transparent
@transparent
public func ${op}= <T : _IntegerArithmeticType>(inout lhs: T, rhs: T) {
lhs = lhs ${op} rhs
}
@@ -107,13 +107,13 @@ public protocol SignedNumberType : Comparable, IntegerLiteralConvertible {
// Unary negation in terms of subtraction. This is a default
// implementation; models of SignedNumberType can provide their own
// implementations.
@_transparent
@transparent
public prefix func - <T : SignedNumberType>(x: T) -> T {
return 0 - x
}
// Unary +
@_transparent
@transparent
public prefix func + <T : SignedNumberType>(x: T) -> T {
return x
}
@@ -125,7 +125,7 @@ internal func _abs<Args>(args: Args) -> (_Abs, Args) {
}
// Do not use this operator directly; call abs(x) instead
@_transparent
@transparent
public func ~> <T : SignedNumberType>(x:T,_:(_Abs, ())) -> T {
return x < 0 ? -x : x
}
@@ -139,7 +139,7 @@ public protocol AbsoluteValuable : SignedNumberType {
}
// Do not use this operator directly; call abs(x) instead
@_transparent
@transparent
public func ~> <T : AbsoluteValuable>(x:T,_:(_Abs, ())) -> T {
return T.abs(x)
}
@@ -148,7 +148,7 @@ public func ~> <T : AbsoluteValuable>(x:T,_:(_Abs, ())) -> T {
///
/// Concrete instances of `SignedNumberType` can specialize this
/// function by conforming to `AbsoluteValuable`.
@_transparent
@transparent
public func abs<T : SignedNumberType>(x: T) -> T {
return x~>_abs()
}