Browse thread
[Caml-list] compiler implementation of partial applications.
- Jason Smith
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2004-02-09 (11:54) |
From: | Jason Smith <JNS28@s...> |
Subject: | [Caml-list] compiler implementation of partial applications. |
Hi All I'm investigating certain compile time optimizations using type information. One in particular is reducing the runtime costs with calling polymorphic functions. My experience so far has mostly been with the internals of the ghc compiler and a language called Mondrian. The ghc compiler performs a runtime argument count check and generates a special closure called a PAP which consumes the appropriate no. of arguments. Ideally this should be eliminated and appropriate transformations performed statically. In particular I'm looking at how the following simplified example is compiled. f1 = \a -> \b -> a + b; f2 = \a -> + a; map (if (..) then f1 else f2) [1, 2, 3]; I was wondering if you could either, a) point me to some resources which discuss ocaml's compilation model with reference to the above, or b) maybe comment on it urself? Thankyou for your time. Jason. ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners