diff --git a/src/vm/dumper.cpp b/src/vm/dumper.cpp index 7eb99469..d3cca573 100644 --- a/src/vm/dumper.cpp +++ b/src/vm/dumper.cpp @@ -235,7 +235,7 @@ static BOOL dump_data_atom(LmnPortRef port, LmnAtomRef data, LmnLinkAttr attr) { break; case LMN_HL_ATTR: { char buf[18]; - port_put_raw_s(port, EXCLAMATION_NAME); + port_put_raw_s(port, "!");// port_put_raw_s(port, HYPERLINK_NAME); if (lmn_env.show_hyperlink) { // sprintf(buf, "H%lx", sprintf(buf, "H%lu", diff --git a/src/vm/functor.cpp b/src/vm/functor.cpp index da46ba20..0cd1abc5 100644 --- a/src/vm/functor.cpp +++ b/src/vm/functor.cpp @@ -75,7 +75,7 @@ struct PredefinedFunctor predefined_functors[] = { {LMN_FALSE_FUNCTOR, FALSE, FALSE_ATOM_NAME, 1}, /* hyperlinkは第二引数にHyperLink構造体へのポインタを埋め込むため二引数として登録する */ - {LMN_EXCLAMATION_FUNCTOR, FALSE, EXCLAMATION_NAME, 2}, + {LMN_EXCLAMATION_FUNCTOR, FALSE, HYPERLINK_NAME, 2}, #ifdef USE_FIRSTCLASS_RULE {LMN_COLON_MINUS_FUNCTOR, FALSE, COLON_MINUS_ATOM_NAME, 3}, #endif diff --git a/src/vm/functor.h b/src/vm/functor.h index e29cbfc7..8d3634bb 100644 --- a/src/vm/functor.h +++ b/src/vm/functor.h @@ -125,7 +125,7 @@ extern LmnFunctorTable *lmn_functor_table; #define MEM_EQ_ATOM_NAME "mem_eq" #define TRUE_ATOM_NAME "true" #define FALSE_ATOM_NAME "false" -#define EXCLAMATION_NAME "!" +#define HYPERLINK_NAME "!jRmVnNw.8xo[muc#qX" //通常atom名として使用されないようなランダム文字列 #define LMN_IN_PROXY_FUNCTOR 0 #define LMN_OUT_PROXY_FUNCTOR 1 diff --git a/src/vm/membrane.cpp b/src/vm/membrane.cpp index 38c77260..1820aa0c 100644 --- a/src/vm/membrane.cpp +++ b/src/vm/membrane.cpp @@ -322,7 +322,7 @@ void move_symbol_atom_to_atom_tail(LmnSymbolAtomRef a, LmnSymbolAtomRef a1, a->set_next(a1); } -void mem_push_symbol_atom(LmnMembraneRef mem, LmnSymbolAtomRef atom, bool no_check_hyperlink) { +void mem_push_symbol_atom(LmnMembraneRef mem, LmnSymbolAtomRef atom) { AtomListEntry *as; LmnFunctor f = atom->get_functor(); @@ -352,7 +352,7 @@ void mem_push_symbol_atom(LmnMembraneRef mem, LmnSymbolAtomRef atom, bool no_che if (LMN_IS_PROXY_FUNCTOR(f)) { LMN_PROXY_SET_MEM(atom, mem); - } else if (LMN_FUNC_IS_HL(f) && !no_check_hyperlink) { + } else if (LMN_FUNC_IS_HL(f)) { LMN_HL_MEM(lmn_hyperlink_at_to_hl(atom)) = mem; mem->symb_atom_inc(); } else if (f != LMN_UNIFY_FUNCTOR) { @@ -4105,11 +4105,11 @@ void lmn_mem_delete_atom(LmnMembraneRef mem, LmnAtomRef atom, lmn_free_atom(atom, attr); } -void lmn_mem_push_atom(LmnMembraneRef mem, LmnAtomRef atom, LmnLinkAttr attr, bool no_check_hyperlink) { +void lmn_mem_push_atom(LmnMembraneRef mem, LmnAtomRef atom, LmnLinkAttr attr) { if (LMN_ATTR_IS_DATA_WITHOUT_EX(attr)) { mem->data_atom_inc(); } else { /* symbol atom */ - mem_push_symbol_atom(mem, (LmnSymbolAtomRef)atom, no_check_hyperlink); + mem_push_symbol_atom(mem, (LmnSymbolAtomRef)atom); } } diff --git a/src/vm/membrane.h b/src/vm/membrane.h index 6c3f211f..0a0df8b2 100644 --- a/src/vm/membrane.h +++ b/src/vm/membrane.h @@ -126,7 +126,7 @@ LmnRuleSetRef lmn_mem_get_ruleset(LmnMembraneRef m, int i); void lmn_mem_rulesets_destroy(const std::vector &rulesets); void lmn_mem_rulesets_destroy(Vector *rulesets); -void mem_push_symbol_atom(LmnMembraneRef mem, LmnSymbolAtomRef atom, bool no_check_hyperlink = false); +void mem_push_symbol_atom(LmnMembraneRef mem, LmnSymbolAtomRef atom); void lmn_mem_add_ruleset_sort(std::vector *rulesets, LmnRuleSetRef ruleset); @@ -181,7 +181,7 @@ void mem_remove_symbol_atom_with_buddy_data(LmnMembraneRef mem, LmnSymbolAtomRef atom); void lmn_mem_remove_atom(LmnMembraneRef mem, LmnAtomRef atom, LmnLinkAttr attr); void lmn_mem_delete_atom(LmnMembraneRef mem, LmnAtomRef atom, LmnLinkAttr attr); -void lmn_mem_push_atom(LmnMembraneRef mem, LmnAtomRef atom, LmnLinkAttr attr, bool no_check_hyperlink = false); +void lmn_mem_push_atom(LmnMembraneRef mem, LmnAtomRef atom, LmnLinkAttr attr); void alter_functor(LmnMembraneRef mem, LmnSymbolAtomRef atom, LmnFunctor f); void lmn_mem_add_ruleset(LmnMembraneRef mem, LmnRuleSetRef ruleset); void newlink_symbol_and_something(LmnSymbolAtomRef atom0, int pos, diff --git a/src/vm/task.cpp b/src/vm/task.cpp index 9ce01c52..94c92c3d 100644 --- a/src/vm/task.cpp +++ b/src/vm/task.cpp @@ -1739,7 +1739,7 @@ bool slim::vm::interpreter::exec_command(LmnReactCxt *rc, LmnRuleRef rule, } #endif } - lmn_mem_push_atom((LmnMembraneRef)rc->wt(memi), (LmnAtomRef)ap, attr, true); + lmn_mem_push_atom((LmnMembraneRef)rc->wt(memi), (LmnAtomRef)ap, attr); rc->reg(atomi) = {(LmnWord)ap, attr, TT_ATOM}; break; } @@ -2796,7 +2796,7 @@ bool slim::vm::interpreter::exec_command(LmnReactCxt *rc, LmnRuleRef rule, } case LMN_HL_ATTR: { char buf[16]; - port_put_raw_s(port, EXCLAMATION_NAME); + port_put_raw_s(port, HYPERLINK_NAME); sprintf(buf, "%lx", LMN_HL_ID(LMN_HL_ATOM_ROOT_HL( (LmnSymbolAtomRef)rc->wt(srcvec->get(0)))));