mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-16 01:25:25 +00:00
Remove incognito from vm
This commit is contained in:
parent
ed09df8223
commit
9ac8969e0d
1 changed files with 2 additions and 11 deletions
|
@ -39,17 +39,10 @@ pub struct CompileOpts {
|
|||
/// How optimized the bytecode output should be; any optimize > 0 does
|
||||
/// not emit assert statements
|
||||
pub optimize: u8,
|
||||
/// Whether introspection on defined functions/other items should be allowed;
|
||||
/// e.g. when true, `func.__globals__` throws an error (where func is a function defined
|
||||
/// in an incognito context)
|
||||
pub incognito: bool,
|
||||
}
|
||||
impl Default for CompileOpts {
|
||||
fn default() -> Self {
|
||||
CompileOpts {
|
||||
optimize: 0,
|
||||
incognito: false,
|
||||
}
|
||||
CompileOpts { optimize: 0 }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -188,9 +181,7 @@ impl<O: OutputStream> Compiler<O> {
|
|||
}
|
||||
}
|
||||
|
||||
fn push_output(&mut self, mut code: CodeObject) {
|
||||
code.flags
|
||||
.set(bytecode::CodeFlags::INCOGNITO, self.opts.incognito);
|
||||
fn push_output(&mut self, code: CodeObject) {
|
||||
self.output_stack.push(code.into());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue