added stix_isint(), stix_inttooow(), stix_oowtoint().

added stix_eqints(), stix_neints(), stix_gtints(), stix_geints(), stix_ltints(), stix_leints().
enhanced some primitive handlers to support large integers
This commit is contained in:
hyunghwan.chung
2015-12-27 18:02:59 +00:00
parent fff2af4762
commit c427f39a12
9 changed files with 627 additions and 284 deletions

View File

@ -43,6 +43,18 @@
self primitiveFailed.
}
#method(#class) ngcNew
{
<primitive: #_ngc_new>
self primitiveFailed.
}
#method(#class) ngcNew: anInteger
{
<primitive: #_ngc_new_with_size>
self primitiveFailed.
}
#method(#class) new
{
| x |
@ -66,6 +78,11 @@
^self.
}
#method ngcDispose
{
<primitive: #_ngc_dispose>
self primitiveFailed.
}
## -------------------------------------------------------
## -------------------------------------------------------
#method shallowCopy

View File

@ -186,6 +186,19 @@
{
^self to: end by: 1 do: aBlock.
}
#method abs
{
self < 0 ifTrue: [^self negated].
^self.
}
#method sign
{
self < 0 ifTrue: [^-1].
self > 0 ifTrue: [^1].
^0.
}
}
#class SmallInteger(Number)

View File

@ -407,6 +407,7 @@ PROCESS TESTING
##self a: 1 b: 2 c: 3 d: 4 e: 5 f: 6 g: 7.
##self a: 1 b: 2 c: 3.
"
FFI isNil dump.
FFI notNil dump.