Move bytecode definitions to top level crate

This commit is contained in:
Windel Bouwman committed 2018-07-03 19:55:15 +02:00
1 parent 7a719190f3
commit 0111a8356d
4 files changed
+7 -4

No files matched your search

+2
View File
@@ -1,6 +1,8 @@
# RustPython
A Python Interpreter written in Rust :snake: :scream: :metal:.
[![Build Status](https://travis-ci.org/RustPython/RustPython.svg?branch=master)](https://travis-ci.org/RustPython/RustPython)
# Usage (Not implemented yet)
To test RustPython, do the following:
+4 -4
View File
@@ -5,14 +5,14 @@ mod python;
pub mod ast;
mod token;
mod lexer;
mod compile;
mod bytecode;
// mod compile;
// mod bytecode;
mod builtins;
mod pyobject;
mod vm;
// mod vm;
pub use self::parser::parse;
pub use self::vm::evaluate;
// pub use self::vm::evaluate;
// Mimic eval code objects:
File renamed without changes.
+1
View File
@@ -29,6 +29,7 @@ pub enum NativeType{
pub struct PyCodeObject {
pub co_consts: Vec<NativeType>,
pub co_names: Vec<String>,
// TODO: use vector of bytecode objects instead of strings?
pub co_code: Vec<(usize, String, Option<usize>)>, //size, name, args
pub co_varnames: Vec<String>,
}