Author: chip
Date: Wed Jul  5 17:31:15 2006
New Revision: 13170

Modified:
   trunk/docs/pdds/pdd21_namespaces.pod

Changes in other areas also in this revision:
Modified:
   trunk/include/parrot/global.h
   trunk/include/parrot/hll.h
   trunk/src/builtin.c
   trunk/src/global.c
   trunk/src/global_setup.c
   trunk/src/hll.c
   trunk/src/mmd.c
   trunk/src/objects.c
   trunk/src/ops/var.ops
   trunk/src/pmc/boolean.pmc
   trunk/src/pmc/default.pmc
   trunk/src/pmc/parrotinterpreter.pmc
   trunk/t/op/globals.t
   trunk/t/pmc/globals.t
   trunk/t/pmc/namespace.t
   trunk/t/src/compiler.t
   trunk/t/src/extend.t

Log:
* No longer support a namespace PMC as the second parameter to find_global
  and store_global.  These opcodes require namespaces to be designated
  (named) with a string, a key, or an array of strings.

  User code that already has a namespace PMC, should use the pdd21 namespace
  interface.

* Revamp the Parrot_{find,store}_global functions, each of which now has
  several variations for convenience in various circumstances:

   PMC *Parrot_find_namespace* - find an existing namespace PMC
   PMC *Parrot_make_namespace* - find an existing namespace PMC,
                                   or if not found, create it
   PMC *Parrot_find_global*    - fetch a global from an existing namespace
   PMC *Parrot_store_global*   - store a possibly new global into a possibly
                                 new namespace

  and helper functions for opcodes:

   PMC *Parrot_find_global_op  - find a global, optionally throwing an
                                  exception on failure
   PMC *Parrot_find_name_op    - find a variable which could be a lexical or
                                  a global in one of a few namespaces,
                                  optionally throwing an exception on failure


Modified: trunk/docs/pdds/pdd21_namespaces.pod
==============================================================================
--- trunk/docs/pdds/pdd21_namespaces.pod        (original)
+++ trunk/docs/pdds/pdd21_namespaces.pod        Wed Jul  5 17:31:15 2006
@@ -343,19 +343,29 @@
   $P1 = split "::", "Foo::Bar"
   $P0 = get_namespace $P1
 
-=item $P0 = find_global $P1, $S0
-
 =item $P0 = find_global $S0
 
-Find $P0 as the variable $S0 in the current namespace. or in $P1 (an array of
-names or a multidimensional hash index), relative to the HLL root namespace.
+Find $P0 as the variable named $S0 in the current namespace.
 
-=item store_global $P1, $S0, $P0
+=item $P0 = find_global $S1, $S0
+
+=item $P0 = find_global $P1, $S0
+
+Find $P0 as the variable named $S0 in $S1 (a first-level namespace) or $P1 (an
+array of names or a multidimensional hash index), relative to the HLL root
+namespace.
 
 =item store_global $S0, $P0
 
-Store $P0 as the variable $S0 in the current namespace, or in $P1 (an array of
-names or a multidimensional hash index), relative to the HLL root namespace.
+Store $P0 as the variable $S0 in the current namespace.
+
+=item store_global $S1, $S0, $P0
+
+=item store_global $P1, $S0, $P0
+
+Store $P0 as the variable $S0 in $S1 (a first-level namespace) or $P1 (an
+array of names or a multidimensional hash index), relative to the HLL root
+namespace.  If the given namespace does not exist it is created.
 
 =back
 

Reply via email to