Sha256: 74f5f73e6296d0dc6e7d8ceea848255d618e5da78b169e488129eb87e8a46ee4

Contents?: true

Size: 1.63 KB

Versions: 135

Compression:

Stored size: 1.63 KB

Contents

/**
 * Copyright 2007 Ye Zheng
 * Distributed under the BSD License
 */

package com.xruby.compiler.codegen;

import org.objectweb.asm.Type;

class ClassGeneratorForOneArgRubyMethod extends ClassGeneratorForRubyMethod {
    public ClassGeneratorForOneArgRubyMethod(String method_name, String fileName, String name, int argc, boolean has_asterisk_parameter, int default_argc, boolean is_singleton_method) {
        super(method_name, fileName, name, argc, has_asterisk_parameter, default_argc,
                is_singleton_method);
    }

    public String getSuperName() {
        return "com/xruby/runtime/lang/RubyOneArgMethod";
    }

    public String getRunMethodName() {
        return "com.xruby.runtime.lang.RubyValue run(com.xruby.runtime.lang.RubyValue, com.xruby.runtime.lang.RubyValue, com.xruby.runtime.lang.RubyBlock)";
    }

    public Type getSuperClassType() {
        return Types.RUBY_ONEARGMETHOD_TYPE;
    }

    public String getSuperCtorName() {
        return "void <init> ()";
    }

    public void pushBasciArgForSuperArg(MethodGenerator mg, int argc, boolean has_asterisk_parameter, int default_argc) {
    }

    public void loadMethodPrameter(int index) {
        assert(0 == index);
        getMethodGenerator().loadArg(1);
    }

    public void storeMethodParameter(int index) {
        assert(0 == index);
        getMethodGenerator().storeArg(1);
    }

    public void callSuperMethod(boolean has_no_arg, boolean has_one_arg) {
        this.getMethodGenerator().RubyAPI_callSuperOneArgMethod();
    }

	public void loadArgOfMethodForBlock() {
		MethodGenerator mg = getMethodGenerator();
		mg.loadArg(1);
		mg.pushNull();
	}
}

Version data entries

135 entries across 135 versions & 2 rubygems

Version Path
rhodes-3.2.2 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForOneArgRubyMethod.java
rhodes-3.2.2.beta platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForOneArgRubyMethod.java
rhodes-3.2.1 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForOneArgRubyMethod.java
rhodes-3.2.0 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForOneArgRubyMethod.java
rhodes-3.2.0.beta.9 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForOneArgRubyMethod.java
rhodes-3.2.0.beta.8 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForOneArgRubyMethod.java
rhodes-3.2.0.beta.7 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForOneArgRubyMethod.java
rhodes-3.2.0.beta.6 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForOneArgRubyMethod.java
rhodes-3.2.0.beta.5 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForOneArgRubyMethod.java
rhodes-3.2.0.beta.4 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForOneArgRubyMethod.java
rhodes-3.2.0.beta.2 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForOneArgRubyMethod.java
rhodes-3.2.0.beta.1 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForOneArgRubyMethod.java
rhodes-3.1.1 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForOneArgRubyMethod.java
rhodes-3.1.1.beta platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForOneArgRubyMethod.java
rhodes-3.1.0 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForOneArgRubyMethod.java
rhodes-3.1.0.beta.5 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForOneArgRubyMethod.java
rhodes-3.1.0.beta.4 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForOneArgRubyMethod.java
rhodes-3.1.0.beta.3 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForOneArgRubyMethod.java
rhodes-3.1.0.beta.2 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForOneArgRubyMethod.java
rhodes-3.1.0.beta.1 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForOneArgRubyMethod.java