Exemplo n.º 1
0
        private static void CompileCreateCopy(FunctionCompiler compiler, FunctionalNode createCopyNode)
        {
            VariableReference copyFrom = createCopyNode.InputTerminals.ElementAt(0).GetTrueVariable(),
                              copyTo   = createCopyNode.OutputTerminals.ElementAt(1).GetTrueVariable();

            compiler.CopyValue(
                () => compiler.LoadValueAsReference(copyFrom),
                () => compiler.LoadLocalAllocationReference(copyTo),
                copyFrom.Type.GetReferentType());
        }