fixed the method lookup bug in exec.c

This commit is contained in:
hyunghwan.chung
2016-11-21 13:56:20 +00:00
parent eaa9dbc958
commit e8985e6dc5
8 changed files with 57 additions and 45 deletions

View File

@ -304,7 +304,6 @@
{
self class cannotInstantiate
}
}
#class Object(Apex)

View File

@ -19,7 +19,8 @@
## ########################################################################
## most of the following methods can actuall become class methods of Apex.
## most of the following methods can actually become class methods of Apex.
## if the instance varibles can be made accessible from the Apex class.
## ########################################################################
#method name

View File

@ -1,17 +1,18 @@
#class(#word) Stdio(Object)
{
#method(#class) new: size
{
##self prohibited
##raise exception. prohibited...
^nil.
^(super new: 1)
}
#method(#class) new
{
##self prohibited
##raise exception. prohibited...
^nil.
^(super new: 1)
}
#method(#class) open: name for: mode
@ -35,6 +36,13 @@
}
}
#class(#word) Stdio2 (Stdio)
#class(#word) Stdio2(Stdio)
{
#method(#class) new
{
##self prohibited
##raise exception. prohibited...
^(super new).
}
}

View File

@ -124,9 +124,12 @@
System logNl: S'\0\0\0END OF MAIN\0AB\0\0\0C\0\0\0'.
v1 := Stdio open: '/tmp/1.txt' for: 'w+'.
##v1 := Stdio2 open: '/tmp/1.txt' for: 'w+'.
v1 := Stdio2 new open: '/tmp/1.txt' for: 'w+'.
v1 xxx.
v1 close.
nil isNil ifTrue: [ 'NIL NIL NIL' dump. ].
(Apex new) notNil ifTrue: [ 'APEX NIL NIL NIL' dump. ].
}
}