void Compiler::OptimizeConst(One<Exe>& exe) { One<Exe> oxe; Vector<Value> stack; ExeContext x(stack); oxe.Create<ExeConst>().value = exe->Eval(x); LLOG("OPTIMIZED constant: " << exe->Eval(stack, out)); exe = pick(oxe); optimized = true; }
String Render(const One<Exe>& exe, Renderer *r, Vector<Value>& var) { LTIMING("Render0"); ExeContext x(var, r); Value v = exe->Eval(x); x.out.Cat(AsString(v)); return x.out; }