<commit_before>package duro.runtime;

import java.util.List;

public class GeneratableProcess extends Process {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private CallFrameInfo callFrameInfo;
	private Object[] arguments;

	public GeneratableProcess(CallFrameInfo callFrameInfo, Object[] arguments) {
		this.callFrameInfo = callFrameInfo;
		this.arguments = arguments;
	}

	@Override
	public void replay(List<Instruction> commands) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void resume(List<Instruction> playedInstructions) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public CallFrameInfo getInstructions(Object key) {
		if(key.equals("iterator")) {
//			generatorInstructions.add(new Instruction(Instruction.OPCODE_LOAD_FUNC, new CallFrameInfo(parameterCount, variableCount, iteratorInstructions.toArray(new Instruction[iteratorInstructions.size()]))));
//			// Forward arguments
//			for(int i = 0; i < parameterCount; i++)
//				generatorInstructions.add(new Instruction(Instruction.OPCODE_LOAD_ARG, i));
//			// A generator is a special object, which understands a single kind of message: next
//			generatorInstructions.add(new Instruction(Instruction.OPCODE_SP_NEW_GENERATOR, parameterCount));
//			generatorInstructions.add(new Instruction(Instruction.OPCODE_RET, 1));
			
			Instruction[] instructions = new Instruction[] {
				new Instruction(Instruction.OPCODE_LOAD_FUNC, callFrameInfo),
				new Instruction(Instruction.OPCODE_LOAD_ARRAY, arguments),
				new Instruction(Instruction.OPCODE_SP_NEW_GENERATOR),
				new Instruction(Instruction.OPCODE_RET, 1)
			};
			
//			instructions[0] = new Instruction(Instruction.OPCODE_LOAD_FUNC, callFrameInfo);
//			for(int i = 0; i < arguments.length; i++)
//				instructions[1 + i] = new Instruction(Instruction.OPCODE_LOAD_ARG, i));
			return new CallFrameInfo(0, 0, instructions);
		}
		
		return null;
	}

	@Override
	public void define(Object key, Object value) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public Object lookup(Object key) {
		// TODO Auto-generated method stub
		return null;
	}
}<commit_msg>Changed generatable process to extend from dictionary process. Removed redundant overwrites in generatable process.  NOTICE: Previous commit was for "generator" process.<commit_after>package duro.runtime;

public class GeneratableProcess extends DictionaryProcess {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private CallFrameInfo callFrameInfo;
	private Object[] arguments;

	public GeneratableProcess(CallFrameInfo callFrameInfo, Object[] arguments) {
		this.callFrameInfo = callFrameInfo;
		this.arguments = arguments;
	}

	@Override
	public CallFrameInfo getInstructions(Object key) {
		if(key.equals("iterator")) {
//			generatorInstructions.add(new Instruction(Instruction.OPCODE_LOAD_FUNC, new CallFrameInfo(parameterCount, variableCount, iteratorInstructions.toArray(new Instruction[iteratorInstructions.size()]))));
//			// Forward arguments
//			for(int i = 0; i < parameterCount; i++)
//				generatorInstructions.add(new Instruction(Instruction.OPCODE_LOAD_ARG, i));
//			// A generator is a special object, which understands a single kind of message: next
//			generatorInstructions.add(new Instruction(Instruction.OPCODE_SP_NEW_GENERATOR, parameterCount));
//			generatorInstructions.add(new Instruction(Instruction.OPCODE_RET, 1));
			
			Instruction[] instructions = new Instruction[] {
				new Instruction(Instruction.OPCODE_LOAD_FUNC, callFrameInfo),
				new Instruction(Instruction.OPCODE_LOAD_ARRAY, arguments),
				new Instruction(Instruction.OPCODE_SP_NEW_GENERATOR),
				new Instruction(Instruction.OPCODE_RET, 1)
			};
			
//			instructions[0] = new Instruction(Instruction.OPCODE_LOAD_FUNC, callFrameInfo);
//			for(int i = 0; i < arguments.length; i++)
//				instructions[1 + i] = new Instruction(Instruction.OPCODE_LOAD_ARG, i));
			return new CallFrameInfo(0, 0, instructions);
		}
		
		return super.getInstructions(key);
	}
}
{'fraction_non_alphanumeric': 0.10353409656545545, 'fraction_numerical': 0.004479840716774514, 'mean_word_length': 4.858600583090379, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2883331', 'n_tokens_mistral': 1292, 'n_tokens_neox': 1156, 'n_words': 280}