chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-janitors] #436: find more efficient way to bulk-init locally al


From: Chicken Trac
Subject: [Chicken-janitors] #436: find more efficient way to bulk-init locally allocated data
Date: Tue, 30 Nov 2010 15:04:33 -0000

#436: find more efficient way to bulk-init locally allocated data
-----------------------------+----------------------------------------------
 Reporter:  felix            |       Owner:  felix
     Type:  task             |      Status:  new  
 Priority:  minor            |   Milestone:       
Component:  compiler         |     Version:  4.6.x
 Keywords:  code generation  |  
-----------------------------+----------------------------------------------
 For example, `letrec` creates code like this:

 {{{
 C_word t1517;
 C_word t1518;
 C_word t1519;
 C_word ab[2291],*a=ab;
 C_check_for_interrupt;
 if(!C_stack_probe(&a)){
 C_save_and_reclaim((void*)tr2,(void*)f_37706,2,t0,t1);}
 t2=C_SCHEME_UNDEFINED;
 t3=(*a=C_VECTOR_TYPE|1,a[1]=t2,tmp=(C_word)a,a+=2,tmp);
 t4=C_SCHEME_UNDEFINED;
 t5=(*a=C_VECTOR_TYPE|1,a[1]=t4,tmp=(C_word)a,a+=2,tmp);
 t6=C_SCHEME_UNDEFINED;
 t7=(*a=C_VECTOR_TYPE|1,a[1]=t6,tmp=(C_word)a,a+=2,tmp);
 t8=C_SCHEME_UNDEFINED;
 t9=(*a=C_VECTOR_TYPE|1,a[1]=t8,tmp=(C_word)a,a+=2,tmp);
 t10=C_SCHEME_UNDEFINED;
 t11=(*a=C_VECTOR_TYPE|1,a[1]=t10,tmp=(C_word)a,a+=2,tmp);
 t12=C_SCHEME_UNDEFINED;
 t13=(*a=C_VECTOR_TYPE|1,a[1]=t12,tmp=(C_word)a,a+=2,tmp);
 t14=C_SCHEME_UNDEFINED;
 t15=(*a=C_VECTOR_TYPE|1,a[1]=t14,tmp=(C_word)a,a+=2,tmp);
 t16=C_SCHEME_UNDEFINED;
 t17=(*a=C_VECTOR_TYPE|1,a[1]=t16,tmp=(C_word)a,a+=2,tmp);
 t18=C_SCHEME_UNDEFINED;
 }}}

 One could use local array initializers or so to reduce the amount of code
 generated.

-- 
Ticket URL: <http://bugs.call-cc.org/ticket/436>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]