added a new method modifier #lenient that applies to a primitive method. when set, it turns soft failure to error return
This commit is contained in:
@ -2,7 +2,7 @@ class Apex(nil)
|
||||
{
|
||||
}
|
||||
|
||||
class Error(Apex)
|
||||
class(#limited) Error(Apex)
|
||||
{
|
||||
}
|
||||
|
||||
@ -37,12 +37,7 @@ extend Apex
|
||||
## -------------------------------------------------------
|
||||
## -------------------------------------------------------
|
||||
|
||||
method(#class) dump
|
||||
{
|
||||
<primitive: #_dump>
|
||||
}
|
||||
|
||||
method dump
|
||||
method(#dual) dump
|
||||
{
|
||||
<primitive: #_dump>
|
||||
}
|
||||
@ -50,12 +45,7 @@ extend Apex
|
||||
## -------------------------------------------------------
|
||||
## -------------------------------------------------------
|
||||
|
||||
method(#class) yourself
|
||||
{
|
||||
^self.
|
||||
}
|
||||
|
||||
method yourself
|
||||
method(#dual) yourself
|
||||
{
|
||||
^self.
|
||||
}
|
||||
@ -63,6 +53,15 @@ extend Apex
|
||||
## -------------------------------------------------------
|
||||
## INSTANTIATION & INITIALIZATION
|
||||
## -------------------------------------------------------
|
||||
method(#class,#lenient) _basicNew
|
||||
{
|
||||
<primitive: #_basic_new>
|
||||
}
|
||||
method(#class,#lenient) _basicNew: size
|
||||
{
|
||||
<primitive: #_basic_new>
|
||||
}
|
||||
|
||||
method(#class) basicNew
|
||||
{
|
||||
| perr |
|
||||
@ -79,6 +78,7 @@ extend Apex
|
||||
{
|
||||
| perr |
|
||||
|
||||
## <primitive: #_basicNew>
|
||||
<primitive: #_basic_new>
|
||||
self primitiveFailed.
|
||||
|
||||
|
@ -339,7 +339,7 @@ class(#pointer) CompiledMethod(Object)
|
||||
method preambleCode
|
||||
{
|
||||
(* TODO: make this a primtive for performance *)
|
||||
^(self.preamble bitAnd: 16rFF) bitShift: -3.
|
||||
^(self.preamble bitShift: -4) bitAnd: 16r1F.
|
||||
}
|
||||
|
||||
method owner
|
||||
|
@ -43,7 +43,7 @@ class Association(Magnitude)
|
||||
}
|
||||
}
|
||||
|
||||
class Character(Magnitude)
|
||||
class(#limited) Character(Magnitude)
|
||||
{
|
||||
## method basicSize
|
||||
## {
|
||||
@ -53,7 +53,7 @@ class Character(Magnitude)
|
||||
method(#primitive) asInteger.
|
||||
}
|
||||
|
||||
class Number(Magnitude)
|
||||
class(#limited) Number(Magnitude)
|
||||
{
|
||||
method + aNumber
|
||||
{
|
||||
@ -300,7 +300,7 @@ class(#limited) Integer(Number)
|
||||
}
|
||||
}
|
||||
|
||||
class SmallInteger(Integer)
|
||||
class(#limited) SmallInteger(Integer)
|
||||
{
|
||||
## method basicSize
|
||||
## {
|
||||
|
Reference in New Issue
Block a user