Package org.cx4a.rsense.util

Examples of org.cx4a.rsense.util.NodeDiff


    public static void methodPartialUpdate(Graph graph, MethodDefNode node, DynamicMethod newMethod, DynamicMethod oldMethod, IRubyObject receiver) {
        if (newMethod instanceof Method && oldMethod instanceof Method) {
            Method newmeth = (Method) newMethod;
            Method oldmeth = (Method) oldMethod;
            NodeDiff nodeDiff = graph.getNodeDiff();

            if (nodeDiff != null
                && nodeDiff.noDiff(node.getArgsNode(), oldmeth.getArgsNode())
                && nodeDiff.noDiff(node.getBodyNode(), oldmeth.getBodyNode())) { // XXX nested class, defn
                // FIXME annotation diff
                newmeth.shareTemplates(oldmeth);
            } else {
                Logger.debug(SourceLocation.of(node), "templates not shared: %s", newmeth);
            }
View Full Code Here


            }
        }
    }

    public static void classPartialUpdate(Graph graph, RubyModule klass, Node bodyNode) {
        NodeDiff nodeDiff = graph.getNodeDiff();

        if (bodyNode != null) {
            ClassTag oldTag = getClassTag(klass);
            if (nodeDiff != null && oldTag != null) {
                List<Node> partialDiff = nodeDiff.diff(bodyNode, oldTag.getBodyNode());
                if (partialDiff != null) {
                    Logger.debug(SourceLocation.of(bodyNode), "class partial update: %s %s", klass, partialDiff.size());
                    for (Node dirty : partialDiff) {
                        graph.createVertex(dirty);
                    }
View Full Code Here

TOP

Related Classes of org.cx4a.rsense.util.NodeDiff

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.