Battle-plan for CTFE

Rory McGuire via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Mon Sep 5 06:13:03 PDT 2016


On Mon, Sep 5, 2016 at 1:39 PM, Stefan Koch via Digitalmars-d-announce <
digitalmars-d-announce at puremagic.com> wrote:

> FunctionCall support is done. (with a lot of room for improvement)
> you can already return strings.
> now I just have to finish string-comparison and string-concat support to
> make it usable.
>
> And of course the correct translation of logical-expressions...
>


Great news! Any chance you post the commit link in your announcements?
Would be really interested in being able to do a quick scan of what changed.

For that latest commit I just see the below. Is this all the changes? :)
what does it mean? (you replaced the old ctfe for functions with your new
one?)

% git show 4ba35de160cdb82bb289ad2860cf5163e1636ab5
commit 4ba35de160cdb82bb289ad2860cf5163e1636ab5
Author: Stefan Koch <Uplink.Coder at googlemail.com>
Date:   Mon Sep 5 13:35:26 2016 +0200

    hack in ability to do function calls

diff --git a/src/ctfe_bc.d b/src/ctfe_bc.d
index 2e9d0fa..a96d37c 100644
--- a/src/ctfe_bc.d
+++ b/src/ctfe_bc.d
@@ -143,6 +143,7 @@ else static if (UsePrinterBackend)
 else
 {
     import ddmd.ctfe.bc;
+import ddmd.dinterpret;

     alias BCGenT = BCGen;

@@ -2252,6 +2253,10 @@ public:
             IGaveUp = true;
             return;
         }
+        import ddmd.dinterpret;
+        ctfeInterpret(ce).accept(this);
+        return ;
+        /*
         auto fn = _sharedCtfeState.getFunctionIndex(ce.f);
         if (!fn)
         {
@@ -2296,6 +2301,8 @@ public:
                 assert(0, "Could not gen Function: " ~ ce.f.toString);
             IGaveUp = true;
         }
+        */
+
     }

     override void visit(ReturnStatement rs)




BTW: thanks for all the work!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-announce/attachments/20160905/cfec5cda/attachment.html>


More information about the Digitalmars-d-announce mailing list