On 13/12/2016 2:57 PM, Adam D. Ruppe wrote:
On Tuesday, 13 December 2016 at 01:03:54 UTC, Ignacious wrote:
Would it be difficult to implement the following, or something with
similar capabilities, as a patch to dmd?

It would be pretty hard to do with dmd because compiled code isn't
designed for modification, but it wouldn't be too hard to do with an
interpreter, which uses a tree of nodes already anyway. Dynamic (and JIT
VM based) languages often use this kind of thing internally for
optimizations and sometimes for self-modifying code.

As CTFE has proven, its do-able but we would be talking at least 6-9 months worth of work.
With no way its going into upstream.

Not to mention we'd need a whole host of AST nodes in druntime.
So really not worth the effort.
  • ... Ignacious via Digitalmars-d
    • ... Adam D. Ruppe via Digitalmars-d
      • ... rikki cattermole via Digitalmars-d
        • ... Jacob Carlborg via Digitalmars-d
          • ... Adam D. Ruppe via Digitalmars-d
    • ... Swoorup Joshi via Digitalmars-d
      • ... bauss (wtf happend to my name took some old cached title LOL??) via Digitalmars-d

Reply via email to