[Yhc] bytecode more complex than needed?

Kartik Vaddadi itskartik at iitb.ac.in
Wed Sep 27 16:08:58 EDT 2006


Hello,
I compiled the following program using yhc:
> main = print (calc 3)
> calc x = munge x 6
> munge x y  = x

The bytecode for calc starts with:

    NEED_HEAP_1
    PUSH_CONST_0
    PUSH_CONST_1
    PUSH_ZAP_1

Couldn't this be simplified to:
   NEED_HEAP_1
   PUSH_CONST_1
   PUSH_CONST_0

Thanks.

-- 
Kartik Vaddadi.

Home: 			www.cse.iitb.ac.in/~kart
Blogs:                  kartik-log.blogspot.com, kartik-rlog.blogspot.com
Alternate mail ID:	kartik.vad at gmail.com

"50% Reservation, 100% Politics" - Protest the Indian government's decision to increase reservation in private educational institutions (yfemumbai.blogspot.com)



More information about the Yhc mailing list