From 6be90832498322ae63a5a28ed19130f115c8729a Mon Sep 17 00:00:00 2001 From: crawshaw Date: Thu, 6 Jan 2005 17:10:01 +0000 Subject: [PATCH] remove Trap.java darcs-hash:20050106171001-2eb37-90f8908dd73237beca6836ec9e05338101bd2f53.gz --- src/org/ibex/js/Trap.java | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 src/org/ibex/js/Trap.java diff --git a/src/org/ibex/js/Trap.java b/src/org/ibex/js/Trap.java deleted file mode 100644 index 580ed69..0000000 --- a/src/org/ibex/js/Trap.java +++ /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(); } -} -- 1.7.10.4