RAPL

Diff
Login

Diff

Differences From Artifact [e5fd262bab]:

To Artifact [04dc153cfc]:


171
172
173
174
175
176
177
178

179
180
181
182
183
184
185
171
172
173
174
175
176
177

178
179
180
181
182
183
184
185







-
+








    /* Concatenate every token in an unique
     * object. */
    obj_ptr = stmt.interp.string_obj_type.newStringObjNoAlloc(null, 0);

    if (word_tokens == 4 && token[idx + 0].token == stmt.TOKEN_ESC && token[idx + 1].token == stmt.TOKEN_ESC
        && token[idx + 2].token == stmt.TOKEN_VAR) {
      /* May be able to do fast interpolated object -> dictSubst */
      /* May be able to do fast interpolated object  -> array */
      obj_ptr.obj_type = obj_ptr.interpolatedObjType;
      obj_ptr.twoPtrValue.ptr1(token);
      obj_ptr.twoPtrValue.ptr2(stmt.intv[idx + 2]);
      stmt.intv[idx + 2].incrRefCount();
    }

    obj_ptr.bytes = "";
209
210
211
212
213
214
215
216

217
218
219
220
221
222
223
209
210
211
212
213
214
215

216
217
218
219
220
221
222
223







-
+







    var sargv = null;
    var line_no = 0;

    stmt.interp.error_flag = 0;

    /* If the object is of type "list", with no string rep we can call
     * a specialized version of evalObj() */
    if (script_obj_ptr.isListObject(script_obj_ptr) && script_obj_ptr.bytes == null) {
    if (script_obj_ptr.isListObj() && script_obj_ptr.bytes == null) {
        return stmt.evalObjList(script_obj_ptr, stmt.interp.empty_obj, 1);
    }

    script_obj_ptr.incrRefCount();     /* Make sure it's shared. */
    script = script_obj_ptr.interp.script_obj_type.getScript(script_obj_ptr);

    /* Reset the interpreter result. This is useful to
237
238
239
240
241
242
243
244

245
246

247
248
249
250
251
252
253
237
238
239
240
241
242
243

244
245

246
247
248
249
250
251
252
253







-
+

-
+







        && script.script_object.tokens[1].obj_ptr.obj_type.name == "command"
        && script.script_object.tokens[1].obj_ptr.cmdValue.cmdPtr.isproc == 0
        && script.script_object.tokens[1].obj_ptr.cmdValue.cmdPtr.u.native.cmdProc == Jim_IncrCoreCommand
        && script.script_object.tokens[2].obj_ptr.obj_typ.name == "variable") {

      var obj_ptr = stmt.interp.getVariable(script.script_object.tokens[2].obj_ptr, stmt.TOKENNONE);

      if (obj_ptr && !obj_ptr.isShared(obj_ptr) && obj_ptrobj_type.name == "int") {
      if (obj_ptr && !obj_ptr.isShared() && obj_ptrobj_type.name == "int") {
//            JimWideValue(obj_ptr)++;
        obj_ptr.invalidateStringRep(obj_ptr);
        obj_ptr.invalidateStringRep();
        script_obj_ptr.decrRefCount();
        stmt.interp.setResult(obj_ptr);
        return stmt.OK;
      }
    }

    /* Now we have to make sure the internal repr will not be
499
500
501
502
503
504
505
506

507
508
509
510
511
512
513
499
500
501
502
503
504
505

506
507
508
509
510
511
512
513







-
+







      procname = "";
    }
    if (!procname && !file_name_obj.getStringLength()) {
      /* No useful info here */
      return;
    }

    if (file_name_obj.isShared(stmt.interp.stack_trace)) {
    if (stmt.interp.stack_trace.isShared()) {
      stmt.interp.stack_trace.decrRefCount();
      stmt.interp.stack_trace = file_name_obj.duplicateObj(stmt.interp.stack_trace);
      stmt.interp.stack_trace.incrRefCount();
    }

    /* If we have no procname but the previous element did, merge with that frame */
    if (!procname && file_name_obj.getStringLength()) {