Changeset 22051

Show
Ignore:
Timestamp:
08/28/08 02:49:31 (3 months ago)
Author:
ruoso
Message:

[smop] updating the S1PSample to the starting sketches for a mold-only output in the s1p compiler...

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • v6/smop/doc/S1PSample.txt

    r22036 r22051  
    1 // this is a sample compilation of a Perl 6 class. The example code is in src-s1p/P6Meta.pm 
     1# this is a sample compilation of a Perl 6 class. The example code is in src-s1p/P6Meta.pm 
    22 
    3 #include <stdlib.h> 
    4 #include <assert.h> 
    5 #include <stdio.h> 
    6 #include <string.h> 
    7 #include <smop.h> 
    8 #include <smop_s1p.h> 
    9 #include <smop_oo.h> 
    10 #include <smop_lowlevel.h> 
    113 
    12 void smop_dynaloader_boot(SMOP__Object* interpreter, SMOP__Object* root_namespace) { 
    13   SMOP__Object* P6Meta = SMOP_DISPATCH(interpreter, 
    14                                        SMOP__p6opaque__RI, 
    15                                        SMOP__ID__REPR_CREATE, 
    16                                        SMOP__NATIVE__capture_create(interpreter, 
    17                                                                     SMOP__p6opaque__RI, 
    18                                                                     NULL,NULL)); 
    19    
    20 } 
     4# first it needs to create the p6opaque, register in the namespace and 
     5# set the how to SMOP__S1P__PurePrototypeHow 
     6 
     7# we also create a common lexical scope, that should be used as the 
     8# outer scope of each method 
     9 
     10# then it needs to create the mold for the code. it should include the 
     11# use of the capture present in $_, as we're going to create every 
     12# method with the bindcapture signature and then going to implement 
     13# the lexical scope population in the beggining of the block. 
     14 
     15 
     16 
     17