fix stream errors
This commit is contained in:
@@ -157,7 +157,7 @@ pub fn clause_type_form(name: Atom, arity: usize) -> Option<ClauseType> {
|
|||||||
))),
|
))),
|
||||||
(atom!("keysort"), 2) => Some(ClauseType::BuiltIn(BuiltInClauseType::KeySort)),
|
(atom!("keysort"), 2) => Some(ClauseType::BuiltIn(BuiltInClauseType::KeySort)),
|
||||||
(atom!("\\=="), 2) => Some(ClauseType::BuiltIn(BuiltInClauseType::NotEq)),
|
(atom!("\\=="), 2) => Some(ClauseType::BuiltIn(BuiltInClauseType::NotEq)),
|
||||||
(atom!("read"), 1) => Some(ClauseType::BuiltIn(BuiltInClauseType::Read)),
|
(atom!("read"), 2) => Some(ClauseType::BuiltIn(BuiltInClauseType::Read)),
|
||||||
(atom!("sort"), 2) => Some(ClauseType::BuiltIn(BuiltInClauseType::Sort)),
|
(atom!("sort"), 2) => Some(ClauseType::BuiltIn(BuiltInClauseType::Sort)),
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
use crate::arena::*;
|
use crate::arena::*;
|
||||||
use crate::atom_table::*;
|
use crate::atom_table::*;
|
||||||
use crate::parser::ast::*;
|
use crate::parser::ast::*;
|
||||||
use crate::temp_v;
|
|
||||||
|
|
||||||
use crate::clause_types::*;
|
use crate::clause_types::*;
|
||||||
use crate::forms::*;
|
use crate::forms::*;
|
||||||
@@ -490,7 +489,7 @@ pub trait CallPolicy: Any + fmt::Debug {
|
|||||||
}
|
}
|
||||||
&BuiltInClauseType::Read => {
|
&BuiltInClauseType::Read => {
|
||||||
let stream = machine_st.get_stream_or_alias(
|
let stream = machine_st.get_stream_or_alias(
|
||||||
machine_st[temp_v!(1)],
|
machine_st.registers[1],
|
||||||
stream_aliases,
|
stream_aliases,
|
||||||
atom!("read"),
|
atom!("read"),
|
||||||
2,
|
2,
|
||||||
|
|||||||
@@ -1369,9 +1369,7 @@ impl MachineState {
|
|||||||
arity: usize,
|
arity: usize,
|
||||||
) -> MachineStub {
|
) -> MachineStub {
|
||||||
let stub = functor_stub(caller, arity);
|
let stub = functor_stub(caller, arity);
|
||||||
let payload = vec![stream_as_cell!(stream)];
|
let err = self.permission_error(perm, err_atom, stream_as_cell!(stream));
|
||||||
|
|
||||||
let err = self.permission_error(perm, err_atom, payload);
|
|
||||||
|
|
||||||
return self.error_form(err, stub);
|
return self.error_form(err, stub);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user