Revision: 1894
          http://svn.sourceforge.net/vexi/?rev=1894&view=rev
Author:   mkpg2
Date:     2007-06-28 14:21:54 -0700 (Thu, 28 Jun 2007)

Log Message:
-----------
Removing 'feature'. RIP automatic cascading.

Modified Paths:
--------------
    core/trunk/org.ibex.js/src/org/ibex/js/Interpreter.jpp

Modified: core/trunk/org.ibex.js/src/org/ibex/js/Interpreter.jpp
===================================================================
--- core/trunk/org.ibex.js/src/org/ibex/js/Interpreter.jpp      2007-06-28 
21:05:47 UTC (rev 1893)
+++ core/trunk/org.ibex.js/src/org/ibex/js/Interpreter.jpp      2007-06-28 
21:21:54 UTC (rev 1894)
@@ -223,27 +223,9 @@
                             TrapMarker tm = (TrapMarker) o;
                             isWriteTrap = tm.t.isWriteTrap();
                             if (isWriteTrap) {
-                               // handles automatic cascading(FOOTNOTE:1)
-                               if (!tm.cascadeHappened && 
!JSU.toBoolean(retval)) {
-                                    JS.Trap t = tm.t.nextWrite();
-                                    while(t == null && tm.t.target() 
instanceof JS.Clone) {
-                                        t = 
((JS.Clone)tm.t.target()).getTrap(tm.t.key());
-                                        if(t != null && !t.isWriteTrap()) t = 
t.nextWrite();
-                                    }
-                                    if(t != null) {
-                                        tm.t = t; // we reuse the old trap 
marker
-                                        setupTrap(t, tm.val, tm, 
tm.trapargs.trapname);
-                                        pc--; // we increment it on the next 
iter
-                                        continue OUTER;
-                                    } else {
-                                        didTrapPut = true;
-                                        if(!tm.pauseOnCascade) 
tm.t.target().put(tm.t.key(), tm.val);
-                                        else Thread.cascadedTo = 
tm.trapargs.trapname;
-                                    }
-                                }else{
-                                       Thread.cascadedTo = null;
-                                       retval = CASCADE_PREVENTED;
-                                }
+                                // REMOVED automatic cascading(FOOTNOTE:1)
+                                       Thread.cascadedTo = null;
+                                       retval = CASCADE_PREVENTED;
                             }
                         }
                         CallMarker cm = (CallMarker) o;
@@ -281,7 +263,6 @@
                     if(t != null) t = write ? t.write() : t.read();
                 }
                 if(write) {
-                    tm.cascadeHappened = true;
                     stack.push(val);
                 }
                 if(t != null) {
@@ -640,7 +621,6 @@
         JS.Trap t;
         JS val;
         TrapArgs trapargs;
-        boolean cascadeHappened;
         final boolean pauseOnCascade;     // FOOTNOTE 2
         public TrapMarker(Interpreter cx, JS.Trap t, JS val, boolean 
pauseOnCascade) {
             super(cx);
@@ -794,7 +774,11 @@
 }
 
 /* FOOTNOTES
- * 1. Automatic cascading is a mechanism for making traps listener like... i.e.
+ * 1. 
+ * UPDATE - automatic cascading has been ripped out. Fundamentally unclean, 
and only
+ * really there as syntactic sugar, even dubious on that level.
+ * 
+ * Automatic cascading is a mechanism for making traps listener like... i.e.
  * though do not effect the put operation, they just do something when one 
happens. 
  *  
  * Automatic cascading is handled at runtime as when we compile to bytecodes we
@@ -804,6 +788,7 @@
  * 
  * Perhaps at a future point explicit cascades will be mandatory.
  * 
+ * 
  * 2. 'pause on cascade' is a mechanism with which at the
  * final cascade (i.e. no more traps to be fired) the interpreter gives up 
control 
  * (returns out) to let the original calling code decide what to do. 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to