package org.mozartoz.truffle.nodes.local;

import org.mozartoz.truffle.nodes.OzNode;

import com.oracle.truffle.api.frame.FrameSlot;
import com.oracle.truffle.api.frame.VirtualFrame;

public class InitializeTmpNode extends OzNode {

	final FrameSlot slot;
	@Child OzNode value;

	public InitializeTmpNode(FrameSlot slot, OzNode value) {
		this.slot = slot;
		this.value = value;
	}

	@Override
	public Object execute(VirtualFrame frame) {
		frame.setObject(slot, value.execute(frame));
		return unit;
	}

}

@@ -227,32 +227,81 @@
 ode 
-%7B%0A%0A%09final FrameSlot slot
+implements FrameSlotNode %7B%0A%0A%09@Child WriteFrameSlotNode writeFrameSlotNode
 ;%0A%09@
@@ -390,19 +390,63 @@
 his.
-slot = 
+writeFrameSlotNode = WriteFrameSlotNodeGen.create(
 slot
+)
 ;%0A%09%09
@@ -469,16 +469,89 @@
 ue;%0A%09%7D%0A%0A
+%09public FrameSlot getSlot() %7B%0A%09%09return writeFrameSlotNode.getSlot();%0A%09%7D%0A%0A
 %09@Overri
@@ -604,28 +604,45 @@
 %7B%0A%09%09
-frame.setObject(slot
+writeFrameSlotNode.executeWrite(frame
 , va

Use a WriteFrameSlotNode in InitializeTmpNode