Sha256: 71b7bb502b24f0608f091965243ae0e5651caf1ccb3ce4b2cc84b22bed577168

Contents?: true

Size: 1.61 KB

Versions: 135

Compression:

Stored size: 1.61 KB

Contents

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

package com.xruby.compiler.codegen;

import org.objectweb.asm.Type;

class ClassGeneratorForVarArgRubyMethod extends ClassGeneratorForRubyMethod {
    public ClassGeneratorForVarArgRubyMethod(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/RubyVarArgMethod";
    }

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

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

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

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

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

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

Version data entries

135 entries across 135 versions & 2 rubygems

Version Path
rhodes-7.6.0 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForVarArgRubyMethod.java
rhodes-7.5.1 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForVarArgRubyMethod.java
rhodes-7.4.1 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForVarArgRubyMethod.java
rhodes-7.1.17 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForVarArgRubyMethod.java
rhodes-6.2.0 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForVarArgRubyMethod.java
rhodes-6.0.11 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForVarArgRubyMethod.java
rhodes-5.5.18 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForVarArgRubyMethod.java
rhodes-5.5.17 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForVarArgRubyMethod.java
rhodes-5.5.15 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForVarArgRubyMethod.java
rhodes-5.5.0.22 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForVarArgRubyMethod.java
rhodes-5.5.2 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForVarArgRubyMethod.java
rhodes-5.5.0.7 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForVarArgRubyMethod.java
rhodes-5.5.0.3 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForVarArgRubyMethod.java
rhodes-5.5.0 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForVarArgRubyMethod.java
tauplatform-1.0.3 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForVarArgRubyMethod.java
tauplatform-1.0.2 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForVarArgRubyMethod.java
tauplatform-1.0.1 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForVarArgRubyMethod.java
rhodes-3.5.1.12 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForVarArgRubyMethod.java
rhodes-3.3.5 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForVarArgRubyMethod.java
rhodes-3.4.2 platform/shared/xruby/src/com/xruby/compiler/codegen/ClassGeneratorForVarArgRubyMethod.java