Package st.gravel.support.compiler.jvm

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


  }

  public JVMMethodCompiler producePrimitive_def_(final MethodNode _aMethodNode, final String[] _prim) {
    final JVMDefinedObjectType _ownerType;
    final String _name;
    final Invoke _invoke;
    final JVMMethodType[] _staticSignature;
    final int[] _selfOffset;
    _selfOffset = new int[1];
    _staticSignature = new JVMMethodType[1];
    _ownerType = JVMDefinedObjectType.factory.dottedClassName_(_prim[0]);
    _name = _prim[1];
    _invoke = _parent.createInvokeInstruction_name_numArgs_(_ownerType, _name, _aMethodNode.arguments().length);
    if (_invoke == null) {
      JVMMethodCompiler.this.emit_(NewInstance.factory.type_(JVMDefinedObjectType.factory.runtimeException()));
      JVMMethodCompiler.this.emit_(Dup.factory.basicNew());
      JVMMethodCompiler.this.pushString_("Cannot find method " + _ownerType.descriptorString() + ">>" + _name);
      JVMMethodCompiler.this.emit_(InvokeSpecial.factory.init_voidArguments_(JVMDefinedObjectType.factory.runtimeException(), st.gravel.support.jvm.ArrayFactory.with_(JVMDefinedObjectType.factory.string())));
      JVMMethodCompiler.this.emit_(AThrow.factory.basicNew());
      return JVMMethodCompiler.this;
    }
    _staticSignature[0] = _invoke.staticSignature();
    if (_invoke.isInvokeStatic() && st.gravel.support.jvm.IntegerExtensions.equals_(_invoke.signature().numArgs(), _aMethodNode.numArgs())) {
      _selfOffset[0] = 0;
    } else {
      _selfOffset[0] = 1;
      JVMMethodCompiler.this.produceVarRead_("self");
      JVMMethodCompiler.this.ensureCast_(_staticSignature[0].arguments()[0]);
View Full Code Here

TOP

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

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.