added more preamable codes.

enhanced the system to be able to attach trailing spaces to an object upon instantiation, especially for external modules to be able to secure GC-safe free workspace inside an instantiated object
added moo_setclasstrsize(), moo_getobjtrailer() for the trailer feature
This commit is contained in:
hyunghwan.chung
2017-02-14 08:29:30 +00:00
parent d7cb283e44
commit 71aa1110ed
19 changed files with 383 additions and 293 deletions

View File

@ -187,14 +187,14 @@ extend MethodContext
{
method isExceptionContext
{
## 10 - MOO_METHOD_PREAMBLE_EXCEPTION in VM.
^self.method preambleCode == 10.
## 12 - MOO_METHOD_PREAMBLE_EXCEPTION in VM.
^self.method preambleCode == 12.
}
method isEnsureContext
{
## 10 - MOO_METHOD_PREAMBLE_ENSURE in VM.
^self.method preambleCode == 11
## 13 - MOO_METHOD_PREAMBLE_ENSURE in VM.
^self.method preambleCode == 13
}
method ensureBlock
@ -208,7 +208,7 @@ extend MethodContext
* 8 instance variables, the ensure block must be at the 9th position
* which translates to index 8 *)
(self.method preambleCode == 11) ifFalse: [^nil].
(self.method preambleCode == 13) ifFalse: [^nil].
^self basicAt: 8.
}