Re: string_exec()

new topic     » goto parent     » topic index » view thread      » older message » newer message
dcuny said...
jimcbrown said...

I was under the impression that what katsmeow really wanted was dynamic/self-modifying code + REPL. OTOH, the entire kitchen sink. Which is something I support.

I got that impression as well. I'm just trying to figure out how the mechanics of that would work.

I'm just trying to understand what's being ask for.

Logical.

dcuny said...

There are a couple bits that aren't clear to me. The where does "top level" code is one of them.

What I had envisioned includes the ability to modify true top-level code and then re-execute it.

So top level code would continue to live in the top level, with no special scoping or protection from pre-existing top level code.

Ironically, top level code is the easiest to deal with in a BCEL library since there's fewer internal data structures that need to be rearranged to deal with it (as compared to creating a whole new routine, for example).

dcuny said...

The other is how existing code gets to know about the new routines, since none of it was visible at the time of compilation.

This is hard to do since in addition to IL itself we'd have to update the internal data structures that manage routines. But the goal is to allow one to write whole new routines on the fly and call them.

dcuny said...

If the request is allowing self-modifying code, what exactly does that mean? Can a routine be redefined?

Yes.

dcuny said...

I think what I've suggested answers both of those questions, but doesn't answer the question of how to add top-level variables.

This also requires modifying internal data structures, but it's probably a little easier than deal with routines.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu