enhanced the compiler to handle default initial values for instance variables and class variables

This commit is contained in:
hyunghwan.chung
2017-04-24 04:26:03 +00:00
parent 4656bf128e
commit 5bf8d20a93
5 changed files with 109 additions and 69 deletions

View File

@ -99,7 +99,15 @@ class(#pointer) Process(Object)
class Semaphore(Object)
{
var count, waiting_head, waiting_tail, heapIndex, fireTimeSec, fireTimeNsec, ioIndex, ioData, ioMask.
var count := 0,
waiting_head := nil,
waiting_tail := nil,
heapIndex := -1,
fireTimeSec := 0,
fireTimeNsec := 0,
ioIndex := -1,
ioData := nil,
ioMask := 0.
method(#class) forMutualExclusion
{
@ -109,19 +117,6 @@ class Semaphore(Object)
^sem
}
method initialize
{
self.count := 0.
self.heapIndex := -1.
self.fireTimeSec := 0.
self.fireTimeNsec := 0.
self.ioIndex := -1.
self.ioData := nil.
self.ioMask := 0.
}
## ==================================================================
method(#primitive) signal.