2 Copyright (c) 2007 Luca Bruno
4 This file is part of Smalltalk YX.
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the 'Software'), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
16 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
27 <primitive: 'SmallInteger_add'>
29 Annotation key: 'category' value: 'arithmetic'!
33 <primitive: 'SmallInteger_minus'>
35 Annotation key: 'category' value: 'arithmetic'!
39 <primitive: 'SmallInteger_mul'>
41 Annotation key: 'category' value: 'arithmetic'!
45 <primitive: 'SmallInteger_lt'>
47 Annotation key: 'category' value: 'testing'!
51 <primitive: 'SmallInteger_gt'>
53 Annotation key: 'category' value: 'testing'!
57 <primitive: 'SmallInteger_le'>
59 Annotation key: 'category' value: 'testing'!
63 <primitive: 'SmallInteger_ge'>
65 Annotation key: 'category' value: 'testing'!
69 <primitive: 'SmallInteger_eq'>
71 Annotation key: 'category' value: 'testing'!
77 ifFalse: [ ^ (self - 2) fibonacci + (self - 1) fibonacci ].!
78 Annotation key: 'category' value: 'mathematics'!
82 <primitive: 'SmallInteger_eq'>
88 <primitive: 'SmallInteger_ne'>
94 <primitive: 'SmallInteger_ne'>
100 <primitive: 'SmallInteger_quo'>
106 <primitive: 'SmallInteger_mod'>
111 SmallInteger methodsFor: 'bit-wise operations'
116 <primitive: 'SmallInteger_bitAnd'>
117 ^super bitAnd: aNumber
122 <primitive: 'SmallInteger_bitOr'>
123 ^ super bitOr: aNumber
128 <primitive: 'SmallInteger_bitXor'>
129 ^ super bitXor: aNumber
134 <primitive: 'SmallInteger_bitShift'>
135 ^ super bitShift: aNumber
139 SmallInteger methodsFor: 'testing'
153 SmallInteger methodsFor: 'coercing'
163 <primitive: 'SmallInteger_asFloat'>
169 <primitive: 'SmallInteger_asLargeInteger'>
175 <primitive: 'SmallInteger_print'>