merge with master

This commit is contained in:
Mark Thom
2020-05-03 18:49:15 -06:00
parent b8400e0c92
commit b5368207d6
18 changed files with 852 additions and 166 deletions

View File

@@ -23,6 +23,7 @@ use std::collections::{BTreeMap, VecDeque};
use std::convert::TryFrom;
use std::fmt;
use std::mem;
use std::net::TcpListener;
use std::ops::{Add, AddAssign, Sub, SubAssign};
use std::rc::Rc;
@@ -69,6 +70,7 @@ pub enum Addr {
StackCell(usize, usize),
Str(usize),
Stream(usize),
TcpListener(usize),
Usize(usize),
}
@@ -230,7 +232,7 @@ impl Addr {
Addr::Lis(_) | Addr::PStrLocation(..) | Addr::Str(_) => {
Some(TermOrderCategory::Compound)
}
Addr::CutPoint(_) | Addr::Stream(_) => {
Addr::CutPoint(_) | Addr::Stream(_) | Addr::TcpListener(_) => {
None
}
}
@@ -388,6 +390,7 @@ pub enum HeapCellValue {
Rational(Rc<Rational>),
PartialString(PartialString, bool), // the partial string, a bool indicating whether it came from a Constant.
Stream(Stream),
TcpListener(TcpListener),
}
impl HeapCellValue {
@@ -410,6 +413,9 @@ impl HeapCellValue {
HeapCellValue::Stream(_) => {
Addr::Stream(focus)
}
HeapCellValue::TcpListener(_) => {
Addr::TcpListener(focus)
}
}
}
@@ -440,6 +446,9 @@ impl HeapCellValue {
&HeapCellValue::Stream(_) => {
HeapCellValue::Stream(Stream::null_stream())
}
&HeapCellValue::TcpListener(_) => {
HeapCellValue::Atom(clause_name!("$socket_server"), None)
}
}
}
}