Skip to content

Commit

Permalink
More TODO rationalization
Browse files Browse the repository at this point in the history
  • Loading branch information
rdaum committed Feb 10, 2024
1 parent 8f16d9b commit b39aa12
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
15 changes: 7 additions & 8 deletions crates/kernel/src/vm/vm_execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,12 @@ impl VM {
f.push(v_err(*val));
}
Op::Imm(slot) => {
// TODO(rdaum): it's questionable whether this optimization actually will be of much use
// on a modern CPU as it could cause branch prediction misses. We should
// benchmark this. its purpose is to avoid pointless stack ops for literals
// that are never used (e.g. comments).
// what might be better is an "optimization pass" that removes these prior to
// execution, but then we'd have to cache them, etc. etc.
// it's questionable whether this optimization actually will be of much use
// on a modern CPU as it could cause branch prediction misses. We should
// benchmark this. its purpose is to avoid pointless stack ops for literals
// that are never used (e.g. comments).
// what might be better is an "optimization pass" that removes these prior to
// execution, but then we'd have to cache them, etc. etc.
match f.lookahead() {
Some(Op::Pop) => {
// skip
Expand All @@ -344,7 +344,7 @@ impl VM {
return self.push_error(state, E_TYPE);
};

// TODO(rdaum): quota check SVO_MAX_LIST_CONCAT -> E_QUOTA
// TODO(rdaum): quota check SVO_MAX_LIST_CONCAT -> E_QUOTA in list add and append
let result = list.push(tail);
f.poke(0, result);
}
Expand All @@ -363,7 +363,6 @@ impl VM {
return self.push_error(state, E_TYPE);
};

// TODO(rdaum): quota check SVO_MAX_LIST_CONCAT -> E_QUOTA
let new_list = list.append(tail);
f.poke(0, new_list);
}
Expand Down
3 changes: 2 additions & 1 deletion crates/values/src/model/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ pub struct NarrativeEvent {
pub enum Event {
/// The typical "something happened" descriptive event.
TextNotify(String),
// TODO(rdaum): other events that might happen here would be things like (local) "object moved" or "object
// TODO(rdaum): Other Event types on Session stream
// other events that might happen here would be things like (local) "object moved" or "object
// created."
}

Expand Down
1 change: 0 additions & 1 deletion crates/values/src/model/world_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ pub trait WorldState {
fn recycle_object(&mut self, perms: Objid, obj: Objid) -> Result<(), WorldStateError>;

/// Return the highest used object # in the system.
// TODO(rdaum): long run want to get rid of this, and deprecate the built-in.
fn max_object(&self, perms: Objid) -> Result<Objid, WorldStateError>;

/// Move an object to a new location.
Expand Down

0 comments on commit b39aa12

Please sign in to comment.