[LLVMdev] Integer handling

Matt Giuca mattgiuca at gmail.com
Mon Sep 29 20:48:25 PDT 2008



OvermindDL1 wrote:
> 
> It is using the Actor-Oriented model, not Object-Oriented.
> /* snip */
> By keeping the type system based on the actual types it allows
> arbitrary message passing to any other actor without needing to load
> any code relating to the actors, you can just send a structure with
> the appropriate ID and format and it will 'just work' as the pattern
> matching will ensure the other actor handles it correctly, or it gets
> dumped with a message stating no match.
> 
Hm. I don't know much about the Actor model (but I do deal with declarative
languages which similarly have no globals or pointers, so I get that
concept).

It seems like your language is very high level indeed (it almost sounds
dynamic). If you can pass arbitrary messages without needing to statically
know the type of anything, and pass data transparently from one machine to
another.

If it's indeed dynamic, then you probably want to implement a minimal
dynamic runtime system in LLVM - have each value wrapped up in a struct
which also contains some small piece of runtime information which holds its
type. For example, along with each int (in an i32), store an i1 (bool) which
specifies whether it is signed or unsigned, and have all relevant operations
(such as division) depend upon that bool. Obviously this makes the language
a lot higher level.
-- 
View this message in context: http://www.nabble.com/Integer-handling-tp19719560p19735721.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.




More information about the llvm-dev mailing list