fixed some minor build flaws

This commit is contained in:
hyunghwan.chung
2016-05-13 15:10:34 +00:00
parent 36a54fd29f
commit 801b6d92d4
14 changed files with 240 additions and 158 deletions

View File

@ -297,3 +297,23 @@
self class cannotInstantiate
}
}
#class Object(Apex)
{
}
#class UndefinedObject(Apex)
{
#method isNil
{
^true
}
#method notNil
{
^false.
}
}

View File

@ -1,63 +0,0 @@
#class(#pointer) Array(Collection)
{
#method size
{
^self basicSize.
}
#method ubound
{
^(self basicSize - 1).
}
#method at: anInteger
{
^self basicAt: anInteger.
}
#method at: anInteger put: aValue
{
^self basicAt: anInteger put: aValue.
}
#method first
{
^self at: 0.
}
#method last
{
^self at: (self ubound).
}
#method do: aBlock
{
0 to: (self ubound) do: [:i | aBlock value: (self at: i)].
}
#method copy: anArray
{
0 to: (anArray ubound) do: [:i | self at: i put: (anArray at: i) ].
}
}
#class(#character) String(Array)
{
#method , aString
{
## concatenate two strings.
## TOOD: make this a primitive for performance.
| newsize newstr self_ubound|
newsize := self basicSize + aString basicSize.
##newstr := self class basicNew: newsize.
newstr := String basicNew: newsize. ## TODO: redefine , for symbol... it's a work arouind... symbols are not contacated to a symbol at this moment.
self_ubound := self ubound.
0 to: self_ubound do: [:i | newstr at: i put: (self at: i)].
0 to: (aString ubound) do: [:i | newstr at: (i + self_ubound + 1) put: (aString at: i)].
^newstr
}
}
#class(#character) Symbol(String)
{
}

View File

@ -1,13 +0,0 @@
#class(#byte) ByteArray(Collection)
{
#method at: anInteger
{
^self basicAt: anInteger.
}
#method at: anInteger put: aValue
{
^self basicAt: anInteger put: aValue.
}
}

View File

@ -1,31 +0,0 @@
#class Set(Collection)
{
#dcl tally bucket.
}
#class SymbolSet(Set)
{
}
#class Dictionary(Set)
{
}
#class SystemDictionary(Dictionary)
{
}
#class Namespace(Set)
{
}
#class PoolDictionary(Set)
{
}
#class MethodDictionary(Dictionary)
{
}

View File

@ -1,3 +1,122 @@
#class Collection(Object)
{
}
## -------------------------------------------------------------------------------
#class(#pointer) Array(Collection)
{
#method size
{
^self basicSize.
}
#method ubound
{
^(self basicSize - 1).
}
#method at: anInteger
{
^self basicAt: anInteger.
}
#method at: anInteger put: aValue
{
^self basicAt: anInteger put: aValue.
}
#method first
{
^self at: 0.
}
#method last
{
^self at: (self ubound).
}
#method do: aBlock
{
0 to: (self ubound) do: [:i | aBlock value: (self at: i)].
}
#method copy: anArray
{
0 to: (anArray ubound) do: [:i | self at: i put: (anArray at: i) ].
}
}
## -------------------------------------------------------------------------------
#class(#character) String(Array)
{
#method , aString
{
## concatenate two strings.
## TOOD: make this a primitive for performance.
| newsize newstr self_ubound|
newsize := self basicSize + aString basicSize.
##newstr := self class basicNew: newsize.
newstr := String basicNew: newsize. ## TODO: redefine , for symbol... it's a work arouind... symbols are not contacated to a symbol at this moment.
self_ubound := self ubound.
0 to: self_ubound do: [:i | newstr at: i put: (self at: i)].
0 to: (aString ubound) do: [:i | newstr at: (i + self_ubound + 1) put: (aString at: i)].
^newstr
}
}
## -------------------------------------------------------------------------------
#class(#character) Symbol(String)
{
}
## -------------------------------------------------------------------------------
#class(#byte) ByteArray(Collection)
{
#method at: anInteger
{
^self basicAt: anInteger.
}
#method at: anInteger put: aValue
{
^self basicAt: anInteger put: aValue.
}
}
## -------------------------------------------------------------------------------
#class Set(Collection)
{
#dcl tally bucket.
}
#class SymbolSet(Set)
{
}
#class Dictionary(Set)
{
}
#class SystemDictionary(Dictionary)
{
}
#class Namespace(Set)
{
}
#class PoolDictionary(Set)
{
}
#class MethodDictionary(Dictionary)
{
}

View File

@ -1,4 +0,0 @@
#class Object(Apex)
{
}

View File

@ -1,6 +1,4 @@
#include 'Apex.st'.
#include 'Object.st'.
#include 'UndefinedObject.st'.
#include 'Class.st'.
#include 'Boolean.st'.
@ -249,9 +247,7 @@
#include 'Collection.st'.
#include 'Collection-ByteArray.st'.
#include 'Collection-Array.st'.
#include 'Collection-Set.st'.
## #include 'Collec~1.st'.
#class(#pointer) CompiledMethod(Object)
{

View File

@ -1,12 +0,0 @@
#class UndefinedObject(Apex)
{
#method isNil
{
^true
}
#method notNil
{
^false.
}
}