<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Hello Amaury:</span></div><div><br><span></span></div><div><span>Yes you are right! I commented out the print statement. I'll fix that later (it is there to check if the code is emitting the correct answers. I can change that a bunch of asserts). <br></span></div><div><br><span></span></div><div><span>Out of curiosity, I thought there was some sort of rpython lint utility out there? Perhaps I can use that to help me catch those sort of errors (I wrote a version of the code in Python to catch mistakes). <br></span></div><div><br></div><div>However now I am getting:</div><div><br></div><div>[rtyper] -=- specialized 2 more blocks -=-<br>[canraise:WARNING] Unknown operation: stm_transaction_boundary<br>[canraise:WARNING] Unknown operation: stm_transaction_boundary<br>[canraise:WARNING] Unknown operation:
stm_transaction_boundary<br>[canraise:WARNING] Unknown operation: stm_transaction_boundary<br>[rtyper] -=- specialized 0 more blocks -=-<br>[backendopt:inlining] phase with threshold factor: 32.4<br>[backendopt:inlining] heuristic: pypy.translator.backendopt.inline.inlining_heuristic<br></div><div><br></div><div>.</div><div>.</div><div>.</div>[translation:ERROR] CompilationError: CompilationError(err="""<br>[translation:ERROR] translator_stm_test_bank.c: In function ‘pypy_g_transactionA’:<br>[translation:ERROR] translator_stm_test_bank.c:257: warning: implicit declaration of function ‘OP_STM_TRANSACTION_BOUNDARY’<br>[translation:ERROR] translator_stm_test_bank.o: In function `pypy_g_transactionB':<br>[translation:ERROR] translator_stm_test_bank.c:(.text+0xc7): undefined reference to `OP_STM_TRANSACTION_BOUNDARY'<br>[translation:ERROR]
translator_stm_test_bank.o: In function `pypy_g_transactionA':<br>[translation:ERROR] translator_stm_test_bank.c:(.text+0x295): undefined reference to `OP_STM_TRANSACTION_BOUNDARY'<br>[translation:ERROR] collect2: ld returned 1 exit status<br>[translation:ERROR] make: *** [bank-c] Error 1<br>[translation:ERROR] """)<br>[translation] start debugger...<br>> /home/andrew/pypy-stm/pypy/translator/platform/__init__.py(138)_handle_error()<br>-> raise CompilationError(stdout, stderr)<br><br>Again, the command I am using to compile the code is:<br>python ../../goal/translate.py --stm --gc=none bank.py<br><br>I have bank.py in the same directory as targetdemo.py and I use the same command.<br><br>I can't wait to see this code compile! Bank accounts are the "hello world" of transactional
programming!<br><br>Cheers,<br>Andrew<br><div><br></div><div><br></div><div><br></div><div><br></div> <div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"> <div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1"> <b><span style="font-weight: bold;">From:</span></b> Amaury Forgeot d'Arc <amauryfa@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> Andrew Francis <andrewfr_ice@yahoo.com> <br><b><span style="font-weight: bold;">Cc:</span></b> Armin Rigo <arigo@tunes.org>; "pypy-dev@codespeak.net" <pypy-dev@codespeak.net> <br> <b><span style="font-weight: bold;">Sent:</span></b> Wednesday, January 25, 2012 1:04 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [pypy-dev] What Causes An Ambiguous low-level helper specialization Error?<br> </font> </div> <br>
<meta http-equiv="x-dns-prefetch-control" content="off"><div id="yiv1949984583">Hi,<br><br><div class="yiv1949984583gmail_quote">2012/1/25 Andrew Francis <span dir="ltr"><<a rel="nofollow" ymailto="mailto:andrewfr_ice@yahoo.com" target="_blank" href="mailto:andrewfr_ice@yahoo.com">andrewfr_ice@yahoo.com</a>></span><br><blockquote class="yiv1949984583gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>>
/home/andrew/pypy-stm/pypy/rpython/lltypesystem/rstr.py(978)do_stringformat()<br>-> assert isinstance(r_arg, IntegerRepr)</div></blockquote></div><br>This one is easy: you are formatting a float with %d,<div>which is not supported by RPython.</div>
<div>For your debug output, use %s instead.<br clear="all"><div><br></div>-- <br>Amaury Forgeot d'Arc<br>
</div>
</div><meta http-equiv="x-dns-prefetch-control" content="on"><br><br> </div> </div> </div></body></html>