Commit Graph

9 Commits

Author SHA1 Message Date
Dmitri Hrybenko
ff771d0984 stdlib: use fixed-width Builtin.IntXX types for Swift.Int and UInt
Using the unknown-sized Builtin.Word types complicates producing
compile-time overflow diagnostics.  If we don't know the target Word
size, we don't know if there is an overflow.  But SIL optimizer does not
know the size of Word, this is the point of having the Word type in the
first place.

Also, this opens up more possibilities for optimizations.

rdar://17604532

Swift SVN r24788
2015-01-28 05:22:42 +00:00
Flash Sheridan
ac30c67fd9 Revert the risky part of the change until I can investigate a bot failure report. The error below sounds like a genuine bug, though not one that I saw, but other errors didn't seem connected to my change.
/Users/buildslave/jenkins/workspace/swift_tools-RA_stdlib-RD/megaclang/src/tools/swift/validation-test/stdlib/NumericDiagnostics.swift.gyb:29:33: error: expected diagnostic not produced
      x1_UInt8 * x2_Float80  // expected-error{{ }}


Swift SVN r24238
2015-01-07 06:37:43 +00:00
Flash Sheridan
c5ebf4f2b5 Add tests for Float80, but only on the desktop; which is tricky, since Gyb doesn't know its destination.
Now 3835 tests.  Reviewed by Dmitri.

Swift SVN r24237
2015-01-07 04:58:25 +00:00
Flash Sheridan
c11eb40008 Iterate over more documented operators, now that the documentation has improved; now 3460 tests.
Replace hard-coded lists of real-number types, and of arithmetic and logical operators I’m testing, with lists added to SwiftIntTypes.py, which becomes a bit of a misnomer.  
Separate them into ones which only work on integer types, and those which also allow reals.
Do a double loop, over just the integers and then the reals as well.
Change the run line to allow importing StdlibUnittest with help from Dmitri, which I won't actually need until I do result type checking.

Approved by Dmitri.

Swift SVN r24029
2014-12-19 04:20:03 +00:00
Dmitri Hrybenko
60cf5d3d1b SwiftIntTypes.py: remove transitional '_new' suffix from a function name
Swift SVN r21579
2014-08-29 15:38:22 +00:00
Dmitri Hrybenko
40103a1309 SwiftIntTypes.py: remove unused code
Swift SVN r21578
2014-08-29 15:18:14 +00:00
Dmitri Hrybenko
14899abdf5 stdlib/FixedPoint: define the same set of 'truncatingBitPattern'
initializers on all platforms

rdar://18167806

Swift SVN r21570
2014-08-29 10:32:33 +00:00
Dmitri Hrybenko
7255f900b9 stdlib: move test for floating point conversion traps to the validation
testsuite

Fixes for traps will follow.


Swift SVN r21108
2014-08-08 15:20:05 +00:00
Dmitri Hrybenko
ac0d9b8175 stdlib/CGFloat: GYB'ify initializers that convert between CGFloat and
integer types.  Never miss an integer type again.

rdar://17853313

Swift SVN r20751
2014-07-30 11:24:11 +00:00