Exemple #1
0
  void SunSparc7$$CREATES() {
    Proto.Fxn fxn;
    StringBuilder sb;

    fxn =
        (Proto.Fxn)
            om.bind(
                "host.platforms.SUN.SunSparc7$$create",
                new Proto.Fxn(
                    om.findStrict("host.platforms.SUN.SunSparc7.Module", "host.platforms.SUN"),
                    om.findStrict("host.platforms.SUN.SunSparc7.Instance", "host.platforms.SUN"),
                    2,
                    1,
                    false));
    fxn.addArg(0, "revision", $$T_Str, $$UNDEF);
    fxn.addArg(
        1,
        "__params",
        (Proto) om.findStrict("host.platforms.SUN.SunSparc7.Params", "host.platforms.SUN"),
        Global.newObject());
    sb = new StringBuilder();
    sb.append("host$platforms$SUN$SunSparc7$$create = function( revision, __params ) {\n");
    sb.append("var __mod = xdc.om['host.platforms.SUN.SunSparc7'];\n");
    sb.append("var __inst = xdc.om['host.platforms.SUN.SunSparc7.Instance'].$$make();\n");
    sb.append("__inst.$$bind('$package', xdc.om['host.platforms.SUN']);\n");
    sb.append("__inst.$$bind('$index', __mod.$instances.length);\n");
    sb.append("__inst.$$bind('$category', 'Instance');\n");
    sb.append("__inst.$$bind('$args', {revision:revision});\n");
    sb.append("__inst.$$bind('$module', __mod);\n");
    sb.append("__mod.$instances.$add(__inst);\n");
    sb.append("__inst.cpuCore = __mod.PARAMS.cpuCore;\n");
    sb.append("__inst.cpuCoreRevision = __mod.PARAMS.cpuCoreRevision;\n");
    sb.append("__inst.minProgUnitSize = __mod.PARAMS.minProgUnitSize;\n");
    sb.append("__inst.minDataUnitSize = __mod.PARAMS.minDataUnitSize;\n");
    sb.append("__inst.dataWordSize = __mod.PARAMS.dataWordSize;\n");
    sb.append("for (__p in __params) __inst[__p] = __params[__p];\n");
    sb.append("var save = xdc.om.$curpkg;\n");
    sb.append("xdc.om.$$bind('$curpkg', __mod.$package.$name);\n");
    sb.append("__mod.instance$meta$init.$fxn.apply(__inst, [revision]);\n");
    sb.append("xdc.om.$$bind('$curpkg', save);\n");
    sb.append("__inst.$$bless();\n");
    sb.append("return __inst;\n");
    sb.append("}\n");
    Global.eval(sb.toString());
    fxn =
        (Proto.Fxn)
            om.bind(
                "host.platforms.SUN.SunSparc7$$construct",
                new Proto.Fxn(
                    om.findStrict("host.platforms.SUN.SunSparc7.Module", "host.platforms.SUN"),
                    null,
                    3,
                    1,
                    false));
    fxn.addArg(
        0,
        "__obj",
        (Proto) om.findStrict("host.platforms.SUN.SunSparc7$$Object", "host.platforms.SUN"),
        null);
    fxn.addArg(1, "revision", $$T_Str, $$UNDEF);
    fxn.addArg(
        2,
        "__params",
        (Proto) om.findStrict("host.platforms.SUN.SunSparc7.Params", "host.platforms.SUN"),
        Global.newObject());
    sb = new StringBuilder();
    sb.append(
        "host$platforms$SUN$SunSparc7$$construct = function( __obj, revision, __params ) {\n");
    sb.append("var __mod = xdc.om['host.platforms.SUN.SunSparc7'];\n");
    sb.append("var __inst = __obj;\n");
    sb.append("__inst.$$bind('$args', {revision:revision});\n");
    sb.append("__inst.$$bind('$module', __mod);\n");
    sb.append("__mod.$objects.$add(__inst);\n");
    sb.append("__inst.cpuCore = __mod.PARAMS.cpuCore;\n");
    sb.append("__inst.cpuCoreRevision = __mod.PARAMS.cpuCoreRevision;\n");
    sb.append("__inst.minProgUnitSize = __mod.PARAMS.minProgUnitSize;\n");
    sb.append("__inst.minDataUnitSize = __mod.PARAMS.minDataUnitSize;\n");
    sb.append("__inst.dataWordSize = __mod.PARAMS.dataWordSize;\n");
    sb.append("for (__p in __params) __inst[__p] = __params[__p];\n");
    sb.append("__inst.$$bless();\n");
    sb.append("return null;\n");
    sb.append("}\n");
    Global.eval(sb.toString());
  }
Exemple #2
0
  void Platform$$CREATES() {
    Proto.Fxn fxn;
    StringBuilder sb;

    fxn =
        (Proto.Fxn)
            om.bind(
                "host.platforms.SUN.Platform$$create",
                new Proto.Fxn(
                    om.findStrict("host.platforms.SUN.Platform.Module", "host.platforms.SUN"),
                    om.findStrict("host.platforms.SUN.Platform.Instance", "host.platforms.SUN"),
                    3,
                    2,
                    false));
    fxn.addArg(0, "name", $$T_Str, $$UNDEF);
    fxn.addArg(1, "args", $$T_Obj, $$UNDEF);
    fxn.addArg(
        2,
        "__params",
        (Proto) om.findStrict("host.platforms.SUN.Platform.Params", "host.platforms.SUN"),
        Global.newObject());
    sb = new StringBuilder();
    sb.append("host$platforms$SUN$Platform$$create = function( name, args, __params ) {\n");
    sb.append("var __mod = xdc.om['host.platforms.SUN.Platform'];\n");
    sb.append("var __inst = xdc.om['host.platforms.SUN.Platform.Instance'].$$make();\n");
    sb.append("__inst.$$bind('$package', xdc.om['host.platforms.SUN']);\n");
    sb.append("__inst.$$bind('$index', __mod.$instances.length);\n");
    sb.append("__inst.$$bind('$category', 'Instance');\n");
    sb.append("__inst.$$bind('$args', {name:name, args:args});\n");
    sb.append("__inst.$$bind('$module', __mod);\n");
    sb.append("__mod.$instances.$add(__inst);\n");
    sb.append("__inst.externalMemoryMap = __mod.PARAMS.externalMemoryMap;\n");
    sb.append("__inst.customMemoryMap = __mod.PARAMS.customMemoryMap;\n");
    sb.append("__inst.renameMap = __mod.PARAMS.renameMap;\n");
    sb.append("__inst.dataMemory = __mod.PARAMS.dataMemory;\n");
    sb.append("__inst.codeMemory = __mod.PARAMS.codeMemory;\n");
    sb.append("__inst.stackMemory = __mod.PARAMS.stackMemory;\n");
    sb.append("__inst.sectMap = __mod.PARAMS.sectMap;\n");
    sb.append("__inst.remoteHost = __mod.PARAMS.remoteHost;\n");
    sb.append("for (__p in __params) __inst[__p] = __params[__p];\n");
    sb.append("var save = xdc.om.$curpkg;\n");
    sb.append("xdc.om.$$bind('$curpkg', __mod.$package.$name);\n");
    sb.append("__mod.instance$meta$init.$fxn.apply(__inst, [name, args]);\n");
    sb.append("xdc.om.$$bind('$curpkg', save);\n");
    sb.append("__inst.$$bless();\n");
    sb.append("return __inst;\n");
    sb.append("}\n");
    Global.eval(sb.toString());
    fxn =
        (Proto.Fxn)
            om.bind(
                "host.platforms.SUN.Platform$$construct",
                new Proto.Fxn(
                    om.findStrict("host.platforms.SUN.Platform.Module", "host.platforms.SUN"),
                    null,
                    4,
                    2,
                    false));
    fxn.addArg(
        0,
        "__obj",
        (Proto) om.findStrict("host.platforms.SUN.Platform$$Object", "host.platforms.SUN"),
        null);
    fxn.addArg(1, "name", $$T_Str, $$UNDEF);
    fxn.addArg(2, "args", $$T_Obj, $$UNDEF);
    fxn.addArg(
        3,
        "__params",
        (Proto) om.findStrict("host.platforms.SUN.Platform.Params", "host.platforms.SUN"),
        Global.newObject());
    sb = new StringBuilder();
    sb.append(
        "host$platforms$SUN$Platform$$construct = function( __obj, name, args, __params ) {\n");
    sb.append("var __mod = xdc.om['host.platforms.SUN.Platform'];\n");
    sb.append("var __inst = __obj;\n");
    sb.append("__inst.$$bind('$args', {name:name, args:args});\n");
    sb.append("__inst.$$bind('$module', __mod);\n");
    sb.append("__mod.$objects.$add(__inst);\n");
    sb.append("__inst.externalMemoryMap = __mod.PARAMS.externalMemoryMap;\n");
    sb.append("__inst.customMemoryMap = __mod.PARAMS.customMemoryMap;\n");
    sb.append("__inst.renameMap = __mod.PARAMS.renameMap;\n");
    sb.append("__inst.dataMemory = __mod.PARAMS.dataMemory;\n");
    sb.append("__inst.codeMemory = __mod.PARAMS.codeMemory;\n");
    sb.append("__inst.stackMemory = __mod.PARAMS.stackMemory;\n");
    sb.append("__inst.sectMap = __mod.PARAMS.sectMap;\n");
    sb.append("__inst.remoteHost = __mod.PARAMS.remoteHost;\n");
    sb.append("for (__p in __params) __inst[__p] = __params[__p];\n");
    sb.append("__inst.$$bless();\n");
    sb.append("return null;\n");
    sb.append("}\n");
    Global.eval(sb.toString());
  }