mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-16 09:35:19 +00:00
max_stacksize -> max_stackdepth
This commit is contained in:
parent
c3b1400240
commit
1a09ba0ede
1 changed files with 3 additions and 3 deletions
|
@ -45,7 +45,7 @@ pub struct CodeInfo {
|
|||
}
|
||||
impl CodeInfo {
|
||||
pub fn finalize_code(mut self, optimize: u8) -> CodeObject {
|
||||
let max_stacksize = self.max_stacksize();
|
||||
let max_stackdepth = self.max_stackdepth();
|
||||
let cell2arg = self.cell2arg();
|
||||
|
||||
if optimize > 0 {
|
||||
|
@ -101,7 +101,7 @@ impl CodeInfo {
|
|||
first_line_number,
|
||||
obj_name,
|
||||
|
||||
max_stacksize,
|
||||
max_stackdepth,
|
||||
instructions: instructions.into_boxed_slice(),
|
||||
locations: locations.into_boxed_slice(),
|
||||
constants: constants.into_iter().collect(),
|
||||
|
@ -161,7 +161,7 @@ impl CodeInfo {
|
|||
}
|
||||
}
|
||||
|
||||
fn max_stacksize(&self) -> u32 {
|
||||
fn max_stackdepth(&self) -> u32 {
|
||||
let mut maxdepth = 0u32;
|
||||
let mut stack = Vec::with_capacity(self.blocks.len());
|
||||
let mut startdepths = vec![u32::MAX; self.blocks.len()];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue