Package st.gravel.support.compiler.jvm

Examples of st.gravel.support.compiler.jvm.JVMClass


  }

  public Class compileClass_extensionPostfix_isStatic_identityClass_(final ClassDescriptionNode _aClassDescriptionNode, final String _extensionPostfix, final boolean _isStatic, final Class _identityClass) {
    final JVMClassCompiler _compiler;
    final Class _extensionClass;
    final JVMClass _jvmClass;
    _compiler = JVMClassCompiler.factory.classDescriptionNode_systemNode_systemMappingUpdater_isStatic_(_aClassDescriptionNode, _systemMapping.systemNode(), this, _isStatic);
    if (_extensionPostfix != null) {
      _compiler.extensionPostfix_(_extensionPostfix);
    }
    if (_identityClass != null) {
View Full Code Here


    final BlockNode _fieldAccessed;
    final BlockInnerClass _aBlockInnerClass;
    final BlockNode _intermediate;
    final BlockNode _holderized;
    final JVMClassCompiler _jvmClassCompiler;
    final JVMClass _blockClass;
    _intermediate = ((BlockNode) IntermediateNodeRewriter.factory.visit_(BlockNode.factory.expression_(_anExpression)));
    _holderized = ((BlockNode) NonLocalTempWritesToHolderConverter.factory.visit_(_intermediate));
    _fieldAccessed = ((BlockNode) VariableAccessToFieldAccessConverter.factory.instVars_owner_ownerReference_(new VariableDeclarationNode[] {}, NilLiteralNode.factory.basicNew(), _aReference).visit_(_holderized));
    _ownerType = JVMDefinedObjectType.factory.dottedClassName_("Expression$" + _compilerTools.nextExtensionPostfix());
    _aBlockInnerClass = BlockInnerClass.factory.ownerType_blockNode_copiedVariables_(_ownerType, _fieldAccessed, new JVMVariable[] {});
View Full Code Here

    return _jvmClassCompiler.withContainerAndExtraClasses_(_blockClass);
  }

  public Class compileInlinedMethod_selfType_allowBlockInlining_(final MethodNode _aMethodNode, final JVMNonPrimitiveType _selfType, final boolean _allowBlockInlining) {
    final JVMClassCompiler _jvmClassCompiler;
    final JVMClass _inlinedMethodClass;
    final JVMClass[] _jvmClasses;
    _jvmClassCompiler = JVMClassCompiler.factory.classDescriptionNode_systemNode_systemMappingUpdater_isStatic_(null, _systemNode, this.newSystemMappingUpdater(), true);
    _jvmClassCompiler.allowBlockInlining_(_allowBlockInlining);
    _jvmClassCompiler.selfType_(_selfType);
    _jvmClassCompiler.superType_(JVMDefinedObjectType.factory.object());
View Full Code Here

  public JVMClass compileBlock() {
    final JVMMethod _m;
    final JVMField[] _fields;
    final JVMMethodCompiler _methodCompiler;
    final JVMClass _jvmClass;
    _fields = st.gravel.support.jvm.ArrayExtensions.collect_(_block.copiedVariables(), ((st.gravel.support.jvm.Block1<JVMField, JVMVariable>) (new st.gravel.support.jvm.Block1<JVMField, JVMVariable>() {

      @Override
      public JVMField value_(final JVMVariable _each) {
        return (JVMField) _each.asField_isStatic_(_block.ownerType(), false);
      }
    })));
    _methodCompiler = JVMMethodCompiler.factory.parent_(_parent);
    _methodCompiler.isStatic_(false);
    _m = _methodCompiler.buildBlock_copiedVariables_blockType_(_block.blockNode(), _fields, _block.ownerType());
    _jvmClass = JVMClass.factory.type_superType_fields_methods_astConstants_(_block.ownerType(), this.superType(), _fields, st.gravel.support.jvm.ArrayFactory.with_with_(_m, this.createInit()), new BlockSendArgument[] {});
    if (_block.blockNode().sourcePosition() != null) {
      _jvmClass.source_(_block.blockNode().sourcePosition().sourceFile().name());
    }
    return _jvmClass;
  }
View Full Code Here

    }
    return this;
  }

  public JVMClass compileBlock_(final BlockInnerClass _aBlockInnerClass) {
    final JVMClass _blockClass;
    _blockClass = this.compileBlockNoAdd_(_aBlockInnerClass);
    _extraClasses.add(_blockClass);
    return _blockClass;
  }
View Full Code Here

    _innerclasses.add(_innerclass);
    return _innerclass;
  }

  public JVMClass createContainerClass() {
    final JVMClass _aClass;
    this.compileClinit();
    this.compileInit();
    this.compileClone();
    this.compileAstInit();
    _aClass = JVMClass.factory.type_superType_fields_methods_astConstants_(_ownerType, _superType, _fields.toArray(new JVMField[_fields.size()]), _jvmMethods.toArray(new JVMMethod[_jvmMethods.size()]), _astConstants.toArray(new BlockSendArgument[_astConstants.size()]));
    if (!((_classDescriptionNode == null) || (_classDescriptionNode.findSourceFile() == null))) {
      _aClass.source_(_classDescriptionNode.findSourceFile().name());
    }
    _jvmMethods = null;
    return _aClass;
  }
View Full Code Here

TOP

Related Classes of st.gravel.support.compiler.jvm.JVMClass

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.