Changes between Version 13 and Version 14 of LoritoDesignQuestions

Show
Ignore:
Timestamp:
07/28/10 04:33:28 (11 years ago)
Author:
chromatic
Comment:

filled out lots of little details

Legend:

Unmodified
Added
Removed
Modified
  • LoritoDesignQuestions

    v13 v14  
    11As [http://trac.parrot.org/parrot/wiki/Lorito 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. 
     2 
     3=== How should I think about Lorito to understand its purpose and to answer these questions? === 
     4 
     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. 
     6 
     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? 
    28 
    39=== What are the main goals that Lorito should accomplish? === 
     
    1521=== How many layers below PIR will exist in Lorito? === 
    1622 
     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. 
     24 
    1725=== Will Lorito have the option of compiling to C? === 
    1826 
     
    2937=== Will Lorito have the same calling conventions as Parrot currently does? === 
    3038 
     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. 
     40 
    3141=== If Lorito's calling conventions differ from Parrot's current ones, what will they be? === 
    3242 
     
    3747=== Will Lorito have a stack? === 
    3848 
     49Doubtful. 
     50 
    3951=== Will Lorito distinguish between data types at the lowest level? === 
     52 
     53Probably not. 
    4054 
    4155=== Will there be separate storage for different types of data at the lowest level? === 
     
    4357=== Will Lorito have a object model built-in? === 
    4458 
     59Likely not. 
     60 
    4561=== Will Lorito still have the same core object model as Parrot? === 
     62 
     63Parrot's core object model will be implemented on top of Lorito. 
    4664 
    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? === 
    5270 
     71No. 
     72 
    5373=== Will there be a declarative syntax at some level below HLLs for creating classes/types? === 
     74 
     75Yes, though this is not a function of Lorito. 
    5476 
    5577=== Will PMCs and Objects be merged? === 
     
    6385=== What requirements will Lorito impose on the memory layout of objects? === 
    6486 
     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). 
     88 
    6589=== Will objects have a static vtable in addition to method dispatch? === 
    6690 
     
    6993=== How should method dispatch work? === 
    7094 
     95Not a question for Lorito. 
     96 
    7197=== Should method dispatch be tied to classes, to objects, to some vtable/prototype object associated with each object? === 
     98 
     99Yes, unless the system uses pervasive multidispatch at the lowest level.  This needs more discussion, especially with regard to the needs of HLLs. 
    72100 
    73101=== Should method dispatch use strings or [http://en.wikipedia.org/wiki/Symbol_(Lisp) symbols]? === 
     
    77105=== How will Lorito support native types? === 
    78106 
     107(Unknown; which native types?) 
     108 
    79109=== How will Lorito support calling C functions in existing libraries? === 
     110 
     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. 
    80112 
    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? === 
    86118 
     119Lorito will support direct memory access with its lowest level of primitives. 
     120 
    87121=== Will Lorito allow direct memory access/pointer arithmetic? === 
     122 
     123Yes/hopefully not. 
    88124 
    89125=== Will Lorito allow manual memory allocation/deallocation? ===