[Prev][Next][Index][Thread]

# the @measure verb

- Date: Sun, 17 Nov 1996 05:33:04 PST
- From:
- Content-Transfer-Encoding: quoted-printable
- Content-Type: text/plain; charset="iso-8859-1"

    In the latest version of the Lamba DB, when i type @measure, it returns
    traceback,
    The TRACEBACK:
    @measure object here
    Checking size of Generic Bridge (#179)...
    #80:object_bytes object_size, line 15:  Verb not found
    ... called from #4:@measure (this == #2), line 17
    (End of traceback)

    THe code for #80:object_bytes
     1:  "Algorithm:";
     2:  "  Base object takes up 13 words plus length of name.  (builtin
     props?)";
     3:  "  Each verb takes up 5 words overhead, plus length of its name,
     plus size of its code.";
     4:  "  Each property definition takes up 1 word plus length of
     property name, plus each property on the object takes up 4 words.
     (Or, 5 per defined prop, 4 per inherited prop)";
     5:  "Note: each word is four bytes.";
     6:  foo = "delimit comments above from commented out code below";
     7:  set_task_perms(this:task_perms());
     8:  o = args[1];
     9:  b = this:object_overhead_bytes(o);
    10:  vs = verbs(o);
    11:  b = b + this:verb_overhead_bytes(o);
    12:  for i in [0..length(vs) - 1]
    13:    $command_utils:suspend_if_needed(5);
    14:    vn = tostr(i);
    15:    info = verb_info(o, vn);
    16:    b = b + length(info[3]) + 1;
    17:    "Request verb code in unindented, unparenthesized form";
    18:    b = b + value_bytes(verb_code(o, vn, 0, 0));
    19:  endfor
    20:  ps = $object_utils:all_properties_suspended(o);
    21:  b = b + this:property_overhead_bytes(o, ps);
    22:  for p in (ps)
    23:    if (this:property_exists(o, p) && !is_clear_property(o, p))
    24:      $command_utils:suspend_if_needed(5);
    25:      b = b + value_bytes(o.(p));
    26:    endif
    27:  endfor
    28:  if ($object_utils:has_property(o, "object_size"))
    29:    oldsize = is_clear_property(o, "object_size") ? 0 |
     o.object_size[1];
    30:    if ($object_utils:has_property(o.owner, "size_quota"))
    31:      "Update quota cache.";
    32:      if (oldsize)
    33:        o.owner.size_quota[2] = o.owner.size_quota[2] + (b -
     oldsize);
    34:      else
    35:        o.owner.size_quota[2] = o.owner.size_quota[2] + b;
    36:        if (o.owner.size_quota[4] > 0)
    37:          o.owner.size_quota[4] = o.owner.size_quota[4] - 1;
    38:        endif
    39:      endif
    40:    endif
    41:    o.object_size = {b, time()};
    42:  endif
    43:  return b;

    Thats all the code that has to do with that traceback.

                                                    Matthew Schmidt

    Lieutenant Picard
    Officer of the FDS-Millennium
    Administrator of Titan Facility
    Office #2073
    Head of FDF Star Wars MOO

Follow-Ups:

- Re: the @measure verb

- From: "James R O'Kane" <jrost10+@pitt.edu>

- Prev: Re: @detail in Lambda 1.8.0p5
- Next: Re: the @measure verb
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index