11//! Implement python as a virtual machine with bytecodes. This module
22//! implements bytecode structure.
33
4- #![ doc( html_logo_url = "https://raw.githubusercontent.com/RustPython/RustPython/main/logo.png" ) ]
5- #![ doc( html_root_url = "https://docs.rs/rustpython-bytecode/" ) ]
6-
7- mod mode;
8- pub use mode:: Mode ;
9-
104use bitflags:: bitflags;
115use bstr:: ByteSlice ;
126use itertools:: Itertools ;
@@ -27,7 +21,7 @@ impl Location {
2721 ///
2822 /// # Example
2923 /// ```
30- /// use rustpython_bytecode ::Location;
24+ /// use rustpython_compiler_core ::Location;
3125 /// let loc = Location::new(10, 10);
3226 /// ```
3327 pub fn new ( row : usize , column : usize ) -> Self {
@@ -433,7 +427,7 @@ bitflags! {
433427///
434428/// # Examples
435429/// ```
436- /// use rustpython_bytecode ::ConstantData;
430+ /// use rustpython_compiler_core ::ConstantData;
437431/// let a = ConstantData::Float {value: 120f64};
438432/// let b = ConstantData::Boolean {value: false};
439433/// assert_ne!(a, b);
@@ -599,8 +593,8 @@ pub enum TestOperator {
599593/// # Examples
600594///
601595/// ```
602- /// use rustpython_bytecode ::Instruction::BinaryOperation;
603- /// use rustpython_bytecode ::BinaryOperator::Add;
596+ /// use rustpython_compiler_core ::Instruction::BinaryOperation;
597+ /// use rustpython_compiler_core ::BinaryOperator::Add;
604598/// let op = BinaryOperation {op: Add};
605599/// ```
606600#[ derive( Debug , Copy , Clone , PartialEq , Eq , Serialize , Deserialize ) ]
@@ -943,7 +937,7 @@ impl Instruction {
943937 /// # Examples
944938 ///
945939 /// ```
946- /// use rustpython_bytecode ::{Instruction, Label};
940+ /// use rustpython_compiler_core ::{Instruction, Label};
947941 /// let label = Label(0xF);
948942 /// let jump_inst = Instruction::Jump {target: label};
949943 /// assert!(jump_inst.unconditional_branch())
@@ -960,7 +954,7 @@ impl Instruction {
960954 /// # Examples
961955 ///
962956 /// ```
963- /// use rustpython_bytecode ::{Instruction, Label, UnaryOperator};
957+ /// use rustpython_compiler_core ::{Instruction, Label, UnaryOperator};
964958 /// let jump_instruction = Instruction::Jump {target: Label(0xF)};
965959 /// let invert_instruction = Instruction::UnaryOperation {op: UnaryOperator::Invert};
966960 /// assert_eq!(jump_instruction.stack_effect(true), 0);
0 commit comments