mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Add support for defaults to bytecode, compiler and VM
This commit is contained in:
@@ -37,6 +37,12 @@ impl CodeObject {
|
||||
}
|
||||
}
|
||||
|
||||
bitflags! {
|
||||
pub struct FunctionOpArg: u8 {
|
||||
const HAS_DEFAULTS = 0x01;
|
||||
}
|
||||
}
|
||||
|
||||
pub type Label = usize;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
@@ -88,7 +94,9 @@ pub enum Instruction {
|
||||
JumpIfFalse {
|
||||
target: Label,
|
||||
},
|
||||
MakeFunction,
|
||||
MakeFunction {
|
||||
flags: FunctionOpArg,
|
||||
},
|
||||
CallFunction {
|
||||
count: usize,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user