RAPL

Diff
Login

Diff

Differences From Artifact [cf3d4a1ac4]:

To Artifact [b5815255f3]:


655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
    if (interp.variable_obj_type.setVariable(args[1], args[2]) != interp.OK) {
       return interp.ERROR;
    }
    interp.setResult(args[2]);
    return interp.OK;
  });

  /* ==================== command set ===================================== */
  interp.registerCommand("::setx", function (interp, args) {
    /* FIXME !!! generally!!! */
    /* not using shift() for args seems to have some performance advantage about 0.5 micro secs of about 26 micro secs!! */
//print("::set!"+args+"!");
    this.requireArgcRange(args, 2, 3, "setx", "");
    var name = args[1];
    var result;
    var val = null;
    if (args.length > 2) {
      val = args[2];
//print("SET30!"+name+"!"+typeof val+"!"+(val instanceof TclDict)+"!"+(val instanceof TclObject)+"!"+typeof val.dict_keys+"!"+val.value_type+"!");
      interp.setVar(name, val);
    }
    if (val != null) {
      result =  val;
    } else {
      result = interp.getVarValue(name);
    }
    return result;
  });

  /* ==================== command source ===================================== */
  interp.registerCommand("::source", function (interp, args) {
    args.shift();
    this.requireExactArgc(args, 1, "source", "");
    var source_file = args.shift();
    return this.Source(interp, source_file);
  });







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







655
656
657
658
659
660
661






















662
663
664
665
666
667
668
    if (interp.variable_obj_type.setVariable(args[1], args[2]) != interp.OK) {
       return interp.ERROR;
    }
    interp.setResult(args[2]);
    return interp.OK;
  });























  /* ==================== command source ===================================== */
  interp.registerCommand("::source", function (interp, args) {
    args.shift();
    this.requireExactArgc(args, 1, "source", "");
    var source_file = args.shift();
    return this.Source(interp, source_file);
  });