~ chicken-core (chicken-5) 3228f4737fc4584888be0f77794a960518b168de
commit 3228f4737fc4584888be0f77794a960518b168de Author: felix <felix@call-with-current-continuation.org> AuthorDate: Fri Sep 17 23:09:09 2010 +0200 Commit: felix <felix@call-with-current-continuation.org> CommitDate: Fri Sep 17 23:09:09 2010 +0200 don't C_mutate if slot already holds identical val diff --git a/runtime.c b/runtime.c index 0ce1ce64..6113b573 100644 --- a/runtime.c +++ b/runtime.c @@ -2573,7 +2573,8 @@ C_regparm C_word C_fcall C_mutate(C_word *slot, C_word val) { int mssize; - if(!C_immediatep(val)) { + if(*slot == val) return val; + else if(!C_immediatep(val)) { #ifdef C_GC_HOOKS if(C_gc_mutation_hook != NULL && C_gc_mutation_hook(slot, val)) return val; #endifTrap