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

package com.xruby.runtime.lang.util;

import org.objectweb.asm.commons.GeneratorAdapter;
import org.objectweb.asm.commons.Method;

import com.xruby.compiler.codegen.CgUtil;
import com.xruby.compiler.codegen.Types;

class NoArgRunMethodHelper extends RunMethodHelper {
	private static final Method NoRunMethod = 
		CgUtil.getMethod("run", Types.RUBY_VALUE_TYPE, Types.RUBY_VALUE_TYPE, Types.RUBY_BLOCK_TYPE);
	
	protected Method getRunMethod() {
		return NoRunMethod;
	}
	
	protected void loadBlock(GeneratorAdapter mg) {
		mg.loadArg(1);
	}
	
	protected int rubyArgSize() {
		return 0;
	}

	protected void loadArgs(GeneratorAdapter mg) {
	}
}
