Changes between Version 13 and Version 14 of LoritoDesignQuestions

07/28/10 04:33:28 (11 years ago)

filled out lots of little details


  • LoritoDesignQuestions

    v13 v14  
    11As [ Lorito] seems to be a somewhat nebulous concept about which people seem to be certain about only a few specific details (not that the specific details are the same between any two people), this is a list of questions we need to consider when designing, planning, and implementing Lorito. Feel free to add more.  When adding answers, please ensure that there is some agreement among Parrot developers about the answer. 
     3=== How should I think about Lorito to understand its purpose and to answer these questions? === 
     5At its lowest level a small set of primitives which could form the basis of a virtual machine to run code written in C without having to follow such features of C as its calling conventions and memory management. 
     7Put another way, what if we had a small and fast virtual machine which supported CPS, multiple dispatch, PMCs, and garbage collection but gave us control over memory layout and let us compose more ops from a handful of simple ops? 
    39=== What are the main goals that Lorito should accomplish? === 
    1521=== How many layers below PIR will exist in Lorito? === 
     23PIR is currently syntactic sugar and parser magic layered over Parrot ops, which themselves are written in C.  Lorito will replace C.  Thus, PIR can remain unchanged at least at the architecture level. 
    1725=== Will Lorito have the option of compiling to C? === 
    2937=== Will Lorito have the same calling conventions as Parrot currently does? === 
     39Yes, at least from the PIR/PCC level.  One of the goals of Lorito is to replace the C/PCC boundary, such that we can use PCC throughout the system. 
    3141=== If Lorito's calling conventions differ from Parrot's current ones, what will they be? === 
    3747=== Will Lorito have a stack? === 
    3951=== Will Lorito distinguish between data types at the lowest level? === 
     53Probably not. 
    4155=== Will there be separate storage for different types of data at the lowest level? === 
    4357=== Will Lorito have a object model built-in? === 
     59Likely not. 
    4561=== Will Lorito still have the same core object model as Parrot? === 
     63Parrot's core object model will be implemented on top of Lorito. 
    4765=== Will Lorito have a single op that does method dispatch at the lowest level or it will be simulated using a series of ops? === 
    5169=== Will Lorito have some declarative syntax at the lowest level for creating classes/types? === 
    5373=== Will there be a declarative syntax at some level below HLLs for creating classes/types? === 
     75Yes, though this is not a function of Lorito. 
    5577=== Will PMCs and Objects be merged? === 
    6385=== What requirements will Lorito impose on the memory layout of objects? === 
     87Unknown; likely we can escape the tyranny of the C memory model (though we should keep in mind things like struct layout and padding where it matters on various architectures). 
    6589=== Will objects have a static vtable in addition to method dispatch? === 
    6993=== How should method dispatch work? === 
     95Not a question for Lorito. 
    7197=== Should method dispatch be tied to classes, to objects, to some vtable/prototype object associated with each object? === 
     99Yes, unless the system uses pervasive multidispatch at the lowest level.  This needs more discussion, especially with regard to the needs of HLLs. 
    73101=== Should method dispatch use strings or [ symbols]? === 
    77105=== How will Lorito support native types? === 
     107(Unknown; which native types?) 
    79109=== How will Lorito support calling C functions in existing libraries? === 
     111Lorito primitives at the lowest level will support building platform-specific call frames and calling C functions; this will be the basis of the new FFI/NCI. 
    81113=== How will Lorito support advanced control flow constructs such as coroutines, continuations, exceptions and CPS in general? === 
    85117=== What kind(s) of memory access will Lorito support?  How will memory management (automatic and manual) work? === 
     119Lorito will support direct memory access with its lowest level of primitives. 
    87121=== Will Lorito allow direct memory access/pointer arithmetic? === 
     123Yes/hopefully not. 
    89125=== Will Lorito allow manual memory allocation/deallocation? ===