[svn:parrot] r46852 - in branches/ops_pct: . compilers/imcc compilers/pct/src/PAST compilers/pct/src/POST config/auto docs/book/pir editor examples/languages/squaak/t examples/tutorial include/parrot lib/Parrot lib/Parrot/Test runtime/parrot/library runtime/parrot/library/Archive runtime/parrot/library/HTTP src src/dynoplibs src/gc src/ops src/packfile src/pmc src/string t/compilers/pct t/dynoplibs t/library t/native_pbc t/op tools/build

bacek at svn.parrot.org bacek at svn.parrot.org
Fri May 21 12:02:33 UTC 2010


Author: bacek
Date: Fri May 21 12:02:31 2010
New Revision: 46852
URL: https://trac.parrot.org/parrot/changeset/46852

Log:
Merge branch 'master' into ops_pct_local

Conflicts:
	MANIFEST
	runtime/parrot/library/HTTP/Message.pir
	runtime/parrot/library/LWP.pir
	t/library/lwp.t
	t/library/uri.t

Added:
   branches/ops_pct/src/dynoplibs/deprecated.ops
   branches/ops_pct/t/dynoplibs/deprecated.t
Modified:
   branches/ops_pct/CREDITS
   branches/ops_pct/MANIFEST
   branches/ops_pct/PBC_COMPAT
   branches/ops_pct/compilers/imcc/pbc.c
   branches/ops_pct/compilers/pct/src/PAST/Compiler.pir
   branches/ops_pct/compilers/pct/src/PAST/Node.pir
   branches/ops_pct/compilers/pct/src/POST/Compiler.pir
   branches/ops_pct/compilers/pct/src/POST/Node.pir
   branches/ops_pct/config/auto/warnings.pm
   branches/ops_pct/docs/book/pir/ch04_variables.pod
   branches/ops_pct/editor/pir-mode.el
   branches/ops_pct/examples/languages/squaak/t/00-sanity.t
   branches/ops_pct/examples/tutorial/12_math_ops_pasm.pir
   branches/ops_pct/include/parrot/embed.h
   branches/ops_pct/include/parrot/exceptions.h
   branches/ops_pct/include/parrot/stat.h
   branches/ops_pct/include/parrot/string_funcs.h
   branches/ops_pct/lib/Parrot/Headerizer.pm
   branches/ops_pct/lib/Parrot/Test/Pod.pm
   branches/ops_pct/parrotbug
   branches/ops_pct/runtime/parrot/library/Archive/Tar.pir
   branches/ops_pct/runtime/parrot/library/HTTP/Message.pir
   branches/ops_pct/runtime/parrot/library/LWP.pir
   branches/ops_pct/runtime/parrot/library/URI.pir
   branches/ops_pct/runtime/parrot/library/distutils.pir
   branches/ops_pct/src/dynoplibs/Defines.in
   branches/ops_pct/src/dynoplibs/Rules.in
   branches/ops_pct/src/dynoplibs/obscure.ops
   branches/ops_pct/src/embed.c
   branches/ops_pct/src/exceptions.c
   branches/ops_pct/src/gc/gc_private.h
   branches/ops_pct/src/gc/mark_sweep.c
   branches/ops_pct/src/ops/math.ops
   branches/ops_pct/src/ops/ops.num
   branches/ops_pct/src/ops/set.ops
   branches/ops_pct/src/packfile/pf_items.c
   branches/ops_pct/src/pmc/string.pmc
   branches/ops_pct/src/string/api.c
   branches/ops_pct/src/utils.c
   branches/ops_pct/t/compilers/pct/post.t
   branches/ops_pct/t/dynoplibs/obscure.t
   branches/ops_pct/t/library/lwp.t
   branches/ops_pct/t/library/uri.t
   branches/ops_pct/t/native_pbc/annotations.pbc
   branches/ops_pct/t/native_pbc/integer_1.pbc
   branches/ops_pct/t/native_pbc/number_1.pbc
   branches/ops_pct/t/native_pbc/string_1.pbc
   branches/ops_pct/t/op/arithmetics.t
   branches/ops_pct/t/op/integer.t
   branches/ops_pct/t/op/jit.t
   branches/ops_pct/t/op/number.t
   branches/ops_pct/t/op/string.t
   branches/ops_pct/tools/build/headerizer.pl

Modified: branches/ops_pct/CREDITS
==============================================================================
--- branches/ops_pct/CREDITS	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/CREDITS	Fri May 21 12:02:31 2010	(r46852)
@@ -742,6 +742,11 @@
 U: moritz
 D: Test infrastructure for languages/perl6/ and Perl 6 in general
 
+N: Nat Tuck
+U: Chandon
+E: nat at ferrus.net
+D: 2010 Hybrid Threads GSoC project
+
 N: Neil Conway
 
 N: Nicholas Clark

Modified: branches/ops_pct/MANIFEST
==============================================================================
--- branches/ops_pct/MANIFEST	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/MANIFEST	Fri May 21 12:02:31 2010	(r46852)
@@ -1258,6 +1258,7 @@
 src/dynoplibs/Defines.in                                    []
 src/dynoplibs/README                                        []doc
 src/dynoplibs/Rules.in                                      []
+src/dynoplibs/deprecated.ops                                []
 src/dynoplibs/math.ops                                      []
 src/dynoplibs/obscure.ops                                   []
 src/dynpmc/Defines.in                                       []
@@ -1651,6 +1652,7 @@
 t/distro/file_metadata.t                                    [test]
 t/distro/manifest.t                                         [test]
 t/distro/manifest_generated.t                               [test]
+t/dynoplibs/deprecated.t                                    [test]
 t/dynoplibs/math.t                                          [test]
 t/dynoplibs/obscure.t                                       [test]
 t/dynpmc/dynlexpad.t                                        [test]

Modified: branches/ops_pct/PBC_COMPAT
==============================================================================
--- branches/ops_pct/PBC_COMPAT	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/PBC_COMPAT	Fri May 21 12:02:31 2010	(r46852)
@@ -27,6 +27,7 @@
 
 # please insert tab separated entries at the top of the list
 
+6.17	2010.05.20	NotFound	store encoding of string constants
 6.16	2010.05.18	plobsing	move freeze/thaw adjacent to visit
 6.15	2010.05.06	bacek	add StringBuilder PMC
 6.14	2010.05.03	coke	remove popaction, pushmark, pushaction ops.

Modified: branches/ops_pct/compilers/imcc/pbc.c
==============================================================================
--- branches/ops_pct/compilers/imcc/pbc.c	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/compilers/imcc/pbc.c	Fri May 21 12:02:31 2010	(r46852)
@@ -888,7 +888,7 @@
 IMCC_string_from_reg(PARROT_INTERP, ARGIN(const SymReg *r))
 {
     ASSERT_ARGS(IMCC_string_from_reg)
-    const char *buf = r->name;
+    char *buf = r->name;
 
     if (r->type & VT_ENCODED) {
         /*
@@ -896,19 +896,63 @@
          * get first part as charset, rest as string
          */
         STRING     *s;
+        const CHARSET *s_charset;
+        const ENCODING *s_encoding = NULL;
+        const ENCODING *src_encoding;
         const char *charset;
-        char * const p = strchr(r->name, '"');
+        #define MAX_NAME 31
+        char charset_name[MAX_NAME + 1];
+        char encoding_name[MAX_NAME + 1];
+        char * p = strchr(r->name, '"');
+        char * p2 = strchr(r->name, ':');
         PARROT_ASSERT(p && p[-1] == ':');
-
-        p[-1]   = 0;
-        charset = r->name;
+        if (p2 < p -1) {
+            strncpy(encoding_name, buf, p2 - buf);
+            encoding_name[p2-buf] = '\0';
+            strncpy(charset_name, p2 +1, p - p2 - 2);
+            charset_name[p- p2 - 2] = '\0';
+            /*fprintf(stderr, "%s:%s\n", charset_name, encoding_name);*/
+            s_charset = Parrot_find_charset(interp, charset_name);
+            s_encoding = Parrot_find_encoding(interp, encoding_name);
+        }
+        else {
+            strncpy(charset_name, buf, p - buf - 1);
+            charset_name[p - buf - 1] = '\0';
+            /*fprintf(stderr, "%s\n", charset_name);*/
+            s_charset = Parrot_find_charset(interp, charset_name);
+        }
+        if (strcmp(charset_name, "unicode") == 0)
+            src_encoding = Parrot_utf8_encoding_ptr;
+        else
+            src_encoding = Parrot_fixed_8_encoding_ptr;
+        if (s_encoding == NULL)
+            s_encoding = src_encoding;
 
         /* past delim */
         buf     = p + 1;
-        s       = Parrot_str_unescape(interp, buf, '"', charset);
-
-        /* restore colon, as we may reuse this string */
-        p[-1] = ':';
+        if (strcmp(charset_name, "unicode") == 0 && strcmp(encoding_name, "utf8") == 0) {
+            /* Special case needed for backward compatibility with utf8 literals
+             * using \xHH\xHH byte sequences */
+            s = Parrot_str_unescape(interp, buf, '"', "utf8:unicode");
+        }
+        else {
+            p       = buf;
+            p2      = strchr(buf, '"');
+            while (p2 != NULL) {
+               p  = p2;
+               p2 = strchr(p + 1, '"');
+            }
+            {
+                STRING * aux = Parrot_str_new_init(interp, buf, p - buf,
+                        src_encoding, s_charset, 0);
+                s = Parrot_str_unescape_string(interp, aux,
+                        s_charset, s_encoding, PObj_constant_FLAG);
+                if (!CHARSET_VALIDATE(interp, s))
+                       Parrot_ex_throw_from_c_args(interp, NULL,
+                               EXCEPTION_INVALID_STRING_REPRESENTATION,
+                               "Malformed string");
+            }
+        }
         return s;
     }
     else if (*buf == '"') {

Modified: branches/ops_pct/compilers/pct/src/PAST/Compiler.pir
==============================================================================
--- branches/ops_pct/compilers/pct/src/PAST/Compiler.pir	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/compilers/pct/src/PAST/Compiler.pir	Fri May 21 12:02:31 2010	(r46852)
@@ -791,7 +791,7 @@
     unshift blockpast, node
 
     .local string name, pirflags, blocktype
-    .local pmc nsentry, subid, ns, hll
+    .local pmc nsentry, subid, ns, hll, multi
     name = node.'name'()
     pirflags = node.'pirflags'()
     blocktype = node.'blocktype'()
@@ -799,6 +799,7 @@
     subid = node.'subid'()
     ns = node.'namespace'()
     hll = node.'hll'()
+    multi = node.'multi'()
 
     ##  handle nsentry attribute
     $I0 = defined nsentry
@@ -824,7 +825,7 @@
     ##  create a POST::Sub node for this block
     .local pmc bpost
     $P0 = get_hll_global ['POST'], 'Sub'
-    bpost = $P0.'new'('node'=>node, 'name'=>name, 'blocktype'=>blocktype, 'namespace'=>ns, 'hll'=>hll, 'subid'=>subid)
+    bpost = $P0.'new'('node'=>node, 'name'=>name, 'blocktype'=>blocktype, 'namespace'=>ns, 'hll'=>hll, 'subid'=>subid, 'multi'=>multi)
     unless pirflags goto pirflags_done
     bpost.'pirflags'(pirflags)
   pirflags_done:

Modified: branches/ops_pct/compilers/pct/src/PAST/Node.pir
==============================================================================
--- branches/ops_pct/compilers/pct/src/PAST/Node.pir	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/compilers/pct/src/PAST/Node.pir	Fri May 21 12:02:31 2010	(r46852)
@@ -286,6 +286,18 @@
     .tailcall self.'attr'('vivibase', value, has_value)
 .end
 
+=item multitype([type])
+
+Get/set MMD type of Var when used as parameter of Block.
+
+=cut
+
+.sub 'multitype' :method
+    .param pmc value           :optional
+    .param int has_value       :opt_flag
+    .tailcall self.'attr'('multitype', value, has_value)
+.end
+
 
 =back
 
@@ -570,6 +582,19 @@
     .tailcall self.'attr'('namespace', value, has_value)
 .end
 
+=item multi([multi])
+
+Get/set the multi signature for this block.  The C<multi> argument
+can be either a string or an array of strings.
+
+=cut
+
+.sub 'multi' :method
+    .param pmc value           :optional
+    .param int has_value       :opt_flag
+    .tailcall self.'attr'('multi', value, has_value)
+.end
+
 
 =item hll([hll])
 

Modified: branches/ops_pct/compilers/pct/src/POST/Compiler.pir
==============================================================================
--- branches/ops_pct/compilers/pct/src/POST/Compiler.pir	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/compilers/pct/src/POST/Compiler.pir	Fri May 21 12:02:31 2010	(r46852)
@@ -321,6 +321,30 @@
     set_global '$?NAMESPACE', ns
     nskey = self.'key_pir'(ns)
 
+    .local pmc multi
+    multi = node.'multi'()
+    unless multi goto no_multi
+
+    .local pmc parts, m_iter
+    parts  = new ['ResizableStringArray']
+    m_iter = iter multi
+  multi_iter:
+    unless m_iter goto multi_iter_done
+    $P0 = shift m_iter
+    $S0 = $P0
+    if $S0 == "_" goto push_part
+    $S0 = self.'key_pir'($P0)
+  push_part:
+    push parts, $S0
+    goto multi_iter
+
+  multi_iter_done:
+    pirflags = concat pirflags, ' :multi('
+    $S0 = join ',', parts
+    pirflags = concat pirflags, $S0
+    pirflags = concat pirflags, ')'
+  no_multi:
+
   subpir_start:
     $P0 = node['loadinit']
     if null $P0 goto loadinit_done

Modified: branches/ops_pct/compilers/pct/src/POST/Node.pir
==============================================================================
--- branches/ops_pct/compilers/pct/src/POST/Node.pir	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/compilers/pct/src/POST/Node.pir	Fri May 21 12:02:31 2010	(r46852)
@@ -204,6 +204,12 @@
     .tailcall self.'attr'('outer', value, has_value)
 .end
 
+.sub 'multi' :method
+    .param pmc value           :optional
+    .param int has_value       :opt_flag
+    .tailcall self.'attr'('multi', value, has_value)
+.end
+
 
 .sub 'subid' :method
     .param pmc value           :optional

Modified: branches/ops_pct/config/auto/warnings.pm
==============================================================================
--- branches/ops_pct/config/auto/warnings.pm	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/config/auto/warnings.pm	Fri May 21 12:02:31 2010	(r46852)
@@ -182,6 +182,8 @@
         -Wdeprecated-declarations
         -Wno-format-extra-args
         -Wno-import
+        -Wsuggest-attribute=pure
+        -Wsuggest-attribute=const
         -Wunreachable-code
         -Wunused
         -Wunused-function

Modified: branches/ops_pct/docs/book/pir/ch04_variables.pod
==============================================================================
--- branches/ops_pct/docs/book/pir/ch04_variables.pod	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/docs/book/pir/ch04_variables.pod	Fri May 21 12:02:31 2010	(r46852)
@@ -31,17 +31,6 @@
 
 =end PIR_FRAGMENT
 
-X<exchange opcode>
-The C<exchange> opcode swaps the contents of two variables of the same type.
-This example sets C<$I0> to the value of C<$I1> and sets C<$I1> to the value
-of C<$I0>.
-
-=begin PIR_FRAGMENT
-
-  exchange $I0, $I1
-
-=end PIR_FRAGMENT
-
 X<null opcode>
 The C<null> opcode sets an integer or number variable to a zero value,
 and undefines a string or object.
@@ -99,12 +88,12 @@
 modify the argument in place. Some of the most common unary numeric
 opcodes are C<inc> (increment)X<inc opcode>, C<dec> (decrement)X<dec
 opcode>, C<abs> (absolute value)X<abs opcode>, C<neg> (negate)X<neg
-opcode>, and C<fact> (factorial)X<fact opcode>:
+opcode>:
 
 =begin PIR_FRAGMENT
 
   $N0 = abs -5.0  # the absolute value of -5.0 is 5.0
-  $I1 = fact  5   # the factorial of 5 is 120
+  $I0 = 120
   inc $I1         # 120 incremented by 1 is 121
 
 =end PIR_FRAGMENT

Modified: branches/ops_pct/editor/pir-mode.el
==============================================================================
--- branches/ops_pct/editor/pir-mode.el	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/editor/pir-mode.el	Fri May 21 12:02:31 2010	(r46852)
@@ -66,7 +66,7 @@
   :type 'boolean
   :group 'pir)
 
-(defcustom pir-basic-indent 8
+(defcustom pir-basic-indent 4
   "*Extra indentation applied to statements in PIR block structures."
   :type 'integer
   :group 'pir)

Modified: branches/ops_pct/examples/languages/squaak/t/00-sanity.t
==============================================================================
--- branches/ops_pct/examples/languages/squaak/t/00-sanity.t	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/examples/languages/squaak/t/00-sanity.t	Fri May 21 12:02:31 2010	(r46852)
@@ -88,7 +88,6 @@
 
 # for-statement
 
-var i = 1
 
 for var i = 18, 20 do
     print("ok ", i)
@@ -104,11 +103,11 @@
 #end
 
 
-i = 0
-while i < 5 do
+var j = 0
+while j < 5 do
 
-    print("ok ", i + g)
-    i = i + 1
+    print("ok ", j + g)
+    j = j + 1
 end
 
 

Modified: branches/ops_pct/examples/tutorial/12_math_ops_pasm.pir
==============================================================================
--- branches/ops_pct/examples/tutorial/12_math_ops_pasm.pir	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/examples/tutorial/12_math_ops_pasm.pir	Fri May 21 12:02:31 2010	(r46852)
@@ -9,8 +9,14 @@
 For a large list of the various mathematical operations supported by Parrot,
 see the documentation at F<src/ops/math.ops>.
 
+Some uncommon math operations have opcodes packaged with Parrot but not part of
+core. These must be loaded as libraries. see the documentation at
+F<src/dynoplibs/math.ops>, F<src/dynoplibs/obscure.ops>.
+
 =cut
 
+.loadlib 'obscure_ops' # fact lives in the obscure dynops lib
+
 .sub main :main
     $N0 = abs -5.0  # the absolute value of -5.0 is 5.0
     print $N0

Modified: branches/ops_pct/include/parrot/embed.h
==============================================================================
--- branches/ops_pct/include/parrot/embed.h	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/include/parrot/embed.h	Fri May 21 12:02:31 2010	(r46852)
@@ -141,14 +141,17 @@
         __attribute__nonnull__(1);
 
 PARROT_EXPORT
+PARROT_PURE_FUNCTION
 Parrot_UInt Parrot_test_debug(PARROT_INTERP, Parrot_UInt flag)
         __attribute__nonnull__(1);
 
 PARROT_EXPORT
+PARROT_PURE_FUNCTION
 Parrot_Int Parrot_test_flag(PARROT_INTERP, Parrot_Int flag)
         __attribute__nonnull__(1);
 
 PARROT_EXPORT
+PARROT_PURE_FUNCTION
 Parrot_UInt Parrot_test_trace(PARROT_INTERP, Parrot_UInt flag)
         __attribute__nonnull__(1);
 

Modified: branches/ops_pct/include/parrot/exceptions.h
==============================================================================
--- branches/ops_pct/include/parrot/exceptions.h	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/include/parrot/exceptions.h	Fri May 21 12:02:31 2010	(r46852)
@@ -118,6 +118,15 @@
 PARROT_EXPORT
 PARROT_DOES_NOT_RETURN
 PARROT_COLD
+void do_panic(
+    NULLOK_INTERP,
+    ARGIN_NULLOK(const char *message),
+    ARGIN_NULLOK(const char *file),
+    unsigned int line);
+
+PARROT_EXPORT
+PARROT_DOES_NOT_RETURN
+PARROT_COLD
 void exit_fatal(int exitcode, ARGIN(const char *format), ...)
         __attribute__nonnull__(2);
 
@@ -215,15 +224,8 @@
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
-PARROT_DOES_NOT_RETURN
-PARROT_COLD
-void do_panic(
-    NULLOK_INTERP,
-    ARGIN_NULLOK(const char *message),
-    ARGIN_NULLOK(const char *file),
-    unsigned int line);
-
 void Parrot_print_backtrace(void);
+#define ASSERT_ARGS_do_panic __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
 #define ASSERT_ARGS_exit_fatal __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(format))
 #define ASSERT_ARGS_Parrot_assert __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -261,7 +263,6 @@
 #define ASSERT_ARGS_die_from_exception __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(exception))
-#define ASSERT_ARGS_do_panic __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
 #define ASSERT_ARGS_Parrot_print_backtrace __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 /* HEADERIZER END: src/exceptions.c */

Modified: branches/ops_pct/include/parrot/stat.h
==============================================================================
--- branches/ops_pct/include/parrot/stat.h	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/include/parrot/stat.h	Fri May 21 12:02:31 2010	(r46852)
@@ -29,13 +29,13 @@
 #define STAT_BACKUPTIME           9
 #define STAT_UID                 10
 #define STAT_GID                 11
-#define STAT_PLATFORM_DEV       - 1
-#define STAT_PLATFORM_INODE     - 2
-#define STAT_PLATFORM_MODE      - 3
-#define STAT_PLATFORM_NLINKS    - 4
-#define STAT_PLATFORM_DEVTYPE   - 5
-#define STAT_PLATFORM_BLOCKSIZE - 6
-#define STAT_PLATFORM_BLOCKS    - 7
+#define STAT_PLATFORM_DEV        -1
+#define STAT_PLATFORM_INODE      -2
+#define STAT_PLATFORM_MODE       -3
+#define STAT_PLATFORM_NLINKS     -4
+#define STAT_PLATFORM_DEVTYPE    -5
+#define STAT_PLATFORM_BLOCKSIZE  -6
+#define STAT_PLATFORM_BLOCKS     -7
 
 /* &end_gen */
 

Modified: branches/ops_pct/include/parrot/string_funcs.h
==============================================================================
--- branches/ops_pct/include/parrot/string_funcs.h	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/include/parrot/string_funcs.h	Fri May 21 12:02:31 2010	(r46852)
@@ -390,7 +390,8 @@
 STRING * Parrot_str_unescape_string(PARROT_INTERP,
     ARGIN(const STRING *src),
     ARGIN(const CHARSET *charset),
-    ARGIN(const ENCODING *encoding))
+    ARGIN(const ENCODING *encoding),
+    UINTVAL flags)
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         __attribute__nonnull__(3)

Modified: branches/ops_pct/lib/Parrot/Headerizer.pm
==============================================================================
--- branches/ops_pct/lib/Parrot/Headerizer.pm	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/lib/Parrot/Headerizer.pm	Fri May 21 12:02:31 2010	(r46852)
@@ -247,8 +247,10 @@
     }
     if ( $return_type =~ /\*/ ) {
         if ( !$macros{PARROT_CAN_RETURN_NULL} && !$macros{PARROT_CANNOT_RETURN_NULL} ) {
-            $self->squawk( $file, $name,
-                'Returns a pointer, but no PARROT_CAN(NOT)_RETURN_NULL macro found.' );
+            if ( $name !~ /^yy/ ) { # Don't complain about lexer-created functions
+                $self->squawk( $file, $name,
+                    'Returns a pointer, but no PARROT_CAN(NOT)_RETURN_NULL macro found.' );
+            }
         }
         elsif ( $macros{PARROT_CAN_RETURN_NULL} && $macros{PARROT_CANNOT_RETURN_NULL} ) {
             $self->squawk( $file, $name,

Modified: branches/ops_pct/lib/Parrot/Test/Pod.pm
==============================================================================
--- branches/ops_pct/lib/Parrot/Test/Pod.pm	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/lib/Parrot/Test/Pod.pm	Fri May 21 12:02:31 2010	(r46852)
@@ -210,7 +210,7 @@
             @files = @{ $self->{argv} };
         }
         else {
-            print STDERR "\nFinding files with POD, this may take a minute.\n";
+            print STDERR "\n# Finding files with POD, this may take a minute.\n";
             @files = (
                 keys(%{ $self->{manifest} }),
                 keys(%{ $self->{manifest_gen} })

Modified: branches/ops_pct/parrotbug
==============================================================================
--- branches/ops_pct/parrotbug	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/parrotbug	Fri May 21 12:02:31 2010	(r46852)
@@ -428,7 +428,17 @@
 # Display everything collected.
 sub dump_report { 
     print "==> Dumping message...\n";
-    print format_message();
+    my $report = format_message();
+
+    if ( defined($ENV{PAGER}) ) {
+        open(my $ofh, '|-', $ENV{PAGER});
+        print {$ofh} $report;
+        close $ofh;
+    }
+    else {
+        print $report;
+    }
+
 }
 
 

Modified: branches/ops_pct/runtime/parrot/library/Archive/Tar.pir
==============================================================================
--- branches/ops_pct/runtime/parrot/library/Archive/Tar.pir	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/runtime/parrot/library/Archive/Tar.pir	Fri May 21 12:02:31 2010	(r46852)
@@ -70,11 +70,13 @@
     .local string data
     data = $P0.'readall'(path)
     pop_eh
-    .local int uid, gid, mtime
+    .local int mode, uid, gid, mtime
+    mode = stat path, .STAT_PLATFORM_MODE
+    mode &= 0o777
     uid = stat path, .STAT_UID
     gid = stat path, .STAT_GID
     mtime = stat path, .STAT_MODIFYTIME
-    .tailcall new_from_data(path, data, uid :named('uid'), gid :named('gid'), mtime :named('mtime'))
+    .tailcall new_from_data(path, data, mode :named('mode'), uid :named('uid'), gid :named('gid'), mtime :named('mtime'))
   _handler:
     null $P0
     .return ($P0)

Modified: branches/ops_pct/runtime/parrot/library/HTTP/Message.pir
==============================================================================
--- branches/ops_pct/runtime/parrot/library/HTTP/Message.pir	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/runtime/parrot/library/HTTP/Message.pir	Fri May 21 12:02:31 2010	(r46852)
@@ -62,6 +62,23 @@
     $P0 = subclass 'Hash', ['HTTP';'Headers']
 .end
 
+.sub 'get_string' :vtable :method
+    $P0 = iter self
+    $P1 = new 'StringBuilder'
+  L1:
+    unless $P0 goto L2
+    $S0 = shift $P0
+    push $P1, $S0
+    push $P1, ": "
+    $S0 = self[$S0]
+    push $P1, $S0
+    push $P1, "\r\n"
+    goto L1
+  L2:
+    $S0 = $P1
+    .return ($S0)
+.end
+
 =head3 Class HTTP;Message
 
 =over 4
@@ -74,13 +91,21 @@
     $P0 = newclass ['HTTP';'Message']
     $P0.'add_attribute'('headers')
     $P0.'add_attribute'('content')
+    $P0.'add_attribute'('protocol')
 .end
 
 .sub 'init' :vtable :method
     $P0 = new ['HTTP';'Headers']
     setattribute self, 'headers', $P0
-    $P0 = box ''
-    setattribute self, 'content', $P0
+.end
+
+=item protocol
+
+=cut
+
+.sub 'protocol' :method
+    $P0 = getattribute self, 'protocol'
+    .return ($P0)
 .end
 
 =item headers
@@ -114,6 +139,16 @@
     .return ($S0)
 .end
 
+=item remove_header
+
+=cut
+
+.sub 'remove_header' :method
+    .param string key
+    $P0 = getattribute self, 'headers'
+    delete $P0[key]
+.end
+
 =item content
 
 =cut
@@ -133,11 +168,14 @@
 
 .namespace ['HTTP';'Request']
 
+.include 'cclass.pasm'
+
 .sub '' :init :load :anon
     load_bytecode 'URI.pir'
     $P0 = subclass ['HTTP';'Message'], ['HTTP';'Request']
     $P0.'add_attribute'('method')
     $P0.'add_attribute'('uri')
+    $P0.'add_attribute'('proxy')
 .end
 
 =item method
@@ -158,6 +196,17 @@
     .return ($P0)
 .end
 
+.sub 'proxy' :method
+    .param pmc val              :optional
+    .param int has_val          :opt_flag
+    unless has_val goto L1
+    setattribute self, 'proxy', val
+    .return ()
+  L1:
+    $P0 = getattribute self, 'proxy'
+    .return ($P0)
+.end
+
 =item GET
 
 =cut
@@ -203,9 +252,56 @@
 =cut
 
 .sub 'POST'
-    .param pmc args :slurpy
-    .param pmc kv :slurpy :named
-    .tailcall _simple_req('POST', args :flat, kv :flat :named)
+    .param string url
+    .param pmc contents :slurpy
+    .param pmc headers :slurpy :named
+    .local pmc req
+    req = new ['HTTP';'Request']
+    $P0 = box 'POST'
+    setattribute req, 'method', $P0
+    $P0 = get_hll_global ['URI'], 'new_from_string'
+    $P0 = $P0(url)
+    setattribute req, 'uri', $P0
+    $P0 = iter headers
+  L1:
+    unless $P0 goto L2
+    $S0 = shift $P0
+    $S1 = headers[$S0]
+    req.'push_header'($S0, $S1)
+    goto L1
+  L2:
+    .local string ct
+    ct = req.'get_header'('Content-Type')
+    unless ct == '' goto L3
+    ct = 'application/x-www-form-urlencoded'
+    goto L4
+  L3:
+    unless ct == 'form-data' goto L4
+    ct = 'multipart/form-data'
+  L4:
+
+    $I0 = index ct, 'multipart/form-data'
+    if $I0 < 0 goto L5
+    .local string content, boundary
+    (content, boundary) = form_data(contents, req)
+    ct .= '; boundary='
+    ct .= boundary
+    goto L11
+  L5:
+
+    # work in progress
+
+  L11:
+
+    req.'push_header'('Content-Type', ct)
+    $I0 = 0
+    if content == '' goto L12
+    $P0 = box content
+    setattribute req, 'content', $P0
+    $I0 = length content
+  L12:
+    req.'push_header'('Content-Length', $I0)
+    .return (req)
 .end
 
 .sub '_simple_req'
@@ -218,35 +314,187 @@
     $P0 = box method
     setattribute req, 'method', $P0
     $P0 = get_hll_global ['URI'], 'new_from_string'
-    $P1 = $P0(url)
-    setattribute req, 'uri', $P1
+    $P0 = $P0(url)
+    setattribute req, 'uri', $P0
     $P0 = iter headers
   L1:
     unless $P0 goto L2
     $S0 = shift $P0
     $S1 = headers[$S0]
-    req.'push_headers'($S0, $S1)
+    req.'push_header'($S0, $S1)
     goto L1
   L2:
     $P0 = iter contents
+    $P1 = new 'StringBuilder'
     unless $P0 goto L3
-    .local pmc content
-    content = getattribute req, 'content'
   L4:
     unless $P0 goto L5
     $S0 = shift $P0
-    content .= $S0
+    push $P1, $S0
     goto L4
   L5:
+    .local string content
+    content = $P1
+    $P0 = box content
+    setattribute req, 'content', $P0
     $S0 = req.'get_header'('Content-Length')
     unless $S0 == '' goto L3
-    $S0 = content
-    $I0 = length $S0
+    $I0 = length content
     req.'push_header'('Content-Length', $I0)
   L3:
     .return (req)
 .end
 
+.sub 'form_data'
+    .param pmc contents
+    .param pmc req
+    .const string CRLF = "\r\n"
+    .local pmc parts
+    parts = new 'ResizableStringArray'
+    $P0 = iter contents
+  L1:
+    unless $P0 goto L2
+    .local pmc k
+    k = shift $P0
+    unless $P0 goto L2
+    .local pmc v
+    v = shift $P0
+    $I0 = does v, 'array'
+    if $I0 goto L3
+    $P1 = new 'StringBuilder'
+    push $P1, 'Content-Disposition: form-data; name="'
+    push $P1, k
+    push $P1, '"'
+    push $P1, CRLF
+    push $P1, CRLF
+    push $P1, v
+    $S0 = $P1
+    push parts, $S0
+    goto L1
+  L3:
+    $P1 = iter v
+    .local string file
+    file = shift $P1
+    .local string usename
+    usename = file
+    unless $P1 goto L4
+    $S0 = shift $P1
+    if $S0 == '' goto L4
+    usename = $S0
+  L4:
+    .local string disp
+    $P2 = new 'StringBuilder'
+    push $P2, 'form-data; name="'
+    push $P2, k
+    push $P2, '"'
+    if usename == '' goto L5
+    push $P2, '; filename="'
+    push $P2, usename
+    push $P2, '"'
+  L5:
+    disp = $P2
+    .local pmc h
+    h = new ['HTTP';'Headers']
+  L6:
+    unless $P1 goto L7
+    $S1 = shift $P1
+    unless $P1 goto L7
+    $S2 = shift $P1
+    h[$S1] = $S2
+    goto L6
+  L7:
+    .local string content
+    content = ''
+    if file == '' goto L8
+    load_bytecode 'osutils.pbc'
+    content = slurp(file)
+    $I0 = exists h['Content-Type']
+    if $I0 goto L8
+    h['Content-Type'] = 'application/octet-stream'
+  L8:
+    $I0 = exists h['Content-Disposition']
+    unless $I0 goto L9
+    disp = h['Content-Disposition']
+    delete h['Content-Disposition']
+  L9:
+    $I0 = exists h['Content']
+    unless $I0 goto L10
+    content = h['Content']
+    delete h['Content']
+  L10:
+    $P1 = new 'StringBuilder'
+    push $P1, 'Content-Disposition: '
+    push $P1, disp
+    push $P1, CRLF
+    push $P1, h
+    push $P1, CRLF
+    push $P1, content
+    $S0 = $P1
+    push parts, $S0
+    goto L1
+  L2:
+
+    .local string _boundary
+    _boundary = boundary(10)
+    $P0 = iter parts
+    $P1 = new 'StringBuilder'
+  L21:
+    unless $P0 goto L22
+    $S0 = shift $P0
+    push $P1, '--'
+    push $P1, _boundary
+    push $P1, CRLF
+    push $P1, $S0
+    push $P1, CRLF
+    goto L21
+  L22:
+    push $P1, '--'
+    push $P1, _boundary
+    push $P1, '--'
+    push $P1, CRLF
+    $S0 = $P1
+    .return ($S0, _boundary)
+.end
+
+.sub 'boundary'
+    .param int size
+    load_bytecode 'MIME/Base64.pbc'
+    load_bytecode 'Math/Rand.pbc'
+    .local pmc srand
+    srand = get_hll_global ['Math';'Rand'], 'srand'
+    time $I0
+    srand($I0)
+    .local pmc rand
+    rand = get_hll_global ['Math';'Rand'], 'rand'
+    $P0 = new 'StringBuilder'
+    $I0 = size * 3
+  L1:
+    unless $I0 goto L2
+    dec $I0
+    $I1 = rand()
+    $I1 %= 256
+    $S0 = chr $I1
+    push $P0, $S0
+    goto L1
+  L2:
+    $S0 = $P0
+    .local pmc encode
+    encode = get_hll_global ['MIME';'Base64'], 'encode_base64'
+    $S0 = encode($S0)
+    $I1 = length $S0
+    $I0 = 0
+  L3:
+    unless $I0 < $I1 goto L4
+    $I2 = is_cclass .CCLASS_ALPHANUMERIC , $S0, $I0
+    if $I2 goto L5
+    $S0 = replace $S0, $I0, 1, 'X'
+  L5:
+    inc $I0
+    goto L3
+  L4:
+    .return ($S0)
+.end
+
 =back
 
 =head3 Class HTTP;Response
@@ -261,6 +509,7 @@
     $P0 = subclass ['HTTP';'Message'], ['HTTP';'Response']
     $P0.'add_attribute'('code')
     $P0.'add_attribute'('message')
+    $P0.'add_attribute'('previous')
     $P0.'add_attribute'('request')
 .end
 
@@ -282,6 +531,15 @@
     .return ($P0)
 .end
 
+=item previous
+
+=cut
+
+.sub 'previous' :method
+    .param pmc prev
+    setattribute self, 'previous', prev
+.end
+
 =item request
 
 =cut
@@ -307,6 +565,23 @@
     .return ($S0)
 .end
 
+=item redirects
+
+=cut
+
+.sub 'redirect' :method
+    $P0 = new 'ResizablePMCArray'
+    $P1 = self
+  L1:
+    $P2 = getattribute $P1, 'previous'
+    if null $P2 goto L2
+    unshift $P0, $P2
+    $P1 = $P2
+    goto L1
+  L2:
+    .return ($P0)
+.end
+
 =item is_info
 
 =cut
@@ -375,7 +650,7 @@
 
 =head1 AUTHOR
 
-Franc§ois Perrad
+Francois Perrad
 
 =cut
 

Modified: branches/ops_pct/runtime/parrot/library/LWP.pir
==============================================================================
--- branches/ops_pct/runtime/parrot/library/LWP.pir	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/runtime/parrot/library/LWP.pir	Fri May 21 12:02:31 2010	(r46852)
@@ -21,17 +21,39 @@
 .sub '' :init :load :anon
     load_bytecode 'HTTP/Message.pir'
     $P0 = newclass ['LWP';'UserAgent']
+    $P0.'add_attribute'('def_headers')
     $P0.'add_attribute'('show_progress')
     $P0.'add_attribute'('progress_start')
     $P0.'add_attribute'('progress_lastp')
     $P0.'add_attribute'('progress_ani')
+    $P0.'add_attribute'('max_redirect')
+    $P0.'add_attribute'('proxy')
+    $P0.'add_attribute'('no_proxy')
     .globalconst int RC_OK = 200
+    .globalconst int RC_MOVED_PERMANENTLY = 301
+    .globalconst int RC_FOUND = 302
+    .globalconst int RC_SEE_OTHER = 303
+    .globalconst int RC_TEMPORARY_REDIRECT = 307
     .globalconst int RC_BAD_REQUEST = 400
+    .globalconst int RC_UNAUTHORIZED = 401
     .globalconst int RC_NOT_FOUND = 404
+    .globalconst int RC_PROXY_AUTHENTICATION_REQUIRED = 407
     .globalconst int RC_INTERNAL_SERVER_ERROR = 500
     .globalconst int RC_NOT_IMPLEMENTED = 501
 .end
 
+.sub 'init' :vtable :method
+    $P0 = new ['HTTP';'Headers']
+    $P0['User-Agent'] = 'libwww-parrot'
+    setattribute self, 'def_headers', $P0
+    $P0 = box 7
+    setattribute self, 'max_redirect', $P0
+    $P0 = new 'Hash'
+    setattribute self, 'proxy', $P0
+    $P0 = new 'ResizableStringArray'
+    setattribute self, 'no_proxy', $P0
+.end
+
 .sub 'send_request' :method
     .param pmc request
     .local string method
@@ -41,24 +63,55 @@
     .local string scheme
     scheme = url.'scheme'()
     self.'progress'('begin', request)
+    .local pmc proxy
+    proxy = request.'proxy'()
+    if null proxy goto L1
+    scheme = proxy.'scheme'()
+  L1:
     .local pmc protocol, response
     $P0 =get_hll_global ['LWP';'Protocol'], 'create'
     protocol = $P0(scheme, self)
-    unless null protocol goto L1
+    unless null protocol goto L2
     response = _new_response(request, RC_NOT_IMPLEMENTED, 'Not Implemented')
-    goto L2
-  L1:
-    response = protocol.'request'(request)
+    goto L3
+  L2:
+    response = protocol.'request'(request, proxy)
     setattribute response, 'request', request
     $P0 = get_hll_global ['HTTP';'Date'], 'time2str'
     $I0 = time
     $S0 = $P0($I0)
     response.'push_header'('Client-Date', $S0)
-  L2:
+  L3:
     self.'progress'('end', response)
     .return (response)
 .end
 
+.sub 'prepare_request' :method
+    .param pmc request
+    $P0 = request.'method'()
+    unless null $P0 goto L1
+    die "Method missing"
+  L1:
+    $P0 = request.'uri'()
+    unless null $P0 goto L2
+    die "URL missing"
+  L2:
+    $S0 = $P0.'scheme'()
+    unless $S0 == '' goto L3
+    die "URL must be absolute"
+  L3:
+    self.'_need_proxy'(request)
+    $P0 = getattribute self, 'def_headers'
+    $P1 = iter $P0
+  L4:
+    unless $P1 goto L5
+    $S0 = shift $P1
+    $S1 = $P0[$S0]
+    request.'push_header'($S0, $S1)
+    goto L4
+  L5:
+.end
+
 .sub 'simple_request' :method
     .param pmc request
     unless null request goto L1
@@ -68,15 +121,102 @@
     if $I0 goto L2
     die "You need a ['HTTP';'Request']"
   L2:
+    self.'prepare_request'(request)
     .tailcall self.'send_request'(request)
 .end
 
 .sub 'request' :method
     .param pmc request
+    .param pmc previous         :optional
+    .param int has_previous     :opt_flag
+
     .local pmc response
     response = self.'simple_request'(request)
+    unless has_previous goto L1
+    response.'previous'(previous)
+  L1:
+
+    .local int redirect
+    $P0 = response.'redirect'()
+    redirect = elements $P0
+    .local int max_redirect
+    $P0 = getattribute self, 'max_redirect'
+    max_redirect = $P0
+    unless redirect >= max_redirect goto L2
+    $S0 = 'Redirect loop detected (max_redirect = '
+    $S1 = max_redirect
+    $S0 .= $S1
+    $S0 .= ')'
+    response.'push_header'('Client-Warning', $S0)
+    .return (response)
+  L2:
+
     .local int code
     code = response.'code'()
+
+    if code == RC_MOVED_PERMANENTLY goto L3
+    if code == RC_FOUND goto L3
+    if code == RC_SEE_OTHER goto L3
+    if code == RC_TEMPORARY_REDIRECT goto L3
+    goto L4
+  L3:
+    .local pmc referral
+    referral = clone request
+    # These headers should never be forwarded
+    referral.'remove_header'('Host')
+    referral.'remove_header'('Cookie')
+
+    # work in progress
+
+    .local string referral_uri
+    referral_uri = response.'get_header'('Location')
+    $P0 = get_hll_global ['URI'], 'new_from_string'
+    $P1 = $P0(referral_uri)
+    $S0 = $P1.'scheme'()
+    unless $S0 == '' goto L5
+    $P2 = new 'StringBuilder'
+    $P3 = request.'uri'()
+    $S0 = $P3.'scheme'()
+    push $P2, $S0
+    push $P2, '://'
+    $S0 = request.'get_header'('Host')
+    push $P2, $S0
+    push $P2, referral_uri
+    $P1 = $P0($P2)
+  L5:
+    setattribute referral, 'uri', $P1
+
+    # work in progress
+
+    $I0 = self.'redirect_ok'(referral, response)
+    if $I0 goto L6
+    .return (response)
+  L6:
+    .tailcall self.'request'(referral, response)
+
+  L4:
+    .local int proxy
+    proxy = 0
+    .local string ch_header
+    ch_header = 'WWW-Authenticate'
+    if code == RC_UNAUTHORIZED goto L11
+    proxy = 1
+    ch_header = 'Proxy-Authenticate'
+    if code == RC_PROXY_AUTHENTICATION_REQUIRED goto L11
+    goto L12
+  L11:
+    .local string challenge
+    challenge = response.'get_header'(ch_header)
+    unless challenge == '' goto L13
+    response.'push_header'('Client-Warning', 'Missing Authenticate header')
+    .return (response)
+  L13:
+
+    # work in progress
+    print "# "
+    say challenge
+
+  L12:
     .return (response)
 .end
 
@@ -93,6 +233,19 @@
     .tailcall self.'request'(request)
 .end
 
+=item head
+
+=cut
+
+.sub 'head' :method
+    .param pmc args :slurpy
+    .param pmc kv :slurpy :named
+    .local pmc request
+    $P0 = get_hll_global ['HTTP';'Request'], 'HEAD'
+    request = $P0(args :flat, kv :flat :named)
+    .tailcall self.'request'(request)
+.end
+
 =item post
 
 =cut
@@ -106,6 +259,19 @@
     .tailcall self.'request'(request)
 .end
 
+=item put
+
+=cut
+
+.sub 'put' :method
+    .param pmc args :slurpy
+    .param pmc kv :slurpy :named
+    .local pmc request
+    $P0 = get_hll_global ['HTTP';'Request'], 'PUT'
+    request = $P0(args :flat, kv :flat :named)
+    .tailcall self.'request'(request)
+.end
+
 =item delete
 
 =cut
@@ -163,15 +329,50 @@
     goto L1
   L3:
     unless status == 'tick' goto L5
-
-    # work in progress
-
+    $P0 = getattribute self, 'progress_ani'
+    inc $P0
+    $P0 %= 4
+    $P1 = split '', '-\|/'
+    $S0 = $P1[$P0]
+    printerr $S0
+    printerr "\b"
     goto L1
   L5:
+    $N0 = status
+    $N0 *= 100
+    $P0 = new 'FixedFloatArray'
+    set $P0, 1
+    $P0[0] = $N0
+    $S1 = sprintf '%3.0f%%', $P0
+    $P0 = getattribute self, 'progress_lastp'
+    $S0 = $P0
+    if $S0 == $S1 goto L1
+    set $P0, $S1
+    printerr $S1
+    printerr "\b\b\b\b"
+  L1:
+.end
 
+.sub 'redirect_ok' :method
+    .param pmc new_request
+    .param pmc response
+    $P0 = response.'request'()
+    $S0 = $P0.'method'()
+    if $S0 == 'GET' goto L1
+    if $S0 == 'HEAD' goto L1
+    .return (0)
+  L1:
     # work in progress
+    .return (1)
+.end
 
-  L1:
+=item max_redirect
+
+=cut
+
+.sub 'max_redirect' :method
+    .param pmc val
+    setattribute self, 'max_redirect', val
 .end
 
 =item show_progress
@@ -183,6 +384,45 @@
     setattribute self, 'show_progress', val
 .end
 
+=item agent
+
+=cut
+
+.sub 'agent' :method
+    .param string val
+    $P0 = getattribute self, 'def_headers'
+    $P0['User-Agent'] = val
+.end
+
+.sub '_need_proxy' :method
+    .param pmc req
+    $P0 = req.'proxy'()
+    unless null $P0 goto L1
+    .local pmc uri
+    uri = req.'uri'()
+    .local string scheme
+    scheme = uri.'scheme'()
+    $P0 = getattribute self, 'proxy'
+    .local string proxy
+    proxy = $P0[scheme]
+    unless proxy goto L1
+    .local string host
+    host = uri.'host'()
+    $P0 = getattribute self, 'no_proxy'
+    $P1 = iter $P0
+  L2:
+    unless $P1 goto L3
+    $S0 = shift $P1
+    $I0 = index host, $S0
+    if $I0 < 0 goto L2
+    goto L1
+  L3:
+    $P0 = get_hll_global ['URI'], 'new_from_string'
+    $P0 = $P0(proxy)
+    req.'proxy'($P0)
+  L1:
+.end
+
 =item env_provy
 
 =cut
@@ -194,10 +434,84 @@
     unless $P1 goto L2
     $S0 = shift $P1
     $S1 = downcase $S0
+    $I0 = index $S1, '_proxy'
+    if $I0 < 0 goto L1
+    $S2 = $P0[$S0]
+    unless $S1 == 'no_proxy' goto L3
+    $P2 = split ',', $S2
+    $P3 = iter $P2
+  L4:
+    unless $P3 goto L1
+    $S0 = shift $P3
+    $S0 = trim($S0)
+    self.'no_proxy'($S0)
+    goto L4
+  L3:
+    $S3 = substr $S1, 0, $I0
+    # Ignore xxx_proxy variables if xxx isn't a supported protocol
+    $P11 = new 'Key'
+    set $P11, 'LWP'
+    $P12 = new 'Key'
+    set $P12, 'Protocol'
+    push $P11, $P12
+    $P13 = new 'Key'
+    set $P13, $S3
+    push $P11, $P13
+    $P10 = get_class $P11
+    if null $P10 goto L1
+    self.'proxy'($S3, $S2)
+    goto L1
+  L2:
+.end
 
-    # work in progress
+.include 'cclass.pasm'
 
-    goto L1
+.sub 'trim' :anon
+    .param string str
+    $I0 = length str
+    $I0 = find_not_cclass .CCLASS_WHITESPACE, str, 0, $I0
+    str = substr str, $I0
+    $I0 = length str
+  L1:
+    dec $I0
+    unless $I0 > 0 goto L2
+    $I1 = is_cclass .CCLASS_WHITESPACE, str, $I0
+    if $I1 != 0 goto L1
+  L2:
+    inc $I0
+    str = substr str, 0, $I0
+    .return (str)
+.end
+
+=item proxy
+
+=cut
+
+.sub 'proxy' :method
+    .param string scheme
+    .param string url
+    $P0 = getattribute self, 'proxy'
+    $P0[scheme] = url
+.end
+
+=item no_proxy
+
+=cut
+
+.sub 'no_proxy' :method
+    .param pmc args :slurpy
+    $I0 = elements args
+    if $I0 goto L1
+    $P0 = new 'ResizableStringArray'
+    setattribute self, 'no_proxy', $P0
+    goto L2
+  L1:
+    $P0 = getattribute self, 'no_proxy'
+  L3:
+    unless args goto L2
+    $S0 = shift args
+    push $P0, $S0
+    goto L3
   L2:
 .end
 
@@ -205,24 +519,25 @@
     .param pmc request
     .param pmc code
     .param pmc message
-    $P0 = new ['HTTP';'Response']
-    setattribute $P0, 'code', code
-    setattribute $P0, 'message', message
-    setattribute $P0, 'request', request
+    .local pmc response
+    response = new ['HTTP';'Response']
+    setattribute response, 'code', code
+    setattribute response, 'message', message
+    setattribute response, 'request', request
     $P0 = get_hll_global ['HTTP';'Date'], 'time2str'
     $I0 = time
     $S0 = $P0($I0)
-    $P0.'push_header'('Client-Date', $S0)
-    $P0.'push_header'('Client-Warning', "Internal response")
-    $P0.'push_header'('Content-Type', 'text/plain')
+    response.'push_header'('Client-Date', $S0)
+    response.'push_header'('Client-Warning', "Internal response")
+    response.'push_header'('Content-Type', 'text/plain')
     $S0 = code
     $S0 .= ' '
     $S1 = message
     $S0 .= $S1
     $S0 .= "\n"
     $P0 = box $S0
-    setattribute $P0, 'content', $P0
-    .return ($P0)
+    setattribute response, 'content', $P0
+    .return (response)
 .end
 
 =back
@@ -260,10 +575,29 @@
     unless null $P0 goto L1
     .return ($P0)
   L1:
-    $P0 = new $P0
-    $P1 = box scheme
-    setattribute $P0, 'scheme', $P1
-    setattribute $P0, 'ua', ua
+    .local pmc protocol
+    protocol = new $P0
+    $P0 = box scheme
+    setattribute protocol, 'scheme', $P0
+    setattribute protocol, 'ua', ua
+    .return (protocol)
+.end
+
+=item scheme
+
+=cut
+
+.sub 'scheme' :method
+    $P0 = getattribute self, 'scheme'
+    .return ($P0)
+.end
+
+=item ua
+
+=cut
+
+.sub 'ua' :method
+    $P0 = getattribute self, 'ua'
     .return ($P0)
 .end
 
@@ -276,6 +610,8 @@
 
 =head3 Class LWP;Protocol;file
 
+=over 4
+
 =cut
 
 .namespace ['LWP';'Protocol';'file']
@@ -283,16 +619,29 @@
 .include 'stat.pasm'
 
 .sub '' :init :load :anon
-    load_bytecode 'osutils.pbc'
     $P0 = subclass ['LWP';'Protocol'], ['LWP';'Protocol';'file']
 .end
 
+=item request
+
+=cut
+
 .sub 'request' :method
     .param pmc request
+    .param pmc proxy
+    if null proxy goto L1
+    $P0 = new ['HTTP';'Response']
+    $P1 = box RC_BAD_REQUEST
+    setattribute $P0, 'code', $P1
+    $P1 = box 'You can not proxy through the filesystem'
+    setattribute $P0, 'message', $P1
+    .return ($P0)
+  L1:
+    load_bytecode 'osutils.pbc'
     .local string method
     method = request.'method'()
     $P0 = get_hll_global ['LWP';'Protocol';'file'], method
-    unless null $P0 goto L1
+    unless null $P0 goto L2
     $P0 = new ['HTTP';'Response']
     $P1 = box RC_BAD_REQUEST
     setattribute $P0, 'code', $P1
@@ -301,12 +650,12 @@
     $P1 = box $S0
     setattribute $P0, 'message', $P1
     .return ($P0)
-  L1:
+  L2:
     .local pmc url
     url = request.'uri'()
     .local string scheme
     scheme = url.'scheme'()
-    if scheme == 'file' goto L2
+    if scheme == 'file' goto L3
     $P0 = new ['HTTP';'Response']
     $P1 = box RC_INTERNAL_SERVER_ERROR
     setattribute $P0, 'code', $P1
@@ -315,7 +664,7 @@
     $P1 = box $S0
     setattribute $P0, 'message', $P1
     .return ($P0)
-  L2:
+  L3:
     .tailcall $P0(self, request)
 .end
 
@@ -377,7 +726,7 @@
     .return (response)
 .end
 
-.sub 'POST' :method :nsentry
+.sub 'PUT' :method :nsentry
     .param pmc request
     .local pmc response
     response = new ['HTTP';'Response']
@@ -446,16 +795,264 @@
     .return (response)
 .end
 
+=back
+
 =head3 Class LWP;Protocol;http
 
+=over 4
+
 =cut
 
 .namespace ['LWP';'Protocol';'http']
 
+.include 'socket.pasm'
+
 .sub '' :init :load :anon
     $P0 = subclass ['LWP';'Protocol'], ['LWP';'Protocol';'http']
 .end
 
+.sub '_new_socket' :method
+    .param string host
+    .param int port
+    .local pmc sock, addr
+    sock = new 'Socket'
+    sock.'socket'(.PIO_PF_INET, .PIO_SOCK_STREAM, .PIO_PROTO_TCP)
+    addr = sock.'sockaddr'(host, port)
+    sock.'connect'(addr)
+    .return (sock)
+.end
+
+.sub '_fixup_header' :method
+    .param pmc headers
+    .param pmc url
+    .param pmc proxy
+    # Extract 'Host' header
+    .local string host
+    host = url.'authority'()
+    $I0 = index host, '@'
+    if $I0 < 0 goto L1
+    .local string userinfo
+    userinfo = substr host, 0, $I0
+    inc $I0
+    host = substr host, $I1
+    $S0 = headers['Authorization']
+    unless $S0 == '' goto L1
+    load_bytecode 'MIME/Base64.pbc'
+    $P0 = get_hll_global ['MIME';'Base64'], 'encode_base64'
+    $S0 = $P0(userinfo)
+    $S0 = 'Basic ' . $S0
+    headers['Authorization'] = $S0
+  L1:
+    headers['Host'] = host
+    if null proxy goto L2
+    userinfo = proxy.'userinfo'()
+    if userinfo == '' goto L2
+    load_bytecode 'MIME/Base64.pbc'
+    $P0 = get_hll_global ['MIME';'Base64'], 'encode_base64'
+    $S0 = $P0(userinfo)
+    $S0 = 'Basic ' . $S0
+    headers['Proxy-Authorization'] = $S0
+  L2:
+.end
+
+.sub '_format_request'
+    .param string method
+    .param string uri
+    .param pmc headers
+    .const string CRLF = "\r\n"
+    $P0 = new 'StringBuilder'
+    push $P0, method
+    push $P0, ' '
+    push $P0, uri
+    push $P0, ' HTTP/1.1'
+    push $P0, CRLF
+    $P1 = iter headers
+  L1:
+    unless $P1 goto L2
+    $S0 = shift $P1
+    $S1 = headers[$S0]
+    push $P0, $S0
+    push $P0, ': '
+    push $P0, $S1
+    push $P0, CRLF
+    goto L1
+  L2:
+    push $P0, CRLF
+    .return ($P0)
+.end
+
+.sub '_parse_response_headers' :method
+    .param pmc response
+    .param string str
+    .local string sep
+    sep = "\r\n"
+    $I0 = index str, "\r"
+    unless $I0 < 0 goto L0
+    sep = "\n"
+  L0:
+    $S0 = sep . sep
+    $I0 = index str, $S0
+    if $I0 < 0 goto L1
+    str = substr str, 0, $I0
+  L1:
+
+    $P0 = split sep, str
+    .local string status_line
+    status_line = shift $P0
+    $I0 = index status_line, " "
+    if $I0 < 0 goto L2
+    $S0 = substr status_line, 0, $I0
+    $P1 = box $S0
+    setattribute response, 'protocol', $P1
+    $I1 = $I0 + 1
+    $I0 = index status_line, " ", $I1
+    if $I0 < 0 goto L2
+    $I2 = $I0 - $I1
+    $S0 = substr status_line, $I1, $I2
+    $P1 = box $S0
+    setattribute response, 'code', $P1
+    inc $I0
+    $S0 = substr status_line, $I0
+    $P1 = box $S0
+    setattribute response, 'message', $P1
+
+    $P3 = new ['HTTP';'Headers']
+  L3:
+    unless $P0 goto L4
+    $S0 = shift $P0
+    $I0 = index $S0, ": "
+    if $I0 < 0 goto L3
+    $S1 = substr $S0, 0, $I0
+    $I0 += 2
+    $S2 = substr $S0, $I0
+    $P3[$S1] = $S2
+    goto L3
+  L4:
+    setattribute response, 'headers', $P3
+
+    $I0 = length str
+    .return ($I0)
+  L2:
+    .return (0)
+.end
+
+.sub '_parse_response_content' :method
+    .param pmc response
+    .param string str
+    $I0 = index str, "\r\n\r\n"
+    if $I0 < 0 goto L1
+    $I0 += 4
+    $S0 = substr str, $I0
+    $P0 = box $S0
+    setattribute response, 'content', $P0
+    goto L2
+  L1:
+    $I0 = index str, "\n\n"
+    if $I0 < 0 goto L1
+    $I0 += 2
+    $S0 = substr str, $I0
+    $P0 = box $S0
+    setattribute response, 'content', $P0
+  L2:
+.end
+
+=item request
+
+=cut
+
+.sub 'request' :method
+    .param pmc request
+    .param pmc proxy
+
+    .local string method
+    method = request.'method'()
+    .local pmc url
+    url = request.'uri'()
+    .local string host, port, fullpath
+    if null proxy goto L1
+    # proxy is an URL to an HTTP server which will proxy this request
+    host = proxy.'host'()
+    port = proxy.'port'()
+    unless method == 'CONNECT' goto L3
+    fullpath = url.'host'()
+    fullpath .= ':'
+    $S0 = url.'port'()
+    fullpath .= $S0
+    goto L2
+  L3:
+    fullpath = url
+    goto L2
+  L1:
+    host = url.'host'()
+    port = url.'port'()
+    fullpath = url.'path_query'()
+    $I0 = index fullpath, '/'
+    if $I0 == 0 goto L2
+    fullpath = '/' . fullpath
+  L2:
+
+    # connect to remote site
+    .local pmc sock
+    sock = self.'_new_socket'(host, port)
+
+    .local pmc request_headers
+    request_headers = request.'headers'()
+    self.'_fixup_header'(request_headers, url, proxy)
+
+    .local pmc ua
+    ua = self.'ua'()
+    $S0 = _format_request(method, fullpath, request_headers)
+    sock.'send'($S0)
+
+    .local string content
+    content = request.'content'()
+    unless content goto L11
+    .local int content_length
+    content_length = length content
+    $I0 = 0
+  L12:
+    unless $I0 < content_length goto L11
+    $S0 = substr content, $I0, 8192
+    $I1 = sock.'send'($S0)
+    $I0 += $I1
+    $N0 = $I0 / content_length
+    goto L12
+  L11:
+
+    .local pmc response
+    response = new ['HTTP';'Response']
+    .local pmc buf
+    buf = new 'StringBuilder'
+    .local int header_length
+    content_length = 0
+  L21:
+    ua.'progress'('tick', request)
+    $S0 = sock.'recv'()
+    if $S0 == '' goto L22
+    push buf, $S0
+    header_length = self.'_parse_response_headers'(response, buf)
+    $I0 = response.'is_success'()
+    unless $I0 goto L22
+    $S0 = response.'get_header'('Content-Length')
+    if $S0 == '' goto L21
+    content_length = $S0
+  L23:
+    $I0 = buf.'get_string_length'()
+    $I0 -= header_length
+    $N0 = $I0 / content_length
+    ua.'progress'($N0, request)
+    $S0 = sock.'recv'()
+    if $S0 == '' goto L22
+    push buf, $S0
+    goto L23
+  L22:
+    sock.'close'()
+    self.'_parse_response_content'(response, buf)
+    .return (response)
+.end
+
+=back
+
 =head1 AUTHOR
 
 Francois Perrad

Modified: branches/ops_pct/runtime/parrot/library/URI.pir
==============================================================================
--- branches/ops_pct/runtime/parrot/library/URI.pir	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/runtime/parrot/library/URI.pir	Fri May 21 12:02:31 2010	(r46852)
@@ -280,16 +280,40 @@
     $P0 = subclass ['URI';'_generic'], ['URI';'_server']
 .end
 
-=item host
+=item userinfo
 
 =cut
 
-.sub 'host' :method
+.sub 'userinfo' :method
     $S0 = self.'authority'()
-    $I0 = index $S0, ':'
+    $I0 = index $S0, '@'
     if $I0 < 0 goto L1
     $S0 = substr $S0, 0, $I0
+    .return ($S0)
+  L1:
+    .return ('')
+.end
+
+=item host
+
+=cut
+
+.sub 'host' :method
+    $S0 = self.'authority'()
+    .local int pos, lastpos
+    lastpos = length $S0
+    pos = 0
   L1:
+    pos = index $S0, ':', pos
+    if pos < 0 goto L2
+    $I1 = pos
+    inc pos
+    $I0 = is_cclass .CCLASS_NUMERIC, $S0, pos
+    unless $I0 goto L1
+    $I0 = find_not_cclass .CCLASS_NUMERIC, $S0, pos, lastpos
+    unless $I0 == lastpos goto L1
+    $S0 = substr $S0, 0, $I1
+  L2:
     .return ($S0)
 .end
 
@@ -301,8 +325,10 @@
     $S0 = self.'authority'()
     .local int pos, lastpos
     lastpos = length $S0
-    pos = index $S0, ':'
-    if pos < 0 goto L1
+    pos = 0
+  L1:
+    pos = index $S0, ':', pos
+    if pos < 0 goto L2
     inc pos
     $I0 = is_cclass .CCLASS_NUMERIC, $S0, pos
     unless $I0 goto L1
@@ -310,7 +336,7 @@
     unless $I0 == lastpos goto L1
     $S1 = substr $S0, pos
     .return ($S1)
-  L1:
+  L2:
     .tailcall self.'default_port'()
 .end
 

Modified: branches/ops_pct/runtime/parrot/library/distutils.pir
==============================================================================
--- branches/ops_pct/runtime/parrot/library/distutils.pir	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/runtime/parrot/library/distutils.pir	Fri May 21 12:02:31 2010	(r46852)
@@ -185,8 +185,6 @@
     register_step_after('build', _build_pir_pge)
     .const 'Sub' _build_pir_tge = '_build_pir_tge'
     register_step_after('build', _build_pir_tge)
-    .const 'Sub' _build_pir_nqp = '_build_pir_nqp'
-    register_step_after('build', _build_pir_nqp)
     .const 'Sub' _build_pir_nqp_rx = '_build_pir_nqp_rx'
     register_step_after('build', _build_pir_nqp_rx)
     .const 'Sub' _build_inc_pir = '_build_inc_pir'
@@ -214,8 +212,6 @@
     register_step_after('clean', _clean_pir_pge)
     .const 'Sub' _clean_pir_tge = '_clean_pir_tge'
     register_step_after('clean', _clean_pir_tge)
-    .const 'Sub' _clean_pir_nqp = '_clean_pir_nqp'
-    register_step_after('clean', _clean_pir_nqp)
     .const 'Sub' _clean_pir_nqp_rx = '_clean_pir_nqp_rx'
     register_step_after('clean', _clean_pir_nqp_rx)
     .const 'Sub' _clean_inc_pir = '_clean_inc_pir'
@@ -679,61 +675,7 @@
     .tailcall run_jobs(jobs)
 .end
 
-=item pir_nqp
-
-hash
-
-the key is the PIR pathname
-
-the value is the NQP pathname
-
-=item pir_nqp_flags
-
-=cut
-
-.sub '_build_pir_nqp' :anon
-    .param pmc kv :slurpy :named
-    $I0 = exists kv['pir_nqp']
-    unless $I0 goto L1
-    $P0 = kv['pir_nqp']
-    $S0 = get_value('pir_nqp_flags', '' :named('default'), kv :flat :named)
-    build_pir_nqp($P0, $S0)
-  L1:
-.end
-
-.sub 'build_pir_nqp'
-    .param pmc hash
-    .param string flags
-    .local pmc jobs
-    jobs = new 'ResizableStringArray'
-    $P0 = iter hash
-  L1:
-    unless $P0 goto L2
-    .local string pir, nqp
-    pir = shift $P0
-    nqp = hash[pir]
-    $I0 = newer(pir, nqp)
-    if $I0 goto L1
-    $S0 = dirname(pir)
-    mkpath($S0, 1 :named('verbose'))
-    .local string cmd
-    cmd = get_parrot()
-    cmd .= " "
-    $S0 = get_compiler('nqp/nqp.pbc')
-    cmd .= $S0
-    cmd .= " --target=pir --output="
-    cmd .= pir
-    cmd .= " "
-    cmd .= flags
-    cmd .= " "
-    cmd .= nqp
-    push jobs, cmd
-    goto L1
-  L2:
-    .tailcall run_jobs(jobs)
-.end
-
-=item pir_nqp-rx / pir_nqprx
+=item pir_nqp-rx / pir_nqprx / pir_nqp
 
 hash
 
@@ -759,6 +701,12 @@
     $S0 = get_value('pir_nqp_flags', '' :named('default'), kv :flat :named)
     build_pir_nqp_rx($P0, $S0)
   L2:
+    $I0 = exists kv['pir_nqp']
+    unless $I0 goto L3
+    $P0 = kv['pir_nqp']
+    $S0 = get_value('pir_nqp_flags', '' :named('default'), kv :flat :named)
+    build_pir_nqp_rx($P0, $S0)
+  L3:
 .end
 
 .sub 'build_pir_nqp_rx'
@@ -1619,20 +1567,7 @@
   L1:
 .end
 
-=item pir_nqp
-
-=cut
-
-.sub '_clean_pir_nqp' :anon
-    .param pmc kv :slurpy :named
-    $I0 = exists kv['pir_nqp']
-    unless $I0 goto L1
-    $P0 = kv['pir_nqp']
-    clean_key($P0)
-  L1:
-.end
-
-=item pir_nqp-rx / pir_nqprx
+=item pir_nqp-rx / pir_nqprx / pir_nqp
 
 =cut
 
@@ -1648,6 +1583,11 @@
     $P0 = kv['pir_nqprx']
     clean_key($P0)
   L2:
+    $I0 = exists kv['pir_nqp']
+    unless $I0 goto L3
+    $P0 = kv['pir_nqp']
+    clean_key($P0)
+  L3:
 .end
 
 =item pbc_pbc
@@ -2133,6 +2073,8 @@
     harness.'extra_props'($P0)
   L7:
     aggregate = harness.'runtests'(files)
+    print "creat "
+    say archive
 
     smolder_post(archive, kv :flat :named)
 .end
@@ -2182,7 +2124,13 @@
     $I0 = response.'code'()
     unless $I0 == 302 goto L1
     $S0 = response.'content'()
-    say $S0
+    $I0 = index $S0, 'Report'
+    unless $I0 == 0 goto L4
+    $I0 = index $S0, "\n"
+    if $I0 < 0 goto L4
+    $S0 = substr $S0, 0, $I0
+  L4:
+    print $S0
   L1:
 .end
 
@@ -3004,6 +2952,8 @@
     $P0.'open'(archive_file, 'wb')
     archive.'write'($P0)
     $P0.'close'()
+    print "creat "
+    say archive_file
   L1:
 .end
 
@@ -3059,6 +3009,8 @@
     goto L2
   L3:
     archive.'writeToFileNamed'(archive_file)
+    print "creat "
+    say archive_file
   L1:
 .end
 

Modified: branches/ops_pct/src/dynoplibs/Defines.in
==============================================================================
--- branches/ops_pct/src/dynoplibs/Defines.in	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/src/dynoplibs/Defines.in	Fri May 21 12:02:31 2010	(r46852)
@@ -1,6 +1,7 @@
 DYNOPLIBS_TARGETS = \
     $(DYNEXT_DIR)/obscure_ops$(LOAD_EXT) \
     $(DYNEXT_DIR)/math_ops$(LOAD_EXT) \
+    $(DYNEXT_DIR)/deprecated_ops$(LOAD_EXT) \
 
 DYNOPLIBS_CLEANUPS = \
     src/dynoplibs/*.c \

Modified: branches/ops_pct/src/dynoplibs/Rules.in
==============================================================================
--- branches/ops_pct/src/dynoplibs/Rules.in	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/src/dynoplibs/Rules.in	Fri May 21 12:02:31 2010	(r46852)
@@ -2,20 +2,25 @@
 # Each opslib must be compiled with several variants.
 #
 
+DYNOP_O_DEPS = \
+    include/pmc/pmc_parrotlibrary.h \
+    $(PARROT_H_HEADERS) \
+    include/parrot/runcore_api.h
+
 $(DYNEXT_DIR)/obscure_ops$(LOAD_EXT): src/dynoplibs/obscure_ops$(O) $(LIBPARROT)
 	$(LD) @ld_out@$@ src/dynoplibs/obscure_ops$(O) $(LINKARGS)
 #IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
 #IF(cygwin or hpux):	$(CHMOD) 0775 $@
 
-src/dynoplibs/obscure_ops$(O): include/pmc/pmc_parrotlibrary.h \
-    src/dynoplibs/obscure_ops.c $(PARROT_H_HEADERS) \
-    include/parrot/runcore_api.h src/dynoplibs/obscure_ops.h
+src/dynoplibs/obscure_ops$(O): $(DYNOP_O_DEPS) \
+    src/dynoplibs/obscure_ops.c include/parrot/runcore_api.h
 
 src/dynoplibs/obscure_ops.h: src/dynoplibs/obscure_ops.c
 
 src/dynoplibs/obscure_ops.c: src/dynoplibs/obscure.ops $(OPS2C)
 	$(OPS2C) --dynamic src/dynoplibs/obscure.ops
 
+
 $(DYNEXT_DIR)/math_ops$(LOAD_EXT): src/dynoplibs/math_ops$(O) $(LIBPARROT)
 	$(LD) @ld_out@$@ src/dynoplibs/math_ops$(O) $(LINKARGS)
 #IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
@@ -24,9 +29,21 @@
 src/dynoplibs/math_ops.c: src/dynoplibs/math.ops $(OPS2C)
 	$(OPS2C) --dynamic src/dynoplibs/math.ops
 
-src/dynoplibs/math_ops$(O): include/pmc/pmc_parrotlibrary.h \
-    src/dynoplibs/math_ops.c $(PARROT_H_HEADERS) \
-    include/parrot/runcore_api.h src/dynoplibs/math_ops.h
+src/dynoplibs/math_ops$(O): $(DYNOP_O_DEPS) \
+    src/dynoplibs/math_ops.c src/dynoplibs/math_ops.h
 
 src/dynoplibs/math_ops.h: src/dynoplibs/math_ops.c
 
+
+$(DYNEXT_DIR)/deprecated_ops$(LOAD_EXT): src/dynoplibs/deprecated_ops$(O) $(LIBPARROT)
+	$(LD) @ld_out@$@ src/dynoplibs/deprecated_ops$(O) $(LINKARGS)
+#IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
+#IF(cygwin or hpux):	$(CHMOD) 0775 $@
+
+src/dynoplibs/deprecated_ops$(O): $(DYNOP_O_DEPS) \
+    src/dynoplibs/deprecated_ops.c src/dynoplibs/deprecated_ops.h
+
+src/dynoplibs/deprecated_ops.h: src/dynoplibs/deprecated_ops.c
+
+src/dynoplibs/deprecated_ops.c: src/dynoplibs/deprecated.ops $(BUILD_TOOLS_DIR)/ops2c.pl
+	$(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl C --dynamic src/dynoplibs/deprecated.ops

Added: branches/ops_pct/src/dynoplibs/deprecated.ops
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/ops_pct/src/dynoplibs/deprecated.ops	Fri May 21 12:02:31 2010	(r46852)
@@ -0,0 +1,166 @@
+/*
+ * $Id$
+ * deprecated.ops
+ */
+
+=head1 NAME
+
+deprecated.ops - Deprecated Opcodes
+
+=head1 DESCRIPTION
+
+These operations are slated for complete removal once their deprecation period
+expires but have been moved out of core on another ticket.
+
+=over 4
+
+=cut
+
+########################################
+
+=item B<exchange>(inout INT, inout INT)
+
+=item B<exchange>(inout NUM, inout NUM)
+
+=item B<exchange>(inout PMC, inout PMC)
+
+=item B<exchange>(inout STR, inout STR)
+
+Exchange the contents of registers $1 and $2
+
+=cut
+
+op exchange(inout INT, inout INT) :deprecated {
+    const INTVAL temp = $1;
+    $1 = $2;
+    $2 = temp;
+}
+
+op exchange(inout PMC, inout PMC) :deprecated {
+    PMC * const temp = $1;
+    $1 = $2;
+    $2 = temp;
+}
+
+op exchange(inout NUM, inout NUM) :deprecated {
+    FLOATVAL temp = $1;
+    $1 = $2;
+    $2 = temp;
+}
+
+op exchange(inout STR, inout STR) :deprecated {
+    STRING * const temp = $1;
+    $1 = $2;
+    $2 = temp;
+}
+
+=item B<setp_ind>(in INT, invar PMC)
+
+Set the PMC in register $1 to $2.
+Please note, that the register allocator doesn't track the usage of the
+affected register - handle with care.
+
+=cut
+
+inline op setp_ind(in INT, invar PMC) :deprecated {
+    if ($1 < 0 || $1 >= NUM_REGISTERS)
+        PANIC(interp, "Out of bound register access");
+    REG_PMC(interp, $1) = $2;
+}
+
+=item B<setn_ind>(in INT, in NUM)
+
+Set the number in register $1 to $2.
+Please note, that the register allocator doesn't track the usage of the
+affected register - handle with care.
+
+=cut
+
+inline op setn_ind(in INT, in NUM) :deprecated {
+    if ($1 < 0 || $1 >= NUM_REGISTERS)
+        PANIC(interp, "Out of bound register access");
+    REG_NUM(interp, $1) = $2;
+}
+
+=item B<sets_ind>(in INT, in STR)
+
+Set the string in register $1 to $2.
+Please note, that the register allocator doesn't track the usage of the
+affected register - handle with care.
+
+=cut
+
+inline op sets_ind(in INT, in STR) :deprecated {
+    if ($1 < 0 || $1 >= NUM_REGISTERS)
+        PANIC(interp, "Out of bound register access");
+    REG_STR(interp, $1) = $2;
+}
+
+=item B<seti_ind>(in INT, in INT)
+
+Set the int in register $1 to $2.
+Please note, that the register allocator doesn't track the usage of the
+affected register - handle with care.
+
+=cut
+
+inline op seti_ind(in INT, in INT) :deprecated {
+    if ($1 < 0 || $1 >= NUM_REGISTERS)
+        PANIC(interp, "Out of bound register access");
+    REG_INT(interp, $1) = $2;
+}
+
+########################################
+
+=item B<cleari>()
+
+=item B<clearn>()
+
+=item B<clearp>()
+
+=item B<clears>()
+
+Clear all the registers of the type indicated in the name of the operation.
+
+INTVAL ('i') and FLOATVAL ('n') registers clear to zero.
+
+PMC ('p') and STRING ('s') registers clear to NULL.
+
+=cut
+
+inline op cleari() :deprecated {
+    Parrot_clear_i(interp);
+}
+
+inline op clearn() :deprecated {
+    Parrot_clear_n(interp);
+}
+
+inline op clears() :deprecated {
+    Parrot_clear_s(interp);
+}
+
+inline op clearp() :deprecated {
+    Parrot_clear_p(interp);
+}
+
+=back
+
+=head1 COPYRIGHT
+
+Copyright (C) 2010, Parrot Foundation.
+
+=head1 LICENSE
+
+This program is free software. It is subject to the same license
+as the Parrot interpreter itself.
+
+=cut
+
+
+/*
+ * Local variables:
+ *   c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */

Modified: branches/ops_pct/src/dynoplibs/obscure.ops
==============================================================================
--- branches/ops_pct/src/dynoplibs/obscure.ops	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/src/dynoplibs/obscure.ops	Fri May 21 12:02:31 2010	(r46852)
@@ -94,6 +94,109 @@
     $1 = 1.0 - cos($2);
 }
 
+########################################
+
+=item B<gcd>(out INT, in INT, in INT)
+
+Greatest Common divisor of $2 and $3.
+
+=cut
+
+inline op gcd(out INT, in INT, in INT) :advanced_math {
+    INTVAL p = 0;
+    INTVAL a = $2 < 0 ? -$2 : $2;
+    INTVAL b = $3 < 0 ? -$3 : $3;
+
+    if (a==0) { $1=b; goto NEXT(); }
+    if (b==0) { $1=a; goto NEXT(); }
+
+    while (!((a | b) & 1)) {
+        a>>=1;
+        b>>=1;
+        p++;
+    }
+
+    while (a>0) {
+        if (!(a & 1)) a>>=1;
+        else if (!(b & 1)) b>>=1;
+        else if (a<b)      b = (b-a)>>1;
+        else               a = (a-b)>>1;
+    }
+
+    $1 = b<<p;
+}
+
+
+########################################
+
+=item B<lcm>(out INT, in INT, in INT)
+
+Least Common Multiple of $2 and $3
+
+=cut
+
+inline op lcm(out INT, in INT, in INT) :advanced_math {
+    INTVAL gcd = 0;
+    INTVAL p = 0;
+    INTVAL a = $2 < 0 ? -$2 : $2;
+    INTVAL b = $3 < 0 ? -$3 : $3;
+    INTVAL saved_var1 = a, saved_var2 = b;
+
+    if (a==0 || b==0) { $1=0; goto NEXT(); }
+
+    while (!((a | b) & 1)) {
+        a>>=1;
+        b>>=1;
+        p++;
+    }
+
+    while (a>0) {
+        if (!(a & 1)) a>>=1;
+        else if (!(b & 1)) b>>=1;
+        else if (a<b)      b = (b-a)>>1;
+        else               a = (a-b)>>1;
+    }
+
+    gcd = b<<p;
+    saved_var1 /= gcd;
+    $1 = saved_var1*saved_var2;
+}
+
+########################################
+
+=item B<fact>(out INT, in INT)
+
+=item B<fact>(out NUM, in INT)
+
+Factorial, n!. Calculates the product of 1 to N.
+
+=cut
+
+inline op fact(out INT, in INT) :advanced_math {
+    /* Coercing a negative to a UINT can get pretty ugly
+     * in this situation. */
+    INTVAL i = $2;
+    UINTVAL q = 1;
+    while (i>0) {
+        q = q*i;
+        i--;
+    }
+    $1 = q;
+}
+
+inline op fact(out NUM, in INT) :advanced_math {
+    /* Coercing a negative to a UINT can get pretty ugly
+     * in this situation. */
+    INTVAL i = $2;
+    FLOATVAL q = 1;
+    while (i>0) {
+        q = q*i;
+        i--;
+    }
+    $1 = q;
+}
+
+
 
 =back
 

Modified: branches/ops_pct/src/embed.c
==============================================================================
--- branches/ops_pct/src/embed.c	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/src/embed.c	Fri May 21 12:02:31 2010	(r46852)
@@ -281,6 +281,7 @@
 */
 
 PARROT_EXPORT
+PARROT_PURE_FUNCTION
 Parrot_Int
 Parrot_test_flag(PARROT_INTERP, Parrot_Int flag)
 {
@@ -300,6 +301,7 @@
 */
 
 PARROT_EXPORT
+PARROT_PURE_FUNCTION
 Parrot_UInt
 Parrot_test_debug(PARROT_INTERP, Parrot_UInt flag)
 {
@@ -319,6 +321,7 @@
 */
 
 PARROT_EXPORT
+PARROT_PURE_FUNCTION
 Parrot_UInt
 Parrot_test_trace(PARROT_INTERP, Parrot_UInt flag)
 {

Modified: branches/ops_pct/src/exceptions.c
==============================================================================
--- branches/ops_pct/src/exceptions.c	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/src/exceptions.c	Fri May 21 12:02:31 2010	(r46852)
@@ -680,6 +680,7 @@
 
 */
 
+PARROT_EXPORT
 PARROT_DOES_NOT_RETURN
 PARROT_COLD
 void

Modified: branches/ops_pct/src/gc/gc_private.h
==============================================================================
--- branches/ops_pct/src/gc/gc_private.h	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/src/gc/gc_private.h	Fri May 21 12:02:31 2010	(r46852)
@@ -352,7 +352,7 @@
     ARGMOD(Memory_Pools *mem_pools),
     int flag,
     ARGIN_NULLOK(void *arg),
-    ARGIN(pool_iter_fn func))
+    NOTNULL(pool_iter_fn func))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         __attribute__nonnull__(5)

Modified: branches/ops_pct/src/gc/mark_sweep.c
==============================================================================
--- branches/ops_pct/src/gc/mark_sweep.c	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/src/gc/mark_sweep.c	Fri May 21 12:02:31 2010	(r46852)
@@ -840,7 +840,7 @@
 header_pools_iterate_callback(PARROT_INTERP,
         ARGMOD(Memory_Pools *mem_pools),
         int flag, ARGIN_NULLOK(void *arg),
-        ARGIN(pool_iter_fn func))
+        NOTNULL(pool_iter_fn func))
 {
     ASSERT_ARGS(header_pools_iterate_callback)
 

Modified: branches/ops_pct/src/ops/math.ops
==============================================================================
--- branches/ops_pct/src/ops/math.ops	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/src/ops/math.ops	Fri May 21 12:02:31 2010	(r46852)
@@ -1169,122 +1169,6 @@
 
 ###############################################################################
 
-=head2 Other mathematical operations
-
-Implementations of various mathematical operations
-
-=over 4
-
-=cut
-
-########################################
-
-=item B<gcd>(out INT, in INT, in INT)
-
-Greatest Common divisor of $2 and $3.
-
-=cut
-
-inline op gcd(out INT, in INT, in INT) :advanced_math {
-    INTVAL p = 0;
-    INTVAL a = $2 < 0 ? -$2 : $2;
-    INTVAL b = $3 < 0 ? -$3 : $3;
-
-    if (a==0) { $1=b; goto NEXT(); }
-    if (b==0) { $1=a; goto NEXT(); }
-
-    while (!((a | b) & 1)) {
-        a>>=1;
-        b>>=1;
-        p++;
-    }
-
-    while (a>0) {
-        if (!(a & 1)) a>>=1;
-        else if (!(b & 1)) b>>=1;
-        else if (a<b)      b = (b-a)>>1;
-        else               a = (a-b)>>1;
-    }
-
-    $1 = b<<p;
-}
-
-
-########################################
-
-=item B<lcm>(out INT, in INT, in INT)
-
-Least Common Multiple of $2 and $3
-
-=cut
-
-inline op lcm(out INT, in INT, in INT) :advanced_math {
-    INTVAL gcd = 0;
-    INTVAL p = 0;
-    INTVAL a = $2 < 0 ? -$2 : $2;
-    INTVAL b = $3 < 0 ? -$3 : $3;
-    INTVAL saved_var1 = a, saved_var2 = b;
-
-    if (a==0 || b==0) { $1=0; goto NEXT(); }
-
-    while (!((a | b) & 1)) {
-        a>>=1;
-        b>>=1;
-        p++;
-    }
-
-    while (a>0) {
-        if (!(a & 1)) a>>=1;
-        else if (!(b & 1)) b>>=1;
-        else if (a<b)      b = (b-a)>>1;
-        else               a = (a-b)>>1;
-    }
-
-    gcd = b<<p;
-    saved_var1 /= gcd;
-    $1 = saved_var1*saved_var2;
-}
-
-########################################
-
-=item B<fact>(out INT, in INT)
-
-=item B<fact>(out NUM, in INT)
-
-Factorial, n!. Calculates the product of 1 to N.
-
-=cut
-
-inline op fact(out INT, in INT) :advanced_math {
-    /* Coercing a negative to a UINT can get pretty ugly
-     * in this situation. */
-    INTVAL i = $2;
-    UINTVAL q = 1;
-    while (i>0) {
-        q = q*i;
-        i--;
-    }
-    $1 = q;
-}
-
-inline op fact(out NUM, in INT) :advanced_math {
-    /* Coercing a negative to a UINT can get pretty ugly
-     * in this situation. */
-    INTVAL i = $2;
-    FLOATVAL q = 1;
-    while (i>0) {
-        q = q*i;
-        i--;
-    }
-    $1 = q;
-}
-
-=back
-
-=cut
-
-###############################################################################
-
 =head1 COPYRIGHT
 
 Copyright (C) 2001-2009, Parrot Foundation.

Modified: branches/ops_pct/src/ops/ops.num
==============================================================================
--- branches/ops_pct/src/ops/ops.num	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/src/ops/ops.num	Fri May 21 12:02:31 2010	(r46852)
@@ -709,546 +709,516 @@
 sinh_n_n                        685
 tan_n_n                         686
 tanh_n_n                        687
-gcd_i_i_i                       688
-gcd_i_ic_i                      689
-gcd_i_i_ic                      690
-lcm_i_i_i                       691
-lcm_i_ic_i                      692
-lcm_i_i_ic                      693
-fact_i_i                        694
-fact_n_i                        695
-callmethodcc_p_s                696
-callmethodcc_p_sc               697
-callmethodcc_p_p                698
-callmethod_p_s_p                699
-callmethod_p_sc_p               700
-callmethod_p_p_p                701
-tailcallmethod_p_s              702
-tailcallmethod_p_sc             703
-tailcallmethod_p_p              704
-addmethod_p_s_p                 705
-addmethod_p_sc_p                706
-can_i_p_s                       707
-can_i_p_sc                      708
-does_i_p_s                      709
-does_i_p_sc                     710
-does_i_p_p                      711
-does_i_p_pc                     712
-isa_i_p_s                       713
-isa_i_p_sc                      714
-isa_i_p_p                       715
-isa_i_p_pc                      716
-newclass_p_s                    717
-newclass_p_sc                   718
-newclass_p_p                    719
-newclass_p_pc                   720
-subclass_p_p                    721
-subclass_p_pc                   722
-subclass_p_p_s                  723
-subclass_p_pc_s                 724
-subclass_p_p_sc                 725
-subclass_p_pc_sc                726
-subclass_p_p_p                  727
-subclass_p_pc_p                 728
-subclass_p_p_pc                 729
-subclass_p_pc_pc                730
-subclass_p_s                    731
-subclass_p_sc                   732
-subclass_p_s_s                  733
-subclass_p_sc_s                 734
-subclass_p_s_sc                 735
-subclass_p_sc_sc                736
-subclass_p_s_p                  737
-subclass_p_sc_p                 738
-subclass_p_s_pc                 739
-subclass_p_sc_pc                740
-get_class_p_s                   741
-get_class_p_sc                  742
-get_class_p_p                   743
-get_class_p_pc                  744
-class_p_p                       745
-addparent_p_p                   746
-removeparent_p_p                747
-addrole_p_p                     748
-addattribute_p_s                749
-addattribute_p_sc               750
-removeattribute_p_s             751
-removeattribute_p_sc            752
-getattribute_p_p_s              753
-getattribute_p_p_sc             754
-getattribute_p_p_p_s            755
-getattribute_p_p_pc_s           756
-getattribute_p_p_p_sc           757
-getattribute_p_p_pc_sc          758
-setattribute_p_s_p              759
-setattribute_p_sc_p             760
-setattribute_p_p_s_p            761
-setattribute_p_pc_s_p           762
-setattribute_p_p_sc_p           763
-setattribute_p_pc_sc_p          764
-inspect_p_p                     765
-inspect_p_pc                    766
-inspect_p_p_s                   767
-inspect_p_pc_s                  768
-inspect_p_p_sc                  769
-inspect_p_pc_sc                 770
-new_p_s                         771
-new_p_sc                        772
-new_p_s_p                       773
-new_p_sc_p                      774
-new_p_s_pc                      775
-new_p_sc_pc                     776
-new_p_p                         777
-new_p_pc                        778
-new_p_p_p                       779
-new_p_pc_p                      780
-new_p_p_pc                      781
-new_p_pc_pc                     782
-root_new_p_p                    783
-root_new_p_pc                   784
-root_new_p_p_p                  785
-root_new_p_pc_p                 786
-root_new_p_p_pc                 787
-root_new_p_pc_pc                788
-typeof_s_p                      789
-typeof_p_p                      790
-get_repr_s_p                    791
-find_method_p_p_s               792
-find_method_p_p_sc              793
-defined_i_p                     794
-defined_i_p_ki                  795
-defined_i_p_kic                 796
-defined_i_p_k                   797
-defined_i_p_kc                  798
-exists_i_p_ki                   799
-exists_i_p_kic                  800
-exists_i_p_k                    801
-exists_i_p_kc                   802
-delete_p_k                      803
-delete_p_kc                     804
-delete_p_ki                     805
-delete_p_kic                    806
-elements_i_p                    807
-push_p_i                        808
-push_p_ic                       809
-push_p_n                        810
-push_p_nc                       811
-push_p_s                        812
-push_p_sc                       813
-push_p_p                        814
-pop_i_p                         815
-pop_n_p                         816
-pop_s_p                         817
-pop_p_p                         818
-unshift_p_i                     819
-unshift_p_ic                    820
-unshift_p_n                     821
-unshift_p_nc                    822
-unshift_p_s                     823
-unshift_p_sc                    824
-unshift_p_p                     825
-shift_i_p                       826
-shift_n_p                       827
-shift_s_p                       828
-shift_p_p                       829
-splice_p_p_i_i                  830
-splice_p_p_ic_i                 831
-splice_p_p_i_ic                 832
-splice_p_p_ic_ic                833
-setprop_p_s_p                   834
-setprop_p_sc_p                  835
-getprop_p_s_p                   836
-getprop_p_sc_p                  837
-delprop_p_s                     838
-delprop_p_sc                    839
-prophash_p_p                    840
-freeze_s_p                      841
-thaw_p_s                        842
-thaw_p_sc                       843
-add_multi_s_s_p                 844
-add_multi_sc_s_p                845
-add_multi_s_sc_p                846
-add_multi_sc_sc_p               847
-find_multi_p_s_s                848
-find_multi_p_sc_s               849
-find_multi_p_s_sc               850
-find_multi_p_sc_sc              851
-register_p                      852
-unregister_p                    853
-box_p_i                         854
-box_p_ic                        855
-box_p_n                         856
-box_p_nc                        857
-box_p_s                         858
-box_p_sc                        859
-iter_p_p                        860
-morph_p_p                       861
-morph_p_pc                      862
-clone_s_s                       863
-clone_s_sc                      864
-exchange_i_i                    865
-exchange_p_p                    866
-exchange_n_n                    867
-exchange_s_s                    868
-set_i_i                         869
-set_i_ic                        870
-set_i_n                         871
-set_i_nc                        872
-set_i_s                         873
-set_i_sc                        874
-set_n_n                         875
-set_n_nc                        876
-set_n_i                         877
-set_n_ic                        878
-set_n_s                         879
-set_n_sc                        880
-set_n_p                         881
-set_s_p                         882
-set_s_s                         883
-set_s_sc                        884
-set_s_i                         885
-set_s_ic                        886
-set_s_n                         887
-set_s_nc                        888
-set_p_pc                        889
-set_p_p                         890
-set_p_i                         891
-set_p_ic                        892
-set_p_n                         893
-set_p_nc                        894
-set_p_s                         895
-set_p_sc                        896
-set_i_p                         897
-assign_p_p                      898
-assign_p_i                      899
-assign_p_ic                     900
-assign_p_n                      901
-assign_p_nc                     902
-assign_p_s                      903
-assign_p_sc                     904
-assign_s_s                      905
-assign_s_sc                     906
-setref_p_p                      907
-deref_p_p                       908
-setp_ind_i_p                    909
-setp_ind_ic_p                   910
-setn_ind_i_n                    911
-setn_ind_ic_n                   912
-setn_ind_i_nc                   913
-setn_ind_ic_nc                  914
-sets_ind_i_s                    915
-sets_ind_ic_s                   916
-sets_ind_i_sc                   917
-sets_ind_ic_sc                  918
-seti_ind_i_i                    919
-seti_ind_ic_i                   920
-seti_ind_i_ic                   921
-seti_ind_ic_ic                  922
-set_p_ki_i                      923
-set_p_kic_i                     924
-set_p_ki_ic                     925
-set_p_kic_ic                    926
-set_p_ki_n                      927
-set_p_kic_n                     928
-set_p_ki_nc                     929
-set_p_kic_nc                    930
-set_p_ki_s                      931
-set_p_kic_s                     932
-set_p_ki_sc                     933
-set_p_kic_sc                    934
-set_p_ki_p                      935
-set_p_kic_p                     936
-set_i_p_ki                      937
-set_i_p_kic                     938
-set_n_p_ki                      939
-set_n_p_kic                     940
-set_s_p_ki                      941
-set_s_p_kic                     942
-set_p_p_ki                      943
-set_p_p_kic                     944
-set_p_k_i                       945
-set_p_kc_i                      946
-set_p_k_ic                      947
-set_p_kc_ic                     948
-set_p_k_n                       949
-set_p_kc_n                      950
-set_p_k_nc                      951
-set_p_kc_nc                     952
-set_p_k_s                       953
-set_p_kc_s                      954
-set_p_k_sc                      955
-set_p_kc_sc                     956
-set_p_k_p                       957
-set_p_kc_p                      958
-set_i_p_k                       959
-set_i_p_kc                      960
-set_n_p_k                       961
-set_n_p_kc                      962
-set_s_p_k                       963
-set_s_p_kc                      964
-set_p_p_k                       965
-set_p_p_kc                      966
-clone_p_p                       967
-clone_p_p_p                     968
-clone_p_p_pc                    969
-copy_p_p                        970
-null_s                          971
-null_i                          972
-null_p                          973
-null_n                          974
-cleari                          975
-clearn                          976
-clears                          977
-clearp                          978
-ord_i_s                         979
-ord_i_sc                        980
-ord_i_s_i                       981
-ord_i_sc_i                      982
-ord_i_s_ic                      983
-ord_i_sc_ic                     984
-chr_s_i                         985
-chr_s_ic                        986
-chopn_s_s_i                     987
-chopn_s_sc_i                    988
-chopn_s_s_ic                    989
-chopn_s_sc_ic                   990
-concat_s_s                      991
-concat_s_sc                     992
-concat_p_p                      993
-concat_p_s                      994
-concat_p_sc                     995
-concat_s_s_s                    996
-concat_s_sc_s                   997
-concat_s_s_sc                   998
-concat_p_p_s                    999
-concat_p_p_sc                  1000
-concat_p_p_p                   1001
-repeat_s_s_i                   1002
-repeat_s_sc_i                  1003
-repeat_s_s_ic                  1004
-repeat_s_sc_ic                 1005
-repeat_p_p_i                   1006
-repeat_p_p_ic                  1007
-repeat_p_p_p                   1008
-repeat_p_i                     1009
-repeat_p_ic                    1010
-repeat_p_p                     1011
-length_i_s                     1012
-length_i_sc                    1013
-bytelength_i_s                 1014
-bytelength_i_sc                1015
-pin_s                          1016
-unpin_s                        1017
-substr_s_s_i                   1018
-substr_s_sc_i                  1019
-substr_s_s_ic                  1020
-substr_s_sc_ic                 1021
-substr_s_s_i_i                 1022
-substr_s_sc_i_i                1023
-substr_s_s_ic_i                1024
-substr_s_sc_ic_i               1025
-substr_s_s_i_ic                1026
-substr_s_sc_i_ic               1027
-substr_s_s_ic_ic               1028
-substr_s_sc_ic_ic              1029
-substr_s_p_i_i                 1030
-substr_s_p_ic_i                1031
-substr_s_p_i_ic                1032
-substr_s_p_ic_ic               1033
-replace_s_s_i_i_s              1034
-replace_s_sc_i_i_s             1035
-replace_s_s_ic_i_s             1036
-replace_s_sc_ic_i_s            1037
-replace_s_s_i_ic_s             1038
-replace_s_sc_i_ic_s            1039
-replace_s_s_ic_ic_s            1040
-replace_s_sc_ic_ic_s           1041
-replace_s_s_i_i_sc             1042
-replace_s_sc_i_i_sc            1043
-replace_s_s_ic_i_sc            1044
-replace_s_sc_ic_i_sc           1045
-replace_s_s_i_ic_sc            1046
-replace_s_sc_i_ic_sc           1047
-replace_s_s_ic_ic_sc           1048
-replace_s_sc_ic_ic_sc          1049
-index_i_s_s                    1050
-index_i_sc_s                   1051
-index_i_s_sc                   1052
-index_i_sc_sc                  1053
-index_i_s_s_i                  1054
-index_i_sc_s_i                 1055
-index_i_s_sc_i                 1056
-index_i_sc_sc_i                1057
-index_i_s_s_ic                 1058
-index_i_sc_s_ic                1059
-index_i_s_sc_ic                1060
-index_i_sc_sc_ic               1061
-sprintf_s_s_p                  1062
-sprintf_s_sc_p                 1063
-sprintf_p_p_p                  1064
-new_s                          1065
-new_s_i                        1066
-new_s_ic                       1067
-stringinfo_i_s_i               1068
-stringinfo_i_sc_i              1069
-stringinfo_i_s_ic              1070
-stringinfo_i_sc_ic             1071
-upcase_s_s                     1072
-upcase_s_sc                    1073
-downcase_s_s                   1074
-downcase_s_sc                  1075
-titlecase_s_s                  1076
-titlecase_s_sc                 1077
-join_s_s_p                     1078
-join_s_sc_p                    1079
-split_p_s_s                    1080
-split_p_sc_s                   1081
-split_p_s_sc                   1082
-split_p_sc_sc                  1083
-charset_i_s                    1084
-charset_i_sc                   1085
-charsetname_s_i                1086
-charsetname_s_ic               1087
-find_charset_i_s               1088
-find_charset_i_sc              1089
-trans_charset_s_s_i            1090
-trans_charset_s_sc_i           1091
-trans_charset_s_s_ic           1092
-trans_charset_s_sc_ic          1093
-encoding_i_s                   1094
-encoding_i_sc                  1095
-encodingname_s_i               1096
-encodingname_s_ic              1097
-find_encoding_i_s              1098
-find_encoding_i_sc             1099
-trans_encoding_s_s_i           1100
-trans_encoding_s_sc_i          1101
-trans_encoding_s_s_ic          1102
-trans_encoding_s_sc_ic         1103
-is_cclass_i_i_s_i              1104
-is_cclass_i_ic_s_i             1105
-is_cclass_i_i_sc_i             1106
-is_cclass_i_ic_sc_i            1107
-is_cclass_i_i_s_ic             1108
-is_cclass_i_ic_s_ic            1109
-is_cclass_i_i_sc_ic            1110
-is_cclass_i_ic_sc_ic           1111
-find_cclass_i_i_s_i_i          1112
-find_cclass_i_ic_s_i_i         1113
-find_cclass_i_i_sc_i_i         1114
-find_cclass_i_ic_sc_i_i        1115
-find_cclass_i_i_s_ic_i         1116
-find_cclass_i_ic_s_ic_i        1117
-find_cclass_i_i_sc_ic_i        1118
-find_cclass_i_ic_sc_ic_i       1119
-find_cclass_i_i_s_i_ic         1120
-find_cclass_i_ic_s_i_ic        1121
-find_cclass_i_i_sc_i_ic        1122
-find_cclass_i_ic_sc_i_ic       1123
-find_cclass_i_i_s_ic_ic        1124
-find_cclass_i_ic_s_ic_ic       1125
-find_cclass_i_i_sc_ic_ic       1126
-find_cclass_i_ic_sc_ic_ic      1127
-find_not_cclass_i_i_s_i_i      1128
-find_not_cclass_i_ic_s_i_i     1129
-find_not_cclass_i_i_sc_i_i     1130
-find_not_cclass_i_ic_sc_i_i    1131
-find_not_cclass_i_i_s_ic_i     1132
-find_not_cclass_i_ic_s_ic_i    1133
-find_not_cclass_i_i_sc_ic_i    1134
-find_not_cclass_i_ic_sc_ic_i   1135
-find_not_cclass_i_i_s_i_ic     1136
-find_not_cclass_i_ic_s_i_ic    1137
-find_not_cclass_i_i_sc_i_ic    1138
-find_not_cclass_i_ic_sc_i_ic   1139
-find_not_cclass_i_i_s_ic_ic    1140
-find_not_cclass_i_ic_s_ic_ic   1141
-find_not_cclass_i_i_sc_ic_ic   1142
-find_not_cclass_i_ic_sc_ic_ic  1143
-escape_s_s                     1144
-compose_s_s                    1145
-compose_s_sc                   1146
-spawnw_i_s                     1147
-spawnw_i_sc                    1148
-spawnw_i_p                     1149
-err_i                          1150
-err_s                          1151
-err_s_i                        1152
-err_s_ic                       1153
-time_i                         1154
-time_n                         1155
-gmtime_s_i                     1156
-gmtime_s_ic                    1157
-localtime_s_i                  1158
-localtime_s_ic                 1159
-decodetime_p_i                 1160
-decodetime_p_ic                1161
-decodelocaltime_p_i            1162
-decodelocaltime_p_ic           1163
-sysinfo_s_i                    1164
-sysinfo_s_ic                   1165
-sysinfo_i_i                    1166
-sysinfo_i_ic                   1167
-sleep_i                        1168
-sleep_ic                       1169
-sleep_n                        1170
-sleep_nc                       1171
-store_lex_s_p                  1172
-store_lex_sc_p                 1173
-store_dynamic_lex_s_p          1174
-store_dynamic_lex_sc_p         1175
-find_lex_p_s                   1176
-find_lex_p_sc                  1177
-find_dynamic_lex_p_s           1178
-find_dynamic_lex_p_sc          1179
-find_caller_lex_p_s            1180
-find_caller_lex_p_sc           1181
-get_namespace_p                1182
-get_namespace_p_p              1183
-get_namespace_p_pc             1184
-get_hll_namespace_p            1185
-get_hll_namespace_p_p          1186
-get_hll_namespace_p_pc         1187
-get_root_namespace_p           1188
-get_root_namespace_p_p         1189
-get_root_namespace_p_pc        1190
-get_global_p_s                 1191
-get_global_p_sc                1192
-get_global_p_p_s               1193
-get_global_p_pc_s              1194
-get_global_p_p_sc              1195
-get_global_p_pc_sc             1196
-get_hll_global_p_s             1197
-get_hll_global_p_sc            1198
-get_hll_global_p_p_s           1199
-get_hll_global_p_pc_s          1200
-get_hll_global_p_p_sc          1201
-get_hll_global_p_pc_sc         1202
-get_root_global_p_s            1203
-get_root_global_p_sc           1204
-get_root_global_p_p_s          1205
-get_root_global_p_pc_s         1206
-get_root_global_p_p_sc         1207
-get_root_global_p_pc_sc        1208
-set_global_s_p                 1209
-set_global_sc_p                1210
-set_global_p_s_p               1211
-set_global_pc_s_p              1212
-set_global_p_sc_p              1213
-set_global_pc_sc_p             1214
-set_hll_global_s_p             1215
-set_hll_global_sc_p            1216
-set_hll_global_p_s_p           1217
-set_hll_global_pc_s_p          1218
-set_hll_global_p_sc_p          1219
-set_hll_global_pc_sc_p         1220
-set_root_global_s_p            1221
-set_root_global_sc_p           1222
-set_root_global_p_s_p          1223
-set_root_global_pc_s_p         1224
-set_root_global_p_sc_p         1225
-set_root_global_pc_sc_p        1226
-find_name_p_s                  1227
-find_name_p_sc                 1228
-find_sub_not_null_p_s          1229
-find_sub_not_null_p_sc         1230
+callmethodcc_p_s                688
+callmethodcc_p_sc               689
+callmethodcc_p_p                690
+callmethod_p_s_p                691
+callmethod_p_sc_p               692
+callmethod_p_p_p                693
+tailcallmethod_p_s              694
+tailcallmethod_p_sc             695
+tailcallmethod_p_p              696
+addmethod_p_s_p                 697
+addmethod_p_sc_p                698
+can_i_p_s                       699
+can_i_p_sc                      700
+does_i_p_s                      701
+does_i_p_sc                     702
+does_i_p_p                      703
+does_i_p_pc                     704
+isa_i_p_s                       705
+isa_i_p_sc                      706
+isa_i_p_p                       707
+isa_i_p_pc                      708
+newclass_p_s                    709
+newclass_p_sc                   710
+newclass_p_p                    711
+newclass_p_pc                   712
+subclass_p_p                    713
+subclass_p_pc                   714
+subclass_p_p_s                  715
+subclass_p_pc_s                 716
+subclass_p_p_sc                 717
+subclass_p_pc_sc                718
+subclass_p_p_p                  719
+subclass_p_pc_p                 720
+subclass_p_p_pc                 721
+subclass_p_pc_pc                722
+subclass_p_s                    723
+subclass_p_sc                   724
+subclass_p_s_s                  725
+subclass_p_sc_s                 726
+subclass_p_s_sc                 727
+subclass_p_sc_sc                728
+subclass_p_s_p                  729
+subclass_p_sc_p                 730
+subclass_p_s_pc                 731
+subclass_p_sc_pc                732
+get_class_p_s                   733
+get_class_p_sc                  734
+get_class_p_p                   735
+get_class_p_pc                  736
+class_p_p                       737
+addparent_p_p                   738
+removeparent_p_p                739
+addrole_p_p                     740
+addattribute_p_s                741
+addattribute_p_sc               742
+removeattribute_p_s             743
+removeattribute_p_sc            744
+getattribute_p_p_s              745
+getattribute_p_p_sc             746
+getattribute_p_p_p_s            747
+getattribute_p_p_pc_s           748
+getattribute_p_p_p_sc           749
+getattribute_p_p_pc_sc          750
+setattribute_p_s_p              751
+setattribute_p_sc_p             752
+setattribute_p_p_s_p            753
+setattribute_p_pc_s_p           754
+setattribute_p_p_sc_p           755
+setattribute_p_pc_sc_p          756
+inspect_p_p                     757
+inspect_p_pc                    758
+inspect_p_p_s                   759
+inspect_p_pc_s                  760
+inspect_p_p_sc                  761
+inspect_p_pc_sc                 762
+new_p_s                         763
+new_p_sc                        764
+new_p_s_p                       765
+new_p_sc_p                      766
+new_p_s_pc                      767
+new_p_sc_pc                     768
+new_p_p                         769
+new_p_pc                        770
+new_p_p_p                       771
+new_p_pc_p                      772
+new_p_p_pc                      773
+new_p_pc_pc                     774
+root_new_p_p                    775
+root_new_p_pc                   776
+root_new_p_p_p                  777
+root_new_p_pc_p                 778
+root_new_p_p_pc                 779
+root_new_p_pc_pc                780
+typeof_s_p                      781
+typeof_p_p                      782
+get_repr_s_p                    783
+find_method_p_p_s               784
+find_method_p_p_sc              785
+defined_i_p                     786
+defined_i_p_ki                  787
+defined_i_p_kic                 788
+defined_i_p_k                   789
+defined_i_p_kc                  790
+exists_i_p_ki                   791
+exists_i_p_kic                  792
+exists_i_p_k                    793
+exists_i_p_kc                   794
+delete_p_k                      795
+delete_p_kc                     796
+delete_p_ki                     797
+delete_p_kic                    798
+elements_i_p                    799
+push_p_i                        800
+push_p_ic                       801
+push_p_n                        802
+push_p_nc                       803
+push_p_s                        804
+push_p_sc                       805
+push_p_p                        806
+pop_i_p                         807
+pop_n_p                         808
+pop_s_p                         809
+pop_p_p                         810
+unshift_p_i                     811
+unshift_p_ic                    812
+unshift_p_n                     813
+unshift_p_nc                    814
+unshift_p_s                     815
+unshift_p_sc                    816
+unshift_p_p                     817
+shift_i_p                       818
+shift_n_p                       819
+shift_s_p                       820
+shift_p_p                       821
+splice_p_p_i_i                  822
+splice_p_p_ic_i                 823
+splice_p_p_i_ic                 824
+splice_p_p_ic_ic                825
+setprop_p_s_p                   826
+setprop_p_sc_p                  827
+getprop_p_s_p                   828
+getprop_p_sc_p                  829
+delprop_p_s                     830
+delprop_p_sc                    831
+prophash_p_p                    832
+freeze_s_p                      833
+thaw_p_s                        834
+thaw_p_sc                       835
+add_multi_s_s_p                 836
+add_multi_sc_s_p                837
+add_multi_s_sc_p                838
+add_multi_sc_sc_p               839
+find_multi_p_s_s                840
+find_multi_p_sc_s               841
+find_multi_p_s_sc               842
+find_multi_p_sc_sc              843
+register_p                      844
+unregister_p                    845
+box_p_i                         846
+box_p_ic                        847
+box_p_n                         848
+box_p_nc                        849
+box_p_s                         850
+box_p_sc                        851
+iter_p_p                        852
+morph_p_p                       853
+morph_p_pc                      854
+clone_s_s                       855
+clone_s_sc                      856
+set_i_i                         857
+set_i_ic                        858
+set_i_n                         859
+set_i_nc                        860
+set_i_s                         861
+set_i_sc                        862
+set_n_n                         863
+set_n_nc                        864
+set_n_i                         865
+set_n_ic                        866
+set_n_s                         867
+set_n_sc                        868
+set_n_p                         869
+set_s_p                         870
+set_s_s                         871
+set_s_sc                        872
+set_s_i                         873
+set_s_ic                        874
+set_s_n                         875
+set_s_nc                        876
+set_p_pc                        877
+set_p_p                         878
+set_p_i                         879
+set_p_ic                        880
+set_p_n                         881
+set_p_nc                        882
+set_p_s                         883
+set_p_sc                        884
+set_i_p                         885
+assign_p_p                      886
+assign_p_i                      887
+assign_p_ic                     888
+assign_p_n                      889
+assign_p_nc                     890
+assign_p_s                      891
+assign_p_sc                     892
+assign_s_s                      893
+assign_s_sc                     894
+setref_p_p                      895
+deref_p_p                       896
+set_p_ki_i                      897
+set_p_kic_i                     898
+set_p_ki_ic                     899
+set_p_kic_ic                    900
+set_p_ki_n                      901
+set_p_kic_n                     902
+set_p_ki_nc                     903
+set_p_kic_nc                    904
+set_p_ki_s                      905
+set_p_kic_s                     906
+set_p_ki_sc                     907
+set_p_kic_sc                    908
+set_p_ki_p                      909
+set_p_kic_p                     910
+set_i_p_ki                      911
+set_i_p_kic                     912
+set_n_p_ki                      913
+set_n_p_kic                     914
+set_s_p_ki                      915
+set_s_p_kic                     916
+set_p_p_ki                      917
+set_p_p_kic                     918
+set_p_k_i                       919
+set_p_kc_i                      920
+set_p_k_ic                      921
+set_p_kc_ic                     922
+set_p_k_n                       923
+set_p_kc_n                      924
+set_p_k_nc                      925
+set_p_kc_nc                     926
+set_p_k_s                       927
+set_p_kc_s                      928
+set_p_k_sc                      929
+set_p_kc_sc                     930
+set_p_k_p                       931
+set_p_kc_p                      932
+set_i_p_k                       933
+set_i_p_kc                      934
+set_n_p_k                       935
+set_n_p_kc                      936
+set_s_p_k                       937
+set_s_p_kc                      938
+set_p_p_k                       939
+set_p_p_kc                      940
+clone_p_p                       941
+clone_p_p_p                     942
+clone_p_p_pc                    943
+copy_p_p                        944
+null_s                          945
+null_i                          946
+null_p                          947
+null_n                          948
+ord_i_s                         949
+ord_i_sc                        950
+ord_i_s_i                       951
+ord_i_sc_i                      952
+ord_i_s_ic                      953
+ord_i_sc_ic                     954
+chr_s_i                         955
+chr_s_ic                        956
+chopn_s_s_i                     957
+chopn_s_sc_i                    958
+chopn_s_s_ic                    959
+chopn_s_sc_ic                   960
+concat_s_s                      961
+concat_s_sc                     962
+concat_p_p                      963
+concat_p_s                      964
+concat_p_sc                     965
+concat_s_s_s                    966
+concat_s_sc_s                   967
+concat_s_s_sc                   968
+concat_p_p_s                    969
+concat_p_p_sc                   970
+concat_p_p_p                    971
+repeat_s_s_i                    972
+repeat_s_sc_i                   973
+repeat_s_s_ic                   974
+repeat_s_sc_ic                  975
+repeat_p_p_i                    976
+repeat_p_p_ic                   977
+repeat_p_p_p                    978
+repeat_p_i                      979
+repeat_p_ic                     980
+repeat_p_p                      981
+length_i_s                      982
+length_i_sc                     983
+bytelength_i_s                  984
+bytelength_i_sc                 985
+pin_s                           986
+unpin_s                         987
+substr_s_s_i                    988
+substr_s_sc_i                   989
+substr_s_s_ic                   990
+substr_s_sc_ic                  991
+substr_s_s_i_i                  992
+substr_s_sc_i_i                 993
+substr_s_s_ic_i                 994
+substr_s_sc_ic_i                995
+substr_s_s_i_ic                 996
+substr_s_sc_i_ic                997
+substr_s_s_ic_ic                998
+substr_s_sc_ic_ic               999
+substr_s_p_i_i                 1000
+substr_s_p_ic_i                1001
+substr_s_p_i_ic                1002
+substr_s_p_ic_ic               1003
+replace_s_s_i_i_s              1004
+replace_s_sc_i_i_s             1005
+replace_s_s_ic_i_s             1006
+replace_s_sc_ic_i_s            1007
+replace_s_s_i_ic_s             1008
+replace_s_sc_i_ic_s            1009
+replace_s_s_ic_ic_s            1010
+replace_s_sc_ic_ic_s           1011
+replace_s_s_i_i_sc             1012
+replace_s_sc_i_i_sc            1013
+replace_s_s_ic_i_sc            1014
+replace_s_sc_ic_i_sc           1015
+replace_s_s_i_ic_sc            1016
+replace_s_sc_i_ic_sc           1017
+replace_s_s_ic_ic_sc           1018
+replace_s_sc_ic_ic_sc          1019
+index_i_s_s                    1020
+index_i_sc_s                   1021
+index_i_s_sc                   1022
+index_i_sc_sc                  1023
+index_i_s_s_i                  1024
+index_i_sc_s_i                 1025
+index_i_s_sc_i                 1026
+index_i_sc_sc_i                1027
+index_i_s_s_ic                 1028
+index_i_sc_s_ic                1029
+index_i_s_sc_ic                1030
+index_i_sc_sc_ic               1031
+sprintf_s_s_p                  1032
+sprintf_s_sc_p                 1033
+sprintf_p_p_p                  1034
+new_s                          1035
+new_s_i                        1036
+new_s_ic                       1037
+stringinfo_i_s_i               1038
+stringinfo_i_sc_i              1039
+stringinfo_i_s_ic              1040
+stringinfo_i_sc_ic             1041
+upcase_s_s                     1042
+upcase_s_sc                    1043
+downcase_s_s                   1044
+downcase_s_sc                  1045
+titlecase_s_s                  1046
+titlecase_s_sc                 1047
+join_s_s_p                     1048
+join_s_sc_p                    1049
+split_p_s_s                    1050
+split_p_sc_s                   1051
+split_p_s_sc                   1052
+split_p_sc_sc                  1053
+charset_i_s                    1054
+charset_i_sc                   1055
+charsetname_s_i                1056
+charsetname_s_ic               1057
+find_charset_i_s               1058
+find_charset_i_sc              1059
+trans_charset_s_s_i            1060
+trans_charset_s_sc_i           1061
+trans_charset_s_s_ic           1062
+trans_charset_s_sc_ic          1063
+encoding_i_s                   1064
+encoding_i_sc                  1065
+encodingname_s_i               1066
+encodingname_s_ic              1067
+find_encoding_i_s              1068
+find_encoding_i_sc             1069
+trans_encoding_s_s_i           1070
+trans_encoding_s_sc_i          1071
+trans_encoding_s_s_ic          1072
+trans_encoding_s_sc_ic         1073
+is_cclass_i_i_s_i              1074
+is_cclass_i_ic_s_i             1075
+is_cclass_i_i_sc_i             1076
+is_cclass_i_ic_sc_i            1077
+is_cclass_i_i_s_ic             1078
+is_cclass_i_ic_s_ic            1079
+is_cclass_i_i_sc_ic            1080
+is_cclass_i_ic_sc_ic           1081
+find_cclass_i_i_s_i_i          1082
+find_cclass_i_ic_s_i_i         1083
+find_cclass_i_i_sc_i_i         1084
+find_cclass_i_ic_sc_i_i        1085
+find_cclass_i_i_s_ic_i         1086
+find_cclass_i_ic_s_ic_i        1087
+find_cclass_i_i_sc_ic_i        1088
+find_cclass_i_ic_sc_ic_i       1089
+find_cclass_i_i_s_i_ic         1090
+find_cclass_i_ic_s_i_ic        1091
+find_cclass_i_i_sc_i_ic        1092
+find_cclass_i_ic_sc_i_ic       1093
+find_cclass_i_i_s_ic_ic        1094
+find_cclass_i_ic_s_ic_ic       1095
+find_cclass_i_i_sc_ic_ic       1096
+find_cclass_i_ic_sc_ic_ic      1097
+find_not_cclass_i_i_s_i_i      1098
+find_not_cclass_i_ic_s_i_i     1099
+find_not_cclass_i_i_sc_i_i     1100
+find_not_cclass_i_ic_sc_i_i    1101
+find_not_cclass_i_i_s_ic_i     1102
+find_not_cclass_i_ic_s_ic_i    1103
+find_not_cclass_i_i_sc_ic_i    1104
+find_not_cclass_i_ic_sc_ic_i   1105
+find_not_cclass_i_i_s_i_ic     1106
+find_not_cclass_i_ic_s_i_ic    1107
+find_not_cclass_i_i_sc_i_ic    1108
+find_not_cclass_i_ic_sc_i_ic   1109
+find_not_cclass_i_i_s_ic_ic    1110
+find_not_cclass_i_ic_s_ic_ic   1111
+find_not_cclass_i_i_sc_ic_ic   1112
+find_not_cclass_i_ic_sc_ic_ic  1113
+escape_s_s                     1114
+compose_s_s                    1115
+compose_s_sc                   1116
+spawnw_i_s                     1117
+spawnw_i_sc                    1118
+spawnw_i_p                     1119
+err_i                          1120
+err_s                          1121
+err_s_i                        1122
+err_s_ic                       1123
+time_i                         1124
+time_n                         1125
+gmtime_s_i                     1126
+gmtime_s_ic                    1127
+localtime_s_i                  1128
+localtime_s_ic                 1129
+decodetime_p_i                 1130
+decodetime_p_ic                1131
+decodelocaltime_p_i            1132
+decodelocaltime_p_ic           1133
+sysinfo_s_i                    1134
+sysinfo_s_ic                   1135
+sysinfo_i_i                    1136
+sysinfo_i_ic                   1137
+sleep_i                        1138
+sleep_ic                       1139
+sleep_n                        1140
+sleep_nc                       1141
+store_lex_s_p                  1142
+store_lex_sc_p                 1143
+store_dynamic_lex_s_p          1144
+store_dynamic_lex_sc_p         1145
+find_lex_p_s                   1146
+find_lex_p_sc                  1147
+find_dynamic_lex_p_s           1148
+find_dynamic_lex_p_sc          1149
+find_caller_lex_p_s            1150
+find_caller_lex_p_sc           1151
+get_namespace_p                1152
+get_namespace_p_p              1153
+get_namespace_p_pc             1154
+get_hll_namespace_p            1155
+get_hll_namespace_p_p          1156
+get_hll_namespace_p_pc         1157
+get_root_namespace_p           1158
+get_root_namespace_p_p         1159
+get_root_namespace_p_pc        1160
+get_global_p_s                 1161
+get_global_p_sc                1162
+get_global_p_p_s               1163
+get_global_p_pc_s              1164
+get_global_p_p_sc              1165
+get_global_p_pc_sc             1166
+get_hll_global_p_s             1167
+get_hll_global_p_sc            1168
+get_hll_global_p_p_s           1169
+get_hll_global_p_pc_s          1170
+get_hll_global_p_p_sc          1171
+get_hll_global_p_pc_sc         1172
+get_root_global_p_s            1173
+get_root_global_p_sc           1174
+get_root_global_p_p_s          1175
+get_root_global_p_pc_s         1176
+get_root_global_p_p_sc         1177
+get_root_global_p_pc_sc        1178
+set_global_s_p                 1179
+set_global_sc_p                1180
+set_global_p_s_p               1181
+set_global_pc_s_p              1182
+set_global_p_sc_p              1183
+set_global_pc_sc_p             1184
+set_hll_global_s_p             1185
+set_hll_global_sc_p            1186
+set_hll_global_p_s_p           1187
+set_hll_global_pc_s_p          1188
+set_hll_global_p_sc_p          1189
+set_hll_global_pc_sc_p         1190
+set_root_global_s_p            1191
+set_root_global_sc_p           1192
+set_root_global_p_s_p          1193
+set_root_global_pc_s_p         1194
+set_root_global_p_sc_p         1195
+set_root_global_pc_sc_p        1196
+find_name_p_s                  1197
+find_name_p_sc                 1198
+find_sub_not_null_p_s          1199
+find_sub_not_null_p_sc         1200

Modified: branches/ops_pct/src/ops/set.ops
==============================================================================
--- branches/ops_pct/src/ops/set.ops	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/src/ops/set.ops	Fri May 21 12:02:31 2010	(r46852)
@@ -31,46 +31,6 @@
        : $2;
 }
 
-
-
-########################################
-
-=item B<exchange>(inout INT, inout INT)
-
-=item B<exchange>(inout NUM, inout NUM)
-
-=item B<exchange>(inout PMC, inout PMC)
-
-=item B<exchange>(inout STR, inout STR)
-
-Exchange the contents of registers $1 and $2
-
-=cut
-
-op exchange(inout INT, inout INT) :base_core {
-    const INTVAL temp = $1;
-    $1 = $2;
-    $2 = temp;
-}
-
-op exchange(inout PMC, inout PMC) :base_core {
-    PMC * const temp = $1;
-    $1 = $2;
-    $2 = temp;
-}
-
-op exchange(inout NUM, inout NUM) :base_core {
-    FLOATVAL temp = $1;
-    $1 = $2;
-    $2 = temp;
-}
-
-op exchange(inout STR, inout STR) :base_core {
-    STRING * const temp = $1;
-    $1 = $2;
-    $2 = temp;
-}
-
 ########################################
 
 =item B<set>(out INT, in INT)
@@ -259,68 +219,6 @@
 
 =back
 
-=head2 Indirect PMC register set
-
-=over 4
-
-=item B<setp_ind>(in INT, invar PMC)
-
-Set the PMC in register $1 to $2.
-Please note, that the register allocator doesn't track the usage of the
-affected register - handle with care.
-
-=cut
-
-inline op setp_ind(in INT, invar PMC) :base_ref {
-    if ($1 < 0 || $1 >= NUM_REGISTERS)
-        PANIC(interp, "Out of bound register access");
-    REG_PMC(interp, $1) = $2;
-}
-
-=item B<setn_ind>(in INT, in NUM)
-
-Set the number in register $1 to $2.
-Please note, that the register allocator doesn't track the usage of the
-affected register - handle with care.
-
-=cut
-
-inline op setn_ind(in INT, in NUM) :base_ref {
-    if ($1 < 0 || $1 >= NUM_REGISTERS)
-        PANIC(interp, "Out of bound register access");
-    REG_NUM(interp, $1) = $2;
-}
-
-=item B<sets_ind>(in INT, in STR)
-
-Set the string in register $1 to $2.
-Please note, that the register allocator doesn't track the usage of the
-affected register - handle with care.
-
-=cut
-
-inline op sets_ind(in INT, in STR) :base_ref {
-    if ($1 < 0 || $1 >= NUM_REGISTERS)
-        PANIC(interp, "Out of bound register access");
-    REG_STR(interp, $1) = $2;
-}
-
-=item B<seti_ind>(in INT, in INT)
-
-Set the int in register $1 to $2.
-Please note, that the register allocator doesn't track the usage of the
-affected register - handle with care.
-
-=cut
-
-inline op seti_ind(in INT, in INT) :base_ref {
-    if ($1 < 0 || $1 >= NUM_REGISTERS)
-        PANIC(interp, "Out of bound register access");
-    REG_INT(interp, $1) = $2;
-}
-
-=back
-
 =cut
 
 ########################################
@@ -573,40 +471,6 @@
     $1 = 0;
 }
 
-########################################
-
-=item B<cleari>()
-
-=item B<clearn>()
-
-=item B<clearp>()
-
-=item B<clears>()
-
-Clear all the registers of the type indicated in the name of the operation.
-
-INTVAL ('i') and FLOATVAL ('n') registers clear to zero.
-
-PMC ('p') and STRING ('s') registers clear to NULL.
-
-=cut
-
-inline op cleari() :base_core {
-    Parrot_clear_i(interp);
-}
-
-inline op clearn() :base_core {
-    Parrot_clear_n(interp);
-}
-
-inline op clears() :base_core {
-    Parrot_clear_s(interp);
-}
-
-inline op clearp() :base_core {
-    Parrot_clear_p(interp);
-}
-
 =back
 
 =cut

Modified: branches/ops_pct/src/packfile/pf_items.c
==============================================================================
--- branches/ops_pct/src/packfile/pf_items.c	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/src/packfile/pf_items.c	Fri May 21 12:02:31 2010	(r46852)
@@ -1216,7 +1216,10 @@
     ASSERT_ARGS(PF_fetch_string)
     STRING   *s;
     UINTVAL   flags;
+    UINTVAL   encoding_nr;
     UINTVAL   charset_nr;
+    const ENCODING *encoding;
+    const CHARSET  *charset;
     size_t    size;
     const int wordsize          = pf ? pf->header->wordsize : sizeof (opcode_t);
     opcode_t  flag_charset_word = PF_fetch_opcode(pf, cursor);
@@ -1224,20 +1227,31 @@
     if (flag_charset_word == -1)
         return STRINGNULL;
 
-    /* decode flags and charset */
+    /* decode flags, charset and encoding */
     flags         = (flag_charset_word & 0x1 ? PObj_constant_FLAG : 0) |
                     (flag_charset_word & 0x2 ? PObj_private7_FLAG : 0) ;
-    charset_nr    = flag_charset_word >> 8;
+    encoding_nr   = (flag_charset_word >> 16);
+    charset_nr    = (flag_charset_word >> 8) & 0xFF;
 
 
     size = (size_t)PF_fetch_opcode(pf, cursor);
 
     TRACE_PRINTF(("PF_fetch_string(): flags=0x%04x, ", flags));
+    TRACE_PRINTF(("encoding_nr=%ld, ", encoding_nr));
     TRACE_PRINTF(("charset_nr=%ld, ", charset_nr));
     TRACE_PRINTF(("size=%ld.\n", size));
 
-    s = string_make_from_charset(interp, (const char *)*cursor,
-                        size, charset_nr, flags);
+    encoding = Parrot_get_encoding(interp, encoding_nr);
+    charset  = Parrot_get_charset(interp, charset_nr);
+    if (!encoding)
+            Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED,
+                    "Invalid encoding number '%d' specified", encoding_nr);
+    if (!charset)
+            Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED,
+                    "Invalid charset number '%d' specified", charset_nr);
+
+    s = Parrot_str_new_init(interp, (const char *)*cursor, size,
+            encoding, charset, flags);
 
     /* print only printable characters */
     TRACE_PRINTF_VAL(("PF_fetch_string(): string is '%s' at 0x%x\n",
@@ -1298,8 +1312,9 @@
      * see also PF_fetch_string
      */
 
-    /* encode charset_nr and flags into the same word for a 33% savings on constant overhead */
-    *cursor++ = (Parrot_charset_number_of_str(NULL, s) << 8)         |
+    /* encode charset_nr, encoding_nr and flags into the same word */
+    *cursor++ = (Parrot_encoding_number_of_str(NULL, s) << 16)       |
+                (Parrot_charset_number_of_str(NULL, s) << 8)         |
                 (PObj_get_FLAGS(s) & PObj_constant_FLAG ? 0x1 : 0x0) |
                 (PObj_get_FLAGS(s) & PObj_private7_FLAG ? 0x2 : 0x0) ;
     *cursor++ = s->bufused;

Modified: branches/ops_pct/src/pmc/string.pmc
==============================================================================
--- branches/ops_pct/src/pmc/string.pmc	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/src/pmc/string.pmc	Fri May 21 12:02:31 2010	(r46852)
@@ -820,7 +820,7 @@
             Parrot_encoding_number(INTERP, encodingname));
         STRING * const src = VTABLE_get_string(INTERP, SELF);
         STRING * const dest = Parrot_str_unescape_string(INTERP, src,
-                charset, encoding);
+                charset, encoding, 0);
         RETURN(STRING *dest);
     }
 

Modified: branches/ops_pct/src/string/api.c
==============================================================================
--- branches/ops_pct/src/string/api.c	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/src/string/api.c	Fri May 21 12:02:31 2010	(r46852)
@@ -2528,7 +2528,7 @@
 /*
 
 =item C<STRING * Parrot_str_unescape_string(PARROT_INTERP, const STRING *src,
-const CHARSET *charset, const ENCODING *encoding)>
+const CHARSET *charset, const ENCODING *encoding, UINTVAL flags)>
 
 EXPERIMENTAL, see TT #1628
 
@@ -2545,12 +2545,13 @@
 STRING *
 Parrot_str_unescape_string(PARROT_INTERP, ARGIN(const STRING *src),
         ARGIN(const CHARSET *charset),
-        ARGIN(const ENCODING *encoding))
+        ARGIN(const ENCODING *encoding),
+        UINTVAL flags)
 {
     ASSERT_ARGS(Parrot_str_unescape_string)
 
     UINTVAL srclen = Parrot_str_byte_length(interp, src);
-    STRING *result = Parrot_gc_new_string_header(interp, 0);
+    STRING *result = Parrot_gc_new_string_header(interp, flags);
     String_iter itersrc;
     String_iter iterdest;
     UINTVAL reserved;
@@ -2613,13 +2614,18 @@
                     }
                     else {
                         /* \xhh 1..2 hex digits */
-                        for (digcount = 0; digcount < 2; ++digcount) {
+                        pending = 1;
+                        for (digcount = 0; digcount < 2;) {
                             if (!isxdigit(c))
                                 break;
                             digbuf[digcount] = c;
+                            ++digcount;
+                            if (itersrc.bytepos >= srclen) {
+                                pending = 0;
+                                break;
+                            }
                             c = itersrc.get_and_advance(interp, &itersrc);
                         }
-                        pending = 1;
                     }
                     if (digcount == 0)
                         throw_illegal_escape(interp);

Modified: branches/ops_pct/src/utils.c
==============================================================================
--- branches/ops_pct/src/utils.c	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/src/utils.c	Fri May 21 12:02:31 2010	(r46852)
@@ -62,12 +62,12 @@
 static void next_rand(_rand_buf X);
 static void process_cycle_without_exit(
     int node_index,
-    ARGIN(parrot_prm_context* c))
+    ARGIN(const parrot_prm_context *c))
         __attribute__nonnull__(2);
 
 static void rec_climb_back_and_mark(
     int node_index,
-    ARGIN(parrot_prm_context* c))
+    ARGIN(const parrot_prm_context *c))
         __attribute__nonnull__(2);
 
 #define ASSERT_ARGS__drand48 __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
@@ -664,8 +664,8 @@
 
 /*
 
-=item C<static void rec_climb_back_and_mark(int node_index, parrot_prm_context*
-c)>
+=item C<static void rec_climb_back_and_mark(int node_index, const
+parrot_prm_context *c)>
 
 Recursive function, used by Parrot_register_move to
 climb back the graph of register moves operations.
@@ -689,7 +689,7 @@
 */
 
 static void
-rec_climb_back_and_mark(int node_index, ARGIN(parrot_prm_context* c))
+rec_climb_back_and_mark(int node_index, ARGIN(const parrot_prm_context *c))
 {
     ASSERT_ARGS(rec_climb_back_and_mark)
     const int node = c->dest_regs[node_index];
@@ -715,8 +715,8 @@
 
 /*
 
-=item C<static void process_cycle_without_exit(int node_index,
-parrot_prm_context* c)>
+=item C<static void process_cycle_without_exit(int node_index, const
+parrot_prm_context *c)>
 
 Recursive function, used by Parrot_register_move to handle the case
 of cycles without exits, that are cycles of move ops between registers
@@ -732,7 +732,7 @@
 */
 
 static void
-process_cycle_without_exit(int node_index, ARGIN(parrot_prm_context* c))
+process_cycle_without_exit(int node_index, ARGIN(const parrot_prm_context *c))
 {
     ASSERT_ARGS(process_cycle_without_exit)
     const int pred = c->src_regs[node_index];
@@ -915,6 +915,7 @@
 /* TODO: Macroize COMPARE */
 /* This is an awfully expensive function to call, what with all the */
 /* comparisons that never change. We ought to precompute everything. */
+/* XXX We should be able to guarantee that *a and *b never change via const parameters. */
 static INTVAL
 COMPARE(PARROT_INTERP, ARGIN(void *a), ARGIN(void *b), ARGIN(PMC *cmp))
 {

Modified: branches/ops_pct/t/compilers/pct/post.t
==============================================================================
--- branches/ops_pct/t/compilers/pct/post.t	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/t/compilers/pct/post.t	Fri May 21 12:02:31 2010	(r46852)
@@ -6,7 +6,7 @@
 use strict;
 use warnings;
 use lib qw(t . lib ../lib ../../lib ../../../lib);
-use Parrot::Test tests => 6;
+use Parrot::Test tests => 7;
 
 foreach my $name (qw(Op Ops Sub Label)) {
     my $module = "'POST';'$name'";
@@ -83,6 +83,37 @@
 }
 OUT
 
+pir_output_is( <<'CODE', <<'OUT', 'Generate :multi' );
+.sub _main
+    load_bytecode 'PCT.pbc'
+    load_bytecode 'dumper.pbc'
+    .local pmc node
+    node = new ['POST';'Sub']
+    node.'name'('foo')
+    $P0 = new ['ResizablePMCArray']
+    push $P0, "_"
+    push $P0, "Foo"
+    $P1 = new ['ResizableStringArray']
+    push $P1, "Bar"
+    push $P1, "Baz"
+    push $P0, $P1
+    node.'multi'($P0)
+
+    .local pmc compiler
+    compiler = new ['POST';'Compiler']
+    $S0 = compiler.'to_pir'(node)
+    say $S0
+    .return ()
+.end
+CODE
+
+.namespace []
+.sub "foo"  :subid("post10") :multi(_,["Foo"],["Bar";"Baz"])
+.end
+
+
+OUT
+
 # Local Variables:
 #   mode: cperl
 #   cperl-indent-level: 4

Added: branches/ops_pct/t/dynoplibs/deprecated.t
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/ops_pct/t/dynoplibs/deprecated.t	Fri May 21 12:02:31 2010	(r46852)
@@ -0,0 +1,282 @@
+#!./parrot
+# Copyright (C) 2010, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+t/dynoplibs/deprecated.t - Tests for Deprecated Ops
+
+=head1 SYNOPSIS
+
+    % prove t/dynoplibs/deprecated.t
+
+=head1 DESCRIPTION
+
+Tests for ops residing in src/dynoplibs/deprecated.ops
+
+=cut
+
+.const int TESTS = 105
+
+.loadlib 'deprecated_ops'
+
+.sub 'test' :main
+    .include 'test_more.pir'
+
+    plan(TESTS)
+
+    test_cleari()
+    test_exchange_i()
+    test_clearn()
+    test_exchange_n()
+    test_clears()
+    test_exchange_s()
+.end
+
+.sub 'test_exchange_i'
+    $I10 = 10
+    $I20 = 20
+    exchange $I10, $I20
+    is($I10, 20, 'exchange - first operand ok')
+    is($I20, 10, 'exchange - second operand ok')
+
+    $I30 = 30
+    exchange $I30, $I30
+    is($I30, 30, 'exchange - reflexive')
+.end
+
+
+.sub 'test_cleari'
+    $I0 = 0xdeadbee
+    $I1 = 0xdeadbee
+    $I2 = 0xdeadbee
+    $I3 = 0xdeadbee
+    $I4 = 0xdeadbee
+    $I5 = 0xdeadbee
+    $I6 = 0xdeadbee
+    $I7 = 0xdeadbee
+    $I8 = 0xdeadbee
+    $I9 = 0xdeadbee
+    $I10 = 0xdeadbee
+    $I11 = 0xdeadbee
+    $I12 = 0xdeadbee
+    $I13 = 0xdeadbee
+    $I14 = 0xdeadbee
+    $I15 = 0xdeadbee
+    $I16 = 0xdeadbee
+    $I17 = 0xdeadbee
+    $I18 = 0xdeadbee
+    $I19 = 0xdeadbee
+    $I20 = 0xdeadbee
+    $I21 = 0xdeadbee
+    $I22 = 0xdeadbee
+    $I23 = 0xdeadbee
+    $I24 = 0xdeadbee
+    $I25 = 0xdeadbee
+    $I26 = 0xdeadbee
+    $I27 = 0xdeadbee
+    $I28 = 0xdeadbee
+    $I29 = 0xdeadbee
+    $I30 = 0xdeadbee
+    $I31 = 0xdeadbee
+
+    cleari
+
+    is($I0, 0, 'cleari - $I0 cleared')
+    is($I1, 0, 'cleari - $I1 cleared')
+    is($I2, 0, 'cleari - $I2 cleared')
+    is($I3, 0, 'cleari - $I3 cleared')
+    is($I4, 0, 'cleari - $I4 cleared')
+    is($I5, 0, 'cleari - $I5 cleared')
+    is($I6, 0, 'cleari - $I6 cleared')
+    is($I7, 0, 'cleari - $I7 cleared')
+    is($I8, 0, 'cleari - $I8 cleared')
+    is($I9, 0, 'cleari - $I9 cleared')
+    is($I10, 0, 'cleari - $I10 cleared')
+    is($I11, 0, 'cleari - $I11 cleared')
+    is($I12, 0, 'cleari - $I12 cleared')
+    is($I13, 0, 'cleari - $I13 cleared')
+    is($I14, 0, 'cleari - $I14 cleared')
+    is($I15, 0, 'cleari - $I15 cleared')
+    is($I16, 0, 'cleari - $I16 cleared')
+    is($I17, 0, 'cleari - $I17 cleared')
+    is($I18, 0, 'cleari - $I18 cleared')
+    is($I19, 0, 'cleari - $I19 cleared')
+    is($I20, 0, 'cleari - $I20 cleared')
+    is($I21, 0, 'cleari - $I21 cleared')
+    is($I22, 0, 'cleari - $I22 cleared')
+    is($I23, 0, 'cleari - $I23 cleared')
+    is($I24, 0, 'cleari - $I24 cleared')
+    is($I25, 0, 'cleari - $I25 cleared')
+    is($I26, 0, 'cleari - $I26 cleared')
+    is($I27, 0, 'cleari - $I27 cleared')
+    is($I28, 0, 'cleari - $I28 cleared')
+    is($I29, 0, 'cleari - $I29 cleared')
+    is($I30, 0, 'cleari - $I30 cleared')
+    is($I31, 0, 'cleari - $I31 cleared')
+.end
+
+.sub test_clearn
+    set     $N0, 547972.0
+    set     $N1, 547972.0
+    set     $N2, 547972.0
+    set     $N3, 547972.0
+    set     $N4, 547972.0
+    set     $N5, 547972.0
+    set     $N6, 547972.0
+    set     $N7, 547972.0
+    set     $N8, 547972.0
+    set     $N9, 547972.0
+    set     $N10, 547972.0
+    set     $N11, 547972.0
+    set     $N12, 547972.0
+    set     $N13, 547972.0
+    set     $N14, 547972.0
+    set     $N15, 547972.0
+    set     $N16, 547972.0
+    set     $N17, 547972.0
+    set     $N18, 547972.0
+    set     $N19, 547972.0
+    set     $N20, 547972.0
+    set     $N21, 547972.0
+    set     $N22, 547972.0
+    set     $N23, 547972.0
+    set     $N24, 547972.0
+    set     $N25, 547972.0
+    set     $N26, 547972.0
+    set     $N27, 547972.0
+    set     $N28, 547972.0
+    set     $N29, 547972.0
+    set     $N30, 547972.0
+    set     $N31, 547972.0
+    clearn
+    is( $N0, "0", 'clearn' )
+    is( $N1, "0", 'clearn' )
+    is( $N2, "0", 'clearn' )
+    is( $N3, "0", 'clearn' )
+    is( $N4, "0", 'clearn' )
+    is( $N5, "0", 'clearn' )
+    is( $N6, "0", 'clearn' )
+    is( $N7, "0", 'clearn' )
+    is( $N8, "0", 'clearn' )
+    is( $N9, "0", 'clearn' )
+    is( $N10, "0", 'clearn' )
+    is( $N11, "0", 'clearn' )
+    is( $N12, "0", 'clearn' )
+    is( $N13, "0", 'clearn' )
+    is( $N14, "0", 'clearn' )
+    is( $N15, "0", 'clearn' )
+    is( $N16, "0", 'clearn' )
+    is( $N17, "0", 'clearn' )
+    is( $N18, "0", 'clearn' )
+    is( $N19, "0", 'clearn' )
+    is( $N20, "0", 'clearn' )
+    is( $N21, "0", 'clearn' )
+    is( $N22, "0", 'clearn' )
+    is( $N23, "0", 'clearn' )
+    is( $N24, "0", 'clearn' )
+    is( $N25, "0", 'clearn' )
+    is( $N26, "0", 'clearn' )
+    is( $N27, "0", 'clearn' )
+    is( $N28, "0", 'clearn' )
+    is( $N29, "0", 'clearn' )
+    is( $N30, "0", 'clearn' )
+    is( $N31, "0", 'clearn' )
+.end
+
+.sub test_exchange_n
+    set $N1, 1.234560
+    set $N2, 9.876540
+    exchange $N1, $N2
+    is( $N1, "9.87654", 'exchange' )
+    is( $N2, "1.23456", 'exchange' )
+    set $N3, -100.200300
+    exchange $N3, $N3
+    is( $N3, "-100.2003", 'exchange' )
+.end
+
+.sub test_clears
+    set $S0, "BOO 0"
+    set $S1, "BOO 1"
+    set $S2, "BOO 2"
+    set $S3, "BOO 3"
+    set $S4, "BOO 4"
+    set $S5, "BOO 5"
+    set $S6, "BOO 6"
+    set $S7, "BOO 7"
+    set $S8, "BOO 8"
+    set $S9, "BOO 9"
+    set $S10, "BOO 10"
+    set $S11, "BOO 11"
+    set $S12, "BOO 12"
+    set $S13, "BOO 13"
+    set $S14, "BOO 14"
+    set $S15, "BOO 15"
+    set $S16, "BOO 16"
+    set $S17, "BOO 17"
+    set $S18, "BOO 18"
+    set $S19, "BOO 19"
+    set $S20, "BOO 20"
+    set $S21, "BOO 21"
+    set $S22, "BOO 22"
+    set $S23, "BOO 23"
+    set $S24, "BOO 24"
+    set $S25, "BOO 25"
+    set $S26, "BOO 26"
+    set $S27, "BOO 27"
+    set $S28, "BOO 28"
+    set $S29, "BOO 29"
+    set $S30, "BOO 30"
+    set $S31, "BOO 31"
+    clears
+    is( $S0, "", '' )
+    is( $S1, "", '' )
+    is( $S2, "", '' )
+    is( $S3, "", '' )
+    is( $S4, "", '' )
+    is( $S5, "", '' )
+    is( $S6, "", '' )
+    is( $S7, "", '' )
+    is( $S8, "", '' )
+    is( $S9, "", '' )
+    is( $S10, "", '' )
+    is( $S11, "", '' )
+    is( $S12, "", '' )
+    is( $S13, "", '' )
+    is( $S14, "", '' )
+    is( $S15, "", '' )
+    is( $S16, "", '' )
+    is( $S17, "", '' )
+    is( $S18, "", '' )
+    is( $S19, "", '' )
+    is( $S20, "", '' )
+    is( $S21, "", '' )
+    is( $S22, "", '' )
+    is( $S23, "", '' )
+    is( $S24, "", '' )
+    is( $S25, "", '' )
+    is( $S26, "", '' )
+    is( $S27, "", '' )
+    is( $S28, "", '' )
+    is( $S29, "", '' )
+    is( $S30, "", '' )
+    is( $S31, "", '' )
+.end
+
+.sub test_exchange_s
+    set $S0, "String #0"
+    set $S1, "String #1"
+    exchange $S0, $S1
+    is( $S0, "String #1", 'exchange' )
+    is( $S1, "String #0", 'exchange' )
+
+    set $S2, "String #2"
+    exchange $S2, $S2
+    is( $S2, "String #2", 'exchange' )
+.end
+
+# Local Variables:
+#   mode: pir
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:

Modified: branches/ops_pct/t/dynoplibs/obscure.t
==============================================================================
--- branches/ops_pct/t/dynoplibs/obscure.t	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/t/dynoplibs/obscure.t	Fri May 21 12:02:31 2010	(r46852)
@@ -20,13 +20,19 @@
 .sub main :main
     .include 'fp_equality.pasm'
     .include 'test_more.pir'
-    plan(17)
+    plan(42)
     ok(1,"load obscure_ops")
 
     test_covers()
     test_vers()
     test_hav()
     test_exsec()
+
+    lcm_test()
+    gcd_test()
+    test_fact()
+    test_fact_n_i()
+    test_fact_n_ic()
 .end
 
 .sub test_covers
@@ -97,6 +103,111 @@
     .fp_eq_ok(x, 0.414213562373095, 'exsec of pi/4')
 .end
 
+.sub lcm_test
+    set $I0, 10
+    set $I1, 10
+    lcm $I2, $I1, $I0
+    is( $I2, 10, 'lcm_test' )
+
+    set $I1, 17
+    lcm $I2, $I1, $I0
+    is( $I2, 170, 'lcm_test' )
+
+    set $I0, 17
+    set $I1, 10
+    lcm $I2, $I1, $I0
+    is( $I2, 170, 'lcm_test' )
+
+    set $I0, 10
+    set $I1, 0
+    lcm $I2, $I1, $I0
+    is( $I2, 0, 'lcm_test' )
+
+    set $I0, 0
+    set $I1, 10
+    lcm $I2, $I1, $I0
+    is( $I2, 0, 'lcm_test' )
+.end
+
+.sub gcd_test
+    set $I0, 70
+    set $I1, 42
+    gcd $I2, $I1, $I0
+    is( $I2, 14, 'gcd_test' )
+
+    set $I0, 66
+    gcd $I2, $I1, $I0
+    is( $I2, 6, 'gcd_test' )
+
+    set $I0, 70
+    set $I1, 1
+    gcd $I2, $I1, $I0
+    is( $I2, 1, 'gcd_test' )
+
+    set $I0, 70
+    set $I1, 3
+    gcd $I2, $I1, $I0
+    is( $I2, 1, 'gcd_test' )
+.end
+
+.sub 'test_fact'
+    $I0 = 3
+    $I1 = 11
+    $I2 = 0
+    $I3 = -563
+
+    $I5 = fact $I0
+    is($I5, 6, 'fact_i_i - first')
+
+    $I6 = fact $I1
+    is($I6, 39916800, 'fact_i_i - second')
+
+    $I7 = fact $I2
+    is($I7, 1, 'fact_i_i on zero')
+
+    $I8 = fact $I3
+    is($I8, 1, 'fact_i_i on a negative integer')
+
+    # Now run the same tests, with constants instead
+    $I5 = fact 3
+    is($I5, 6, 'fact_i_ic - first')
+
+    $I6 = fact 11
+    is($I6, 39916800, 'fact_i_ic - second')
+
+    $I7 = fact 0
+    is($I7, 1, 'fact_i_ic on zero')
+
+    $I8 = fact -563
+    is($I8, 1, 'fact_i_ic on a negative integer')
+.end
+
+.sub test_fact_n_i
+    set $I0, 3
+    set $I1, 11
+    set $I2, 0
+    set $I3, -563
+    fact $N5, $I0
+    is( $N5, "6", 'fact_n_i' )
+    fact $N6, $I1
+    is( $N6, "39916800", 'fact_n_i' )
+    fact $N7, $I2
+    is( $N7, "1", 'fact_n_i' )
+    fact $N8, $I3
+    is( $N8, "1", 'fact_n_i' )
+.end
+
+.sub test_fact_n_ic
+    fact $N5, 3
+    is( $N5, "6", 'fact_n_ic' )
+    fact $N6, 11
+    is( $N6, "39916800", 'fact_n_ic' )
+    fact $N7, 0
+    is( $N7, "1", 'fact_n_ic' )
+    fact $N8, -563
+    is( $N8, "1", 'fact_n_ic' )
+.end
+
 
 # Local Variables:
 #   mode: pir

Modified: branches/ops_pct/t/library/lwp.t
==============================================================================
--- branches/ops_pct/t/library/lwp.t	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/t/library/lwp.t	Fri May 21 12:02:31 2010	(r46852)
@@ -20,12 +20,17 @@
     .include 'test_more.pir'
 
     load_bytecode 'LWP.pir'
+    load_bytecode 'osutils.pbc'
 
-    plan(30)
+    plan(48)
     test_new()
+    test_unknown_protocol()
+    test_bad_request()
     test_file_not_found()
     test_file()
+    test_file_head()
     test_file_post_delete()
+    test_file_proxy()
 .end
 
 .sub 'test_new'
@@ -57,6 +62,34 @@
     ok($I0, "isa ['HTTP';'Message']")
 .end
 
+.sub 'test_unknown_protocol'
+    .local pmc ua, response
+    ua = new ['LWP';'UserAgent']
+    response = ua.'get'('unk:foo/bar')
+    $I0 = isa response, ['HTTP';'Response']
+    ok($I0, "GET unk:foo/bar")
+    $I0 = response.'code'()
+    is($I0, 501, "code")
+    $S0 = response.'message'()
+    is($S0, "Not Implemented", "message")
+    $I0 = response.'is_error'()
+    ok($I0, "is error")
+.end
+
+.sub 'test_bad_request'
+    .local pmc ua, response
+    ua = new ['LWP';'UserAgent']
+    response = ua.'post'('file:foo/bar')
+    $I0 = isa response, ['HTTP';'Response']
+    ok($I0, "GET unk:foo/bar")
+    $I0 = response.'code'()
+    is($I0, 400, "code bad request")
+    $S0 = response.'message'()
+    is($S0, "Library does not allow method POST for 'file:' URLs", "message")
+    $I0 = response.'is_error'()
+    ok($I0, "is error")
+.end
+
 .sub 'test_file_not_found'
     unlink('t/no_file')
     .local pmc ua, response
@@ -96,6 +129,28 @@
     ok($I0, "Last-Modified contains GMT")
 .end
 
+.sub 'test_file_head'
+    .local pmc ua, response
+    ua = new ['LWP';'UserAgent']
+    response = ua.'head'('file:t/library/lwp.t')
+    $I0 = isa response, ['HTTP';'Response']
+    ok($I0, "HEAD file:t/library/lwp.t")
+    $I0 = response.'code'()
+    is($I0, 200, "code")
+    $I0 = response.'is_success'()
+    ok($I0, "is success")
+    $S0 = response.'content'()
+    is($S0, '', "no content")
+    $I0 = response.'get_header'('Content-Length')
+    $I0 = $I0 > 2000
+    ok($I0, "Content-Length")
+    $S0 = response.'get_header'('Last-Modified')
+    diag($S0)
+    $I0 = index $S0, 'GMT'
+    $I0 = $I0 > 0
+    ok($I0, "Last-Modified contains GMT")
+.end
+
 .sub 'test_file_post_delete'
     .const string data = "the file contains some text"
     .const string filename = 't/library/file.txt'
@@ -105,9 +160,9 @@
     .local pmc ua, response
     ua = new ['LWP';'UserAgent']
 
-    response = ua.'post'(url, data)
+    response = ua.'put'(url, data)
     $I0 = isa response, ['HTTP';'Response']
-    ok($I0, "POST file:t/library/file.txt")
+    ok($I0, "PUT file:t/library/file.txt")
     $I0 = response.'code'()
     is($I0, 200, "code")
     $I0 = response.'is_success'()
@@ -134,6 +189,21 @@
     ok($I0, "is error")
 .end
 
+.sub 'test_file_proxy'
+    .local pmc ua, response
+    ua = new ['LWP';'UserAgent']
+    ua.'proxy'('file', 'file://proxy.net')
+    response = ua.'get'('file:t/library/lwp.t')
+    $I0 = isa response, ['HTTP';'Response']
+    ok($I0, "GET file:t/library/lwp.t via a proxy")
+    $I0 = response.'code'()
+    is($I0, 400, "code")
+    $S0 = response.'message'()
+    is($S0, "You can not proxy through the filesystem", "message")
+    $I0 = response.'is_error'()
+    ok($I0, "is error")
+.end
+
 # Local Variables:
 #   mode: pir
 #   fill-column: 100

Modified: branches/ops_pct/t/library/uri.t
==============================================================================
--- branches/ops_pct/t/library/uri.t	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/t/library/uri.t	Fri May 21 12:02:31 2010	(r46852)
@@ -21,11 +21,12 @@
 
     load_bytecode 'URI.pir'
 
-    plan(47)
+    plan(60)
     test_new()
     test_uri()
     test_file()
     test_http()
+    test_https()
 .end
 
 .sub 'test_new'
@@ -52,6 +53,12 @@
     ok($I0, "new ['URI';'http']")
     $I0 = isa $P0, ['URI';'_server']
     ok($I0, "isa ['URI';'_server']")
+
+    $P0 = new ['URI';'https']
+    $I0 = isa $P0, ['URI';'https']
+    ok($I0, "new ['URI';'https']")
+    $I0 = isa $P0, ['URI';'http']
+    ok($I0, "isa ['URI';'http']")
 .end
 
 .sub 'test_uri'
@@ -151,6 +158,35 @@
     is($S0, '127.0.0.1', 'host')
     $S0 = $P0.'port'()
     is($S0, '8080', 'port')
+
+    $P0 = factory('http://user:passwd@proxy.net:8000/path')
+    ok($P0, "http://user:passwd@proxy.net:8000/path")
+    $I0 = isa $P0, ['URI';'http']
+    ok($I0, "isa ['URI';'http']")
+    $S0 = $P0.'scheme'()
+    is($S0, 'http', "scheme")
+    $S0 = $P0.'authority'()
+    is($S0, 'user:passwd at proxy.net:8000', 'authority')
+    $S0 = $P0.'userinfo'()
+    is($S0, 'user:passwd', 'userinfo')
+    $S0 = $P0.'host'()
+    is($S0, 'user:passwd at proxy.net', 'host')
+    $S0 = $P0.'port'()
+    is($S0, '8000', 'port')
+.end
+
+.sub 'test_https'
+    .local pmc factory
+    factory = get_hll_global ['URI'], 'new_from_string'
+
+    $P0 = factory('https://www.parrot.org')
+    ok($P0, "https://www.parrot.org")
+    $I0 = isa $P0, ['URI';'https']
+    ok($I0, "isa ['URI';'https']")
+    $S0 = $P0.'scheme'()
+    is($S0, 'https', "scheme")
+    $S0 = $P0.'port'()
+    is($S0, '443', 'port')
 .end
 
 # Local Variables:

Modified: branches/ops_pct/t/native_pbc/annotations.pbc
==============================================================================
Binary file (source and/or target). No diff available.

Modified: branches/ops_pct/t/native_pbc/integer_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.

Modified: branches/ops_pct/t/native_pbc/number_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.

Modified: branches/ops_pct/t/native_pbc/string_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.

Modified: branches/ops_pct/t/op/arithmetics.t
==============================================================================
--- branches/ops_pct/t/op/arithmetics.t	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/t/op/arithmetics.t	Fri May 21 12:02:31 2010	(r46852)
@@ -21,7 +21,7 @@
     .include 'test_more.pir'
     .include 'iglobals.pasm'
 
-    plan(130)
+    plan(121)
 
     take_the_negative_of_a_native_integer()
     take_the_absolute_of_a_native_integer()
@@ -42,8 +42,6 @@
     subtract_native_number_from_native_number()
     multiply_native_number_with_native_number()
     divide_native_number_by_native_number()
-    lcm_test()
-    gcd_test()
     integer_overflow_with_pow()
     bnot_p_p_creates_destination()
     # END_OF_TESTS
@@ -472,53 +470,6 @@
 
 .end
 
-.sub lcm_test
-    set $I0, 10
-    set $I1, 10
-    lcm $I2, $I1, $I0
-    is( $I2, 10, 'lcm_test' )
-
-    set $I1, 17
-    lcm $I2, $I1, $I0
-    is( $I2, 170, 'lcm_test' )
-
-    set $I0, 17
-    set $I1, 10
-    lcm $I2, $I1, $I0
-    is( $I2, 170, 'lcm_test' )
-
-    set $I0, 10
-    set $I1, 0
-    lcm $I2, $I1, $I0
-    is( $I2, 0, 'lcm_test' )
-
-    set $I0, 0
-    set $I1, 10
-    lcm $I2, $I1, $I0
-    is( $I2, 0, 'lcm_test' )
-.end
-
-.sub gcd_test
-    set $I0, 70
-    set $I1, 42
-    gcd $I2, $I1, $I0
-    is( $I2, 14, 'gcd_test' )
-
-    set $I0, 66
-    gcd $I2, $I1, $I0
-    is( $I2, 6, 'gcd_test' )
-
-    set $I0, 70
-    set $I1, 1
-    gcd $I2, $I1, $I0
-    is( $I2, 1, 'gcd_test' )
-
-    set $I0, 70
-    set $I1, 3
-    gcd $I2, $I1, $I0
-    is( $I2, 1, 'gcd_test' )
-.end
-
 .sub integer_overflow_with_pow
     .include "iglobals.pasm"
 

Modified: branches/ops_pct/t/op/integer.t
==============================================================================
--- branches/ops_pct/t/op/integer.t	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/t/op/integer.t	Fri May 21 12:02:31 2010	(r46852)
@@ -16,7 +16,7 @@
 
 =cut
 
-.const int TESTS = 202
+.const int TESTS = 159
 
 .sub 'test' :main
     .include 'test_more.pir'
@@ -47,11 +47,8 @@
     test_dec()
     test_sub_i_i()
     test_set_n()
-    test_cleari()
     test_neg()
-    test_fact()
     test_mul_i_i()
-    test_exchange()
     test_null()
     test_div_i_i_by_zero()
     test_div_i_ic_by_zero()
@@ -751,76 +748,6 @@
     is($N2, -2147483648.0, 'set_n_i - negative integer')
 .end
 
-.sub 'test_cleari'
-    $I0 = 0xdeadbee
-    $I1 = 0xdeadbee
-    $I2 = 0xdeadbee
-    $I3 = 0xdeadbee
-    $I4 = 0xdeadbee
-    $I5 = 0xdeadbee
-    $I6 = 0xdeadbee
-    $I7 = 0xdeadbee
-    $I8 = 0xdeadbee
-    $I9 = 0xdeadbee
-    $I10 = 0xdeadbee
-    $I11 = 0xdeadbee
-    $I12 = 0xdeadbee
-    $I13 = 0xdeadbee
-    $I14 = 0xdeadbee
-    $I15 = 0xdeadbee
-    $I16 = 0xdeadbee
-    $I17 = 0xdeadbee
-    $I18 = 0xdeadbee
-    $I19 = 0xdeadbee
-    $I20 = 0xdeadbee
-    $I21 = 0xdeadbee
-    $I22 = 0xdeadbee
-    $I23 = 0xdeadbee
-    $I24 = 0xdeadbee
-    $I25 = 0xdeadbee
-    $I26 = 0xdeadbee
-    $I27 = 0xdeadbee
-    $I28 = 0xdeadbee
-    $I29 = 0xdeadbee
-    $I30 = 0xdeadbee
-    $I31 = 0xdeadbee
-
-    cleari
-
-    is($I0, 0, 'cleari - $I0 cleared')
-    is($I1, 0, 'cleari - $I1 cleared')
-    is($I2, 0, 'cleari - $I2 cleared')
-    is($I3, 0, 'cleari - $I3 cleared')
-    is($I4, 0, 'cleari - $I4 cleared')
-    is($I5, 0, 'cleari - $I5 cleared')
-    is($I6, 0, 'cleari - $I6 cleared')
-    is($I7, 0, 'cleari - $I7 cleared')
-    is($I8, 0, 'cleari - $I8 cleared')
-    is($I9, 0, 'cleari - $I9 cleared')
-    is($I10, 0, 'cleari - $I10 cleared')
-    is($I11, 0, 'cleari - $I11 cleared')
-    is($I12, 0, 'cleari - $I12 cleared')
-    is($I13, 0, 'cleari - $I13 cleared')
-    is($I14, 0, 'cleari - $I14 cleared')
-    is($I15, 0, 'cleari - $I15 cleared')
-    is($I16, 0, 'cleari - $I16 cleared')
-    is($I17, 0, 'cleari - $I17 cleared')
-    is($I18, 0, 'cleari - $I18 cleared')
-    is($I19, 0, 'cleari - $I19 cleared')
-    is($I20, 0, 'cleari - $I20 cleared')
-    is($I21, 0, 'cleari - $I21 cleared')
-    is($I22, 0, 'cleari - $I22 cleared')
-    is($I23, 0, 'cleari - $I23 cleared')
-    is($I24, 0, 'cleari - $I24 cleared')
-    is($I25, 0, 'cleari - $I25 cleared')
-    is($I26, 0, 'cleari - $I26 cleared')
-    is($I27, 0, 'cleari - $I27 cleared')
-    is($I28, 0, 'cleari - $I28 cleared')
-    is($I29, 0, 'cleari - $I29 cleared')
-    is($I30, 0, 'cleari - $I30 cleared')
-    is($I31, 0, 'cleari - $I31 cleared')
-.end
-
 .sub 'test_neg'
     $I0 = neg 3
     $I0 = neg $I0
@@ -837,50 +764,6 @@
     is($I0, 12, 'mul_i_i')
 .end
 
-.sub 'test_fact'
-    $I0 = 3
-    $I1 = 11
-    $I2 = 0
-    $I3 = -563
-
-    $I5 = fact $I0
-    is($I5, 6, 'fact_i_i - first')
-
-    $I6 = fact $I1
-    is($I6, 39916800, 'fact_i_i - second')
-
-    $I7 = fact $I2
-    is($I7, 1, 'fact_i_i on zero')
-
-    $I8 = fact $I3
-    is($I8, 1, 'fact_i_i on a negative integer')
-
-    # Now run the same tests, with constants instead
-    $I5 = fact 3
-    is($I5, 6, 'fact_i_ic - first')
-
-    $I6 = fact 11
-    is($I6, 39916800, 'fact_i_ic - second')
-
-    $I7 = fact 0
-    is($I7, 1, 'fact_i_ic on zero')
-
-    $I8 = fact -563
-    is($I8, 1, 'fact_i_ic on a negative integer')
-.end
-
-.sub 'test_exchange'
-    $I10 = 10
-    $I20 = 20
-    exchange $I10, $I20
-    is($I10, 20, 'exchange - first operand ok')
-    is($I20, 10, 'exchange - second operand ok')
-
-    $I30 = 30
-    exchange $I30, $I30
-    is($I30, 30, 'exchange - reflexive')
-.end
-
 .sub 'test_null'
     $I1 = 1000
     is($I1, 1000, 'null_i - before null')

Modified: branches/ops_pct/t/op/jit.t
==============================================================================
--- branches/ops_pct/t/op/jit.t	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/t/op/jit.t	Fri May 21 12:02:31 2010	(r46852)
@@ -103,12 +103,12 @@
 OUTPUT
 
 pasm_output_is( <<'CODE', <<'OUTPUT', "add_i_i_i 1 mapped" );
-cleari
 set I0,0
 set I1,1
 set I2,2
 set I3,3
 set I4,4
+set I5,0
 set I0,I1
 set I2,I3
 set I0,I1
@@ -164,12 +164,12 @@
 OUTPUT
 
 pasm_output_is( <<'CODE', <<'OUTPUT', "add_i_i_i 0 mapped" );
-cleari
 set I0,0
 set I1,1
 set I2,2
 set I3,3
 set I4,4
+set I6,0
 set I0,I1
 set I2,I3
 set I0,I1
@@ -259,12 +259,12 @@
 OUTPUT
 
 pasm_output_is( <<'CODE', <<'OUTPUT', "sub_i_i_i 1 mapped" );
-cleari
 set I0,0
 set I1,1
 set I2,2
 set I3,3
 set I4,4
+set I5,0
 set I0,I1
 set I2,I3
 set I0,I1
@@ -320,12 +320,12 @@
 OUTPUT
 
 pasm_output_is( <<'CODE', <<'OUTPUT', "sub_i_ic 0 mapped" );
-cleari
 set I0,0
 set I1,1
 set I2,2
 set I3,3
 set I4,4
+set I5,0
 set I0,I1
 set I2,I3
 set I0,I1
@@ -341,12 +341,12 @@
 OUTPUT
 
 pasm_output_is( <<'CODE', <<'OUTPUT', "sub_i_i_i 0 mapped" );
-cleari
 set I0,0
 set I1,1
 set I2,2
 set I3,3
 set I4,4
+set I6,0
 set I0,I1
 set I2,I3
 set I0,I1
@@ -436,12 +436,12 @@
 OUTPUT
 
 pasm_output_is( <<'CODE', <<'OUTPUT', "mul_i_i_i 1 mapped" );
-cleari
 set I0,0
 set I1,1
 set I2,2
 set I3,3
 set I4,4
+set I5,0
 set I0,I1
 set I2,I3
 set I0,I1
@@ -497,12 +497,12 @@
 OUTPUT
 
 pasm_output_is( <<'CODE', <<'OUTPUT', "mul_i_i_i 0 mapped" );
-cleari
 set I0,0
 set I1,1
 set I2,2
 set I3,3
 set I4,4
+set I6,0
 set I0,I1
 set I2,I3
 set I0,I1
@@ -575,12 +575,12 @@
 OUTPUT
 
 pasm_output_is( <<'CODE', <<'OUTPUT', "mul_i_i 0 mapped" );
-cleari
 set I0,0
 set I1,1
 set I2,2
 set I3,3
 set I4,4
+set I5,0
 set I0,I1
 set I2,I3
 set I0,I1
@@ -669,12 +669,12 @@
 OUTPUT
 
 pasm_output_is( <<'CODE', <<'OUTPUT', "div_i_i_i 1 mapped" );
-cleari
 set I0,0
 set I1,1
 set I2,2
 set I3,3
 set I4,4
+set I5,0
 set I0,I1
 set I2,I3
 set I0,I1
@@ -730,12 +730,12 @@
 OUTPUT
 
 pasm_output_is( <<'CODE', <<'OUTPUT', "div_i_i_i 0 mapped" );
-cleari
 set I0,0
 set I1,1
 set I2,2
 set I3,3
 set I4,4
+set I6,0
 set I0,I1
 set I2,I3
 set I0,I1

Modified: branches/ops_pct/t/op/number.t
==============================================================================
--- branches/ops_pct/t/op/number.t	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/t/op/number.t	Fri May 21 12:02:31 2010	(r46852)
@@ -19,7 +19,7 @@
 .sub main :main
     .include 'test_more.pir'
 
-    plan(173)
+    plan(130)
     test_set_n_nc()
     test_set_n()
     test_add_n_n_n()
@@ -47,13 +47,9 @@
     test_inc_n()
     test_dec_n()
     test_set_i_n()
-    test_clearn()
     test_neg_n()
     test_neg_0_dot_0()
     test_mul_n_n()
-    test_fact_n_i()
-    test_fact_n_ic()
-    test_exchange()
     test_op_n_nc_nc()
     test_lt_nc_nc_ic()
     test_string_gt_num()
@@ -609,74 +605,6 @@
     is( $I2, "-2147483648", 'set_i_n' )
 .end
 
-.sub test_clearn
-    set     $N0, 547972.0
-    set     $N1, 547972.0
-    set     $N2, 547972.0
-    set     $N3, 547972.0
-    set     $N4, 547972.0
-    set     $N5, 547972.0
-    set     $N6, 547972.0
-    set     $N7, 547972.0
-    set     $N8, 547972.0
-    set     $N9, 547972.0
-    set     $N10, 547972.0
-    set     $N11, 547972.0
-    set     $N12, 547972.0
-    set     $N13, 547972.0
-    set     $N14, 547972.0
-    set     $N15, 547972.0
-    set     $N16, 547972.0
-    set     $N17, 547972.0
-    set     $N18, 547972.0
-    set     $N19, 547972.0
-    set     $N20, 547972.0
-    set     $N21, 547972.0
-    set     $N22, 547972.0
-    set     $N23, 547972.0
-    set     $N24, 547972.0
-    set     $N25, 547972.0
-    set     $N26, 547972.0
-    set     $N27, 547972.0
-    set     $N28, 547972.0
-    set     $N29, 547972.0
-    set     $N30, 547972.0
-    set     $N31, 547972.0
-    clearn
-    is( $N0, "0", 'clearn' )
-    is( $N1, "0", 'clearn' )
-    is( $N2, "0", 'clearn' )
-    is( $N3, "0", 'clearn' )
-    is( $N4, "0", 'clearn' )
-    is( $N5, "0", 'clearn' )
-    is( $N6, "0", 'clearn' )
-    is( $N7, "0", 'clearn' )
-    is( $N8, "0", 'clearn' )
-    is( $N9, "0", 'clearn' )
-    is( $N10, "0", 'clearn' )
-    is( $N11, "0", 'clearn' )
-    is( $N12, "0", 'clearn' )
-    is( $N13, "0", 'clearn' )
-    is( $N14, "0", 'clearn' )
-    is( $N15, "0", 'clearn' )
-    is( $N16, "0", 'clearn' )
-    is( $N17, "0", 'clearn' )
-    is( $N18, "0", 'clearn' )
-    is( $N19, "0", 'clearn' )
-    is( $N20, "0", 'clearn' )
-    is( $N21, "0", 'clearn' )
-    is( $N22, "0", 'clearn' )
-    is( $N23, "0", 'clearn' )
-    is( $N24, "0", 'clearn' )
-    is( $N25, "0", 'clearn' )
-    is( $N26, "0", 'clearn' )
-    is( $N27, "0", 'clearn' )
-    is( $N28, "0", 'clearn' )
-    is( $N29, "0", 'clearn' )
-    is( $N30, "0", 'clearn' )
-    is( $N31, "0", 'clearn' )
-.end
-
 .sub test_neg_n
     neg $N0,3.0
     neg $N0,$N0
@@ -706,43 +634,6 @@
     is( $N0, "12", 'mul_n_n' )
 .end
 
-.sub test_fact_n_i
-    set $I0, 3
-    set $I1, 11
-    set $I2, 0
-    set $I3, -563
-    fact $N5, $I0
-    is( $N5, "6", 'fact_n_i' )
-    fact $N6, $I1
-    is( $N6, "39916800", 'fact_n_i' )
-    fact $N7, $I2
-    is( $N7, "1", 'fact_n_i' )
-    fact $N8, $I3
-    is( $N8, "1", 'fact_n_i' )
-.end
-
-.sub test_fact_n_ic
-    fact $N5, 3
-    is( $N5, "6", 'fact_n_ic' )
-    fact $N6, 11
-    is( $N6, "39916800", 'fact_n_ic' )
-    fact $N7, 0
-    is( $N7, "1", 'fact_n_ic' )
-    fact $N8, -563
-    is( $N8, "1", 'fact_n_ic' )
-.end
-
-.sub test_exchange
-    set $N1, 1.234560
-    set $N2, 9.876540
-    exchange $N1, $N2
-    is( $N1, "9.87654", 'exchange' )
-    is( $N2, "1.23456", 'exchange' )
-    set $N3, -100.200300
-    exchange $N3, $N3
-    is( $N3, "-100.2003", 'exchange' )
-.end
-
 .sub test_op_n_nc_nc
     add $N1, 2.0, 3.0
     is( $N1, "5", 'op_n_nc_nc' )

Modified: branches/ops_pct/t/op/string.t
==============================================================================
--- branches/ops_pct/t/op/string.t	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/t/op/string.t	Fri May 21 12:02:31 2010	(r46852)
@@ -19,7 +19,7 @@
 .sub main :main
     .include 'test_more.pir'
 
-    plan(374)
+    plan(339)
 
     set_s_s_sc()
     test_clone()
@@ -65,7 +65,6 @@
     test_concat_s_s_sc()
     concat_s_s_sc_s_sc()
     concat_ensure_copy_is_made()
-    test_clears()
 
     same_constant_twice_bug()
     exception_two_param_ord_empty_string()
@@ -120,7 +119,6 @@
     other_form_of_sprintf_op()
     sprintf_left_justify()
     correct_precision_for_sprintf_x()
-    test_exchange()
     test_find_encoding()
     test_assign()
     assign_and_globber()
@@ -605,74 +603,6 @@
     is( $S2, "JAPH", '' )
 .end
 
-.sub test_clears
-    set $S0, "BOO 0"
-    set $S1, "BOO 1"
-    set $S2, "BOO 2"
-    set $S3, "BOO 3"
-    set $S4, "BOO 4"
-    set $S5, "BOO 5"
-    set $S6, "BOO 6"
-    set $S7, "BOO 7"
-    set $S8, "BOO 8"
-    set $S9, "BOO 9"
-    set $S10, "BOO 10"
-    set $S11, "BOO 11"
-    set $S12, "BOO 12"
-    set $S13, "BOO 13"
-    set $S14, "BOO 14"
-    set $S15, "BOO 15"
-    set $S16, "BOO 16"
-    set $S17, "BOO 17"
-    set $S18, "BOO 18"
-    set $S19, "BOO 19"
-    set $S20, "BOO 20"
-    set $S21, "BOO 21"
-    set $S22, "BOO 22"
-    set $S23, "BOO 23"
-    set $S24, "BOO 24"
-    set $S25, "BOO 25"
-    set $S26, "BOO 26"
-    set $S27, "BOO 27"
-    set $S28, "BOO 28"
-    set $S29, "BOO 29"
-    set $S30, "BOO 30"
-    set $S31, "BOO 31"
-    clears
-    is( $S0, "", '' )
-    is( $S1, "", '' )
-    is( $S2, "", '' )
-    is( $S3, "", '' )
-    is( $S4, "", '' )
-    is( $S5, "", '' )
-    is( $S6, "", '' )
-    is( $S7, "", '' )
-    is( $S8, "", '' )
-    is( $S9, "", '' )
-    is( $S10, "", '' )
-    is( $S11, "", '' )
-    is( $S12, "", '' )
-    is( $S13, "", '' )
-    is( $S14, "", '' )
-    is( $S15, "", '' )
-    is( $S16, "", '' )
-    is( $S17, "", '' )
-    is( $S18, "", '' )
-    is( $S19, "", '' )
-    is( $S20, "", '' )
-    is( $S21, "", '' )
-    is( $S22, "", '' )
-    is( $S23, "", '' )
-    is( $S24, "", '' )
-    is( $S25, "", '' )
-    is( $S26, "", '' )
-    is( $S27, "", '' )
-    is( $S28, "", '' )
-    is( $S29, "", '' )
-    is( $S30, "", '' )
-    is( $S31, "", '' )
-.end
-
 .sub same_constant_twice_bug
    set     $S0, ""
    set     $S1, ""
@@ -844,7 +774,6 @@
     ok( $S0, 'string " " is true' )
 
     # An empty register should be false...
-    clears
     nok( $S1, 'empty register is false' )
 .end
 
@@ -1437,18 +1366,6 @@
     is( $S1, $S0, 'Correct precision for %x' )
 .end
 
-.sub test_exchange
-    set $S0, "String #0"
-    set $S1, "String #1"
-    exchange $S0, $S1
-    is( $S0, "String #1", 'exchange' )
-    is( $S1, "String #0", 'exchange' )
-
-    set $S2, "String #2"
-    exchange $S2, $S2
-    is( $S2, "String #2", 'exchange' )
-.end
-
 .sub test_find_encoding
     skip( 4, "Pending reimplementation of find_encoding" )
     # find_encoding $I0, "singlebyte"

Modified: branches/ops_pct/tools/build/headerizer.pl
==============================================================================
--- branches/ops_pct/tools/build/headerizer.pl	Fri May 21 09:29:08 2010	(r46851)
+++ branches/ops_pct/tools/build/headerizer.pl	Fri May 21 12:02:31 2010	(r46852)
@@ -89,8 +89,9 @@
 
         my $heading = $headerizer->generate_documentation_signature($decl);
 
-        $text =~ s/=item C<[^>]*\b$name\b[^>]*>\n+/$heading\n\n/sm or
-            warn "$cfile_name: $name has no POD\n";
+        $text =~ s/=item C<[^>]*\b$name\b[^>]*>\n+/$heading\n\n/sm or do {
+            warn "$cfile_name: $name has no POD\n" unless $name =~ /^yy/; # lexer funcs don't have to have POD
+        }
     }
     open( my $fhout, '>', $cfile_name ) or die "Can't create $cfile_name: $!";
     print {$fhout} $text;
@@ -126,7 +127,9 @@
             push( @attrs, "__attribute__nonnull__($n)" );
         }
         if ( ( $arg =~ m{\*} ) && ( $arg !~ /\b(SHIM|((ARGIN|ARGOUT|ARGMOD)(_NULLOK)?)|ARGFREE(_NOTNULL)?)\b/ ) ) {
-            $headerizer->squawk( $file, $name, qq{"$arg" isn't protected with an ARGIN, ARGOUT or ARGMOD (or a _NULLOK variant), or ARGFREE} );
+            if ( $name !~ /^yy/ ) { # Don't complain about the lexer auto-generated funcs
+                $headerizer->squawk( $file, $name, qq{"$arg" isn't protected with an ARGIN, ARGOUT or ARGMOD (or a _NULLOK variant), or ARGFREE} );
+            }
         }
         if ( ($arg =~ /\bconst\b/) && ($arg =~ /\*/) && ($arg !~ /\*\*/) && ($arg =~ /\b(ARG(MOD|OUT))\b/) ) {
             $headerizer->squawk( $file, $name, qq{"$arg" is const, but that $1 conflicts with const} );


More information about the parrot-commits mailing list