Skip to content

Commit c16e650

Browse files
committed
rustpython-bytecode -> rustpython-compiler-core
1 parent acde8bb commit c16e650

7 files changed

Lines changed: 18 additions & 16 deletions

File tree

‎Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = ["RustPython Team"]
66
edition = "2021"
77

88
[dependencies]
9-
rustpython-bytecode = { path = "bytecode" }
9+
rustpython-compiler-core = { path = "core" }
1010
rustpython-codegen = { path = "codegen" }
1111
rustpython-parser = { path = "parser" }
1212

‎ast/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ unparse = ["rustpython-common"]
1212

1313
[dependencies]
1414
num-bigint = "0.4.3"
15-
rustpython-bytecode = { path = "../bytecode" }
15+
rustpython-compiler-core = { path = "../core" }
1616
rustpython-common = { path = "../../common", optional = true }

‎ast/src/constant.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use num_bigint::BigInt;
2-
pub use rustpython_bytecode::ConversionFlag;
2+
pub use rustpython_compiler_core::ConversionFlag;
33

44
#[derive(Debug, PartialEq)]
55
pub enum Constant {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "rustpython-bytecode"
2+
name = "rustpython-compiler-core"
33
description = "RustPython specific bytecode."
44
version = "0.1.2"
55
authors = ["RustPython Team"]
Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
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-
104
use bitflags::bitflags;
115
use bstr::ByteSlice;
126
use 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);

‎core/src/lib.rs‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#![doc(html_logo_url = "https://raw.githubusercontent.com/RustPython/RustPython/main/logo.png")]
2+
#![doc(html_root_url = "https://docs.rs/rustpython-compiler-core/")]
3+
4+
pub mod bytecode;
5+
mod mode;
6+
7+
pub use bytecode::*;
8+
pub use mode::Mode;
File renamed without changes.

0 commit comments

Comments
 (0)