diff src/symtab.h @ 9144:c6463412aebb

eliminate symbol_table::scope_stack; fix scoping issue with evalin
author John W. Eaton <jwe@octave.org>
date Tue, 21 Apr 2009 15:39:57 -0400
parents da58ec8f62e8
children f27a8c07f0b2
line wrap: on
line diff
--- a/src/symtab.h
+++ b/src/symtab.h
@@ -947,34 +947,6 @@
       }
   }
 
-  static void push_scope (scope_id scope)
-  {
-    if (scope_stack.empty ())
-      scope_stack.push_front (xtop_scope);
-
-    set_scope (scope);
-
-    scope_stack.push_front (scope);
-  }
-
-  static void pop_scope (void)
-  {
-    scope_stack.pop_front ();
-
-    set_scope (scope_stack[0]);
-  }
-
-  static void pop_scope (void *) { pop_scope (); }
-
-  static void reset_scope (void)
-  {
-    scope_stack.clear ();
-
-    scope_stack.push_front (xtop_scope);
-
-    set_scope (xtop_scope);
-  }
-
   static void set_parent_scope (scope_id scope)
   {
     xparent_scope = scope;
@@ -985,6 +957,13 @@
     set_parent_scope (-1);
   }
 
+  static void erase_scope (void *ptr)
+  {
+    scope_id *pscope = static_cast<scope_id *> (ptr);
+
+    erase_scope (*pscope);
+  }
+
   static void erase_scope (scope_id scope)
   {
     assert (scope != xglobal_scope);
@@ -1896,8 +1875,6 @@
 
   static context_id xcurrent_context;
 
-  static std::deque<scope_id> scope_stack;
-
   symbol_table (void)
     : table_name (), table () { }