copyprop.dcf

来自「用Java实现的编译器。把源代码编译成SPARC汇编程序」· DCF 代码 · 共 45 行

DCF
45
字号
class Program {    void main() {    int a,b,c,d,e,f;    callout("printf","A? ");    //a = callout("readint");    callout("printf","B? ");    //b = callout("readint");    callout("printf","C? ");    //c = callout("readint");    a = 1;    b = 2;    c = 3;    d = a + b;    e = d;  // may be removed    f = e;   // should be optimized to f = d     callout("printf", "f: %d  ", f);        e = c;  // may not remove    f = e + 3; // may replace the e by c    a = b;  // may be removed    if (c < 5) {       e = e + c; // may replace the e by c      b = a;     // should replace a by b, maybe eliminate entirely    }    a = e - 3;    callout("printf", "a: %d  ", a);    callout("printf", "b: %d  ", b);    callout("printf", "c: %d  ", c);    callout("printf", "d: %d  ", d);    callout("printf", "e: %d  ", e);    callout("printf", "f: %d\n\n", f);  }}          

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?