Search in sources :

Example 1 with SelfNode

use of st.gravel.support.compiler.ast.SelfNode in project gravel by gravel-st.

the class SystemMappingUpdater method localLinkMethods_instVars_ownerReference_.

public MethodNode[] localLinkMethods_instVars_ownerReference_(final MethodNode[] _methods, final BoundVariableDeclarationNode[] _instVars, final Reference _ownerReference) {
    final SelfNode[] _owner;
    _owner = new SelfNode[1];
    _owner[0] = SelfNode.factory.basicNew();
    return st.gravel.support.jvm.ArrayExtensions.collect_(_methods, ((st.gravel.support.jvm.Block1<MethodNode, MethodNode>) (new st.gravel.support.jvm.Block1<MethodNode, MethodNode>() {

        @Override
        public MethodNode value_(final MethodNode _m) {
            final MethodNode _fieldAccessed;
            _fieldAccessed = ((MethodNode) SystemMappingUpdater.this.localLink_instVars_ownerReference_owner_(_m, _instVars, _ownerReference, _owner[0]));
            return (MethodNode) _fieldAccessed;
        }
    })));
}
Also used : List(java.util.List) ArrayList(java.util.ArrayList) UnaryMethodNode(st.gravel.support.compiler.ast.UnaryMethodNode) MethodNode(st.gravel.support.compiler.ast.MethodNode) SelfNode(st.gravel.support.compiler.ast.SelfNode)

Example 2 with SelfNode

use of st.gravel.support.compiler.ast.SelfNode in project gravel by gravel-st.

the class BlockInliner method link_.

public MethodNode link_(final MethodNode _aMethodNode) {
    final SelfNode _owner;
    final SystemMappingUpdater _updater;
    final BoundVariableDeclarationNode[] _instVars;
    _owner = SelfNode.factory.basicNew();
    _updater = _systemMapping.newSystemMappingUpdater();
    _instVars = _updater.allInstVarsForReference_(_receiverReference);
    return ((MethodNode) _updater.localLink_instVars_ownerReference_owner_(_aMethodNode, _instVars, _receiverReference, _owner));
}
Also used : SystemMappingUpdater(st.gravel.support.compiler.ast.SystemMappingUpdater) SelfNode(st.gravel.support.compiler.ast.SelfNode) BoundVariableDeclarationNode(st.gravel.support.compiler.ast.BoundVariableDeclarationNode)

Aggregations

SelfNode (st.gravel.support.compiler.ast.SelfNode)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 BoundVariableDeclarationNode (st.gravel.support.compiler.ast.BoundVariableDeclarationNode)1 MethodNode (st.gravel.support.compiler.ast.MethodNode)1 SystemMappingUpdater (st.gravel.support.compiler.ast.SystemMappingUpdater)1 UnaryMethodNode (st.gravel.support.compiler.ast.UnaryMethodNode)1