SignedLongIntegerArray.st
author Claus Gittinger <cg@exept.de>
Thu, 09 Jun 2016 18:09:58 +0200
changeset 3934 3fc6968232c1
parent 3877 8f70271485f2
permissions -rw-r--r--
class: exept_expecco_plugin class definition
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
703
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
 COPYRIGHT (c) 1998 by Claus Gittinger / eXept Software AG
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
	      All Rights Reserved
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
 This software is furnished under a license and may be used
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 hereby transferred.
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
"
1177
f81425b27be5 inheritance & documentation
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
    12
"{ Package: 'stx:libbasic2' }"
f81425b27be5 inheritance & documentation
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
    13
3732
c82695606896 #FEATURE
Stefan Vogel <sv@exept.de>
parents: 3332
diff changeset
    14
"{ NameSpace: Smalltalk }"
c82695606896 #FEATURE
Stefan Vogel <sv@exept.de>
parents: 3332
diff changeset
    15
1177
f81425b27be5 inheritance & documentation
Claus Gittinger <cg@exept.de>
parents: 736
diff changeset
    16
UnboxedIntegerArray variableSignedLongLongSubclass:#SignedLongIntegerArray
703
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	instanceVariableNames:''
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	classVariableNames:''
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	poolDictionaries:''
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
	category:'Collections-Arrayed'
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
!SignedLongIntegerArray class methodsFor:'documentation'!
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
copyright
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
"
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
 COPYRIGHT (c) 1998 by Claus Gittinger / eXept Software AG
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
	      All Rights Reserved
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
 This software is furnished under a license and may be used
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 only in accordance with the terms of that license and with the
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 be provided or otherwise made available to, or used by, any
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
 other person.  No title to or ownership of the software is
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
 hereby transferred.
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
"
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
!
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
documentation
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
"
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
    SignedLongIntegerArrays store 64bit signed integers in the range 
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
    -16r8000000000000000..16r7FFFFFFFFFFFFFFF.
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
    In contrast to normal arrays (which store pointers to their elements),
1574
0c15fa756ca4 comments
Claus Gittinger <cg@exept.de>
parents: 1177
diff changeset
    44
    signedLongIntegerArrays store the values in a dense & compact way. 
703
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
    Since the representation fits the underlying C-language systems representation
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
    of signed longlong's, this is also useful to pass bulk data to c primitive code.
704
140e6119a3d7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 703
diff changeset
    47
    (the system makes certain, that the first longlong is aligned as required)
703
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
736
db164846b078 documentation
Claus Gittinger <cg@exept.de>
parents: 704
diff changeset
    49
    [memory requirements:]
db164846b078 documentation
Claus Gittinger <cg@exept.de>
parents: 704
diff changeset
    50
        OBJ-HEADER + (size * 8)
db164846b078 documentation
Claus Gittinger <cg@exept.de>
parents: 704
diff changeset
    51
703
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
    [see also:]
736
db164846b078 documentation
Claus Gittinger <cg@exept.de>
parents: 704
diff changeset
    53
        ByteArray BooleanArray FloatArray DoubleArray Array
db164846b078 documentation
Claus Gittinger <cg@exept.de>
parents: 704
diff changeset
    54
        WordArray SignedWordArray IntegerArray SignedIntegerArray
db164846b078 documentation
Claus Gittinger <cg@exept.de>
parents: 704
diff changeset
    55
        LongIntegerArray
703
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
    [author:]
736
db164846b078 documentation
Claus Gittinger <cg@exept.de>
parents: 704
diff changeset
    58
        Claus Gittinger
703
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
"
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
! !
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
2643
4aebab81d404 faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents: 1574
diff changeset
    62
!SignedLongIntegerArray class methodsFor:'queries'!
4aebab81d404 faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents: 1574
diff changeset
    63
4aebab81d404 faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents: 1574
diff changeset
    64
elementByteSize
3332
a11afae119d5 class: WordArray
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
    65
    "for bit-like containers, return the number of bytes stored per element.
a11afae119d5 class: WordArray
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
    66
     Here, 8 is returned"
a11afae119d5 class: WordArray
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
    67
2643
4aebab81d404 faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents: 1574
diff changeset
    68
    ^ 8
4aebab81d404 faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents: 1574
diff changeset
    69
4aebab81d404 faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents: 1574
diff changeset
    70
    "Created: / 15-09-2011 / 14:11:31 / cg"
3732
c82695606896 #FEATURE
Stefan Vogel <sv@exept.de>
parents: 3332
diff changeset
    71
!
c82695606896 #FEATURE
Stefan Vogel <sv@exept.de>
parents: 3332
diff changeset
    72
c82695606896 #FEATURE
Stefan Vogel <sv@exept.de>
parents: 3332
diff changeset
    73
maxVal
3877
8f70271485f2 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3866
diff changeset
    74
    "the maximum value which can be stored in instances of me.
8f70271485f2 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3866
diff changeset
    75
     For SignedLongIntegerArrays, this is 9223372036854775807 eg. 16r7FFFFFFFFFFFFFFF 
8f70271485f2 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3866
diff changeset
    76
     (largest 64bit signed int)"
3866
36992d5630f4 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3732
diff changeset
    77
3732
c82695606896 #FEATURE
Stefan Vogel <sv@exept.de>
parents: 3332
diff changeset
    78
    ^ 16r7FFFFFFFFFFFFFFF
3866
36992d5630f4 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3732
diff changeset
    79
!
36992d5630f4 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3732
diff changeset
    80
36992d5630f4 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3732
diff changeset
    81
minVal
3877
8f70271485f2 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3866
diff changeset
    82
    "the minimum value which can be stored in instances of me.
8f70271485f2 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3866
diff changeset
    83
     For SignedLongIntegerArrays, this is -9223372036854775808 eg. -16r8000000000000000 
8f70271485f2 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3866
diff changeset
    84
     (smallest 64bit signed int)"
3866
36992d5630f4 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3732
diff changeset
    85
36992d5630f4 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3732
diff changeset
    86
    ^ -16r8000000000000000
2643
4aebab81d404 faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents: 1574
diff changeset
    87
! !
4aebab81d404 faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents: 1574
diff changeset
    88
703
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
!SignedLongIntegerArray class methodsFor:'documentation'!
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
version
3732
c82695606896 #FEATURE
Stefan Vogel <sv@exept.de>
parents: 3332
diff changeset
    92
    ^ '$Header$'
3877
8f70271485f2 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3866
diff changeset
    93
!
8f70271485f2 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3866
diff changeset
    94
8f70271485f2 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3866
diff changeset
    95
version_CVS
8f70271485f2 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3866
diff changeset
    96
    ^ '$Header$'
703
a0a2d6178de4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
! !
3332
a11afae119d5 class: WordArray
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
    98