Higher Order Instructions



I was wondering if there has been any research into adding higher-
order instruction to the CIL? In other words instructions that either
push or pop instructions on the evaluation stack.

There are only a few core instructions that would be neccessary to
build others :

- constantly : pop a value, push an instruction on the stack that
returns that value
- compose : pop two instructions, push a new instruction that that
evaluates the first, then the second.
- eval : pop an instruction and evaluate

This functionality would make it easier for me to compile functional
languages to the CIL, and make them much more efficient.

We have been discussing the topic on Lambda-the-Ultimate (
http://lambda-the-ultimate.org/node/2177 ). The first response from
many people is that they believe that this functionality has a huge
performance hit, and loses the effect of statically verifiable type
safety. This is untrue.

I've developed a type-system for stack-based languages with higher-
order functions and written a paper about it at : http://www.cat-language.com/paper.html.
I believe the work to be novel, and I would be interested in
discussing it further.

Cheers,
Christopher Diggins
http://www.cdiggins.com

.



Relevant Pages

  • Re: Some confusion on Stack operation
    ... By integrating 16-bit and 32-bit segments into a single protected-mode task. ... assembler to differentiate between 'push ax' and 'push eax'. ... instruction coding is the same. ...
    (alt.lang.asm)
  • Re: To Richard Heathfield: enoughs enough
    ... > A single CISC instruction that searches for a NUL byte takes Otime. ... language" in a typical machine with a typical stack. ... push intIndex1 ...
    (comp.programming)
  • Re: [PATCH -tip 0/4 V3] tracing: kprobe-based event tracer
    ... to push these basic patches into -tip tree so that they can easily ... - Check insertion point safety by using instruction decoder. ... The functionality is genuinely useful, ... Not having this was the main design failure of original kprobes, ...
    (Linux-Kernel)
  • Re: Some confusion on Stack operation
    ... Using A 16-Bit TSS with 32-Bit Constructs ... assembler to differentiate between 'push ax' and 'push eax'. ... instruction coding is the same. ... ELSE (* OperandSize = 16*) ...
    (alt.lang.asm)
  • Re: Linux, X, ld, gcc, linking, shared libraries and stuff
    ... To choose the most appropriate encoding for a given ... optimization only within a single instruction (choose the ... Therefore if you want to push a 10 onto the stack, RosAsm ...
    (alt.lang.asm)