Пример #1
0
        static public void setupPrimitives()
        {
            prims = new Hashtable(40);
            prims["addobj-prim"]     = new AddObjPrim();
            prims["subobj-prim"]     = new SubObjPrim();
            prims["mulobj-prim"]     = new MulObjPrim();
            prims["divobj-prim"]     = new DivObjPrim();
            prims["strcompare-prim"] = new StrcompPrim();
            prims["numcompare-prim"] = new NumcompPrim();
            prims["hash-ref-prim"]   = new HashrefPrim();
            prims["hash-set!-prim"]  = new HashsetPrim();
            prims["cons-prim"]       = new ConsPrim();
            prims["set-car-prim"]    = new SetCarPrim();
            prims["set-cdr-prim"]    = new SetCdrPrim();
            prims["car-prim"]        = new CarPrim();
            prims["cdr-prim"]        = new CdrPrim();
            prims["eq?-prim"]        = new EqPrim();
            prims["eqv?-prim"]       = new EqvPrim();
            prims["is-pair-prim"]    = new IsPairPrim();

            prims["typeof-prim"] = new TypeofPrim();

            prims["vector-prim"]         = new VectorPrim();
            prims["vector-length-prim"]  = new VecLenPrim();
            prims["vector-ref-prim"]     = new VecRefPrim();
            prims["vector-set!-prim"]    = new VecSetPrim();
            prims["string->symbol-prim"] = new StrSymPrim();
            prims["tostring-prim"]       = new TostringPrim();

            prims["get-type-prim"]     = new GetTypePrim();
            prims["new-prim"]          = new NewPrim();
            prims["call-prim"]         = new CallPrim();
            prims["call-static-prim"]  = new CallStaticPrim();
            prims["get-property-prim"] = new GetPropPrim();
            prims["set-property-prim"] = new SetPropPrim();
            prims["get-field-prim"]    = new GetFieldPrim();
            prims["set-field-prim"]    = new SetFieldPrim();
            prims["copy-debug-prim"]   = new CopyDebugPrim();
        }
Пример #2
0
        public static void setupPrimitives()
        {
            prims = new Hashtable(40);
            prims["addobj-prim"] = new AddObjPrim();
            prims["subobj-prim"] = new SubObjPrim();
            prims["mulobj-prim"] = new MulObjPrim();
            prims["divobj-prim"] = new DivObjPrim();
            prims["strcompare-prim"] = new StrcompPrim();
            prims["numcompare-prim"] = new NumcompPrim();
            prims["hash-ref-prim"] = new HashrefPrim();
            prims["hash-set!-prim"] = new HashsetPrim();
            prims["cons-prim"] = new ConsPrim();
            prims["set-car-prim"] = new SetCarPrim();
            prims["set-cdr-prim"] = new SetCdrPrim();
            prims["car-prim"] = new CarPrim();
            prims["cdr-prim"] = new CdrPrim();
            prims["eq?-prim"] = new EqPrim();
            prims["eqv?-prim"] = new EqvPrim();
            prims["is-pair-prim"] = new IsPairPrim();

            prims["typeof-prim"] = new TypeofPrim();

            prims["vector-prim"] = new VectorPrim();
            prims["vector-length-prim"] = new VecLenPrim();
            prims["vector-ref-prim"] = new VecRefPrim();
            prims["vector-set!-prim"] = new VecSetPrim();
            prims["string->symbol-prim"] = new StrSymPrim();
            prims["tostring-prim"] = new TostringPrim();

              			prims["get-type-prim" ] = new GetTypePrim();
            prims["new-prim"] = new NewPrim();
            prims["call-prim"] = new CallPrim();
            prims["call-static-prim"] = new CallStaticPrim();
            prims["get-property-prim"] = new GetPropPrim();
            prims["set-property-prim"] = new SetPropPrim();
            prims["get-field-prim"] = new GetFieldPrim();
            prims["set-field-prim"] = new SetFieldPrim();
            prims["copy-debug-prim"] = new CopyDebugPrim();
        }