MUD-Dev
mailing list archive
[ Other Periods
| Other mailing lists
| Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
[MUD-Dev] Re: PDMud thread summary
> From: Jon A. Lambert <jlsysinc#ix,netcom.com>
>
Replying to my post. Sort of like talking to myself. ;)
>
> An example header entry protocol using name-mangling:
>
> #module@function!offset$arg1$arg1...$argn
>
> Where #module is the module or class name
> Where @function is the function name, method name, or dataname
> Where !offset is the relative offset to executable bytecode or symbol table
> Where $arg entry would be of the following format
>
Upon further review this is lame name mangling scheme..
Rather: #module@function$args makes more sense.
The first 3 parts can be used to match the function called
allowing polymorphism. !offset shouldn't be part of a scheme but
can be included in a module header in table format:
#mangled_name offset
I think Chris Gray mentioned fixing bytecode memory addresses
at startup, allowing direct jumps into functions. While a performance
boost, it makes dynamic registration and unregistration of modules
more complex.
Are function calls resolved at compile-time, registration, or run-time?
> $ style type
>
> Where style would be:
> a argument
> r return
Having the return value, buys nothing either, since the caller may not use
it and wouldn't be able to build a proper mangled name.
> int cast(int time, string spell) ----> #magic@cast!0x00000000$ri$ai$as
> char foo(char * bptr, bar i) ----> #magic@foo!0x1FBA2000$rc$apc$aebar
int cast(int time, string spell) ----> #magic@cast$ai$as
char foo(char * bptr, bar i) ----> #magic@foo$apc$aebar
For a standard call format, why not just have the caller push() it's address and then all the
arguments from left-to-right onto the stack then jump to the callee. The callee pops() them
out and loads local variables right-to-left. Return would pop() the return address off the
stack and push() the result and jump to the address just popped.
This is pretty simple. There maybe better ways of doing this. Message passing perhaps?
Thoughts?
- Thread context:
- [MUD-Dev] Re: PDMud thread summary, (continued)
- [MUD-Dev] Re: PDMud thread summary,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Fri 23 Oct 1998, 03:17 GMT
- [MUD-Dev] Re: PDMud thread summary,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Fri 23 Oct 1998, 03:33 GMT
- [MUD-Dev] Re: PDMud thread summary,
Jon A. Lambert jlsysinc#ix,netcom.com, Fri 23 Oct 1998, 15:05 GMT
- [MUD-Dev] Re: PDMud thread summary,
ApplePiMan ApplePiMan#aol,com, Fri 23 Oct 1998, 23:48 GMT
- [MUD-Dev] Re: PDMud thread summary,
ApplePiMan ApplePiMan#aol,com, Sat 24 Oct 1998, 00:02 GMT
- [MUD-Dev] Re: PDMud thread summary,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Sat 24 Oct 1998, 01:01 GMT
[ Other Periods
| Other mailing lists
| Search
]