RAPL

Check-in [c3abdb2183]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:fixes and removal of dead or duplicate code
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:c3abdb2183ed23497c4e06fc3f604ed6ea075532
User & Date: arnulf 2012-04-05 13:53:07
Context
2012-04-07
15:58
fix for setFromAny check-in: 7770b50f1e user: arnulf tags: trunk
2012-04-05
13:53
fixes and removal of dead or duplicate code check-in: c3abdb2183 user: arnulf tags: trunk
2012-03-31
22:48
fixes check-in: 143896aeaa user: arnulf tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to rapl_interp.js.

135
136
137
138
139
140
141

142
143
144
145
146
147
148
...
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
...
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
  intp.uplevel_dist     = 0;
  intp.upvar_dist       = 0;
  intp.in_upvar         = 0;
  intp.curr_class_info  = null;
  intp.class_type       = intp.NAMESPACE;
  intp.full_class_name  = null;
  intp.tcl_tests        = null;


  var constructor = intp.constructor;
  Interp.superclass.constructor.apply(intp, arguments);

  intp.eval_statement   = new R.EvalStatement(intp);
  intp.eval_expression  = new R.Expr(intp);

................................................................................
  },

  /* ==================== getCurrentNamespace ===================================== */
  getCurrentNamespace: function() {
    if (this.uplevel_dist == 0) {
      return this.current_namespace;
    }
    return this.namespaces[this.level-this.uplevel_dist];
  },

  /* ==================== pushNamespace ===================================== */
  pushNamespace: function(name, ns) {
    this.namespaces.push(ns);
    this.current_namespace = ns;
    this.current_namespace_name = name;
  },

  /* ==================== popNamespace ===================================== */
  popNamespace: function() {
    this.namespaces.pop();
    var idx = this.namespaces.length-1;
    var ns = this.namespaces[idx];
    this.current_namespace = ns;
    this.current_namespace_name = this.global_ns_ptr.getNamespaceName(ns);
  },

  /* ==================== setCommandNamespace ===================================== */
  setCommandNamespace: function(ns) {
    this.command_namespace = ns;
  },

  /* ==================== getCommand ===================================== */
  getCommand: function(obj_ptr, flags) {
    var intp = this;
    var cmd_name = obj_ptr.getString();
    var my_aliases = intp.aliases[intp.curr_interp];
................................................................................
     */
    v[0] = intp.unknown;
    for (var i = 0; i < argc; i++) {
      v.push(argv[i]);
    }
    /* Call it */
    intp.unknown_called++;
    ret_code = intp.eval_statement._evalObjVector(argc + 1, v, file_name_obj, linenr);
    intp.unknown_called--;
    /* Clean up */
    return ret_code;

  },

  /* ==================== getTclTests ===================================== */







>







 







|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|







135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
...
228
229
230
231
232
233
234
235





















236
237
238
239
240
241
242
...
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
  intp.uplevel_dist     = 0;
  intp.upvar_dist       = 0;
  intp.in_upvar         = 0;
  intp.curr_class_info  = null;
  intp.class_type       = intp.NAMESPACE;
  intp.full_class_name  = null;
  intp.tcl_tests        = null;
  intp.error_code       = null;

  var constructor = intp.constructor;
  Interp.superclass.constructor.apply(intp, arguments);

  intp.eval_statement   = new R.EvalStatement(intp);
  intp.eval_expression  = new R.Expr(intp);

................................................................................
  },

  /* ==================== getCurrentNamespace ===================================== */
  getCurrentNamespace: function() {
    if (this.uplevel_dist == 0) {
      return this.current_namespace;
    }
    return this.namespaces[this.frame_ptr.level-this.uplevel_dist];





















  },

  /* ==================== getCommand ===================================== */
  getCommand: function(obj_ptr, flags) {
    var intp = this;
    var cmd_name = obj_ptr.getString();
    var my_aliases = intp.aliases[intp.curr_interp];
................................................................................
     */
    v[0] = intp.unknown;
    for (var i = 0; i < argc; i++) {
      v.push(argv[i]);
    }
    /* Call it */
    intp.unknown_called++;
    ret_code = intp.eval_statement._evalObjVector(argc + 1, v, file_name_obj, line_no);
    intp.unknown_called--;
    /* Clean up */
    return ret_code;

  },

  /* ==================== getTclTests ===================================== */

Changes to rapl_namespace_obj_type.js.

630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
      namesp.interp.setResult(namesp.interp.string_obj_type.newStringObj("::", 2, "NAMESPACE_OBJ_TYPE_1"));
    } else {
      namesp.interp.setResult(interp, namesp.interp.string_obj_type.newStringObj(curr_ns_ptr.fullName, -1, "NAMESPACE_OBJ_TYPE_2"));
    }
    return namesp.OK;
  },

  /* ==================== getGlobalNamespace ===================================== */
  getGlobalNamespace: function() {
    var namesp = this;

    return namesp.interp.global_ns_ptr;
  },

  /* ==================== newNamespaceObj ================================== */
  newNamespaceObj: function(val) {
    var obj = this.interp;
    var obj_ptr = obj.empty_obj.newRaplObject();
    obj_ptr.obj_type = obj.namespace_obj_type;
    obj_ptr.bytes = null;
    obj_ptr.namespace.fullName(val);







<
<
<
<
<
<
<







630
631
632
633
634
635
636







637
638
639
640
641
642
643
      namesp.interp.setResult(namesp.interp.string_obj_type.newStringObj("::", 2, "NAMESPACE_OBJ_TYPE_1"));
    } else {
      namesp.interp.setResult(interp, namesp.interp.string_obj_type.newStringObj(curr_ns_ptr.fullName, -1, "NAMESPACE_OBJ_TYPE_2"));
    }
    return namesp.OK;
  },








  /* ==================== newNamespaceObj ================================== */
  newNamespaceObj: function(val) {
    var obj = this.interp;
    var obj_ptr = obj.empty_obj.newRaplObject();
    obj_ptr.obj_type = obj.namespace_obj_type;
    obj_ptr.bytes = null;
    obj_ptr.namespace.fullName(val);

Changes to rapl_pkg_listcmd.js.

517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
        i++;
        break;
      case interp.SORT_OPTION_INDEX:
        if (i >= (args.length - 2)) {
          interp.setResultString("\"-index\" option must be followed by list index", -1);
          return interp.ERROR;
        }
        if (interp.list_obj_type.getIndex(args[i + 1], info.index) != interp.OK) {
          return interp.ERROR;
        }
        info.indexed = 1;
        i++;
        break;
      }
    }







|







517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
        i++;
        break;
      case interp.SORT_OPTION_INDEX:
        if (i >= (args.length - 2)) {
          interp.setResultString("\"-index\" option must be followed by list index", -1);
          return interp.ERROR;
        }
        if (interp.index_obj_type.getIndex(args[i + 1], info.index) != interp.OK) {
          return interp.ERROR;
        }
        info.indexed = 1;
        i++;
        break;
      }
    }