remove Trap.java
authorcrawshaw <crawshaw@ibex.org>
Thu, 6 Jan 2005 17:10:01 +0000 (17:10 +0000)
committercrawshaw <crawshaw@ibex.org>
Thu, 6 Jan 2005 17:10:01 +0000 (17:10 +0000)
darcs-hash:20050106171001-2eb37-90f8908dd73237beca6836ec9e05338101bd2f53.gz

src/org/ibex/js/Trap.java [deleted file]

diff --git a/src/org/ibex/js/Trap.java b/src/org/ibex/js/Trap.java
deleted file mode 100644 (file)
index 580ed69..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2004 Adam Megacz, see the COPYING file for licensing [GPL]
-package org.ibex.js;
-
-/**
- *  This class encapsulates a single trap placed on a given node. The
- *  traps for a given property name on a given box are maintained as a
- *  linked list stack, with the most recently placed trap at the head
- *  of the list.
- */
-final class Trap {
-
-    final JS target;          ///< the box on which this trap was placed
-    final JS key;             ///< the property that the trap was placed on
-
-    final JSFunction f;       ///< the function for this trap
-    Trap next;                ///< the next trap down the trap stack
-
-    Trap(JS b, JS n, JSFunction f, Trap nx) {
-        target = b; key = n; this.f = f; this.next = nx;
-    }
-    
-    boolean isReadTrap()  { return f.numFormalArgs == 0; }
-    boolean isWriteTrap() { return f.numFormalArgs != 0; }
-    Trap readTrap()  { Trap t = this; while(t!=null && t.isWriteTrap()) t = t.next; return t; }
-    Trap writeTrap() { Trap t = this; while(t!=null && t.isReadTrap())  t = t.next; return t; }
-    Trap nextReadTrap()  { return next == null ? null : next.readTrap();  }
-    Trap nextWriteTrap() { return next == null ? null : next.writeTrap(); }
-}