Package org.openquark.cal.internal.machine.g

Examples of org.openquark.cal.internal.machine.g.Node


            throws CALExecutorException {

        //insertTextualRecordFieldPrimitive recordValue fieldName fieldValue
        NRecordValue recordValue = (NRecordValue) executor.internalEvaluate(arguments[0]);
        String fieldName = (String)executor.internalEvaluate(arguments[1]).getValue();
        Node fieldValue = arguments[2];

        return recordValue.insertRecordField(fieldName, fieldValue);
    }
View Full Code Here


            paramSources.add(RecordParamHelper.create(recordValue.getNthValue(i), executor));
        }
        for (int i = 0; i < nFields; ++i) {
           
            Node fieldDict = recordDict.getNthValue(i);           
            Node elem;

            if (index.getIntValue() == -1)
                elem = fieldDict;
            else
                elem = fieldDict.apply(index);
           
            //fill f's arguments using the param sources.
            for(RecordParamHelper param : paramSources) {
                elem = elem.apply(param.getNext(executor));
            }
           
            result.add(elem);
        }
       
View Full Code Here

                //compute "Debug.show valueDictionaryThunk xValueThunk"
                //this is just (after inlining Debug.show d = d)
                //valueDictionaryThunk xValueThunk
               
                String fieldName = fieldNames.get(i);
                Node valueDictionaryThunk = recordDictionary.getValue(fieldName);
                Node xValueThunk = x.getValue(fieldName);
                Node ap = valueDictionaryThunk.apply (xValueThunk);
               
                String apResult = (String)(executor.internalEvaluate(ap).getValue());
               
                showResult.append(apResult);
            }
           
            showResult.append(")");
           
        } else {
            showResult.append ("{");
           
            for (int i = 0; i < nFields; ++i) {
                if (i > 0) {
                    showResult.append (", ");
                }
               
                String fieldName = fieldNames.get(i);
                showResult.append(fieldName).append(" = ");
               
                //compute "Debug.show valueDictionaryThunk xValueThunk"
                //this is just (after inlining Debug.show d = d)
                //valueDictionaryThunk xValueThunk
                Node valueDictionaryThunk = recordDictionary.getValue(fieldName);
                Node xValueThunk = x.getValue(fieldName);
                Node ap = new NAp(valueDictionaryThunk, xValueThunk);
               
                String apResult = (String)(executor.internalEvaluate(ap).getValue());
               
                showResult.append(apResult);
            }
View Full Code Here

        final int nFields = fieldNames.size();
       
        for (int i = 0; i < nFields; ++i) {
           
            String fieldName = fieldNames.get(i);
            Node valueDictionaryThunk = recordDictionary.getValue(fieldName);
            Node xValueThunk = x.getValue(fieldName);
            Node yValueThunk = y.getValue(fieldName);
           
            //compute "Prelude.equals valueDictionaryThunk xValueThunk yValueThunk"
            //this is just (after inlining Prelude.equals d = d classMethodIndex)
            //valueDictionaryThunk classMethodIndex xValueThunk yValueThunk
           
View Full Code Here

TOP

Related Classes of org.openquark.cal.internal.machine.g.Node

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.