Modified: MacRuby/branches/experimental/roxor.cpp (1488 => 1489)
--- MacRuby/branches/experimental/roxor.cpp 2009-04-25 04:13:51 UTC (rev 1488)
+++ MacRuby/branches/experimental/roxor.cpp 2009-04-25 04:21:25 UTC (rev 1489)
@@ -2,7 +2,6 @@
#define ROXOR_COMPILER_DEBUG 0
#define ROXOR_VM_DEBUG 0
-#define ROXOR_DUMP_IR_BEFORE_EXIT 0
#define ROXOR_ULTRA_LAZY_JIT 1
#define ROXOR_INTERPRET_EVAL 0
@@ -5727,6 +5726,7 @@
// Compile retval.
Value *retval;
if (sret != NULL) {
+ imp_call->addAttribute(0, Attribute::StructRet);
retval = new LoadInst(sret, "", bb);
}
else {
@@ -9403,11 +9403,11 @@
void
rb_vm_finalize(void)
{
-#if ROXOR_DUMP_IR_BEFORE_EXIT
- printf("IR dump ----------------------------------------------\n");
- RoxorCompiler::module->dump();
- printf("------------------------------------------------------\n");
-#endif
+ if (getenv("VM_DUMP_IR") != NULL) {
+ printf("IR dump ----------------------------------------------\n");
+ RoxorCompiler::module->dump();
+ printf("------------------------------------------------------\n");
+ }
#if ROXOR_VM_DEBUG
printf("functions all=%ld compiled=%ld\n", RoxorCompiler::module->size(),
GET_VM()->functions_compiled);