Skip to content

Commit

Permalink
Budget pool trickle charge
Browse files Browse the repository at this point in the history
  • Loading branch information
ecton committed Aug 5, 2024
1 parent 5603b6a commit fdaaba5
Show file tree
Hide file tree
Showing 5 changed files with 342 additions and 115 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: ["stable", "1.74.0"]
version: ["stable", "1.79.0"]
features: ["", "--all-features"]
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion muse-lang/src/runtime/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl BitcodeStruct {
.downcast_ref::<StructInstance>(vm.guard())
.ok_or(Fault::ValueFreed)?;
if let Some(field) = loaded.fields.get(field_name) {
if field.access < dbg!(vm.caller_access_level_by_index(module)) {
if field.access < vm.caller_access_level_by_index(module) {
return Err(Fault::Forbidden);
}
Ok(field.accessable)
Expand Down
4 changes: 1 addition & 3 deletions muse-lang/src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1173,8 +1173,6 @@ impl<'context, 'guard> VmContext<'context, 'guard> {
let module = &vm.modules[vm.frames[vm.current_frame].module.0];
if let Some(decl) = module.try_load(self.guard)?.declarations().get_mut(name) {
if decl.mutable {
let name = name.try_load(self.guard()).expect("missing symbol");
println!("Set {name} from {:?} to {value:?}", decl.value);
decl.value = value;
Ok(())
} else {
Expand Down Expand Up @@ -2137,7 +2135,7 @@ impl ExecutionError {
/// Returns this error as a [`Value`].
pub fn as_value(&self) -> Value {
match self {
ExecutionError::NoBudget => Value::Symbol(SymbolRef::from("no-budget")),
ExecutionError::NoBudget => Value::Symbol(SymbolRef::from("no_budget")),
ExecutionError::Waiting => Value::Symbol(SymbolRef::from("waiting")),
ExecutionError::Timeout => Value::Symbol(SymbolRef::from("timeout")),
ExecutionError::Exception(v) => *v,
Expand Down
Loading

0 comments on commit fdaaba5

Please sign in to comment.