From 1da6c62f7f8471a674ef4ce8eec1e6f275bd0ea3 Mon Sep 17 00:00:00 2001 From: Reini Urban Date: Sat, 8 Mar 2014 23:16:02 -0600 Subject: [PATCH] frontend: fix -R trace trace is a seperate runcore, but misses a _init registration function, we rather go through the slow runcore and check then the trace flag. Fixes the t/run/options.t breakage of the previous commit --- src/embed/api.c | 6 +++--- src/ops/set.ops | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/embed/api.c b/src/embed/api.c index 06e5e9ec8f..d83ad36698 100644 --- a/src/embed/api.c +++ b/src/embed/api.c @@ -1,5 +1,5 @@ /* -Copyright (C) 2010-2012, Parrot Foundation. +Copyright (C) 2010-2014, Parrot Foundation. =head1 NAME @@ -187,6 +187,8 @@ Parrot_api_set_runcore(Parrot_PMC interp_pmc, ARGIN(const char * corename), else { if (STREQ(corename, "slow") || STREQ(corename, "bounds")) Parrot_runcore_switch(interp, Parrot_str_new_constant(interp, "slow")); + else if (STREQ(corename, "trace")) + Parrot_runcore_switch(interp, Parrot_str_new_constant(interp, "slow")); else if (STREQ(corename, "fast") || STREQ(corename, "function") || STREQ(corename, "cgp") @@ -202,8 +204,6 @@ Parrot_api_set_runcore(Parrot_PMC interp_pmc, ARGIN(const char * corename), else if (STREQ(corename, "exec")) Parrot_runcore_switch(interp, Parrot_str_new_constant(interp, corename)); #endif - else if (STREQ(corename, "trace")) - Parrot_runcore_switch(interp, Parrot_str_new_constant(interp, corename)); else if (STREQ(corename, "profiling")) Parrot_runcore_switch(interp, Parrot_str_new_constant(interp, corename)); else if (STREQ(corename, "gc_debug")) diff --git a/src/ops/set.ops b/src/ops/set.ops index dc410e7f61..f3663c883f 100644 --- a/src/ops/set.ops +++ b/src/ops/set.ops @@ -178,6 +178,7 @@ Assign a new value $2, to PMC $1. Same as the equivalent B opcodes. =item B(invar PMC, invar PMC) Assign a new value $2, to PMC $1 by copying the value. +Usually calls the set_pmc vtable method. =item B(out STR, in STR)