- live browsing of Self object memory -

lobby traitsvector

CopyDowns: vector

CreatorPath: traits vector

Module: vector

parent* = traits mutableIndexable
asVector = ( self)
at:IfAbsent: =
( 
    asVector _At: index IfFail: [ | :error. :name. |
        ('badTypeError' == error) &&
        [index asSmallInteger !== index] ifTrue: [
            ^ asVector at: index asSmallInteger IfAbsent: block
        ].
        if: error IsIndex: block Index: index ElseFailPrim: name])
at:Put:IfAbsent: =
( 
    asVector _At: index Put: value IfFail: [ | :error. :name. |
        ('badTypeError' == error) &&
        [index asSmallInteger !== index] ifTrue: [
            ^ asVector at: index asSmallInteger Put: value IfAbsent: block
        ].
        if: error IsIndex: block Index: index ElseFailPrim: name])
copy = ( clone)
copyAddLast: = ( (copySize: size succ) at: size Put: x)
copyRemoveAll = ( copySize: 0)
copySize:FillingWith: = ( cloneSize: n FillingWith: x)
methodPointer = ( methodPointerIfFail: raiseError)For literal vectors, this returns a mirror on the method that the literal vector is a part of; for other vectors this fails.
methodPointerIfFail: = ( _MethodPointerIfFail: b)For literal vectors, this returns a mirror on the method that the literal vector is a part of; for other vectors this fails.
randomlyDo: = ( (random permutation: size) do: [|:i| blk value: (at: i) With: i])
size = ( asVector _Size)
clone = ( clonePrim: _Size Filler: nil)Override clone to give memory the right numbers when space overflows. -- dmu 5/04
clonePrim:Filler: =
( 
    _Clone: n Filler: filler IfFail: [|:error|
      'outOfMemoryError' == error ifTrue: [
        memory allocationFailed: n.
        ^_Clone: n Filler: filler
      ] False: [
        error: error
      ]
    ])
cloneSize: = ( asVector clonePrim: n Filler: nil)
cloneSize:FillingWith: = ( asVector clonePrim: n Filler: filler)
prototype = ( vector)

printing

collectionName = 'vector'

range copy primitives

copyRangeDstPos:SrcArray:SrcPos:Len: = ( copyRangeDstPos: dstPos SrcArray: srcArray SrcPos: srcPos Len: len IfFail: raiseError)
copyRangeDstPos:SrcArray:SrcPos:Len:IfFail: =
( 
     _CopyRangeDstPos: dstPos Src: srcArray SrcPos: srcPos Length: len IfFail: [ | :error. :name |
        ('badTypeError' == error) &&
          [(dstPos asSmallInteger !== dstPos) ||
          [(srcPos asSmallInteger !== srcPos) || 
          [ len    asSmallInteger !== len    ]]]  ifTrue: [
           ^ _CopyRangeDstPos: dstPos   asSmallInteger
                          Src: srcArray 
                       SrcPos: srcPos   asSmallInteger
                       Length: len      asSmallInteger
                       IfFail: errBlk ] False: [
           ^ errBlk value: error With: name
        ]
    ])