English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
arm backend
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-05-03 (12:34)
From: Robert Muller <muller@c...>
Subject: Re: [Caml-list] OCaml on iPhone (was: arm backend)
This sounds great.  I will be teaching an iphone programming course  
next year and I would
very much like to use the course as an opportunity to introduce  
students to caml. I know that
there are others gearing up for iphone programming courses who aren't  
thrilled with the idea
of teaching Objective C.

If you were to post your resources on a web site it might lower the  
barrier to entry for more
people to use ocaml + your wrappers rather than Objective C.

Bob Muller

On May 2, 2009, at 7:15 PM, Jeffrey Scofield wrote:

> Nathaniel Gray <n8gray@gmail.com> writes:
>> Ok, I'm glad I left this to people who are familiar with ARM
>> assembly programming.  :-)
> We've done a lot of assembly programming, but none of us is an
> ARM expert.  We looked at ARM documents and the assembly (.s)
> files generated by ocamlopt and gcc, and spent some long sessions
> with gdb.
>> Awesome, but now I'm confused because the arm.S you included
>> has lots of .global pseudo-ops.  Do you not compile it with
>> Apple's as?
> At around line 36, you'll see:
>  #define global globl
> As I said in private mail, you could call this a hack, but it's a
> way to avoid making lots of small changes everywhere in the file.
>> What's your app?
> We're working on a collection of card games for casual play.
>> How are you managing the interface between Cocoa and OCaml?
> This is a big topic.  The summary is that we model Cocoa objects
> as OCaml objects.  We have a layer that wraps OCaml objects in
> smallish ObjC objects for use on the ObjC side, and wraps ObjC
> objects in smallish OCaml objects for use on the OCaml side.  The
> layer then translates between these representations as required
> for calls into iPhoneOS and Cocoa Touch from OCaml (asking for
> iPhone OS services) and into OCaml from iPhoneOS (for event
> handling).
>>> We also made a small fix to the ARM code generator
>> I am very interested in any and all information needed to get a
>> correct OCaml port suitable for use in App Store applications.
>> Please share!
> OK, I'll gather up our patch and send it to the list.  I want to
> separate out our changes from those of Toshiyuki Maeda [1].
> As I said, our patch fixes calls to external C float functions
> such as floor(), sin(), and so on.  There is special handling in
> ocamlopt to allow them to be unboxed, but the ABI of the existing
> ARM code generator doesn't match the iPhone ABI.
> Regards,
> Jeff Scofield
> Seattle
> [1] http://web.yl.is.s.u-tokyo.ac.jp/~tosh/ocaml-on-iphone/
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs