[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]
SCHERAN LIVES!!
- To: <xtech@xxxxxxxxxxx>, <unreal!xdudes>
- Subject: SCHERAN LIVES!!
- From: Young Rob Jellinghaus <autodesk!unreal!robertj>
- Date: Thu, 13 Dec 90 17:29:19 PST
Check this out!
/48\melange:~/work > bex.exe -gc0 &
/49\melange:~/work > xanscheme.sun4
> (load "~/work/scm/misc/moose.l")
> (load "~/work/elk/src/mip/xan/initmoose.l")
> (load-xan-moose (global-environment))
> (define my-connection (%send Connection 'connection #t #t))
setting up ac, av
calling connection
introducing to xm
returning handle
my-connection
> new connection s = 4
(define my-keymaster
(let-KeyMaster
(%send (%send my-connection
'receiveBootHeaper
(xan-make-KeyMaster-Category))
'%fh?)))
setting retval = cat_KeyMaster
introducing retval
returning handle
setting retval = cat_KeyMaster
introducing retval
returning handle
my-keymaster
> (define my-id-clubnamesdoc (%send my-keymaster 'fetchHomeDocID))
my-id-clubnamesdoc
> (define my-clubnames
(let-IndexedWaldo
(%send (%send my-keymaster
'fetchWaldo1
(%send my-id-clubnamesdoc '%fh?)
(%send (%send ID 'key "Map") '%fh?)
#f)
'%fh?)))
my-clubnames
> (%send my-clubnames 'type?)
IndexedWaldo
> (define my-adminID
(let-ID
(%send (%send my-clubnames
'get
(%send (%send PackOBits 'packOBits2 "System Admin") '%fh?))
'%fh?)))
my-adminID
> (%send my-adminID 'type?)
ID
> (%send my-adminID '%fh?)
#[FebeHandle 4905872]
> (define my-boolock
(let-BooLock
(%send (%send my-keymaster
'login
(%send my-adminID '%fh?))
'%fh?)))
my-boolock
> (define my-adminer
(%send (%send my-boolock 'boo) 'fetchAdminer))
my-adminer
> (%send my-adminer 'shutDown)
#t
> terminate ()
Closing connection 0, fd = 4
> ^D
/50\melange:~/work >
Yes, indeed, all the code above was generated automatically by Scheran, and
by God it works! Interpreted backend frobbing!
The stuff above is uglier than it will be (Paul just defined some lightweight
objects that will fit nicely, and Scheran'll learn to resolve overloading and
handle casts more gracefully). But this is the first time the backend's
actually conversed with Montage! (Isn't it? Rick, did you have this working
this summer?)
This test was translated from the following code from fbtestt.cxx:
void ShutdownTester::shutdownTest (ostream& oo){
SPTR(KeyMaster) km;
SPTR(ID) iDOfClubNamesDoc;
SPTR(IndexedWaldo) clubNames;
SPTR(ID) adminID;
SPTR(BooLock) booLock;
SPTR(Adminer) adminer;
km = this->keyMaster();
iDOfClubNamesDoc = km->fetchHomeDocID();
clubNames = CAST(IndexedWaldo,km->fetchWaldo(iDOfClubNamesDoc, ::key("Map"), FALSE));
adminID = CAST(ID,clubNames->get(::packOBits ("System Admin")));
booLock = CAST(BooLock,km->login(adminID));
adminer = booLock->boo()->fetchAdminer();
adminer->shutDown();
return;
}
Next week: smarter Scheran, local models, just generally tons of fun!
Rob