package edu.mit.streamjit.impl.compiler.insts;

import edu.mit.streamjit.impl.compiler.BasicBlock;
import edu.mit.streamjit.impl.compiler.ParentedList;
import edu.mit.streamjit.impl.compiler.Value;
import edu.mit.streamjit.impl.compiler.types.Type;
import edu.mit.streamjit.util.IntrusiveList;

/**
 *
 * @author Jeffrey Bosboom <jeffreybosboom@gmail.com>
 * @since 4/11/2013
 */
public abstract class Instruction extends Value implements ParentedList.Parented<BasicBlock> {
	@IntrusiveList.Previous
	private Instruction previous;
	@IntrusiveList.Next
	private Instruction next;
	@ParentedList.Parent
	private BasicBlock parent;

	protected Instruction(Type type) {
		super(type);
	}
	protected Instruction(Type type, String name) {
		super(type, name);
	}

	@Override
	public BasicBlock getParent() {
		return parent;
	}
}

@@ -184,21 +184,20 @@
 ompiler.
-Value
+User
 ;%0Aimport
@@ -418,13 +418,12 @@
 nds 
-Value
+User
  imp
@@ -679,69 +679,247 @@
 %0A%09%7D%0A
-%09protected Instruction(Type type, String name) %7B%0A%09%09super(type
+%0A%09protected Instruction(Type type, int operands) %7B%0A%09%09super(type, operands);%0A%09%7D%0A%0A%09protected Instruction(Type type, String name) %7B%0A%09%09super(type, name);%0A%09%7D%0A%0A%09protected Instruction(Type type, int operands, String name) %7B%0A%09%09super(type, operands
 , na

Instruction is a User, not just a Value