RCS file: ts1.self,v Working file: ts1.self head: 1.29 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 29; selected revisions: 29 description: Simple tinySelf interpreter in Self. Jecel Mattos de Assumpcao Junior This interpreter gets most of its functionality from the underlying Self 4.0 implementation. Three different schedulers can be use to test the compatibility between tinySelf's parallel execution model and Self 4's. As it is not possible to _Perform primitives, an extra primitive object has been created with a normal Self method for each primitive in the system (which just calls the corresponding primitive). So with just a little patching we can also use the implementation's primitives (except in a few cases where it wouldn't make sense). ---------------------------- revision 1.29 date: 1997/07/02 18:49:03; author: jecel; state: Exp; lines: +377 -28 initial implementation of logging schedulers. They generate information that will later be used for rudimentary debugging. ---------------------------- revision 1.28 date: 1997/06/06 20:53:51; author: jecel; state: Exp; lines: +24 -5 implemented deadlock detection for non recursive code. fixed a bug where a send to a future was blocking only the sender of the new message, but not that message too. ---------------------------- revision 1.27 date: 1997/05/21 20:04:57; author: jecel; state: Exp; lines: +87 -11 even more graphs - distribution of sends (to futures, blocks, busy or idle objects, as well as normal and tail recursive sends) and distribution of receives (local slot access, assignments, data and constant slots in receiver, method and primitives). ---------------------------- revision 1.26 date: 1997/05/16 20:34:04; author: jecel; state: Exp; lines: +65 -10 more statistics and graphs. You can now see the bytecode distribution and the number of recursion deadlocks detected and handled (as well as the "branching structure" of waiting futures encountered while looking for deadlocks) ---------------------------- revision 1.25 date: 1997/05/13 20:45:10; author: jecel; state: Exp; lines: +52 -9 added statistics for the recursion detection algorithm ---------------------------- revision 1.24 date: 1997/04/28 18:34:54; author: jecel; state: Exp; lines: +5 -5 small bug fix: messages to future object with block arguments must go into a different wakeUp list than if not arguments are blocks. ---------------------------- revision 1.23 date: 1997/04/11 21:41:44; author: jecel; state: Exp; lines: +42 -11 added regression tests (finally!). fixed push self in block method bug. cleaned up primitive blocking on future arguments. added fixUp to leave blockedOn in a nice state for all futures. don't let the recursion detection place futures twice in ready queue. ---------------------------- revision 1.22 date: 1997/04/11 00:50:37; author: jecel; state: Exp; lines: +8 -3 implemented primitive blocking on future arguments. ---------------------------- revision 1.21 date: 1997/04/10 20:28:27; author: jecel; state: Exp; lines: +54 -23 fixed many bugs: tail recursion elimination was messing up killAllUpTo: for non local returns in blocks. implemented lookup for normal resends and directed resends ---------------------------- revision 1.20 date: 1997/04/05 03:26:52; author: jecel; state: Exp; lines: +52 -35 just a bunch of bug fixes ---------------------------- revision 1.19 date: 1997/03/31 17:05:26; author: jecel; state: Exp; lines: +21 -12 cleaned up recursion detection ---------------------------- revision 1.18 date: 1997/03/24 23:16:17; author: jecel; state: Exp; lines: +38 -6 recursion detection. ---------------------------- revision 1.17 date: 1997/03/24 22:21:17; author: jecel; state: Exp; lines: +8 -5 fixed two bugs related to blocking on messages ---------------------------- revision 1.16 date: 1997/03/19 19:18:42; author: jecel; state: Exp; lines: +5 -7 added ugly hack to remember the current context on tail recursion elimination for implicit self sends. ---------------------------- revision 1.15 date: 1997/03/17 23:53:42; author: jecel; state: Exp; lines: +22 -9 finished code for non local block returns (killUpTo:...) and fixed some bugs - was always creating blockMethodContexts when the receiver was a block, not just for the local method. ---------------------------- revision 1.14 date: 1997/03/14 23:34:43; author: jecel; state: Exp; lines: +61 -26 fixed bug: when send was blocking, the message wasn't getting on the receiver's message queue initial implementation of non local returns for blocks futures now have a parent for shared methods ---------------------------- revision 1.13 date: 1997/03/12 00:15:58; author: jecel; state: Exp; lines: +116 -40 blocks mostly work now ---------------------------- revision 1.12 date: 1997/03/05 14:36:48; author: jecel; state: Exp; lines: +46 -25 created a utility object to store common behavior for contexts and the scheduler. Indirections through ready future objects are now eliminated whenever possible. ---------------------------- revision 1.11 date: 1997/02/24 23:04:10; author: jecel; state: Exp; lines: +75 -2 Added a nice graphical view of execution statistics. ---------------------------- revision 1.10 date: 1997/02/20 23:07:57; author: jecel; state: Exp; lines: +104 -35 Mostly a lot of fixes for blocking on sends. The code is getting really ugly by now. Messages were not being removed from an object's pending list when they returned. Messages were not being added to the pending list in several cases (they still aren't for slot access messages). Tail recursion elimination was conflicting with other parts of the code (for normal sends). ---------------------------- revision 1.9 date: 1997/02/17 19:50:36; author: jecel; state: Exp; lines: +77 -31 send to future now blocks. very simple statistics. ---------------------------- revision 1.8 date: 1997/02/14 20:33:55; author: jecel; state: Exp; lines: +78 -2 ooops! version 1.8 was missing tinySelf cache... it was cut-and-pasted back from a previous version (1.5) and corrected to use mirrors instead of objects themselves for hash and lookup. method temporaries are now created at the bottom of the stack before the method starts running. Local temporary and constant slot now work. ---------------------------- revision 1.7 date: 1997/02/14 16:09:45; author: jecel; state: Exp; lines: +19 -59 Using more mirrors to avoid confusions with objects that don't know their hash. When sending messages or with arguments to primitives, handle multiple "layers" of futures. Corrected bug that made most futures point to themselves in computation when done. ---------------------------- revision 1.6 date: 1997/02/13 22:51:10; author: jecel; state: Exp; lines: +111 -24 '3+4' now works, but there is still some confusion with futures as arguments. ---------------------------- revision 1.5 date: 1997/02/07 23:04:35; author: jecel; state: Exp; lines: +374 -20 message sending is starting to work. non local returns work. the different types of scheduling are ready. one arg primitives with no fail block run. no message lookup yet. ---------------------------- revision 1.4 date: 1997/02/06 19:50:42; author: jecel; state: Exp; lines: +217 -11 eval: in tinySelf now works, calling eval in scheduler. And this relies on context to do most of the work (including deciding when it is done). Scheduler parent does nothing special at the end of each bytecodes, but the interleaved scheduler now keeps switching the running object. Context doByteFor:WhenDone: already works for index extensions and push literal bytecodes. Push and pop methods help it out. ---------------------------- revision 1.3 date: 1997/02/05 20:35:27; author: jecel; state: Exp; lines: +165 -6 Added future and context objects. Made the lookup cache work. 'eval: string' is the main tinySelf method. tested message and slot objects and will used them in the interpreter. ---------------------------- revision 1.2 date: 1997/02/03 22:39:47; author: jecel; state: Exp; lines: +6467 -91 Patched initPrimitives to cope with a bug in primitives primitiveList that ommited the final colon in a few long keyword names. Added IfFail: to every primitive as it seems that all can accept it. This will be useful to let the tinySelf interpreter intercept all errors in primitives. Added an annotation to place all slots created by initPrimitives in the ts1 module. ---------------------------- revision 1.1 date: 1997/02/03 21:42:20; author: jecel; state: Exp; Initial revision =============================================================================