Reduce exception copying

This commit is contained in:
Andrew Morris
2023-07-01 09:21:47 +10:00
parent 7a7ba86921
commit 7ad17b73b6
12 changed files with 18 additions and 34 deletions

View File

@@ -146,9 +146,7 @@ impl StackFrameTrait for ArrayMappingFrame {
panic!("Not appropriate for MapFrame")
}
fn catch_exception(&mut self, _exception: Val) -> bool {
return false;
}
fn catch_exception(&mut self, _exception: &mut Val) {}
fn clone_to_stack_frame(&self) -> StackFrame {
Box::new(self.clone())

View File

@@ -111,9 +111,7 @@ impl StackFrameTrait for ReduceFrame {
panic!("Not appropriate for ReduceFrame")
}
fn catch_exception(&mut self, _exception: Val) -> bool {
return false;
}
fn catch_exception(&mut self, _exception: &mut Val) {}
fn clone_to_stack_frame(&self) -> StackFrame {
Box::new(self.clone())

View File

@@ -124,9 +124,7 @@ impl StackFrameTrait for ReduceRightFrame {
panic!("Not appropriate for ReduceRightFrame")
}
fn catch_exception(&mut self, _exception: Val) -> bool {
false
}
fn catch_exception(&mut self, _exception: &mut Val) {}
fn clone_to_stack_frame(&self) -> StackFrame {
Box::new(self.clone())

View File

@@ -319,9 +319,7 @@ impl StackFrameTrait for SortFrame {
panic!("Not appropriate for SortFrame")
}
fn catch_exception(&mut self, _exception: Val) -> bool {
false
}
fn catch_exception(&mut self, _exception: &mut Val) {}
fn clone_to_stack_frame(&self) -> StackFrame {
Box::new(self.clone())