introduce bespoke Heap type for in-heap partial strings
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
use crate::arena::*;
|
||||
use crate::atom_table::*;
|
||||
use crate::functor_macro::*;
|
||||
use crate::parser::ast::*;
|
||||
use crate::parser::char_reader::*;
|
||||
use crate::read::*;
|
||||
|
||||
#[cfg(feature = "http")]
|
||||
use crate::http::HttpResponse;
|
||||
use crate::machine::heap::*;
|
||||
use crate::machine::machine_errors::*;
|
||||
use crate::machine::machine_indices::*;
|
||||
use crate::machine::machine_state::*;
|
||||
@@ -476,7 +476,7 @@ impl StreamOptions {
|
||||
#[inline]
|
||||
pub fn get_alias(self) -> Option<Atom> {
|
||||
if self.has_alias() {
|
||||
Some(Atom::from(self.alias() << 3))
|
||||
Some(Atom::from(self.alias()))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
@@ -487,7 +487,7 @@ impl StreamOptions {
|
||||
self.set_has_alias(alias.is_some());
|
||||
|
||||
if let Some(alias) = alias {
|
||||
self.set_alias(alias.flat_index());
|
||||
self.set_alias(alias.index);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1953,7 +1953,7 @@ impl MachineState {
|
||||
let err = self.permission_error(
|
||||
Permission::Open,
|
||||
atom!("source_sink"),
|
||||
functor!(atom!("alias"), [atom(alias)]),
|
||||
functor!(atom!("alias"), [atom_as_cell(alias)]),
|
||||
);
|
||||
|
||||
self.error_form(err, stub)
|
||||
@@ -1961,7 +1961,7 @@ impl MachineState {
|
||||
|
||||
pub(crate) fn reposition_error(&mut self, stub_name: Atom, stub_arity: usize) -> MachineStub {
|
||||
let stub = functor_stub(stub_name, stub_arity);
|
||||
let rep_stub = functor!(atom!("reposition"), [atom(atom!("true"))]);
|
||||
let rep_stub = functor!(atom!("reposition"), [atom_as_cell((atom!("true")))]);
|
||||
let err = self.permission_error(Permission::Open, atom!("source_sink"), rep_stub);
|
||||
|
||||
self.error_form(err, stub)
|
||||
|
||||
Reference in New Issue
Block a user