Differences From Artifact [d6bfebbae7e5dfaf]:
- File        
polemy/runtime.d
- 2010-11-27 11:46:26 - part of checkin [203e4cb208] on branch trunk - fixed automatic memoization bug (whole part of the contexts are now used as the memo key) (user: kinaba) [annotate]
 
 
To Artifact [00f787cfb5f7b260]:
- File        
polemy/runtime.d
- 2010-11-27 14:23:54 - part of checkin [005474ba5b] on branch trunk - changed: not to lift _|_ (user: kinaba) [annotate]
 
 
   56          // type test                                                                  56          // type test
   57          e.addPrimitive("_isint", ValueLayer,                                          57          e.addPrimitive("_isint", ValueLayer,
   58                  (Value v){return new IntValue(cast(IntValue)v !is null);} );          58                  (Value v){return new IntValue(cast(IntValue)v !is null);} );
   59          e.addPrimitive("_isstr", ValueLayer,                                          59          e.addPrimitive("_isstr", ValueLayer,
   60                  (Value v){return new IntValue(cast(StrValue)v !is null);} );          60                  (Value v){return new IntValue(cast(StrValue)v !is null);} );
   61          e.addPrimitive("_isfun", ValueLayer,                                          61          e.addPrimitive("_isfun", ValueLayer,
   62                  (Value v){return new IntValue(cast(FunValue)v !is null);} );          62                  (Value v){return new IntValue(cast(FunValue)v !is null);} );
   63          e.addPrimitive("_isundefined", ValueLayer,                               |    63          e.addPrimitive("_isbot", ValueLayer,
   64                  (Value v){return new IntValue(cast(BottomValue)v !is null);} );       64                  (Value v){return new IntValue(cast(BottomValue)v !is null);} );
   65          e.addPrimitive("_istable", ValueLayer,                                   |    65          e.addPrimitive("_istbl", ValueLayer,
   66                  (Value v){return new IntValue(cast(Table)v !is null);} );             66                  (Value v){return new IntValue(cast(Table)v !is null);} );
   67          // table                                                                      67          // table
   68          e.addPrimitive(".", ValueLayer, (Table t, StrValue s){                        68          e.addPrimitive(".", ValueLayer, (Table t, StrValue s){
   69                  if( t.has(s.data, ValueLayer) )                                       69                  if( t.has(s.data, ValueLayer) )
   70                          return t.get(s.data, ValueLayer);                             70                          return t.get(s.data, ValueLayer);
   71                  throw genex!RuntimeException(text("table do not have the field "      71                  throw genex!RuntimeException(text("table do not have the field "
   72          });                                                                           72          });