HTTP/1.1 -1 Read error in cache disk data: SuccessContent-Type: application/rss+xml; charset="utf-8"
Last-Modified: Sat, 22 Jan 2022 06:48:46 GMT
Content-length: 80159
Connection: Close
Proxy-Connection: Close
X-Cache: HIT from web1.osuosl.org
Server: ProxyTrack 0.5 (HTTrack 3.49.2)
Parrot: {8} Active Tickets, Mine first
http://trac.parrot.org/parrot/report/8
Trac Report -
* List all active tickets by priority.
* Show all tickets owned by the logged in user in a group first.
en-usParrothttp://trac.parrot.org/parrot/chrome/site/parrot_logo.png
http://trac.parrot.org/parrot/report/8
Trac v0.11.7#1582: NCI_FB_CB and NCI_FB_UD in iglobalsSat, 24 Apr 2010 04:46:12 GMTWed, 06 Jul 2011 02:52:13 GMT<p>
Hooks allowing a runtime-loadable dynamic frame builder
</p>
http://trac.parrot.org/parrot/ticket/1582
http://trac.parrot.org/parrot/ticket/1582Report#971: Add "current" versions of Parrot_pcc_get_foo and Parrot_pcc_set_foo functionsThu, 03 Sep 2009 12:12:25 GMTTue, 26 Oct 2010 02:53:13 GMT<p>
Hello.
</p>
<p>
Many (or all for consistency sake) of Parrot_pcc_get_foo and set_foo functions can have Parrot_pcc_get_current_foo counterparts which will use current Context of Interp. This will simplify code which use CURRENT_CONTEXT macro
</p>
<p>
--
Bacek
</p>
http://trac.parrot.org/parrot/ticket/971
http://trac.parrot.org/parrot/ticket/971Report#1143: examples/benchmarks/overload.pir requires rewriting.Sat, 24 Oct 2009 21:31:53 GMTSat, 02 Jul 2011 22:45:56 GMT<p>
Hello,
</p>
<p>
after fixing <a class="closed ticket" href="http://trac.parrot.org/parrot/ticket/452" title="deprecation: Don't use MULTI when not needed (closed: invalid)">#452</a> examples/benchmarks/overload.pir doesn't test anything and requires rewriting to use classes inherited from Integer instead of direct use of Integer.
</p>
<p>
--
Bacek
</p>
http://trac.parrot.org/parrot/ticket/1143
http://trac.parrot.org/parrot/ticket/1143Report#1581: GC_SYS_NAME option to interpinfo_s_iSat, 24 Apr 2010 04:45:00 GMTWed, 06 Jul 2011 02:56:24 GMT<p>
Ability to get the string name of the current GC core from the interpinfo_s_i.
See r43900 and r43904 for details.
</p>
http://trac.parrot.org/parrot/ticket/1581
http://trac.parrot.org/parrot/ticket/1581Report#1033: no args checking for a sub without paramsMon, 21 Sep 2009 04:07:54 GMTSat, 27 Aug 2011 16:54:14 GMT<p>
Originally reported in <a class="ext-link" href="http://rt.perl.org/rt3/Ticket/Display.html?id=39844"><span class="icon"> </span>RT</a>.
</p>
<p>
If no .params are given, no args checking is done on sub invocation. From the original:
</p>
<pre class="wiki">On Sat Jul 15 23:29:10 2006, mdiep wrote:
> I expect this to die with a "too many args" error, but it doesn't --
> it prints "ok":
>
> .sub main :main
> test("foo", "bar")
> end
> .end
>
> .sub test
> print "ok\n"
> .return()
> .end
>
> --
> Matt Diephouse
>
</pre><p>
2 sample patches to achieve this (both of which are declared to fail) are attached to the original ticket. Neither apply cleanly to trunk.
</p>
<p>
There is a question, however, as to whether or not the existing behavior is desirable - should we always check args? should we always check except for :main? (should we check for :main too and suggest that the programmer use .param args :slurpy to avoid any issues?)
</p>
<p>
There's a test already committed in t/op/calling.t
</p>
http://trac.parrot.org/parrot/ticket/1033
http://trac.parrot.org/parrot/ticket/1033Report#339: msvc+mingw detectionSun, 15 Feb 2009 10:46:27 GMTTue, 02 Mar 2010 15:34:41 GMT<p>
With r36750 I had to fix one more MSWin32 compiler detection (uppercase allowed), but there are several more instances of compiler special cases in the makefile templates and tests.
</p>
<p>
My proposal is to get that right in the first place, config/init/hints/mswin32.pm, and store it in the config as <strong>msvc</strong>, <strong>mingw</strong>, and maybe also icc or borland keys.
</p>
<p>
Use these keys in the makefile templates and testsuite then.
</p>
<p>
cc="ccache cl" for example might not be safe also.
</p>
<p>
The patch in TT <a class="closed ticket" href="http://trac.parrot.org/parrot/ticket/312" title="bug: disable static on win32/aix if shared (closed: invalid)">#312</a> already contains the mingw and msvc keys, as they are the only one currently used.
</p>
http://trac.parrot.org/parrot/ticket/339
http://trac.parrot.org/parrot/ticket/339Report#446: [CAGE] Fixed a few warnings and a NCI example on Windows using MSVSSat, 14 Mar 2009 12:01:04 GMTWed, 01 Dec 2010 19:49:11 GMT<p>
Fixed <strong>warnings</strong> like unused variables, unreachable code in core.ops<br />
config/gen/platform/win32/exec.c<br />
config/gen/platform/win32/stat.c<br />
include/parrot/encoding.h<br />
src/embed.c<br />
src/oo.c<br />
src/ops/core.ops<br />
src/packfile.c<br />
src/spf_render.c<br />
src/string/encoding.c<br />
src/string/encoding/fixed_8.c<br />
src/thread.c<br />
</p>
<p>
also Fixed a <strong>NCI example</strong><br />
examples/nci/PQt.C<br />
examples/nci/PQt.cpp<br />
examples/nci/QtHelloWorld.pasm<br />
examples/nci/QtHelloWorld.pir <br />
</p>
<p>
this is a good way to get comfortable with code base :)<br />
</p>
<pre class="wiki"> CREDITS | 2
config/gen/platform/win32/exec.c | 3
config/gen/platform/win32/stat.c | 3
examples/nci/PQt.C | 149 --------------------------------------
examples/nci/PQt.cpp | 151 +++++++++++++++++++++++++++++++++++++++
examples/nci/QtHelloWorld.pasm | 22 ++---
examples/nci/QtHelloWorld.pir | 69 +++++++++++++++++
include/parrot/encoding.h | 8 +-
src/embed.c | 2
src/oo.c | 2
src/ops/core.ops | 13 ++-
src/packfile.c | 2
src/spf_render.c | 3
src/string/encoding.c | 10 ++
src/string/encoding/fixed_8.c | 8 +-
src/thread.c | 6 +
16 files changed, 275 insertions(+), 178 deletions(-)
</pre><pre class="wiki">:
[FIXED]src\ops\core_ops.c
[FIXED]src\ops\core.ops(920) : warning C4189: 'resume' : local variable is initialized but not referenced
[FIXED]src\ops\core.ops(920) : warning C4189: 'resume' : local variable is initialized but not referenced
[FIXED]src\ops\core.ops(920) : warning C4189: 'resume' : local variable is initialized but not referenced
[FIXED]src\ops\core.ops(920) : warning C4189: 'resume' : local variable is initialized but not referenced
:
[NOT FIXED]src\ops\experimental.ops(52) : warning C4189: 'unused' : local variable is initialized but not referenced
:
:
[FIXED]f:\git\rakudo\parrot\src\ops\core.ops(1453) : warning C4702: unreachable code
[FIXED]f:\git\rakudo\parrot\src\ops\core.ops(1472) : warning C4702: unreachable code
[FIXED]f:\git\rakudo\parrot\src\ops\core.ops(1472) : warning C4702: unreachable code
src\ops\core_ops_switch.c
[FIXED]src\ops\core.ops(920) : warning C4189: 'resume' : local variable is initialized but not referenced
[FIXED]src\ops\core.ops(920) : warning C4189: 'resume' : local variable is initialized but not referenced
[FIXED]src\ops\core.ops(920) : warning C4189: 'resume' : local variable is initialized but not referenced
[FIXED]src\ops\core.ops(920) : warning C4189: 'resume' : local variable is initialized but not referenced
:
[FIXED]src\embed.c(1296) : warning C4189: 'pf' : local variable is initialized but not referenced
[FIXED]src\string\encoding.c
[FIXED]src\string\encoding.c(156) : warning C4646: function declared with __declspec(noreturn) has non-void return type
[FIXED]src\string\encoding.c(445) : warning C4646: function declared with __declspec(noreturn) has non-void return type
:
:
[FIXED]src\packfile.c(868) : warning C4189: 'pf' : local variable is initialized but not referenced
:
[FIXED]src\spf_render.c
[FIXED]src\spf_render.c(115) : warning C4005: 'snprintf' : macro redefinition
[FIXED]F:\git\rakudo\parrot\include\parrot/misc.h(28) : see previous definition of 'snprintf'
:
:
[FIXED]config/gen/platform/win32/stat.c(115) : warning C4244: '=' : conversion from 'time_t' to 'INTVAL', possible loss of data
[FIXED]config/gen/platform/win32/stat.c(118) : warning C4244: '=' : conversion from 'time_t' to 'INTVAL', possible loss of data
[FIXED]config/gen/platform/win32/stat.c(121) : warning C4244: '=' : conversion from 'time_t' to 'INTVAL', possible loss of data
[FIXED]config/gen/platform/win32/exec.c(218) : warning C4090: 'function' : different 'const' qualifiers
src\pmc_freeze.c
f:\git\rakudo\parrot\src\pmc_freeze.c(1725) : warning C4706: assignment within conditional expression
:
:
[FIXED]src\thread.c
[FIXED]f:\git\rakudo\parrot\src\thread.c(639) : warning C4701: potentially uninitialized local variable 'val_sub' used
[FIXED]f:\git\rakudo\parrot\src\thread.c(503) : warning C4700: uninitialized local variable 'interp' used
:
:
[FIXED]src\string\encoding\fixed_8.c
[FIXED]src\string\encoding\fixed_8.c(236) : warning C4646: function declared with __declspec(noreturn) has non-void return type
:
</pre>
http://trac.parrot.org/parrot/ticket/446
http://trac.parrot.org/parrot/ticket/446Report#1139: Need tests for invoke_sigobject for Sub subclasses.Fri, 23 Oct 2009 14:23:09 GMTFri, 23 Oct 2009 14:23:09 GMT<p>
Hello.
</p>
<p>
In r42036 I added check to runops for Sub subclasses (bug spotted by fperrad++ in Lua). We need test for it.
</p>
<p>
--
Bacek
</p>
http://trac.parrot.org/parrot/ticket/1139
http://trac.parrot.org/parrot/ticket/1139Report#1971: Oplib paths are truncated in PBC filesSun, 16 Jan 2011 19:31:11 GMTSun, 22 May 2011 02:07:59 GMT<p>
The problem seems to be that IMCC uses the correct path to load the oplib object file when compiling, but drops all directory information when producing the packfile, so that loading the PBC file fails to find the library.
</p>
<p>
1. Unpack the attached test case tarball, and edit the PARROT-HOME macro in the makefile to point to a local Parrot working copy.
</p>
<p>
2. Run "make" to build and run the test. Here's what the output looks like on my machine (GNU/Linux, openSUSE 11.3):
</p>
<blockquote>
<p>
rogers@rgr> make
/usr/src/parrot/ops2c --dynamic dynops/kea_cl.ops --quiet
cc -I/usr/src/parrot/include -I/usr/src/parrot/include/pmc \
</p>
<blockquote>
<p>
-o dynops/kea_cl_ops.o -c dynops/kea_cl_ops.c
</p>
</blockquote>
<p>
ld -o dynops/kea_cl_ops.so dynops/kea_cl_ops.o -shared
/usr/src/parrot/parrot -o test.pbc test.pir
/usr/src/parrot/parrot -o aux.pbc aux.pir
/usr/src/parrot/parrot test.pbc
Could not load oplib `kea_cl_ops'
current instr.: 'main' pc 0 (test.pir:4)
make: *** [test] Error 1
rogers@rgr>
</p>
</blockquote>
<p>
3. Apply parrot-lib-debugging.patch to the Parrot working copy, do "make parrot", and rerun the test:
</p>
<blockquote>
<p>
rogers@rgr> make clean
rm -f *.pbc *.dump *.dis dynops/kea_cl_ops.*
rogers@rgr> make
/usr/src/parrot/ops2c --dynamic dynops/kea_cl.ops --quiet
Got path '/usr/src/parrot/runtime/parrot/dynext/os.so' for os
cc -I/usr/src/parrot/include -I/usr/src/parrot/include/pmc \
</p>
<blockquote>
<p>
-o dynops/kea_cl_ops.o -c dynops/kea_cl_ops.c
</p>
</blockquote>
<p>
ld -o dynops/kea_cl_ops.so dynops/kea_cl_ops.o -shared
/usr/src/parrot/parrot -o test.pbc test.pir
Got path 'dynops/kea_cl_ops.so' for dynops/kea_cl_ops
/usr/src/parrot/parrot -o aux.pbc aux.pir
Got path 'dynops/kea_cl_ops.so' for dynops/kea_cl_ops
/usr/src/parrot/parrot test.pbc
Got path <i> for kea_cl_ops
Could not load oplib `kea_cl_ops'
current instr.: 'main' pc 0 (test.pir:4)
make: *** [test] Error 1
rogers@rgr>
</i></p>
</blockquote>
<p>
This shows that IMCC is looking for "dynops/kea_cl_ops" (as you would expect), but the PBC file is looking for "kea_cl_ops" at load time and failing. Indeed, if you do "strings aux.pbc", you will find the latter but not the former. (As an aside, pbc_dump and pbc_disassemble do not work on aux.pbc. Unless you copy dynops/kea_cl_ops.so to runtime/parrot/dynext/ in the Parrot working copy, where it will be found.)
</p>
<p>
4. Change the aux.pir source to use the absolute pathname. This does not help:
</p>
<blockquote>
<p>
rogers@rgr> make
/usr/src/parrot/parrot -o aux.pbc aux.pir
Got path '/home/rogers/projects/kea2/bug/dynops/kea_cl_ops.so' for /home/rogers/projects/kea2/bug/dynops/kea_cl_ops
/usr/src/parrot/parrot test.pbc
Got path <i> for kea_cl_ops
Could not load oplib `kea_cl_ops'
current instr.: 'main' pc 0 (test.pir:4)
make: *** [test] Error 1
rogers@rgr>
</i></p>
</blockquote>
<p>
As before, just "kea_cl_ops" is stored in the PBC file.
</p>
<p>
FWIW, Parrot has never had this problem with dynamic PMC classes; the exact pathname used in the .loadlib directive makes it into the PBC file.
</p>
http://trac.parrot.org/parrot/ticket/1971
http://trac.parrot.org/parrot/ticket/1971Report#754: cross-HLL export/import is experimentalFri, 12 Jun 2009 17:42:17 GMTSat, 12 Jun 2010 05:25:59 GMT<p>
The current method for loading libraries across HLLs, and importing symbols from them, is experimental both in design and implementation. Because it may take more than one release to get the kinks ironed out, we want to make sure that any users are acutely aware of that experimental status, and don't come to rely on something we plan to change at will.
</p>
http://trac.parrot.org/parrot/ticket/754
http://trac.parrot.org/parrot/ticket/754Report#1583: loadlib_p_s_pSat, 24 Apr 2010 04:47:07 GMTWed, 06 Jul 2011 02:48:28 GMT<p>
Ability to use non-default dynamic loading behavior
</p>
http://trac.parrot.org/parrot/ticket/1583
http://trac.parrot.org/parrot/ticket/1583Report#1637: experimental library: LWP, HTTP/Message, URI & URI::EscapeFri, 14 May 2010 12:39:57 GMTWed, 21 Jul 2010 00:34:55 GMT
http://trac.parrot.org/parrot/ticket/1637
http://trac.parrot.org/parrot/ticket/1637Report#313: ignore print -0 test errors on win32Wed, 11 Feb 2009 09:07:06 GMTTue, 03 Aug 2010 21:58:46 GMT<p>
The win32 msvcrt has a special limitation not to print -0 as -0, instead it prints 0.
</p>
<p>
openbsd seems to have the same problem. cygwin is not affected, since it uses newlib, which is similar to the glibc in this regard.
</p>
<p>
For now I fixed the failing tests, but there should be a workaround.
</p>
<pre class="wiki">t\pmc\complex.t:
not ok 380 - sinh of 0-2i
# Have: 0.000000-0.909297i
# Want: -0.000000-0.909297i
not ok 381 - sinh of 0+2i
# Have: 0.000000+0.909297i
# Want: -0.000000+0.909297i
t\pmc\float.t:
not ok 23 - neg 0
# Failed test 'neg 0'
# at t\pmc\float.t line 509
# '0'
# doesn't match '/^-0/
# '
t\op\arithmetics.t:
not ok 7 - turn a native number into its negative
# Failed test 'turn a native number into its negative'
# at t\op\arithmetics.t line 175.
# got: '0
# 0
# -123.456789
# 123.456789
# 0
# 0
# -123.456789
# 123.456789
# '
# expected: '-0
# 0
# -123.456789
# 123.456789
# -0
# 0
# -123.456789
# 123.456789
# '
</pre><p>
The internal numeric representation seems not to be affected.
In detail, this patch does not help. It's just the printer.
</p>
<pre class="wiki">Index: parrot-svn/src/ops/math.ops
===================================================================
--- parrot-svn.orig/src/ops/math.ops
+++ parrot-svn/src/ops/math.ops
@@ -774,7 +774,17 @@ inline op neg(inout INT) :base_core {
}
inline op neg(inout NUM) :base_core {
+#ifdef WIN32
+ /* The msvcrt is broken for neg -0.0 */
+ if ($1 == -0.0) {
+ $1 = -0.0;
+ }
+ else {
+ $1 = - $1;
+ }
+#else
$1 = - $1;
+#endif
}
inline op neg(invar PMC) :base_core {
@@ -786,7 +796,17 @@ inline op neg(out INT, in INT) :base_cor
}
inline op neg(out NUM, in NUM) :base_core {
+#ifdef WIN32
+ /* The msvcrt is broken for neg -0.0 */
+ if ($2 == -0.0) {
+ $1 = -0.0;
+ }
+ else {
+ $1 = - $1;
+ }
+#else
$1 = - $2;
+#endif
}
inline op neg(out PMC, invar PMC) :base_core {
</pre>
http://trac.parrot.org/parrot/ticket/313
http://trac.parrot.org/parrot/ticket/313Report#1765: Memory leak in allocate_interpreterWed, 01 Sep 2010 21:00:04 GMTSat, 27 Aug 2011 17:20:53 GMT<pre class="wiki">$ valgrind --leak-check=full ./parrot --leak-test t/op/interp_2.pir
[...]
==4748== 131,364 (216 direct, 131,148 indirect) bytes in 1 blocks are definitely lost in loss record 184 of 184
==4748== at 0x402328F: calloc (vg_replace_malloc.c:467)
==4748== by 0x40F262B: mem_sys_allocate_zeroed (alloc_memory.c:82)
==4748== by 0x4108184: allocate_interpreter (inter_create.c:123)
==4748== by 0x410813A: make_interpreter (inter_create.c:91)
==4748== by 0x416FFED: create_interp (parrotinterpreter.pmc:182)
==4748== by 0x41708C8: Parrot_ParrotInterpreter_init (parrotinterpreter.pmc:251)
==4748== by 0x413BCAB: Parrot_pmc_new (pmc.c:163)
==4748== by 0x40B8F13: Parrot_new_p_sc (core_ops.c:20494)
==4748== by 0x413E780: runops_slow_core (cores.c:646)
==4748== by 0x413D7F9: runops_int (main.c:218)
==4748== by 0x41098EE: runops (ops.c:126)
==4748== by 0x4103CCA: Parrot_pcc_invoke_from_sig_object (pcc.c:323)
</pre>
http://trac.parrot.org/parrot/ticket/1765
http://trac.parrot.org/parrot/ticket/1765Report#1831: config problem with glui library on ubuntu 10.04Sat, 16 Oct 2010 23:33:12 GMTSat, 16 Oct 2010 23:33:12 GMT<p>
If I have the glui libraries (include files) installed on my ubuntu 10.04 system, the $ perl configure.pl shell command makes the following complaint/warning:
</p>
<pre class="wiki">gen::opengl - Generating OpenGL bindings...In OpenGL header '/usr/include/GL/glui.h', can't parse canonicalized prototype for '':
GLUI_String& glui_format_str(GLUI_String &str, char* fmt, ...);
Original prototype:
GLUIAPI GLUI_String& glui_format_str(GLUI_String &str, const char* fmt, ...);
......................done.
</pre><p>
this appears to come from the header file parser in parrot/config/gen/opengl.pm throwing out the "const" prefix for a "char *"
argument:
</p>
<pre class="wiki">cc179ba1 (japhb 2008-06-01 03:02:27 +0000 695) s/\bconst\b\s*//g;
</pre>
http://trac.parrot.org/parrot/ticket/1831
http://trac.parrot.org/parrot/ticket/1831Report#1486: rewrite examples/ to use hierarchical namespaces instead of flat ::-styleSun, 28 Feb 2010 06:24:18 GMTSun, 28 Feb 2010 06:24:18 GMT<p>
Tetris::
Mines::EventHandler
MoveLogo::EventHandler
</p>
<p>
(or just remove these SDL examples entirely)
</p>
http://trac.parrot.org/parrot/ticket/1486
http://trac.parrot.org/parrot/ticket/1486Report#1084: Bus error when running 'parrot -t something.pbc' on MacOSXFri, 02 Oct 2009 00:43:22 GMTMon, 04 Jul 2011 18:52:59 GMT<p>
Using parrot trunk @r41607
Proto-language at <a class="ext-link" href="http://github.com/cconstantine/Reason"><span class="icon"> </span>http://github.com/cconstantine/Reason</a>
</p>
<p>
MacOSX: 10.5.7; MacBookPro3,1 (Core 2 Duo);
</p>
<p>
While attempting to debug my proto-language I attempted to run my compiler with 'parrot -t reason.pbc'. Output is attached.
</p>
http://trac.parrot.org/parrot/ticket/1084
http://trac.parrot.org/parrot/ticket/1084Report#869: [cage] t/pmc/iterator.t should be removedTue, 21 Jul 2009 12:58:58 GMTFri, 05 Nov 2010 01:42:57 GMT<p>
Hello.
</p>
<pre class="wiki">new 'Iterator', aggregate
</pre><p>
is deprecated and removed.
</p>
<p>
t/pmc/iterator.t should be removed. Aggregate-specific tests should go into aggregate specific test files. E.g. t/pmc/hashiterator.t and so on.
</p>
http://trac.parrot.org/parrot/ticket/869
http://trac.parrot.org/parrot/ticket/869Report#1787: OS X --m=32 doesn't work in snow leopardMon, 13 Sep 2010 15:37:23 GMTTue, 21 Sep 2010 02:46:33 GMT<p>
In OS X, if you try to build parrot as 32 bit using --m=32 it has no effect.
</p>
<p>
Also, it would be nice if there was a configuration option for building a universal binary in OS X (which means configuring for 32-bit, 64-bit x86 and possibly ppc, and ppc64).
</p>
http://trac.parrot.org/parrot/ticket/1787
http://trac.parrot.org/parrot/ticket/1787Report#1766: n_regs_used in PBC files isn't checkedThu, 02 Sep 2010 13:29:21 GMTThu, 02 Sep 2010 13:29:21 GMT<p>
One can make Parrot crash by setting n_regs_used to a bogus value.
</p>
http://trac.parrot.org/parrot/ticket/1766
http://trac.parrot.org/parrot/ticket/1766Report#1494: factorial example in languages/squaak gives incorrect resultThu, 04 Mar 2010 05:48:50 GMTTue, 17 Aug 2010 21:15:08 GMT<p>
[squaak]% cat examples/factorial.sq
# Copyright (C) 2008, Parrot Foundation.
# $Id: factorial.sq 36833 2009-02-17 20:09:26Z allison $
</p>
<p>
print("Please enter number: ")
x = read()
</p>
<p>
sub factorial(n)
</p>
<blockquote>
<p>
## test for < 2 because all numbers are represented by
## floating-point numbers, and equality checks on those
## do not work (yet?)
if n < 2 then
</p>
<blockquote>
<p>
return 1
</p>
</blockquote>
<p>
else
</p>
<blockquote>
<p>
return n * factorial(n - 1)
</p>
</blockquote>
<p>
end
</p>
</blockquote>
<p>
end
</p>
<p>
print("factorial of ", x, " is: ", factorial(x))
</p>
<p>
[squaak]% ./installable_squaak examples/factorial.sq
Please enter number:
10
factorial of 10
</p>
<blockquote>
<p>
is: 1
</p>
</blockquote>
<p>
[squaak]% ./installable_squaak examples/factorial.sq
Please enter number:
10
factorial of 10
</p>
<blockquote>
<p>
is: 1
</p>
</blockquote>
<p>
[squaak]% pwd
/home/parthm/src/parrot-2.1.1/examples/languages/squaak
[squaak]% which parrot
/home/parthm/src/parrot-2.1.1/parrot
[squaak]%
</p>
<p>
It seems (n < 2) is always returning true. Below are the results with prints added.
</p>
<p>
[squaak]% cat fac2.sq
# Copyright (C) 2008, Parrot Foundation.
# $Id: factorial.sq 36833 2009-02-17 20:09:26Z allison $
</p>
<p>
print("Please enter number: ")
x = read()
</p>
<p>
print("you entered:", x)
</p>
<p>
sub factorial(n)
</p>
<blockquote>
<p>
## test for < 2 because all numbers are represented by
## floating-point numbers, and equality checks on those
## do not work (yet?)
</p>
</blockquote>
<blockquote>
<p>
print("got: ", n)
print("is n < 2:", n < 2)
</p>
</blockquote>
<blockquote>
<p>
if n < 2 then
</p>
<blockquote>
<p>
print("return 1")
return 1
</p>
</blockquote>
<p>
else
</p>
<blockquote>
<p>
print("return n * fac(n-1)")
return n * factorial(n - 1)
</p>
</blockquote>
<p>
end
</p>
</blockquote>
<p>
end
</p>
<p>
print("factorial of ", x, " is: ", factorial(x))
</p>
<p>
[squaak]% ./installable_squaak fac2.sq
Please enter number:
10
you entered:10
</p>
<p>
got: 10
</p>
<p>
is n < 2:1
return 1
factorial of 10
</p>
<blockquote>
<p>
is: 1
</p>
</blockquote>
<p>
[squaak]%
</p>
http://trac.parrot.org/parrot/ticket/1494
http://trac.parrot.org/parrot/ticket/1494Report#1485: runtime/parrot/library/SDL/*.pir bitrotSun, 28 Feb 2010 05:52:51 GMTSun, 28 Feb 2010 05:54:53 GMT<pre class="wiki">$ make runtime/parrot/library/SDL/StopWatch.pbc./parrot -o runtime/parrot/library/SDL/StopWatch.pbc runtime/parrot/library/SDL/StopWatch.pir
error:imcc:The opcode 'setattribute_p_i_p' (setattribute<3>) was not found. Check the type and number of the arguments
in file 'runtime/parrot/library/SDL/StopWatch.pir' line 78
make: *** [runtime/parrot/library/SDL/StopWatch.pbc] Error 2
$ make runtime/parrot/library/SDL/Surface.pbc./parrot -o runtime/parrot/library/SDL/Surface.pbc runtime/parrot/library/SDL/Surface.pir
error:imcc:syntax error, unexpected DOT ('.')
in file 'runtime/parrot/library/SDL/Surface.pir' line 148
error:imcc:syntax error, unexpected DOT ('.')
in file 'runtime/parrot/library/SDL/Surface.pir' line 152
error:imcc:syntax error, unexpected DOT ('.')
in file 'runtime/parrot/library/SDL/Surface.pir' line 156
make: *** [runtime/parrot/library/SDL/Surface.pbc] Error 1
</pre><p>
---
looks like none of the SDL pir files are built by default, or this would have been caught much sooner.
</p>
http://trac.parrot.org/parrot/ticket/1485
http://trac.parrot.org/parrot/ticket/1485Report#1275: failure with eq_num op in t/op/comp.t with g++ 4.4.1 --optimized buildMon, 16 Nov 2009 09:01:02 GMTMon, 20 Sep 2010 00:41:12 GMT<p>
I switched to Ubuntu 9.10 i386 and eventually got parrot to build with g++ ver 4.4.1 (about two weeks ago) I started getting an error with t/op/comp.t on an optimized build with g++ on i386 - the error did not effect the build without --optimize and the gcc build passes the test both with and without --optimize. The test also passed with all four options on amd64, both on Ubuntu 9.04 amd64 and Ubuntu 9.10 amd64 (gcc/g++ 4.4.1 and 4.3.4) respectively) - I had upgraded my Ubuntu 9.04 i386 to Ubuntu 9.10 i386 so could no longer test there. NotFound++ did test on that platform and it passed, however when he installed Ubuntu 9.10 i386 on his laptop he got the same results with g++ and --optimize.
</p>
<p>
see comments by NotFound and mikehh on TT <a class="new ticket" href="http://trac.parrot.org/parrot/ticket/1176" title="bug: Configure-time check for whether to use powl() or pow(), since powl() is ... (new)">#1176</a>.
</p>
<p>
I was working on converting the test to .pir from .pasm when bubaflub++ posted a patch to do this in TT <a class="closed ticket" href="http://trac.parrot.org/parrot/ticket/1269" title="patch: [PATCH] convert t/op/comp.t to PIR (closed: fixed)">#1269</a> - I applied this in r42518 - the test is now sub-test 17
</p>
<p>
I was on amd64 at the time, but when I re-booted to i386 the test still gave a failure with the eq_num op on i386 with an --optimize build with g++. (PASSes on all my other platform/options.)
</p>
<p>
Specifically the code:
</p>
<pre class="wiki">.sub test_eq_num
new $P0, 'Float'
set $P0, -1.2
new $P1, 'String'
set $P1, "-1.2"
eq_num $P0, $P1, OK
ok(0, "not eq_num")
.return()
OK:
ok(1, "eq_num")
.end
</pre><p>
the eq_num $P0, $P1, OK does not take the OK branch
</p>
<p>
if I change to set P1, "-1.2000000000" the test passes (with all options on i386), fewer zeros still fail (more ok).
</p>
<p>
if I set POW to powl (as per TT <a class="new ticket" href="http://trac.parrot.org/parrot/ticket/1176" title="bug: Configure-time check for whether to use powl() or pow(), since powl() is ... (new)">#1176</a>) the test also passes (with $P1 as "-1.2")
</p>
<p>
<strong>Analysis</strong>
</p>
<p>
What is happening here is that with g++ 4.4.1 (with --optimize) actually uses higher precision in intermediate code (as allowed by the standard)
</p>
<p>
On further consideration I decided that although this is related to TT <a class="new ticket" href="http://trac.parrot.org/parrot/ticket/1176" title="bug: Configure-time check for whether to use powl() or pow(), since powl() is ... (new)">#1176</a> it is actually a different problem in that as we are not specifying use of long double POW would be set to pow rather than powl in this case.
</p>
<p>
I have serious doubts as to the validity of using the eq_num op in comparing float to string, certainly when using binary floats as opposed to decimal floats. see <a class="ext-link" href="http://speleotrove.com/decimal/"><span class="icon"> </span>http://speleotrove.com/decimal/</a>
</p>
<p>
excuse the excessive verbosity in the post, but I felt explanations were necessary, (and I cut out quite a bit)
</p>
<p>
We can get the test to pass using the set P1, "-1.2000000000" as it also passes with the normally passing tests (at least on i386, will check on amd64 in a bit).
</p>
http://trac.parrot.org/parrot/ticket/1275
http://trac.parrot.org/parrot/ticket/1275Report#253: warn on possibly conflicting opengl headersWed, 28 Jan 2009 18:31:27 GMTTue, 02 Mar 2010 15:33:44 GMT<p>
a) warn if the opengl header parser finds more than one "set" of opengl headers which might lead to nci runtime conflicts.
</p>
<p>
b) support --with-opengl-include and --with-opengl-libs for disambiguation
</p>
<p>
per irc discussion with japhb and particle only warn, not fail.
<a class="ext-link" href="http://irclog.perlgeek.de/parrot/2009-01-28#i_870777"><span class="icon"> </span>http://irclog.perlgeek.de/parrot/2009-01-28#i_870777</a>
</p>
http://trac.parrot.org/parrot/ticket/253
http://trac.parrot.org/parrot/ticket/253Report#1598: Archive::Tar & Archive::Zip in parrot libraryThu, 29 Apr 2010 13:09:48 GMTSat, 13 Aug 2011 16:10:33 GMT<p>
Track new experimental parrot runtime library module.
</p>
http://trac.parrot.org/parrot/ticket/1598
http://trac.parrot.org/parrot/ticket/1598Report#1599: experimental packfiledebug PMCThu, 29 Apr 2010 19:43:29 GMTWed, 06 Jul 2011 16:15:01 GMT
http://trac.parrot.org/parrot/ticket/1599
http://trac.parrot.org/parrot/ticket/1599Report#1286: method overload in pir subclass of pmc pccmethod leaves object undefinedTue, 17 Nov 2009 03:15:19 GMTThu, 23 Sep 2010 02:20:34 GMT<p>
while creating a subclass of Exporter to test inter-language exports,
i stumbled across a bug that i can't seem to fix.
</p>
<p>
i've created a subclass of Exporter called MyExporter. MyExporter has
an overridden 'add_global' method, which adds a '&' sigil to each
global specified by the user and calls the method in the superclass.
</p>
<p>
i've also created a high-level language that uses the '&' sigil on
subs, and i import and aim to call the hll sub. however, the code
never finishes 'add_method', as it segfaults inside the supermethod
with an undefined 'exp' object. that is, from src/pmc/exporter.pmc,
line 260:
</p>
<p>
Parrot_Exporter *exp = PARROT_EXPORTER(SELF);
</p>
<p>
after this line, 'exp' is NULL, but 'SELF' (or after macro expansion
'pmc') is not. this is not the case when 'add_method' has not been
overridden. here's the pir code that exposes the bug:
</p>
<p>
.sub 'main' :main
.local pmc exp, ns
</p>
<p>
exp = new 'MyExporter'
</p>
<p>
ns = get_root_namespace <a class="missing wiki">foo?</a>
exp.'source'( ns )
</p>
<p>
exp.'add_global'('bar')
</p>
<p>
say "NEVER REACHES HERE"
</p>
<p>
exp.'import'()
</p>
<p>
'&bar'() ## THIS WILL SUCCEED!
'bar'() ## THIS WILL FAIL!
## THAT'S NOT WHAT I WANT!!!
.end
</p>
<p>
## create a subclass of Exporter that overrides 'add_global'
## it adds a '&' sigil to each requested global
.namespace <a class="missing wiki">MyExporter?</a>
.sub 'onload' :load :init :anon
.local pmc class
class = subclass 'Exporter', 'MyExporter'
.return ()
.end
</p>
<p>
.sub 'add_global' :method
.param string glb :optional
.param int has_glb :opt_flag
</p>
<p>
.local pmc args, super
args = new .Hash
super = new .Super, self
</p>
<p>
unless has_glb goto no_global
glb = concat '&', glb
.return super.'add_global'( glb )
no_global:
.return super.'add_global'()
.end
</p>
<p>
# create a high-level language that uses '&' sigil for sub names
.HLL 'foo', <i>
.sub '&bar'
say 'hello, world!'
.end
</i></p>
<p>
note that switching from a tail method call to a regular method call
has no effect.
</p>
<p>
also note that my code also exposes a problem with the current
Exporter implementation: the imported sub name does not match the
requested name. i have yet to address this as the current bug is
blocking progress.
</p>
<p>
~jerry
</p>
http://trac.parrot.org/parrot/ticket/1286
http://trac.parrot.org/parrot/ticket/1286Report#1190: Replace .globalconst/.const directives by .const/.localconst (respectively)Tue, 03 Nov 2009 16:01:44 GMTMon, 04 Jul 2011 09:16:59 GMT<p>
This ticket replaces RT57634.
</p>
<p>
hi,
</p>
<p>
in PIR you can use the .globalconst directive in a sub to define a constant
that is globally accessible.
Likewise, you can use the .const directive in a sub that is local to that
sub.
</p>
<p>
.sub foo
.globalconst int answer = 42
.const num PI = 3.14
</p>
<p>
.end
</p>
<p>
answer in this case is globally accessible (in any other sub, that is parsed
AFTER the foo subroutine, I should note)
PI in this case is only accessible in this subroutine foo.
</p>
<p>
However, I question the need for .globalconst, as the .const directive can
also be used /outside/ of a subroutine, like so:
</p>
<p>
.const int answer = 42
</p>
<p>
Therefore, the .globalconst directive seems to be superfluous; why have 2
directives that do the same thing; if a .globalconst is accessible globally
anyway, there's no need to define it WITHIN a sub.
</p>
<p>
Therefore, my proposal is to remove the .globalconst directive;
whenever you need to have a global const, use .const outside of a
subroutine.
whenever you need to have a local const (in a sub), use .const inside a
subroutine.
</p>
<p>
comments welcome,
kjs
</p>
http://trac.parrot.org/parrot/ticket/1190
http://trac.parrot.org/parrot/ticket/1190Report#1087: Various tests fail on DragonFly/amd64Fri, 02 Oct 2009 21:29:50 GMTTue, 15 Nov 2011 14:05:10 GMT<p>
Since DragonFly BSD 2.4 there is an amd64 version of the system. While my experiences on the x86 version were pretty good the amd64 port causes various errors when running a smoke test. It's a SMP enabled system (Phenom II, X2 545) btw, if this does matter.
</p>
<p>
Summary:
<a class="ext-link" href="http://smolder.plusthree.com/app/public_projects/report_details/28463"><span class="icon"> </span>http://smolder.plusthree.com/app/public_projects/report_details/28463</a>
</p>
<p>
t/op/inf_nan.t:
<a class="ext-link" href="http://smolder.plusthree.com/app/public_projects/tap_stream/28463/103"><span class="icon"> </span>http://smolder.plusthree.com/app/public_projects/tap_stream/28463/103</a>
</p>
<p>
t/src/atomic.t
<a class="ext-link" href="http://smolder.plusthree.com/app/public_projects/tap_stream/28463/269"><span class="icon"> </span>http://smolder.plusthree.com/app/public_projects/tap_stream/28463/269</a>
</p>
<p>
t/src/basic.t:
<a class="ext-link" href="http://smolder.plusthree.com/app/public_projects/tap_stream/28463/270"><span class="icon"> </span>http://smolder.plusthree.com/app/public_projects/tap_stream/28463/270</a>
</p>
<p>
t/src/embed.t
<a class="ext-link" href="http://smolder.plusthree.com/app/public_projects/tap_stream/28463/271"><span class="icon"> </span>http://smolder.plusthree.com/app/public_projects/tap_stream/28463/271</a>
</p>
<p>
t/src/exit.t
<a class="ext-link" href="http://smolder.plusthree.com/app/public_projects/tap_stream/28463/272"><span class="icon"> </span>http://smolder.plusthree.com/app/public_projects/tap_stream/28463/272</a>
</p>
<p>
t/src/extend.t
<a class="ext-link" href="http://smolder.plusthree.com/app/public_projects/tap_stream/28463/273"><span class="icon"> </span>http://smolder.plusthree.com/app/public_projects/tap_stream/28463/273</a>
</p>
<p>
t/src/warnings.t
<a class="ext-link" href="http://smolder.plusthree.com/app/public_projects/tap_stream/28463/274"><span class="icon"> </span>http://smolder.plusthree.com/app/public_projects/tap_stream/28463/274</a>
</p>
<p>
t/perl/Parrot_Test.t:
<a class="ext-link" href="http://smolder.plusthree.com/app/public_projects/tap_stream/28463/278"><span class="icon"> </span>http://smolder.plusthree.com/app/public_projects/tap_stream/28463/278</a>
</p>
http://trac.parrot.org/parrot/ticket/1087
http://trac.parrot.org/parrot/ticket/1087Report#205: r35872 test fails on solarisWed, 21 Jan 2009 20:39:05 GMTFri, 13 Aug 2010 14:10:55 GMT<p>
Test Summary Report
</p>
<hr />
<p>
t/op/trans (Wstat: 256 Tests: 22 Failed: 1)
</p>
<blockquote>
<p>
Failed test: 14
Non-zero exit status: 1
</p>
</blockquote>
<p>
Files=395, Tests=11826, 574 wallclock secs ( 3.10 usr 1.83 sys + 89.02 cusr 30.35 csys = 124.30 CPU)
Result: FAIL
make: *** [test] Error 1
</p>
<p>
I'm not sure what else you need, so here are some random things.
</p>
<p>
uname -a
SunOS web01-dev 5.10 Generic_127112-11 i86pc i386 i86pc Solaris
</p>
<p>
./parrot -V
This is parrot version 0.9.0-devel built for nojit.
Copyright (C) 2001-2008, The Perl Foundation.
</p>
<p>
This code is distributed under the terms of the Artistic License 2.0.
For more details, see the full text of the license in the LICENSE file
included in the Parrot source tree.
</p>
http://trac.parrot.org/parrot/ticket/205
http://trac.parrot.org/parrot/ticket/205Report#228: t/pmc/sub fails with runcore PBCMon, 26 Jan 2009 05:05:58 GMTSat, 19 Dec 2009 02:58:57 GMT<p>
perl t/harness --gc-debug --running-make-test -r t/pmc/sub.t
</p>
<pre class="wiki">t/pmc/sub....NOK 63/64
# Failed test ':outer with identical sub names'
# at t/pmc/sub.t line 1462.
# Exited with error code: 1
# Received:
# ABC::outer
# ABC::inner
# Null PMC in say
# current instr.: 'parrot;ABC;inner' pc 47 (/local/scratch/dmajnem2/parrot/t/pmc/sub_63.pir:20)
# called from Sub 'parrot;ABC;outer' pc 37 (/local/scratch/dmajnem2/parrot/t/pmc/sub_63.pir:14)
# called from Sub 'main' pc 9 (/local/scratch/dmajnem2/parrot/t/pmc/sub_63.pir:3)
#
# Expected:
# ABC::outer
# ABC::inner
# ABC lex
# DEF::outer
# DEF::inner
# DEF lex
#
# Looks like you failed 1 test of 64.
t/pmc/sub....dubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 63
Failed 1/64 tests, 98.44% okay
Failed Test Stat Wstat Total Fail List of Failed
-------------------------------------------------------------------------------
t/pmc/sub.t 1 256 64 1 63
Failed 1/1 test scripts. 1/64 subtests failed.
Files=1, Tests=64, 2 wallclock secs ( 1.54 cusr + 0.46 csys = 2.00 CPU)
Failed 1/1 test programs. 1/64 subtests failed.
</pre><p>
icc --version
</p>
<pre class="wiki">icc (ICC) 10.1 20080801
Copyright (C) 1985-2008 Intel Corporation. All rights reserved.
</pre><p>
svn info
</p>
<pre class="wiki">Path: .
URL: https://svn.perl.org/parrot/trunk
Repository Root: https://svn.perl.org/parrot
Repository UUID: d31e2699-5ff4-0310-a27c-f18f2fbe73fe
Revision: 36011
Node Kind: directory
Schedule: normal
Last Changed Author: Whiteknight
Last Changed Rev: 36011
Last Changed Date: 2009-01-25 17:09:07 -0600 (Sun, 25 Jan 2009)
</pre>
http://trac.parrot.org/parrot/ticket/228
http://trac.parrot.org/parrot/ticket/228Report#760: readline_interactive method no longer returns PMCNULL on eofSat, 13 Jun 2009 13:28:00 GMTThu, 03 Mar 2011 17:46:00 GMT<p>
Sending EOF to the standard input (typically: hitting Control-G) does not make HLLCompiler end interactive sessions when readline is used.
</p>
<p>
To reproduce: take your favorite HLL written with HLLCompiler, and a Parrot with readline, and run it without any argument. This should start an interactive session (i.e., you get a prompt for the language), but hitting <tt>^G</tt> makes HLLCompiler display a new prompt instead of exiting.
</p>
<p>
This bug has two origins:
</p>
<p>
* the "readline_interactive" method of FileHandle always returns a string (that's because of its type: when it seems to return NULL, it is actually converted to the empty string). On the other hand, HLLCompiler tests if the value returned by "readline_interactive" is null to detect EOF: this test is always false... The fix is to test EOF using the "get_bool" vtable of FileHandle; and
</p>
<p>
* the method "readline_interactive" never sets the EOF flag when readline is activated.
</p>
<p>
The attached patch fixes this.
</p>
http://trac.parrot.org/parrot/ticket/760
http://trac.parrot.org/parrot/ticket/760Report#1195: Add cross-compiling support to Configure.pl, such as --target=i386-rtems4.10Thu, 05 Nov 2009 03:54:55 GMTSun, 27 Mar 2011 14:42:30 GMT<p>
Parrot is currently being ported to the RTEMS real-time OS. This means that we need to support cross-compiling.
</p>
<p>
More info here:
</p>
<p>
<a class="ext-link" href="http://leto.net/dukeleto.pl/2009/11/realtime-embedded-parrots.html"><span class="icon"> </span>http://leto.net/dukeleto.pl/2009/11/realtime-embedded-parrots.html</a>
</p>
http://trac.parrot.org/parrot/ticket/1195
http://trac.parrot.org/parrot/ticket/1195Report#748: memory leak in IMCCTue, 09 Jun 2009 14:17:20 GMTThu, 03 Mar 2011 04:08:42 GMT<p>
From a valgrind run against partcl (r440) on parrot (r39470) using
</p>
<p>
parrot tcl.pbc -e "puts hi"
</p>
<pre class="wiki">==12199== 25,242 bytes in 1,120 blocks are definitely lost in loss record 48 of 48
==12199== at 0x402601E: malloc (vg_replace_malloc.c:207)
==12199== by 0x40D78B3: mem_sys_allocate (alloc_memory.c:47)
==12199== by 0x4136C0B: str_dup (primitives.c:357)
==12199== by 0x43210B9: yylex_skip (imcc.l:859)
==12199== by 0x431F527: yylex (imcc.l:416)
==12199== by 0x431649E: yyparse (imcparser.c:3117)
==12199== by 0x431C03D: compile_string (imcc.l:1351)
==12199== by 0x4338A84: imcc_compile (parser_util.c:683)
==12199== by 0x4338D2D: imcc_compile_pir_ex (parser_util.c:876)
==12199== by 0x439708C: ???
==12199== by 0x426112B: Parrot_NCI_invoke (nci.pmc:326)
==12199== by 0x4061835: Parrot_invokecc_p (core.ops:504)
==12199== by 0x413124F: runops_slow_core (cores.c:462)
==12199== by 0x412FE4D: runops_int (main.c:987)
==12199== by 0x40EC710: runops (ops.c:107)
==12199== by 0x40ECB03: runops_args (ops.c:256)
==12199== by 0x40ED9B5: Parrot_runops_fromc_args (ops.c:325)
==12199== by 0x40CA856: Parrot_runcode (embed.c:1014)
==12199== by 0x4322A5E: imcc_run_pbc (main.c:801)
==12199== by 0x432365B: imcc_run (main.c:1092)
==12199== by 0x8048967: main (main.c:61)
</pre><p>
This is 82% of the leaked memory.
</p>
http://trac.parrot.org/parrot/ticket/748
http://trac.parrot.org/parrot/ticket/748Report#777: .HLL should not case-mangle its argFri, 19 Jun 2009 17:16:44 GMTTue, 11 Jan 2011 10:21:22 GMT<p>
In many cases, .HLL 'Donut' is the same as .HLL 'donut'; however, in some cases (e.g. ParrotInterpreter.hll_map()), it's not.
</p>
<p>
I recommend that to avoid any potential for confusion, we remove any case mangling and treat the HLL exactly specified in the directive.
</p>
<p>
If we get consensus on this, we can add a deprecation notice for 1.4 and change it immediately after release.
</p>
http://trac.parrot.org/parrot/ticket/777
http://trac.parrot.org/parrot/ticket/777Report#370: Rounding Inf and NaNTue, 24 Feb 2009 08:52:42 GMTThu, 09 Sep 2010 20:31:59 GMT<p>
$ ./perl6
</p>
<blockquote class="citation">
<p>
say ceiling(NaN)
</p>
</blockquote>
<p>
-2147483648
</p>
<blockquote class="citation">
<p>
say floor(NaN)
</p>
</blockquote>
<p>
-2147483648
</p>
<blockquote class="citation">
<p>
say floor(Inf)
</p>
</blockquote>
<p>
-2147483648
</p>
<blockquote class="citation">
<p>
say ceiling(Inf)
</p>
</blockquote>
<p>
-2147483648
</p>
http://trac.parrot.org/parrot/ticket/370
http://trac.parrot.org/parrot/ticket/370Report#1040: inplace math on subclasses failing (MMD/vtable)Mon, 21 Sep 2009 06:47:52 GMTTue, 23 Mar 2010 12:18:48 GMT<p>
Originally posted in <a class="ext-link" href="http://rt.perl.org/rt3/Ticket/Display.html?id=60036"><span class="icon"> </span>RT</a> by pmichaud.
</p>
<pre class="wiki">$ cat y.pir;./parrot y.pir
.sub main :main
$P1 = new 'Integer'
assign $P1, 4
$P1 *= 3
say $P1
$P0 = subclass 'Integer', 'MyInt'
$P1 = new 'MyInt'
assign $P1, 4
$P1 *= 3
say $P1
.end
12
Multiple Dispatch: No suitable candidate found for 'i_multiply_int',
with signature 'PI'
current instr.: 'main' pc 21 (y.pir:9)
</pre>
http://trac.parrot.org/parrot/ticket/1040
http://trac.parrot.org/parrot/ticket/1040Report#806: Test.readdir is not skipped on Win32 even though it appears that it should beFri, 03 Jul 2009 17:06:34 GMTSat, 19 Dec 2009 00:36:58 GMT<p>
t/pmc/os.t:270:
</p>
<pre class="wiki">skip 'not implemented on windows yet', 1 if ( $MSWin32 && $MSVC );
</pre><p>
It seems like the message doesn't agree with the if clause, because you can also use GCC (MinGW) to compile on Windows. If you compile Parrot on Windows XP SP3 with GCC 4.4 this test will fail (see attached log and smolder report at <a class="ext-link" href="http://smolder.plusthree.com/app/public_projects/report_details/24454"><span class="icon"> </span>http://smolder.plusthree.com/app/public_projects/report_details/24454</a>). However I'm not sure wether the if clause is responsible for this error or GCC 4.4 since other Windows builds compiled with GCC 3.4 pass this test according to smolder (see <a class="ext-link" href="http://smolder.plusthree.com/app/public_projects/report_details/24452"><span class="icon"> </span>http://smolder.plusthree.com/app/public_projects/report_details/24452</a>).
</p>
http://trac.parrot.org/parrot/ticket/806
http://trac.parrot.org/parrot/ticket/806Report#326: win32 Wide API needed . 'make smoke' failed 63 tests.Fri, 13 Feb 2009 15:38:38 GMTMon, 21 Feb 2011 14:21:13 GMT<p>
It failed 63 tests.
</p>
<p>
see <a class="ext-link" href="http://smolder.plusthree.com/app/public_projects/report_details/17984"><span class="icon"> </span>http://smolder.plusthree.com/app/public_projects/report_details/17984</a>
</p>
<p>
parrot fails to load:
.\parrot.exe -o C:/DOCUME~1/⻨ÃÃÃÃ/LOCALS~1/Temp/tySepN24eO
</p>
<p>
The Windows Wide API is not enabled.
</p>
<p>
As workaround $TEMP could be checked to point to a pure ascii path.
</p>
http://trac.parrot.org/parrot/ticket/326
http://trac.parrot.org/parrot/ticket/326Report#1631: Exception handler throwing exception in NQP-rx causes segfaultThu, 13 May 2010 08:57:43 GMTTue, 13 Jul 2010 18:52:33 GMT<p>
{ pir::die(""); CATCH { pir::die(""); } }
</p>
<p>
The NQP-rx generated exception handler does not call pop_eh in the handler path, which apparently it should, according to bacek.
</p>
http://trac.parrot.org/parrot/ticket/1631
http://trac.parrot.org/parrot/ticket/1631Report#1288: Limit the required interface for PMCsTue, 17 Nov 2009 03:21:16 GMTTue, 17 Nov 2009 03:21:16 GMT<pre class="wiki">In the pdd03 design document there is the todo item (with context):
=item 5 C<FLAT> (P only)
If this bit is set on a PMC value, then the PMC must be an aggregate. The
contents of the aggregate, rather than the aggregate itself, will be passed.
If the C<NAMED> bit is also set, the aggregate will be used as a hash; its
contents, as key/value pairs, will be passed as named parameters. The PMC
must implement the full hash interface. {{ TODO: Limit the required
interface. }}
What is the required interface? How should it be limited? This, I
suspect, needs to be discussed and decided upon, and then documented
in the PDD.
</pre><p>
Originally reported in <a class="ext-link" href="http://rt.perl.org/rt3/Ticket/Display.html?id=45367"><span class="icon"> </span>http://rt.perl.org/rt3/Ticket/Display.html?id=45367</a>
</p>
http://trac.parrot.org/parrot/ticket/1288
http://trac.parrot.org/parrot/ticket/1288Report#867: Implicit NameSpace Creation Does Not Respect Compile-time HLL MapTue, 21 Jul 2009 02:42:42 GMTTue, 21 Jul 2009 02:42:42 GMT<p>
From an example by Coke:
</p>
<pre class="wiki">.HLL 'tcl'
.sub 'foo' :anon :init
$P1 = get_class 'NameSpace'
$P2 = subclass $P1, 'BSNS'
$P0 = getinterp
$P0.'hll_map'($P1, $P2)
.end
.namespace ['a';'b';'c']
.sub 'hi'
noop
.end
.namespace []
.sub 'blah' :main
$P1 = get_hll_namespace ['a';'b';'c']
$S0 = typeof $P1
print 'ok 1 - '
say $S0
.end
</pre><p>
I believe this should print <tt> ok 1 - BSNS </tt>.
</p>
<p>
Making this work is not trivial.
</p>
http://trac.parrot.org/parrot/ticket/867
http://trac.parrot.org/parrot/ticket/867Report#1801: Properly merge pools in GC MS2 when child interpreter destroyed.Fri, 24 Sep 2010 01:10:15 GMTFri, 24 Sep 2010 03:52:47 GMT<p>
Currently GC MS2 doesn't properly clean up in finalize mode due absence of merging pools functionality. It should be implemented.
</p>
http://trac.parrot.org/parrot/ticket/1801
http://trac.parrot.org/parrot/ticket/1801Report#899: heredocs in a macro argument broken.Sun, 02 Aug 2009 18:17:09 GMTSat, 02 Jul 2011 21:22:52 GMT<pre class="wiki">.macro qq(code)
.code
.endm
.sub main :main
say 'hi'
say <<'FOO'
hi
FOO
.qq({
say "hi"
})
=for FAIL
.qq({
say <<"FOO"
hi
FOO
})
=cut
.end
</pre><p>
If you remove the pod comments, you get:
</p>
<pre class="wiki">parrot foo.pir
error:imcc:The opcode 'say' (say<0>) was not found. Check the type and number of the arguments in macro '.qq' line 3 included from 'foo.pir' line 1
</pre><p>
I'd expect non-POD'd version to print out 'hi' 4 times (modulo whitespace)
</p>
http://trac.parrot.org/parrot/ticket/899
http://trac.parrot.org/parrot/ticket/899Report#775: Simplify makefile rules on windows.Thu, 18 Jun 2009 22:01:39 GMTSun, 13 Jun 2010 03:58:51 GMT<p>
Windows XP Professional, ActivePerl 5.10.0.1005-MSWin32, dmake 4.11
</p>
<p>
Trying to build Parrot using dmake results in the following error:
</p>
<pre class="wiki">dmake: makefile: line 126: Warning: -- Macro `O' redefined after use
dmake: makefile: line 130: Warning: -- Macro `A' redefined after use
dmake: makefile: line 3236: Warning: -- Found non-white space character after '[' in [[ -d parrot-$(VERSION) ] || ln -s $(CUR_DIR) parrot-$(VERSION)].
dmake: makefile: line 3340: Error: -- Incomplete rule recipe group detected
</pre><p>
(See attached Makefile)
Especially for Strawberry Perl users this might be a blocker, as afaik Strawberry Perl ships only dmake by default, so someone should probably document this somewhere.
</p>
http://trac.parrot.org/parrot/ticket/775
http://trac.parrot.org/parrot/ticket/775Report#1071: Intermittent failure with t/pmc/os.t test 9Mon, 28 Sep 2009 10:35:00 GMTMon, 20 Sep 2010 08:52:39 GMT<p>
I am getting an intermittent failure with t/pmc/os.t - test 9 on Ubuntu 9.04 amd64.
</p>
<p>
It has failed twice for me recently - pretty much in the same way (see below) but in both cases when I re-ran the test it PASSed.
</p>
<p>
In fact in the last couple of days I have run the test many times (considering that it is run 7 times for each of my test runs, once in smoke and 6 times (once for each core) in fulltest. As I have logged 6 test runs since the first failure (+ other runs not recorded) I have run the test more than 50 times with 2 failures.
</p>
<p>
At r41542 from <a class="ext-link" href="http://smolder.plusthree.com/app/public_projects/report_details/28233"><span class="icon"> </span>http://smolder.plusthree.com/app/public_projects/report_details/28233</a>:
</p>
<pre class="wiki">1..16
ok 1 - Test cwd
ok 2 - Test chdir
ok 3 - Test mkdir
ok 4 - Test rm call in a directory
ok 5 - Test that rm removed the directory
ok 6 - Test OS.stat
ok 7 - Test OS.readdir
ok 8 - Test OS.rename
not ok 9 - Test OS.lstat
# Failed test 'Test OS.lstat'
# at t/pmc/os.t line 314.
# got: '0x00000811
# 0x00a1b82f
# 0x000081a4
# 0x00000001
# 0x000003e8
# 0x000003e8
# 0x00000000
# 0x00000004
# 0x4ac081ae
# 0x4ac081ad
# 0x4ac081ad
# 0x00001000
# 0x00000008
# '
# expected: '0x00000811
# 0x00a1b82f
# 0x000081a4
# 0x00000001
# 0x000003e8
# 0x000003e8
# 0x00000000
# 0x00000004
# 0x4ac081ad
# 0x4ac081ad
# 0x4ac081ad
# 0x00001000
# 0x00000008
# '
ok 10 - Test rm call in a file
ok 11 - Test that rm removed file
ok 12 - Test symlink
ok 13 - symlink was really created
ok 14 - Test link
ok 15 - hard link to file was really created
ok 16 - Test dirlink
# Looks like you failed 1 test of 16.
</pre><p>
At r41534 make fulltest - make testr:
</p>
<pre class="wiki"># Failed test 'Test OS.lstat'
# at t/pmc/os.t line 314.
# got: '0x00000811
# 0x009e0109
# 0x000081a4
# 0x00000001
# 0x000003e8
# 0x000003e8
# 0x00000000
# 0x00000004
# 0x4abfaa1d
# 0x4abfaa1c
# 0x4abfaa1c
# 0x00001000
# 0x00000008
# '
# expected: '0x00000811
# 0x009e0109
# 0x000081a4
# 0x00000001
# 0x000003e8
# 0x000003e8
# 0x00000000
# 0x00000004
# 0x4abfaa1c
# 0x4abfaa1c
# 0x4abfaa1c
# 0x00001000
# 0x00000008
# '
</pre><p>
Note that the failure (0x4ac081ae expected 0x4abfaa1d) and (0x4ac081ad expected 0x4abfaa1c) in the 9th line of output seems to be the same failure.
</p>
<p>
I am investigating this further.
</p>
http://trac.parrot.org/parrot/ticket/1071
http://trac.parrot.org/parrot/ticket/1071Report#562: subclassing basic number types fails to inherit basic ops like add, sub, mul and divSat, 18 Apr 2009 11:05:14 GMTSat, 05 Dec 2009 23:00:15 GMT<p>
When subclassing base types like Integer, Float and Complex. The ops sub, add, mul and div are not properly inherited by the derived class.
</p>
<p>
A basic example is provided by the following code: -
</p>
<pre class="wiki">.sub '' :main
$P0 = subclass 'Integer', 'FooInt'
print 'Integer: 10 - 1 = '
$P0 = new 'Integer'
$P0 = 10
sub $P1, $P0, 1
say $P1
print 'FooInt: 10 - 1 = '
$P0 = new 'FooInt'
$P0 = 10
#$P1 = new 'FooInt' # uncommenting here does not help
sub $P1, $P0, 1
say $P1
.end
</pre><p>
outputs the following: -
</p>
<pre class="wiki">Integer: 10 - 1 = 9
FooInt: 10 - 1 = Multiple Dispatch: No suitable candidate found for 'subtract_int', with signature 'PIP->P'
...
</pre><p>
This appears to be related to RT <a class="ext-link" href="http://rt.perl.org/rt3/Public/Bug/Display.html?id=59630"><span class="icon"> </span>http://rt.perl.org/rt3/Public/Bug/Display.html?id=59630</a> which outlines the problem for a specific case of a Complex type.
</p>
<p>
The attached script proves the bug also affects add, sub, mul, div for Integer, Float and Complex. It could be used as a test case.
</p>
http://trac.parrot.org/parrot/ticket/562
http://trac.parrot.org/parrot/ticket/562Report#706: Out of mem (PASM, compreg, invokecc)Tue, 26 May 2009 12:32:49 GMTWed, 08 Sep 2010 21:39:41 GMT<p>
Attached test use compreg P1, "PASM" and invokecc it 100,000 times.
On i386-MSWin32 (mingw32) it consumes 66MB of RAM with r39159 (107 MB of RAM with r11704).
</p>
<p>
If you replace "lt I20, 100000, NEXT" to "lt I20, 10000000, NEXT" it fails with "Parrot VM: PANIC: Out of mem! C file src\gc\alloc_memory.c, line 142".
</p>
<pre class="wiki">set S28, ""
concat S28, ".pcc_sub :anon _indi:\n"
concat S28, " get_params \"(0,0,0)\", I0, I1, I2\n"
concat S28, " set I3, 23\n"
concat S28, " set_returns \"(0)\", I3\n"
concat S28, " returncc\n"
compreg P1, "PASM"
set I20, 0
NEXT:
set_args "(0)",S28
get_results "(0)", P0
invokecc P1
needs_destroy P0
sweep 0
inc I20
lt I20, 100000, NEXT
# sleep 10
end
</pre>
http://trac.parrot.org/parrot/ticket/706
http://trac.parrot.org/parrot/ticket/706Report#1041: pmc2c silently ignores bad codeMon, 21 Sep 2009 07:03:08 GMTMon, 21 Sep 2009 07:03:08 GMT<p>
Originally reported in <a class="ext-link" href="http://rt.perl.org/rt3/Ticket/Display.html?id=39313"><span class="icon"> </span>RT</a>
</p>
<p>
Summary of that ticket (quoting allison)
</p>
<pre class="wiki">Pmc2c is just a series of regular expressions. It looks for specific
patterns, and if it finds them, builds relevant C code out of them.
It has no ability to check for arbitrary syntax that *doesn't* match a
pattern. It's a preprocessor (macro substitution), not a language parser.
What could be done is have it dump anything leftover after the
extraction into the resulting C file. Then you'd get a C error on
compilation.
</pre>
http://trac.parrot.org/parrot/ticket/1041
http://trac.parrot.org/parrot/ticket/1041Report#1032: Document and test available HLL MappingsMon, 21 Sep 2009 03:59:04 GMTMon, 21 Sep 2009 05:13:41 GMT<p>
See <a class="ext-link" href="http://rt.perl.org/rt3/Ticket/Display.html?id=40124"><span class="icon"> </span>Original RT</a>
</p>
<p>
There should be a list somewhere in docs/ showing all the possible effects that calling the .hll_map() method on ParrotInterpreter can have - list the given core PMC type, and then what changes will occur when registering a mapping for that type . (NB: Mappings can also be registered for PMCs with the 'maps' declaration.)
</p>
<p>
For example, mapping ResizablePMCArray overrides the PMC type used for :slurpy parameter args.
</p>
<p>
Grep for usages of Parrot_get_ctx_HLL_type in the source to get the current listing.
</p>
<p>
All usages need to have tests as well.
</p>
http://trac.parrot.org/parrot/ticket/1032
http://trac.parrot.org/parrot/ticket/1032Report