fix scripts
This commit is contained in:
parent
f039a5d688
commit
9b89e6fd92
2046
C/arrays.c
2046
C/arrays.c
File diff suppressed because it is too large
Load Diff
57
C/flags.c
57
C/flags.c
@ -51,8 +51,8 @@ static Int current_prolog_flag(USES_REGS1);
|
||||
static Int set_prolog_flag(USES_REGS1);
|
||||
|
||||
#include "Yatom.h"
|
||||
#include "yapio.h"
|
||||
#include "eval.h"
|
||||
#include "yapio.h"
|
||||
|
||||
#define YAP_FLAG(ID, NAME, WRITABLE, DEF, INIT, HELPER) \
|
||||
{ NAME, WRITABLE, DEF, INIT, HELPER }
|
||||
@ -199,7 +199,7 @@ static bool getenc(Term inp) {
|
||||
Yap_Error(TYPE_ERROR_ATOM, inp, "get_encoding");
|
||||
return false;
|
||||
}
|
||||
return Yap_unify(inp, MkAtomTerm(Yap_LookupAtom(enc_name(LOCAL_encoding))));
|
||||
return Yap_unify(inp, MkAtomTerm(Yap_LookupAtom(enc_name(LOCAL_encoding))));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -585,10 +585,10 @@ static void initFlag(flag_info *f, int fnum, bool global) {
|
||||
|
||||
static bool executable(Term inp) {
|
||||
CACHE_REGS
|
||||
if (GLOBAL_argv && GLOBAL_argv[0]) {
|
||||
if (!Yap_AbsoluteFile(GLOBAL_argv[0], LOCAL_FileNameBuf,true))
|
||||
return false;
|
||||
} else
|
||||
if (GLOBAL_argv && GLOBAL_argv[0]) {
|
||||
if (!Yap_AbsoluteFile(GLOBAL_argv[0], LOCAL_FileNameBuf, true))
|
||||
return false;
|
||||
} else
|
||||
strncpy(LOCAL_FileNameBuf, Yap_FindExecutable(), YAP_FILENAME_MAX - 1);
|
||||
|
||||
return Yap_unify(MkAtomTerm(Yap_LookupAtom(LOCAL_FileNameBuf)), inp);
|
||||
@ -1012,19 +1012,18 @@ bool setYapFlag(Term tflag, Term t2) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Term Yap_UnknownFlag(Term mod) {
|
||||
if (mod == PROLOG_MODULE)
|
||||
mod = TermProlog;
|
||||
if (mod == PROLOG_MODULE)
|
||||
mod = TermProlog;
|
||||
|
||||
ModEntry *fv = Yap_GetModuleEntry(mod);
|
||||
ModEntry *fv = Yap_GetModuleEntry(mod);
|
||||
if (fv == NULL)
|
||||
fv = Yap_GetModuleEntry(TermUser);
|
||||
if (fv->flags & UNKNOWN_ERROR)
|
||||
return TermError;
|
||||
if (fv->flags & UNKNOWN_WARNING)
|
||||
return TermWarning;
|
||||
return TermFail;
|
||||
fv = Yap_GetModuleEntry(TermUser);
|
||||
if (fv->flags & UNKNOWN_ERROR)
|
||||
return TermError;
|
||||
if (fv->flags & UNKNOWN_WARNING)
|
||||
return TermWarning;
|
||||
return TermFail;
|
||||
}
|
||||
|
||||
Term getYapFlag(Term tflag) {
|
||||
@ -1254,10 +1253,10 @@ static bool setInitialValue(bool bootstrap, flag_func f, const char *s,
|
||||
if (bootstrap) {
|
||||
return false;
|
||||
}
|
||||
CACHE_REGS
|
||||
encoding_t encoding = ENC_ISO_UTF8;
|
||||
t0 = Yap_StringToTerm(s, strlen(s) + 1, &encoding, GLOBAL_MaxPriority,
|
||||
NULL);
|
||||
CACHE_REGS
|
||||
encoding_t encoding = ENC_ISO_UTF8;
|
||||
t0 =
|
||||
Yap_StringToTerm(s, strlen(s) + 1, &encoding, GLOBAL_MaxPriority, NULL);
|
||||
if (!t0)
|
||||
return false;
|
||||
if (IsAtomTerm(t0) || IsIntTerm(t0)) {
|
||||
@ -1275,10 +1274,10 @@ static bool setInitialValue(bool bootstrap, flag_func f, const char *s,
|
||||
}
|
||||
|
||||
#define PROLOG_FLAG_PROPERTY_DEFS() \
|
||||
PAR("access", isaccess, PROLOG_FLAG_PROPERTY_ACCESS, "read_write"), \
|
||||
PAR("type", isground, PROLOG_FLAG_PROPERTY_TYPE, "term"), \
|
||||
PAR("access", isaccess, PROLOG_FLAG_PROPERTY_ACCESS, "read_write") \
|
||||
, PAR("type", isground, PROLOG_FLAG_PROPERTY_TYPE, "term"), \
|
||||
PAR("scope", flagscope, PROLOG_FLAG_PROPERTY_SCOPE, "global"), \
|
||||
PAR("keep", booleanFlag, PROLOG_FLAG_PROPERTY_KEEP, "false"), \
|
||||
PAR("keep", booleanFlag, PROLOG_FLAG_PROPERTY_KEEP, "false"), \
|
||||
PAR(NULL, ok, PROLOG_FLAG_PROPERTY_END, 0)
|
||||
|
||||
#define PAR(x, y, z, w) z
|
||||
@ -1306,7 +1305,7 @@ do_prolog_flag_property(Term tflag,
|
||||
args = Yap_ArgList2ToVector(opts, prolog_flag_property_defs,
|
||||
PROLOG_FLAG_PROPERTY_END);
|
||||
if (args == NULL) {
|
||||
Yap_Error( LOCAL_Error_TYPE, LOCAL_Error_Term, NULL );
|
||||
Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, NULL);
|
||||
return false;
|
||||
}
|
||||
if (!IsAtomTerm(tflag)) {
|
||||
@ -1345,8 +1344,8 @@ do_prolog_flag_property(Term tflag,
|
||||
rc = rc &&
|
||||
Yap_unify(TermFloat, args[PROLOG_FLAG_PROPERTY_TYPE].tvalue);
|
||||
else
|
||||
rc =
|
||||
rc && Yap_unify(TermTerm, args[PROLOG_FLAG_PROPERTY_TYPE].tvalue);
|
||||
rc = rc &&
|
||||
Yap_unify(TermTerm, args[PROLOG_FLAG_PROPERTY_TYPE].tvalue);
|
||||
break;
|
||||
case PROLOG_FLAG_PROPERTY_KEEP:
|
||||
rc = rc && false;
|
||||
@ -1467,8 +1466,8 @@ static Int do_create_prolog_flag(USES_REGS1) {
|
||||
|
||||
args = Yap_ArgList2ToVector(opts, prolog_flag_property_defs,
|
||||
PROLOG_FLAG_PROPERTY_END);
|
||||
if (args == NULL) {
|
||||
Yap_Error( LOCAL_Error_TYPE, LOCAL_Error_Term, NULL );
|
||||
if (args == NULL) {
|
||||
Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, NULL);
|
||||
return false;
|
||||
}
|
||||
fv = GetFlagProp(AtomOfTerm(tflag));
|
||||
@ -1542,7 +1541,7 @@ void Yap_InitFlags(bool bootstrap) {
|
||||
}
|
||||
GLOBAL_flagCount++;
|
||||
f++;
|
||||
}
|
||||
}
|
||||
LOCAL_flagCount = 0;
|
||||
int nflags = sizeof(local_flags_setup) / sizeof(flag_info);
|
||||
if (bootstrap)
|
||||
|
570
H/ATOMS
Normal file
570
H/ATOMS
Normal file
@ -0,0 +1,570 @@
|
||||
//
|
||||
// Fields are TAB spaced
|
||||
// Atoms are of the form A Name Normal,FullLookup String
|
||||
// Functors are of the form F Name Atom Arity
|
||||
// Terms are of the form T FullName Atom
|
||||
//
|
||||
// This is supported by YAP directly
|
||||
// A Dot N "."
|
||||
//
|
||||
A 3Dots N "..."
|
||||
A Abol F "$abol"
|
||||
A Access N "access"
|
||||
A AfInet N "AF_INET"
|
||||
A AfLocal N "AF_LOCAL"
|
||||
A AfUnix N "AF_UNIX"
|
||||
A Alarm F "$alarm"
|
||||
A Alias N "alias"
|
||||
A All N "all"
|
||||
A AltNot N "not"
|
||||
A Answer N "answer"
|
||||
A Any N "any"
|
||||
A Append N "append"
|
||||
A Arg N "arg"
|
||||
A Array F "$array"
|
||||
A ArrayAccess F "$array_arg"
|
||||
A ArrayOverflow N "array_overflow"
|
||||
A ArrayType N "array_type"
|
||||
A Arrow N "->"
|
||||
A AttributedModule N "attributes_module"
|
||||
A DoubleArrow N "-->"
|
||||
A Assert N ":-"
|
||||
A EmptyBrackets N "()"
|
||||
A EmptySquareBrackets N "[]"
|
||||
A EmptyCurlyBrackets N "{}"
|
||||
A Asserta N "asserta"
|
||||
A AssertaStatic N "asserta_static"
|
||||
A Assertz N "assertz"
|
||||
A AssertzStatic N "assertz_static"
|
||||
A At N "at"
|
||||
A Atom N "atom"
|
||||
A Atomic N "atomic"
|
||||
A Att F "$att"
|
||||
A Att1 N "att"
|
||||
A AttDo F "$att_do"
|
||||
A Attributes N "attributes"
|
||||
A B F "$last_choice_pt"
|
||||
A Batched N "batched"
|
||||
A Between N "between"
|
||||
A Binary N "binary"
|
||||
A BigNum N "big_num"
|
||||
A BinaryStream N "binary_stream"
|
||||
A Boolean N "boolean"
|
||||
A Braces N "{}"
|
||||
A Break F "$break"
|
||||
A Byte N "byte"
|
||||
A CArith F "$c_arith"
|
||||
A Call N "call"
|
||||
A CallAndRetryCounter N "call_and_retry_counter"
|
||||
A CallCounter N "call_counter"
|
||||
A Callable N "callable"
|
||||
A Catch F "$catch"
|
||||
A ChangeModule F "$change_module"
|
||||
A Char N "char"
|
||||
A Charsio N "charsio"
|
||||
A Character N "character"
|
||||
A CharacterCode N "character_code"
|
||||
A Chars N "chars"
|
||||
A Charset N "charset"
|
||||
A ChType F "$char_type"
|
||||
A CleanCall F "$clean_call"
|
||||
A Colon N ":"
|
||||
A CodeSpace N "code_space"
|
||||
A Codes N "codes"
|
||||
A CoInductive N "coinductive"
|
||||
A Comma N ","
|
||||
A CommentHook N "comment_hook"
|
||||
A Compact N "compact"
|
||||
A Compound N "compound"
|
||||
A ConsistencyError N "consistency_error"
|
||||
A Consult N "consult"
|
||||
A ConsultOnBoot F "$consult_on_boot"
|
||||
A Context N "context"
|
||||
A Cputime N "cputime"
|
||||
A Create N "create"
|
||||
A Creep F "$creep"
|
||||
A CryptAtoms N "crypt_atoms"
|
||||
A Curly N "{}"
|
||||
A Csult F "$csult"
|
||||
A CurrentModule F "$current_module"
|
||||
A Cut N "!"
|
||||
A CutBy F "$cut_by"
|
||||
A DAbort F "$abort"
|
||||
A DBLoad F "$db_load"
|
||||
A DBREF N "DBRef"
|
||||
A DBReference N "db_reference"
|
||||
A DBTerm N "db_term"
|
||||
A DBref F "$dbref"
|
||||
A DInteger F "$integer"
|
||||
A DebugMeta F "$debug_meta"
|
||||
A DebuggerInput N "debugger_input"
|
||||
A Dec10 N "dec10"
|
||||
A Default N "default"
|
||||
A DevNull N "/dev/null"
|
||||
A Diff N "\\="
|
||||
A Directory N "disrectorys"
|
||||
A Discontiguous N "discontiguous"
|
||||
A DiscontiguousWarnings N "discontiguous_warnings"
|
||||
A Dollar F "$"
|
||||
A DoLogUpdClause F "$do_log_upd_clause"
|
||||
A DoLogUpdClause0 F "$do_log_upd_clause0"
|
||||
A DoLogUpdClauseErase F "$do_log_upd_clause_erase"
|
||||
A DollarU F "$u"
|
||||
A DollarUndef F "$undef"
|
||||
A DomainError N "domain_error"
|
||||
A DoStaticClause F "$do_static_clause"
|
||||
A Dots N "dots"
|
||||
A DOUBLE F "Double"
|
||||
A DoubleSlash F "//"
|
||||
A E N "e"
|
||||
A EOFBeforeEOT N "end_of_file_found_before_end_of_term"
|
||||
A EQ N "="
|
||||
A EmptyAtom N ""
|
||||
A Encoding N "encoding"
|
||||
A EndOfStream N "$end_of_stream"
|
||||
A Eof N "end_of_file"
|
||||
A EOfCode N "eof_code"
|
||||
A Eq N "="
|
||||
A Error N "error"
|
||||
A Exception N "exception"
|
||||
A Extensions N "extensions"
|
||||
A Evaluable N "evaluable"
|
||||
A EvaluationError N "evaluation_error"
|
||||
A Executable N "executable"
|
||||
A Execute N "execute"
|
||||
A ExecAnswers N "exec_answers"
|
||||
A ExecuteInMod F "$execute_in_mod"
|
||||
A ExecuteWithin F "$execute_within"
|
||||
A ExecuteWoMod F "$execute_wo_mod"
|
||||
A Exist N "exist"
|
||||
A Exit N "exit"
|
||||
A ExistenceError N "existence_error"
|
||||
A ExoClause F "$exo_clause"
|
||||
A ExpectedNumber N "expected_number_syntax"
|
||||
A Expand N "expand"
|
||||
A ExtendFileSearchPath F "$extend_file_search_path"
|
||||
A Extendsions N "extensionh"
|
||||
A FB N "fb"
|
||||
A Fail N "fail"
|
||||
A False N "false"
|
||||
A Fast F "$fast"
|
||||
A FastFail N "fast_fail"
|
||||
A FileErrors N "file_errors"
|
||||
A Fileerrors N "fileerrors"
|
||||
A FileType N "file_type"
|
||||
A First N "first"
|
||||
A Float N "float"
|
||||
A FloatFormat N "\%.15g"
|
||||
A FloatOverflow N "float_overflow"
|
||||
A FloatUnderflow N "float_underflow"
|
||||
A Format N "format"
|
||||
A FormatAt F "$format@"
|
||||
A Full N "full"
|
||||
A Functor N "functor"
|
||||
A GT N ">"
|
||||
A GVar N "var"
|
||||
A Gc F "$gc"
|
||||
A GcMargin F "$gc_margin"
|
||||
A GcTrace F "$gc_trace"
|
||||
A GcVerbose F "$gc_verbose"
|
||||
A GcVeryVerbose F "$gc_very_verbose"
|
||||
A GeneratePredInfo F "$generate_pred_info"
|
||||
A Getwork F "$getwork"
|
||||
A GetworkSeq F "$getwork_seq"
|
||||
A Glob N "glob"
|
||||
A Global N "global"
|
||||
A GlobalSp N "global_sp"
|
||||
A GlobalTrie N "global_trie"
|
||||
A GoalExpansion N "goal_expansion"
|
||||
A Hat N "^"
|
||||
A HERE N "\n <====HERE====> \n"
|
||||
A HandleThrow F "$handle_throw"
|
||||
A Heap N "heap"
|
||||
A HeapUsed N "heapused"
|
||||
A HugeInt N "huge_int"
|
||||
A IDB N "idb"
|
||||
A IOMode N "io_mode"
|
||||
A I N "i"
|
||||
A Id N "id"
|
||||
A Ignore N "ignore"
|
||||
A Inf N "inf"
|
||||
A Infinity N "infinity"
|
||||
A InitGoal F "$init_goal"
|
||||
A InitProlog F "$init_prolog"
|
||||
A InStackExpansion N "in stack expansion"
|
||||
A Input N "input"
|
||||
A InstantiationError N "instantiation_error"
|
||||
A Int N "int"
|
||||
A IntOverflow N "int_overflow"
|
||||
A Integer N "integer"
|
||||
A InternalCompilerError N "internal_compiler_error"
|
||||
A Is N "is"
|
||||
A J N "j"
|
||||
A Key N "key"
|
||||
A LDLibraryPath N "LD_LIBRARY_PATH"
|
||||
A LONGINT N "LongInt"
|
||||
A LOOP N "_LOOP_"
|
||||
A LoopStream N "loop_stream"
|
||||
A LT N "<"
|
||||
A LastExecuteWithin F "$last_execute_within"
|
||||
A Leash F "$leash"
|
||||
A Least N "least"
|
||||
A Length F "length"
|
||||
A List N "list"
|
||||
A Line N "line"
|
||||
A Live F "$live"
|
||||
A LoadAnswers N "load_answers"
|
||||
A Local N "local"
|
||||
A LocalSp N "local_sp"
|
||||
A LocalTrie N "local_trie"
|
||||
A Max N "max"
|
||||
A Maximum N "maximum"
|
||||
A MaxArity N "max_arity"
|
||||
A MaxFiles N "max_files"
|
||||
A MegaClause F "$mega_clause"
|
||||
A MetaCall F "$call"
|
||||
A MfClause F "$mf_clause"
|
||||
A Min N "min"
|
||||
A Minimum N "minimum"
|
||||
A Minus N "-"
|
||||
A Modify N "modify"
|
||||
A Module N "module"
|
||||
A Most N "most"
|
||||
A Multi N "multi"
|
||||
A MultiFile F "$mf"
|
||||
A Multiple F "multiple"
|
||||
A Mutable N "mutable"
|
||||
A MutableVariable F "$mutable_variable"
|
||||
A Mutex N "mutex"
|
||||
A MyddasDB F "$myddas_db"
|
||||
A MyddasGoal F "$myddas_goal"
|
||||
A MyddasHost F "$myddas_host"
|
||||
A MyddasPass F "$myddas_pass"
|
||||
A MyddasUser F "$myddas_user"
|
||||
A MyddasVersionName F "$myddas_version_name"
|
||||
A Nan N "nan"
|
||||
A Nb N "nb"
|
||||
A NbTerm N "nb_term"
|
||||
A New N "new"
|
||||
A NewLine N "nl"
|
||||
A Nl N "nl"
|
||||
A NoEffect N "no_effect"
|
||||
A NoMemory N "no_memory"
|
||||
A None N "none"
|
||||
A NonEmptyList N "non_empty_list"
|
||||
A Not N "\\+"
|
||||
A NotImplemented N "not_implemented"
|
||||
A NotLessThanZero N "not_less_than_zero"
|
||||
A NotNewline N "not_newline"
|
||||
A NotZero N "not_zero"
|
||||
A Number N "number"
|
||||
A Obj N "o__bj__"
|
||||
A Off N "off"
|
||||
A Offline N "offline"
|
||||
A On N "on"
|
||||
A Online N "online"
|
||||
A Open N "open"
|
||||
A OperatingSystemError N "operating_SYSTEM_ERROR_INTERNAL"
|
||||
A OperatingSystemSupport N "operating_system_support"
|
||||
A Operator N "operator"
|
||||
A OperatorPriority N "operator_priority"
|
||||
A OperatorSpecifier N "operator_specifier"
|
||||
A Opt N "opt"
|
||||
A Otherwise N "otherwise"
|
||||
A OutOfAttvarsError N "out_of_attvars_error"
|
||||
A OutOfAuxspaceError N "out_of_auxspace_error"
|
||||
A OutOfHeapError N "out_of_heap_error"
|
||||
A OutOfRange N "out_of_range"
|
||||
A OutOfStackError N "out_of_stack_error"
|
||||
A OutOfTrailError N "out_of_trail_error"
|
||||
A Output N "output"
|
||||
A Parameter N "parameter"
|
||||
A PrologCommonsDir N "prolog_commons_directory"
|
||||
A Past N "past"
|
||||
A PastEndOfStream N "past_end_of_stream"
|
||||
A PermissionError N "permission_error"
|
||||
A Pi N "pi"
|
||||
A Pipe N "pipe"
|
||||
A Plus N "+"
|
||||
A Pointer N "pointer"
|
||||
A Portray F "portray"
|
||||
A PredicateIndicator N "predicate_indicator"
|
||||
A Primitive N "primitive"
|
||||
A PrintMessage N "print_message"
|
||||
A PrivateProcedure N "private_procedure"
|
||||
A Procedure N "procedure"
|
||||
A Profile F "$profile"
|
||||
A Prolog N "prolog"
|
||||
A ProtectStack F "$protect_stack"
|
||||
A Qly N "qly"
|
||||
A Query N "?-"
|
||||
A Queue N "queue"
|
||||
A Quiet N "quiet"
|
||||
A Radix N "radix"
|
||||
A Random N "random"
|
||||
A Range N "range"
|
||||
A RDiv N "rdiv"
|
||||
A Read N "read"
|
||||
A ReadOnly N "read_only"
|
||||
A ReadWrite N "read_write"
|
||||
A Readutil N "readutil"
|
||||
A Reconsult N "reconsult"
|
||||
A RecordedP F "$recordep"
|
||||
A RecordedWithKey F "$recorded_with_key"
|
||||
A RedefineWarnings N "redefine_warnings"
|
||||
A RedoFreeze F "$redo_freeze"
|
||||
A RefoundVar F "$I_FOUND_THE_VARIABLE_AGAIN"
|
||||
A RelativeTo F "relative_to"
|
||||
A Repeat N "repeat"
|
||||
A RepeatSpace N "repeat "
|
||||
A Reposition N "reposition"
|
||||
A RepresentationError N "representation_error"
|
||||
A Reset N "reset"
|
||||
A Resize N "resize"
|
||||
A ResourceError N "resource_error"
|
||||
A RestoreRegs F "$restore_regs"
|
||||
A Retry N "retry"
|
||||
A RetryCounter N "retry_counter"
|
||||
A RTree N "rtree"
|
||||
A Safe F "$safe"
|
||||
A SafeCallCleanup F "$safe_call_cleanup"
|
||||
A Same N "=="
|
||||
A Semic N ";"
|
||||
A ShiftCountOverflow N "shift_count_overflow"
|
||||
A SigAlarm N "sig_alarm"
|
||||
A SigBreak N "sig_break"
|
||||
A SigCreep N "sig_creep"
|
||||
A SigDebug N "sig_debug"
|
||||
A SigDelayCreep N "sig_delay_creep"
|
||||
A SigFPE N "sig_fpe"
|
||||
A SigHup N "sig_hup"
|
||||
A SigInt N "sig_int"
|
||||
A SigIti N "sig_iti"
|
||||
A SigPending F "$sig_pending"
|
||||
A SigPipe N "sig_pipe"
|
||||
A SigStackDump N "sig_stack_dump"
|
||||
A SigStatistics N "sig_statistics"
|
||||
A SigTrace N "sig_trace"
|
||||
A SigUsr1 N "sig_usr1"
|
||||
A SigUsr2 N "sig_usr2"
|
||||
A SigVTAlarm N "sig_vtalarm"
|
||||
A SigWakeUp N "sig_wake_up"
|
||||
A Silent N "Silent"
|
||||
A Single N "single"
|
||||
A SingleVarWarnings N "single_var_warnings"
|
||||
A Singleton N "singleton"
|
||||
A Slash N "/"
|
||||
A Socket N "socket"
|
||||
A Solutions N "solutions"
|
||||
A Source N "source"
|
||||
A SourceSink N "source_sink"
|
||||
A Spy F "$spy"
|
||||
A Stack N "stack"
|
||||
A StackFree N "stackfree"
|
||||
A StartupSavedState F "$startup_saved_state"
|
||||
A StaticClause F "$static_clause"
|
||||
A StaticProcedure N "static_procedure"
|
||||
A Stream F "$stream"
|
||||
A SWIStream F "<stream>"
|
||||
A VStream N "stream"
|
||||
A Streams N "streams"
|
||||
A StreamOrAlias N "stream_or_alias"
|
||||
A StreamPos F "$stream_position"
|
||||
A StreamPosition N "stream_position"
|
||||
A String N "string"
|
||||
A StyleCheck N "style_check"
|
||||
A STRING F "String"
|
||||
A Swi N "swi"
|
||||
A SymbolChar N "symbol_char"
|
||||
A SyntaxError N "syntax_error"
|
||||
A SyntaxErrors N "syntax_errors"
|
||||
A SyntaxErrorHandler N "syntax_error_handler"
|
||||
A System N "system"
|
||||
A SystemError N "SYSTEM_ERROR_INTERNAL"
|
||||
A SystemLibraryDir N "system_library_directory"
|
||||
A T N "t"
|
||||
A Term N "term"
|
||||
A TermExpansion N "term_expansion"
|
||||
A Terms N "terms"
|
||||
A Text N "text"
|
||||
A TextStream N "text_stream"
|
||||
A Thread N "thread"
|
||||
A Threads N "threads"
|
||||
A Throw N "throw"
|
||||
A TimeOutSpec N "time_out_spec"
|
||||
A TimeoutError N "timeout_error"
|
||||
A TopLevelGoal F "$top_level_goal"
|
||||
A TopThreadGoal F "$top_thread_goal"
|
||||
A TraceMetaCall F "$trace_meta_call"
|
||||
A Trail N "trail"
|
||||
A True N "true"
|
||||
A Tty N "tty"
|
||||
A Ttys N "ttys"
|
||||
A Tuple N "tuple"
|
||||
A Txt N "txt"
|
||||
A TypeError N "type_error"
|
||||
A Undefined N "undefined"
|
||||
A Undefp F "$undefp"
|
||||
A Underflow N "underflow"
|
||||
A UnificationStack N "unification_stack"
|
||||
A Unique N "unique"
|
||||
A UnsignedByte N "unsigned_byte"
|
||||
A UnsignedChar N "unsigned_char"
|
||||
A User N "user"
|
||||
A UserErr N "user_error"
|
||||
A UserIn N "user_input"
|
||||
A UserOut N "user_output"
|
||||
A DollarVar N "$VAR"
|
||||
A VBar N "|"
|
||||
A VarBranches N "var_branches"
|
||||
A VariableNames N "variable_names"
|
||||
A HiddenVar F "$V"
|
||||
A Variable N "variable"
|
||||
A Verbose N "verbose"
|
||||
A VerboseFileSearch N "verbose_file_search"
|
||||
A VersionNumber F "$version_name"
|
||||
A VeryVerbose N "very_verbose"
|
||||
A WakeUpGoal F "$wake_up_goal"
|
||||
A Warning N "warning"
|
||||
A When F "$when"
|
||||
A Write N "write"
|
||||
A Xml N "xml"
|
||||
A YapHacks N "yap_hacks"
|
||||
A ZeroDivisor N "zero_divisor"
|
||||
F AfInet AfInet 2
|
||||
F AfLocal AfLocal 1
|
||||
F AfUnix AfUnix 1
|
||||
F AltNot AltNot 1
|
||||
F Arg Arg 3
|
||||
F ArrayEntry ArrayAccess 3
|
||||
F Arrow Arrow 2
|
||||
F DoubleArrow DoubleArrow 2
|
||||
F Assert1 Assert 1
|
||||
F Assert Assert 2
|
||||
F AtFoundOne FoundVar 2
|
||||
F Atom Atom 1
|
||||
F Att1 Att1 3
|
||||
F AttGoal AttDo 2
|
||||
F Braces Braces 1
|
||||
F Call Call 1
|
||||
F Catch Catch 3
|
||||
F ChangeModule ChangeModule 1
|
||||
F Chars Chars 2
|
||||
F Chars1 Chars 1
|
||||
F CleanCall CleanCall 2
|
||||
F Clist When 4
|
||||
F Codes Codes 2
|
||||
F Codes1 Codes 1
|
||||
F Colon Colon 2
|
||||
F Comma Comma 2
|
||||
F CommentHook CommentHook 3
|
||||
F Context2 Context 2
|
||||
F ConsistencyError ConsistencyError 1
|
||||
F Creep Creep 1
|
||||
F Csult Csult 2
|
||||
F CurrentModule CurrentModule 1
|
||||
F CutBy CutBy 1
|
||||
F DBREF DBREF 1
|
||||
F Diff Diff 2
|
||||
F DoLogUpdClause DoLogUpdClause 6
|
||||
F DoLogUpdClause0 DoLogUpdClause0 6
|
||||
F DoLogUpdClauseErase DoLogUpdClauseErase 6
|
||||
F DoStaticClause DoStaticClause 5
|
||||
F Dollar Dollar 1
|
||||
F DollarVar DollarVar 1
|
||||
F DomainError DomainError 2
|
||||
F Dot Dot 2
|
||||
F Dot10 Dot 10
|
||||
F Dot11 Dot 11
|
||||
F Dot12 Dot 12
|
||||
F Dot2 Dot 2
|
||||
F Dot3 Dot 3
|
||||
F Dot4 Dot 4
|
||||
F Dot5 Dot 5
|
||||
F Dot6 Dot 6
|
||||
F Dot7 Dot 7
|
||||
F Dot8 Dot 8
|
||||
F Dot9 Dot 9
|
||||
F DoubleSlash DoubleSlash 2
|
||||
F EmptySquareBrackets EmptySquareBrackets 2
|
||||
F EmptyCurlyBrackets EmptyCurlyBrackets 2
|
||||
F Eq Eq 2
|
||||
F Error Error 2
|
||||
F EvaluationError EvaluationError 1
|
||||
F Exception Exception 1
|
||||
F Execute2InMod ExecuteWoMod 2
|
||||
F ExecuteInMod ExecuteInMod 2
|
||||
F ExecuteWithin ExecuteWithin 1
|
||||
F ExistenceError ExistenceError 2
|
||||
F ExoClause ExoClause 2
|
||||
F Functor Functor 3
|
||||
F GAtom Atom 1
|
||||
F GAtomic Atomic 1
|
||||
F GCompound Compound 1
|
||||
F GFloat Float 1
|
||||
F GFormatAt FormatAt 2
|
||||
F GInteger Integer 1
|
||||
F GNumber Number 1
|
||||
F GPrimitive Primitive 1
|
||||
F GVar GVar 1
|
||||
F GeneratePredInfo GeneratePredInfo 4
|
||||
F GoalExpansion2 GoalExpansion 2
|
||||
F GoalExpansion GoalExpansion 3
|
||||
F HandleThrow HandleThrow 3
|
||||
F Hat Hat 2
|
||||
F I I 2
|
||||
F Id Id 1
|
||||
F Is Is 2
|
||||
F J J 2
|
||||
F LastExecuteWithin LastExecuteWithin 1
|
||||
F List Dot 2
|
||||
F LOOP LOOP 1
|
||||
F MegaClause MegaClause 2
|
||||
F MetaCall MetaCall 4
|
||||
F Minus Minus 2
|
||||
F Module Colon 2
|
||||
F MultiFileClause MfClause 5
|
||||
F Mutable MutableVariable (sizeof(timed_var)/sizeof(CELL))
|
||||
F Mutex Mutex 2
|
||||
F NotImplemented NotImplemented 2
|
||||
F NBQueue Queue 4
|
||||
F Not Not 1
|
||||
F Obj Obj 1
|
||||
F Or Semic 2
|
||||
F PermissionError PermissionError 3
|
||||
F Plus Plus 2
|
||||
F Portray Portray 1
|
||||
F PrintMessage PrintMessage 2
|
||||
F Procedure Procedure 5
|
||||
F PrologConstraint Prolog 2
|
||||
F ProtectStack ProtectStack 4
|
||||
F Query Query 1
|
||||
F RecordedWithKey RecordedWithKey 6
|
||||
F RDiv RDiv 2
|
||||
F RedoFreeze RedoFreeze 3
|
||||
F RepresentationError RepresentationError 1
|
||||
F ResourceError ResourceError 1
|
||||
F RestoreRegs RestoreRegs 2
|
||||
F RestoreRegs1 RestoreRegs 1
|
||||
F Safe Safe 1
|
||||
F SafeCallCleanup SafeCallCleanup 4
|
||||
F Same Same 2
|
||||
F Slash Slash 2
|
||||
F StaticClause StaticClause 2
|
||||
F Stream Stream 1
|
||||
F StreamEOS EndOfStream 1
|
||||
F StreamPos StreamPos 4
|
||||
F String1 String 1
|
||||
F StyleCheck StyleCheck 4
|
||||
F SyntaxError SyntaxError 4
|
||||
F ShortSyntaxError SyntaxError 1
|
||||
F TermExpansion TermExpansion 2
|
||||
F ThreadRun TopThreadGoal 2
|
||||
F Throw Throw 1
|
||||
F TimeoutError TimeoutError 2
|
||||
F TraceMetaCall TraceMetaCall 3
|
||||
F TypeError TypeError 2
|
||||
F UMinus Minus 1
|
||||
F UPlus Plus 1
|
||||
F VBar VBar 2
|
||||
F HiddenVar HiddenVar 1
|
@ -91,7 +91,7 @@ ATOMS
|
||||
Term TermDollarU MkAT AtomDollarU
|
||||
#endif
|
||||
Term TermAnswer MkAT AtomAnswer
|
||||
z
|
||||
|
||||
//modules
|
||||
Term USER_MODULE MkAT AtomUser
|
||||
Term IDB_MODULE MkAT AtomIDB
|
@ -1,6 +1,6 @@
|
||||
|
||||
/* This file, dglobals.h, was generated automatically by "yap -L misc/buildlocalglobal"
|
||||
please do not update, update misc/GLOBALS instead */
|
||||
please do not update, update H/GLOBALS instead */
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/* This file, dhstruct.h, was generated automatically by "yap -L misc/buildlocalglobal"
|
||||
please do not update, update misc/HEAPFIELDS instead */
|
||||
please do not update, update H/HEAPFIELDS instead */
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/* This file, dlocals.h, was generated automatically by "yap -L misc/buildlocalglobal"
|
||||
please do not update, update misc/LOCALS instead */
|
||||
please do not update, update H/LOCALS instead */
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/* This file, hglobals.h, was generated automatically by "yap -L misc/buildlocalglobal"
|
||||
please do not update, update misc/GLOBALS instead */
|
||||
please do not update, update H/GLOBALS instead */
|
||||
|
||||
//
|
||||
// File defining fields in the Yap_GLOBAL global structure
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/* This file, d0hstruct.h, was generated automatically by "yap -L misc/buildlocalglobal"
|
||||
please do not update, update misc/HEAPFIELDS instead */
|
||||
please do not update, update H/HEAPFIELDS instead */
|
||||
|
||||
//
|
||||
// File defining fields in the Yap_heap_codes global structure
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/* This file, hglobals.h, was generated automatically by "yap -L misc/buildlocalglobal"
|
||||
please do not update, update misc/GLOBALS instead */
|
||||
please do not update, update H/GLOBALS instead */
|
||||
|
||||
//
|
||||
// File defining fields in the Yap_GLOBAL global structure
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/* This file, hlocals.h, was generated automatically by "yap -L misc/buildlocalglobal"
|
||||
please do not update, update misc/LOCALS instead */
|
||||
please do not update, update H/LOCALS instead */
|
||||
|
||||
// Stuff that must be considered local to a thread or worker
|
||||
typedef struct worker_local {
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/* This file, hstruct.h, was generated automatically by "yap -L misc/buildlocalglobal"
|
||||
please do not update, update misc/HEAPFIELDS instead */
|
||||
please do not update, update H/HEAPFIELDS instead */
|
||||
|
||||
//
|
||||
// File defining fields in the Yap_heap_codes global structure
|
||||
|
@ -63,7 +63,7 @@
|
||||
AtomCharset = Yap_LookupAtom("charset"); TermCharset = MkAtomTerm(AtomCharset);
|
||||
AtomChType = Yap_FullLookupAtom("$char_type"); TermChType = MkAtomTerm(AtomChType);
|
||||
AtomCleanCall = Yap_FullLookupAtom("$clean_call"); TermCleanCall = MkAtomTerm(AtomCleanCall);
|
||||
AtomColomn = Yap_LookupAtom(":"); TermColomn = MkAtomTerm(AtomColomn);
|
||||
AtomColon = Yap_LookupAtom(":"); TermColon = MkAtomTerm(AtomColon);
|
||||
AtomCodeSpace = Yap_LookupAtom("code_space"); TermCodeSpace = MkAtomTerm(AtomCodeSpace);
|
||||
AtomCodes = Yap_LookupAtom("codes"); TermCodes = MkAtomTerm(AtomCodes);
|
||||
AtomCoInductive = Yap_LookupAtom("coinductive"); TermCoInductive = MkAtomTerm(AtomCoInductive);
|
||||
@ -79,6 +79,7 @@
|
||||
AtomCreate = Yap_LookupAtom("create"); TermCreate = MkAtomTerm(AtomCreate);
|
||||
AtomCreep = Yap_FullLookupAtom("$creep"); TermCreep = MkAtomTerm(AtomCreep);
|
||||
AtomCryptAtoms = Yap_LookupAtom("crypt_atoms"); TermCryptAtoms = MkAtomTerm(AtomCryptAtoms);
|
||||
AtomCurly = Yap_LookupAtom("{}"); TermCurly = MkAtomTerm(AtomCurly);
|
||||
AtomCsult = Yap_FullLookupAtom("$csult"); TermCsult = MkAtomTerm(AtomCsult);
|
||||
AtomCurrentModule = Yap_FullLookupAtom("$current_module"); TermCurrentModule = MkAtomTerm(AtomCurrentModule);
|
||||
AtomCut = Yap_LookupAtom("!"); TermCut = MkAtomTerm(AtomCut);
|
||||
@ -178,6 +179,7 @@
|
||||
AtomHugeInt = Yap_LookupAtom("huge_int"); TermHugeInt = MkAtomTerm(AtomHugeInt);
|
||||
AtomIDB = Yap_LookupAtom("idb"); TermIDB = MkAtomTerm(AtomIDB);
|
||||
AtomIOMode = Yap_LookupAtom("io_mode"); TermIOMode = MkAtomTerm(AtomIOMode);
|
||||
AtomI = Yap_LookupAtom("i"); TermI = MkAtomTerm(AtomI);
|
||||
AtomId = Yap_LookupAtom("id"); TermId = MkAtomTerm(AtomId);
|
||||
AtomIgnore = Yap_LookupAtom("ignore"); TermIgnore = MkAtomTerm(AtomIgnore);
|
||||
AtomInf = Yap_LookupAtom("inf"); TermInf = MkAtomTerm(AtomInf);
|
||||
@ -192,6 +194,7 @@
|
||||
AtomInteger = Yap_LookupAtom("integer"); TermInteger = MkAtomTerm(AtomInteger);
|
||||
AtomInternalCompilerError = Yap_LookupAtom("internal_compiler_error"); TermInternalCompilerError = MkAtomTerm(AtomInternalCompilerError);
|
||||
AtomIs = Yap_LookupAtom("is"); TermIs = MkAtomTerm(AtomIs);
|
||||
AtomJ = Yap_LookupAtom("j"); TermJ = MkAtomTerm(AtomJ);
|
||||
AtomKey = Yap_LookupAtom("key"); TermKey = MkAtomTerm(AtomKey);
|
||||
AtomLDLibraryPath = Yap_LookupAtom("LD_LIBRARY_PATH"); TermLDLibraryPath = MkAtomTerm(AtomLDLibraryPath);
|
||||
AtomLONGINT = Yap_LookupAtom("LongInt"); TermLONGINT = MkAtomTerm(AtomLONGINT);
|
||||
@ -250,6 +253,7 @@
|
||||
AtomNotNewline = Yap_LookupAtom("not_newline"); TermNotNewline = MkAtomTerm(AtomNotNewline);
|
||||
AtomNotZero = Yap_LookupAtom("not_zero"); TermNotZero = MkAtomTerm(AtomNotZero);
|
||||
AtomNumber = Yap_LookupAtom("number"); TermNumber = MkAtomTerm(AtomNumber);
|
||||
AtomObj = Yap_LookupAtom("o__bj__"); TermObj = MkAtomTerm(AtomObj);
|
||||
AtomOff = Yap_LookupAtom("off"); TermOff = MkAtomTerm(AtomOff);
|
||||
AtomOffline = Yap_LookupAtom("offline"); TermOffline = MkAtomTerm(AtomOffline);
|
||||
AtomOn = Yap_LookupAtom("on"); TermOn = MkAtomTerm(AtomOn);
|
||||
@ -374,8 +378,8 @@
|
||||
AtomSystemError = Yap_LookupAtom("SYSTEM_ERROR_INTERNAL"); TermSystemError = MkAtomTerm(AtomSystemError);
|
||||
AtomSystemLibraryDir = Yap_LookupAtom("system_library_directory"); TermSystemLibraryDir = MkAtomTerm(AtomSystemLibraryDir);
|
||||
AtomTerm = Yap_LookupAtom("term"); TermTerm = MkAtomTerm(AtomTerm);
|
||||
AtomTerms = Yap_LookupAtom("terms"); TermTerms = MkAtomTerm(AtomTerms);
|
||||
AtomTermExpansion = Yap_LookupAtom("term_expansion"); TermTermExpansion = MkAtomTerm(AtomTermExpansion);
|
||||
AtomTerms = Yap_LookupAtom("terms"); TermTerms = MkAtomTerm(AtomTerms);
|
||||
AtomText = Yap_LookupAtom("text"); TermText = MkAtomTerm(AtomText);
|
||||
AtomTextStream = Yap_LookupAtom("text_stream"); TermTextStream = MkAtomTerm(AtomTextStream);
|
||||
AtomThread = Yap_LookupAtom("thread"); TermThread = MkAtomTerm(AtomThread);
|
||||
@ -444,6 +448,7 @@
|
||||
FunctorClist = Yap_MkFunctor(AtomWhen,4);
|
||||
FunctorCodes = Yap_MkFunctor(AtomCodes,2);
|
||||
FunctorCodes1 = Yap_MkFunctor(AtomCodes,1);
|
||||
FunctorColon = Yap_MkFunctor(AtomColon,2);
|
||||
FunctorComma = Yap_MkFunctor(AtomComma,2);
|
||||
FunctorCommentHook = Yap_MkFunctor(AtomCommentHook,3);
|
||||
FunctorContext2 = Yap_MkFunctor(AtomContext,2);
|
||||
@ -458,6 +463,7 @@
|
||||
FunctorDoLogUpdClause0 = Yap_MkFunctor(AtomDoLogUpdClause0,6);
|
||||
FunctorDoLogUpdClauseErase = Yap_MkFunctor(AtomDoLogUpdClauseErase,6);
|
||||
FunctorDoStaticClause = Yap_MkFunctor(AtomDoStaticClause,5);
|
||||
FunctorDollar = Yap_MkFunctor(AtomDollar,1);
|
||||
FunctorDollarVar = Yap_MkFunctor(AtomDollarVar,1);
|
||||
FunctorDomainError = Yap_MkFunctor(AtomDomainError,2);
|
||||
FunctorDot = Yap_MkFunctor(AtomDot,2);
|
||||
@ -499,21 +505,24 @@
|
||||
FunctorGoalExpansion = Yap_MkFunctor(AtomGoalExpansion,3);
|
||||
FunctorHandleThrow = Yap_MkFunctor(AtomHandleThrow,3);
|
||||
FunctorHat = Yap_MkFunctor(AtomHat,2);
|
||||
FunctorI = Yap_MkFunctor(AtomI,2);
|
||||
FunctorId = Yap_MkFunctor(AtomId,1);
|
||||
FunctorIs = Yap_MkFunctor(AtomIs,2);
|
||||
FunctorJ = Yap_MkFunctor(AtomJ,2);
|
||||
FunctorLastExecuteWithin = Yap_MkFunctor(AtomLastExecuteWithin,1);
|
||||
FunctorList = Yap_MkFunctor(AtomDot,2);
|
||||
FunctorLOOP = Yap_MkFunctor(AtomLOOP,1);
|
||||
FunctorMegaClause = Yap_MkFunctor(AtomMegaClause,2);
|
||||
FunctorMetaCall = Yap_MkFunctor(AtomMetaCall,4);
|
||||
FunctorMinus = Yap_MkFunctor(AtomMinus,2);
|
||||
FunctorModule = Yap_MkFunctor(AtomColomn,2);
|
||||
FunctorModule = Yap_MkFunctor(AtomColon,2);
|
||||
FunctorMultiFileClause = Yap_MkFunctor(AtomMfClause,5);
|
||||
FunctorMutable = Yap_MkFunctor(AtomMutableVariable,(sizeof(timed_var)/sizeof(CELL)));
|
||||
FunctorMutex = Yap_MkFunctor(AtomMutex,2);
|
||||
FunctorNotImplemented = Yap_MkFunctor(AtomNotImplemented,2);
|
||||
FunctorNBQueue = Yap_MkFunctor(AtomQueue,4);
|
||||
FunctorNot = Yap_MkFunctor(AtomNot,1);
|
||||
FunctorObj = Yap_MkFunctor(AtomObj,1);
|
||||
FunctorOr = Yap_MkFunctor(AtomSemic,2);
|
||||
FunctorPermissionError = Yap_MkFunctor(AtomPermissionError,3);
|
||||
FunctorPlus = Yap_MkFunctor(AtomPlus,2);
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/* This file, iglobals.h, was generated automatically by "yap -L misc/buildlocalglobal"
|
||||
please do not update, update misc/GLOBALS instead */
|
||||
please do not update, update H/GLOBALS instead */
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/* This file, ihstruct.h, was generated automatically by "yap -L misc/buildlocalglobal"
|
||||
please do not update, update misc/HEAPFIELDS instead */
|
||||
please do not update, update H/HEAPFIELDS instead */
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/* This file, ilocals.h, was generated automatically by "yap -L misc/buildlocalglobal"
|
||||
please do not update, update misc/LOCALS instead */
|
||||
please do not update, update H/LOCALS instead */
|
||||
|
||||
|
||||
static void InitWorker(int wid) {
|
||||
|
@ -63,7 +63,7 @@
|
||||
AtomCharset = AtomAdjust(AtomCharset); TermCharset = MkAtomTerm(AtomCharset);
|
||||
AtomChType = AtomAdjust(AtomChType); TermChType = MkAtomTerm(AtomChType);
|
||||
AtomCleanCall = AtomAdjust(AtomCleanCall); TermCleanCall = MkAtomTerm(AtomCleanCall);
|
||||
AtomColomn = AtomAdjust(AtomColomn); TermColomn = MkAtomTerm(AtomColomn);
|
||||
AtomColon = AtomAdjust(AtomColon); TermColon = MkAtomTerm(AtomColon);
|
||||
AtomCodeSpace = AtomAdjust(AtomCodeSpace); TermCodeSpace = MkAtomTerm(AtomCodeSpace);
|
||||
AtomCodes = AtomAdjust(AtomCodes); TermCodes = MkAtomTerm(AtomCodes);
|
||||
AtomCoInductive = AtomAdjust(AtomCoInductive); TermCoInductive = MkAtomTerm(AtomCoInductive);
|
||||
@ -79,6 +79,7 @@
|
||||
AtomCreate = AtomAdjust(AtomCreate); TermCreate = MkAtomTerm(AtomCreate);
|
||||
AtomCreep = AtomAdjust(AtomCreep); TermCreep = MkAtomTerm(AtomCreep);
|
||||
AtomCryptAtoms = AtomAdjust(AtomCryptAtoms); TermCryptAtoms = MkAtomTerm(AtomCryptAtoms);
|
||||
AtomCurly = AtomAdjust(AtomCurly); TermCurly = MkAtomTerm(AtomCurly);
|
||||
AtomCsult = AtomAdjust(AtomCsult); TermCsult = MkAtomTerm(AtomCsult);
|
||||
AtomCurrentModule = AtomAdjust(AtomCurrentModule); TermCurrentModule = MkAtomTerm(AtomCurrentModule);
|
||||
AtomCut = AtomAdjust(AtomCut); TermCut = MkAtomTerm(AtomCut);
|
||||
@ -178,6 +179,7 @@
|
||||
AtomHugeInt = AtomAdjust(AtomHugeInt); TermHugeInt = MkAtomTerm(AtomHugeInt);
|
||||
AtomIDB = AtomAdjust(AtomIDB); TermIDB = MkAtomTerm(AtomIDB);
|
||||
AtomIOMode = AtomAdjust(AtomIOMode); TermIOMode = MkAtomTerm(AtomIOMode);
|
||||
AtomI = AtomAdjust(AtomI); TermI = MkAtomTerm(AtomI);
|
||||
AtomId = AtomAdjust(AtomId); TermId = MkAtomTerm(AtomId);
|
||||
AtomIgnore = AtomAdjust(AtomIgnore); TermIgnore = MkAtomTerm(AtomIgnore);
|
||||
AtomInf = AtomAdjust(AtomInf); TermInf = MkAtomTerm(AtomInf);
|
||||
@ -192,6 +194,7 @@
|
||||
AtomInteger = AtomAdjust(AtomInteger); TermInteger = MkAtomTerm(AtomInteger);
|
||||
AtomInternalCompilerError = AtomAdjust(AtomInternalCompilerError); TermInternalCompilerError = MkAtomTerm(AtomInternalCompilerError);
|
||||
AtomIs = AtomAdjust(AtomIs); TermIs = MkAtomTerm(AtomIs);
|
||||
AtomJ = AtomAdjust(AtomJ); TermJ = MkAtomTerm(AtomJ);
|
||||
AtomKey = AtomAdjust(AtomKey); TermKey = MkAtomTerm(AtomKey);
|
||||
AtomLDLibraryPath = AtomAdjust(AtomLDLibraryPath); TermLDLibraryPath = MkAtomTerm(AtomLDLibraryPath);
|
||||
AtomLONGINT = AtomAdjust(AtomLONGINT); TermLONGINT = MkAtomTerm(AtomLONGINT);
|
||||
@ -250,6 +253,7 @@
|
||||
AtomNotNewline = AtomAdjust(AtomNotNewline); TermNotNewline = MkAtomTerm(AtomNotNewline);
|
||||
AtomNotZero = AtomAdjust(AtomNotZero); TermNotZero = MkAtomTerm(AtomNotZero);
|
||||
AtomNumber = AtomAdjust(AtomNumber); TermNumber = MkAtomTerm(AtomNumber);
|
||||
AtomObj = AtomAdjust(AtomObj); TermObj = MkAtomTerm(AtomObj);
|
||||
AtomOff = AtomAdjust(AtomOff); TermOff = MkAtomTerm(AtomOff);
|
||||
AtomOffline = AtomAdjust(AtomOffline); TermOffline = MkAtomTerm(AtomOffline);
|
||||
AtomOn = AtomAdjust(AtomOn); TermOn = MkAtomTerm(AtomOn);
|
||||
@ -374,8 +378,8 @@
|
||||
AtomSystemError = AtomAdjust(AtomSystemError); TermSystemError = MkAtomTerm(AtomSystemError);
|
||||
AtomSystemLibraryDir = AtomAdjust(AtomSystemLibraryDir); TermSystemLibraryDir = MkAtomTerm(AtomSystemLibraryDir);
|
||||
AtomTerm = AtomAdjust(AtomTerm); TermTerm = MkAtomTerm(AtomTerm);
|
||||
AtomTerms = AtomAdjust(AtomTerms); TermTerms = MkAtomTerm(AtomTerms);
|
||||
AtomTermExpansion = AtomAdjust(AtomTermExpansion); TermTermExpansion = MkAtomTerm(AtomTermExpansion);
|
||||
AtomTerms = AtomAdjust(AtomTerms); TermTerms = MkAtomTerm(AtomTerms);
|
||||
AtomText = AtomAdjust(AtomText); TermText = MkAtomTerm(AtomText);
|
||||
AtomTextStream = AtomAdjust(AtomTextStream); TermTextStream = MkAtomTerm(AtomTextStream);
|
||||
AtomThread = AtomAdjust(AtomThread); TermThread = MkAtomTerm(AtomThread);
|
||||
@ -444,6 +448,7 @@
|
||||
FunctorClist = FuncAdjust(FunctorClist);
|
||||
FunctorCodes = FuncAdjust(FunctorCodes);
|
||||
FunctorCodes1 = FuncAdjust(FunctorCodes1);
|
||||
FunctorColon = FuncAdjust(FunctorColon);
|
||||
FunctorComma = FuncAdjust(FunctorComma);
|
||||
FunctorCommentHook = FuncAdjust(FunctorCommentHook);
|
||||
FunctorContext2 = FuncAdjust(FunctorContext2);
|
||||
@ -458,6 +463,7 @@
|
||||
FunctorDoLogUpdClause0 = FuncAdjust(FunctorDoLogUpdClause0);
|
||||
FunctorDoLogUpdClauseErase = FuncAdjust(FunctorDoLogUpdClauseErase);
|
||||
FunctorDoStaticClause = FuncAdjust(FunctorDoStaticClause);
|
||||
FunctorDollar = FuncAdjust(FunctorDollar);
|
||||
FunctorDollarVar = FuncAdjust(FunctorDollarVar);
|
||||
FunctorDomainError = FuncAdjust(FunctorDomainError);
|
||||
FunctorDot = FuncAdjust(FunctorDot);
|
||||
@ -499,8 +505,10 @@
|
||||
FunctorGoalExpansion = FuncAdjust(FunctorGoalExpansion);
|
||||
FunctorHandleThrow = FuncAdjust(FunctorHandleThrow);
|
||||
FunctorHat = FuncAdjust(FunctorHat);
|
||||
FunctorI = FuncAdjust(FunctorI);
|
||||
FunctorId = FuncAdjust(FunctorId);
|
||||
FunctorIs = FuncAdjust(FunctorIs);
|
||||
FunctorJ = FuncAdjust(FunctorJ);
|
||||
FunctorLastExecuteWithin = FuncAdjust(FunctorLastExecuteWithin);
|
||||
FunctorList = FuncAdjust(FunctorList);
|
||||
FunctorLOOP = FuncAdjust(FunctorLOOP);
|
||||
@ -514,6 +522,7 @@
|
||||
FunctorNotImplemented = FuncAdjust(FunctorNotImplemented);
|
||||
FunctorNBQueue = FuncAdjust(FunctorNBQueue);
|
||||
FunctorNot = FuncAdjust(FunctorNot);
|
||||
FunctorObj = FuncAdjust(FunctorObj);
|
||||
FunctorOr = FuncAdjust(FunctorOr);
|
||||
FunctorPermissionError = FuncAdjust(FunctorPermissionError);
|
||||
FunctorPlus = FuncAdjust(FunctorPlus);
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/* This file, rhstruct.h, was generated automatically by "yap -L misc/buildlocalglobal"
|
||||
please do not update, update misc/HEAPFIELDS instead */
|
||||
please do not update, update H/HEAPFIELDS instead */
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/* This file, rlocals.h, was generated automatically by "yap -L misc/buildlocalglobal"
|
||||
please do not update, update misc/LOCALS instead */
|
||||
please do not update, update H/LOCALS instead */
|
||||
|
||||
|
||||
static void RestoreWorker(int wid USES_REGS) {
|
||||
|
@ -63,7 +63,7 @@ Atom AtomChars; Term TermChars;
|
||||
Atom AtomCharset; Term TermCharset;
|
||||
Atom AtomChType; Term TermChType;
|
||||
Atom AtomCleanCall; Term TermCleanCall;
|
||||
Atom AtomColomn; Term TermColomn;
|
||||
Atom AtomColon; Term TermColon;
|
||||
Atom AtomCodeSpace; Term TermCodeSpace;
|
||||
Atom AtomCodes; Term TermCodes;
|
||||
Atom AtomCoInductive; Term TermCoInductive;
|
||||
@ -79,6 +79,7 @@ Atom AtomCputime; Term TermCputime;
|
||||
Atom AtomCreate; Term TermCreate;
|
||||
Atom AtomCreep; Term TermCreep;
|
||||
Atom AtomCryptAtoms; Term TermCryptAtoms;
|
||||
Atom AtomCurly; Term TermCurly;
|
||||
Atom AtomCsult; Term TermCsult;
|
||||
Atom AtomCurrentModule; Term TermCurrentModule;
|
||||
Atom AtomCut; Term TermCut;
|
||||
@ -178,6 +179,7 @@ Atom AtomHeapUsed; Term TermHeapUsed;
|
||||
Atom AtomHugeInt; Term TermHugeInt;
|
||||
Atom AtomIDB; Term TermIDB;
|
||||
Atom AtomIOMode; Term TermIOMode;
|
||||
Atom AtomI; Term TermI;
|
||||
Atom AtomId; Term TermId;
|
||||
Atom AtomIgnore; Term TermIgnore;
|
||||
Atom AtomInf; Term TermInf;
|
||||
@ -192,6 +194,7 @@ Atom AtomIntOverflow; Term TermIntOverflow;
|
||||
Atom AtomInteger; Term TermInteger;
|
||||
Atom AtomInternalCompilerError; Term TermInternalCompilerError;
|
||||
Atom AtomIs; Term TermIs;
|
||||
Atom AtomJ; Term TermJ;
|
||||
Atom AtomKey; Term TermKey;
|
||||
Atom AtomLDLibraryPath; Term TermLDLibraryPath;
|
||||
Atom AtomLONGINT; Term TermLONGINT;
|
||||
@ -250,6 +253,7 @@ Atom AtomNotLessThanZero; Term TermNotLessThanZero;
|
||||
Atom AtomNotNewline; Term TermNotNewline;
|
||||
Atom AtomNotZero; Term TermNotZero;
|
||||
Atom AtomNumber; Term TermNumber;
|
||||
Atom AtomObj; Term TermObj;
|
||||
Atom AtomOff; Term TermOff;
|
||||
Atom AtomOffline; Term TermOffline;
|
||||
Atom AtomOn; Term TermOn;
|
||||
@ -374,8 +378,8 @@ Atom AtomSystem; Term TermSystem;
|
||||
Atom AtomSystemError; Term TermSystemError;
|
||||
Atom AtomSystemLibraryDir; Term TermSystemLibraryDir;
|
||||
Atom AtomTerm; Term TermTerm;
|
||||
Atom AtomTerms; Term TermTerms;
|
||||
Atom AtomTermExpansion; Term TermTermExpansion;
|
||||
Atom AtomTerms; Term TermTerms;
|
||||
Atom AtomText; Term TermText;
|
||||
Atom AtomTextStream; Term TermTextStream;
|
||||
Atom AtomThread; Term TermThread;
|
||||
@ -468,6 +472,8 @@ Atom AtomZeroDivisor; Term TermZeroDivisor;
|
||||
|
||||
Functor FunctorCodes1;
|
||||
|
||||
Functor FunctorColon;
|
||||
|
||||
Functor FunctorComma;
|
||||
|
||||
Functor FunctorCommentHook;
|
||||
@ -496,6 +502,8 @@ Atom AtomZeroDivisor; Term TermZeroDivisor;
|
||||
|
||||
Functor FunctorDoStaticClause;
|
||||
|
||||
Functor FunctorDollar;
|
||||
|
||||
Functor FunctorDollarVar;
|
||||
|
||||
Functor FunctorDomainError;
|
||||
@ -578,10 +586,14 @@ Atom AtomZeroDivisor; Term TermZeroDivisor;
|
||||
|
||||
Functor FunctorHat;
|
||||
|
||||
Functor FunctorI;
|
||||
|
||||
Functor FunctorId;
|
||||
|
||||
Functor FunctorIs;
|
||||
|
||||
Functor FunctorJ;
|
||||
|
||||
Functor FunctorLastExecuteWithin;
|
||||
|
||||
Functor FunctorList;
|
||||
@ -608,6 +620,8 @@ Atom AtomZeroDivisor; Term TermZeroDivisor;
|
||||
|
||||
Functor FunctorNot;
|
||||
|
||||
Functor FunctorObj;
|
||||
|
||||
Functor FunctorOr;
|
||||
|
||||
Functor FunctorPermissionError;
|
||||
|
303
H/hstruct.h
303
H/hstruct.h
@ -1,303 +0,0 @@
|
||||
|
||||
/* This file, hstruct.h, was generated automatically by "yap -L misc/buildheap"
|
||||
please do not update, update misc/HEAPFIELDS instead */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct worker_local {
|
||||
|
||||
UInt Yap_HoleSize;
|
||||
struct malloc_state *Yap_av;
|
||||
#if USE_DL_MALLOC
|
||||
struct Yap_MemoryHoles[MAX_DLMALLOC_HOLES] void;
|
||||
UInt Yap_NOfMemoryHoles;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar DLMallocLock;
|
||||
#endif
|
||||
#endif
|
||||
#if USE_DL_MALLOC || (USE_SYSTEM_MALLOC && HAVE_MALLINFO)
|
||||
#ifndef HeapUsed
|
||||
#define HeapUsed Yap_givemallinfo()
|
||||
#endif
|
||||
Int NotHeapUsed;
|
||||
#else
|
||||
Int HeapUsed;
|
||||
#endif
|
||||
Int HeapMax;
|
||||
ADDR HeapTop;
|
||||
ADDR HeapLim;
|
||||
struct FREEB *FreeBlocks;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar FreeBlocksLock;
|
||||
lockvar HeapUsedLock;
|
||||
lockvar HeapTopLock;
|
||||
int HeapTopOwner;
|
||||
#endif
|
||||
UInt MaxStack;
|
||||
UInt MaxTrail;
|
||||
|
||||
|
||||
#if USE_THREADED_CODE
|
||||
op_entry *OP_RTABLE;
|
||||
#endif
|
||||
|
||||
OPCODE EXECUTE_CPRED_OP_CODE;
|
||||
OPCODE EXPAND_OP_CODE;
|
||||
OPCODE FAIL_OPCODE;
|
||||
OPCODE INDEX_OPCODE;
|
||||
OPCODE LOCKPRED_OPCODE;
|
||||
OPCODE ORLAST_OPCODE;
|
||||
OPCODE UNDEF_OPCODE;
|
||||
OPCODE RETRY_USERC_OPCODE;
|
||||
OPCODE EXECUTE_CPRED_OPCODE;
|
||||
|
||||
UInt NOfAtoms;
|
||||
UInt AtomHashTableSize;
|
||||
UInt WideAtomHashTableSize;
|
||||
UInt NOfWideAtoms;
|
||||
AtomHashEntry INVISIBLECHAIN;
|
||||
AtomHashEntry *WideHashChain;
|
||||
AtomHashEntry *HashChain;
|
||||
|
||||
#include "tatoms.h"
|
||||
#ifdef EUROTRA
|
||||
Term TermDollarU;
|
||||
#endif
|
||||
|
||||
Term USER_MODULE;
|
||||
Term IDB_MODULE;
|
||||
Term ATTRIBUTES_MODULE;
|
||||
Term CHARSIO_MODULE;
|
||||
Term CHTYPE_MODULE;
|
||||
Term TERMS_MODULE;
|
||||
Term SYSTEM_MODULE;
|
||||
Term READUTIL_MODULE;
|
||||
Term HACKS_MODULE;
|
||||
Term ARG_MODULE;
|
||||
Term GLOBALS_MODULE;
|
||||
Term SWI_MODULE;
|
||||
Term DBLOAD_MODULE;
|
||||
Term RANGE_MODULE;
|
||||
Term ERROR_MODULE;
|
||||
|
||||
|
||||
|
||||
struct mod_entry *CurrentModules;
|
||||
|
||||
|
||||
|
||||
|
||||
Prop HIDDEN_PREDICATES;
|
||||
|
||||
|
||||
|
||||
union flagTerm* GLOBAL_Flags;
|
||||
UInt GLOBAL_flagCount;
|
||||
|
||||
yap_exec_mode Yap_ExecutionMode;
|
||||
|
||||
UInt PredsInHashTable;
|
||||
uint64_t PredHashTableSize;
|
||||
struct pred_entry **PredHash;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
rwlock_t PredHashRWLock;
|
||||
#endif
|
||||
|
||||
struct pred_entry *CreepCode;
|
||||
struct pred_entry *UndefCode;
|
||||
struct pred_entry *SpyCode;
|
||||
struct pred_entry *PredFail;
|
||||
struct pred_entry *PredTrue;
|
||||
#ifdef COROUTINING
|
||||
struct pred_entry *WakeUpCode;
|
||||
#endif
|
||||
struct pred_entry *PredGoalExpansion;
|
||||
struct pred_entry *PredMetaCall;
|
||||
struct pred_entry *PredTraceMetaCall;
|
||||
struct pred_entry *PredDollarCatch;
|
||||
struct pred_entry *PredRecordedWithKey;
|
||||
struct pred_entry *PredLogUpdClause;
|
||||
struct pred_entry *PredLogUpdClauseErase;
|
||||
struct pred_entry *PredLogUpdClause0;
|
||||
struct pred_entry *PredStaticClause;
|
||||
struct pred_entry *PredThrow;
|
||||
struct pred_entry *PredHandleThrow;
|
||||
struct pred_entry *PredIs;
|
||||
struct pred_entry *PredSafeCallCleanup;
|
||||
struct pred_entry *PredRestoreRegs;
|
||||
struct pred_entry *PredCommentHook;
|
||||
#ifdef YAPOR
|
||||
struct pred_entry *PredGetwork;
|
||||
#endif /* YAPOR */
|
||||
struct pred_entry *PredProcedure;
|
||||
|
||||
#ifdef LOW_LEVEL_TRACER
|
||||
int Yap_do_low_level_trace;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar Yap_low_level_trace_lock;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
UInt Yap_ClauseSpace;
|
||||
UInt Yap_IndexSpace_Tree;
|
||||
UInt Yap_IndexSpace_EXT;
|
||||
UInt Yap_IndexSpace_SW;
|
||||
UInt Yap_LUClauseSpace;
|
||||
UInt Yap_LUIndexSpace_Tree;
|
||||
UInt Yap_LUIndexSpace_CP;
|
||||
UInt Yap_LUIndexSpace_EXT;
|
||||
UInt Yap_LUIndexSpace_SW;
|
||||
|
||||
yamop COMMA_CODE[5];
|
||||
yamop DUMMYCODE[1];
|
||||
yamop FAILCODE[1];
|
||||
yamop NOCODE[1];
|
||||
yamop ENV_FOR_TRUSTFAIL[2];
|
||||
yamop *TRUSTFAILCODE;
|
||||
yamop ENV_FOR_YESCODE[2];
|
||||
yamop *YESCODE;
|
||||
yamop RTRYCODE[1];
|
||||
#ifdef BEAM
|
||||
yamop BEAM_RETRY_CODE[1];
|
||||
#endif /* BEAM */
|
||||
#ifdef YAPOR
|
||||
yamop GETWORK[1];
|
||||
yamop GETWORK_SEQ[1];
|
||||
yamop GETWORK_FIRST_TIME[1];
|
||||
#endif /* YAPOR */
|
||||
#ifdef TABLING
|
||||
yamop LOAD_ANSWER[1];
|
||||
yamop TRY_ANSWER[1];
|
||||
yamop ANSWER_RESOLUTION[1];
|
||||
yamop COMPLETION[1];
|
||||
#ifdef THREADS_CONSUMER_SHARING
|
||||
yamop ANSWER_RESOLUTION_COMPLETION[1];
|
||||
#endif /* THREADS_CONSUMER_SHARING */
|
||||
#endif /* TABLING */
|
||||
|
||||
|
||||
|
||||
|
||||
yamop *P_before_spy;
|
||||
|
||||
yamop *RETRY_C_RECORDEDP_CODE;
|
||||
yamop *RETRY_C_RECORDED_K_CODE;
|
||||
|
||||
int PROFILING;
|
||||
int CALL_COUNTING;
|
||||
int optimizer_on;
|
||||
int compile_mode;
|
||||
int profiling;
|
||||
int call_counting;
|
||||
|
||||
int compile_arrays;
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar DBTermsListLock;
|
||||
#endif
|
||||
struct dbterm_list *DBTermsList;
|
||||
|
||||
yamop *ExpandClausesFirst;
|
||||
yamop *ExpandClausesLast;
|
||||
UInt Yap_ExpandClauses;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar ExpandClausesListLock;
|
||||
lockvar OpListLock;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
UInt Yap_NewCps;
|
||||
UInt Yap_LiveCps;
|
||||
UInt Yap_DirtyCps;
|
||||
UInt Yap_FreedCps;
|
||||
#endif
|
||||
UInt Yap_expand_clauses_sz;
|
||||
|
||||
struct udi_info *UdiControlBlocks;
|
||||
|
||||
|
||||
Int STATIC_PREDICATES_MARKED;
|
||||
|
||||
Prop *INT_KEYS;
|
||||
Prop *INT_LU_KEYS;
|
||||
Prop *INT_BB_KEYS;
|
||||
|
||||
UInt INT_KEYS_SIZE;
|
||||
UInt INT_KEYS_TIMESTAMP;
|
||||
UInt INT_BB_KEYS_SIZE;
|
||||
|
||||
int UPDATE_MODE;
|
||||
|
||||
struct DB_STRUCT *DBErasedMarker;
|
||||
struct logic_upd_clause *LogDBErasedMarker;
|
||||
|
||||
struct static_clause *DeadStaticClauses;
|
||||
struct static_mega_clause *DeadMegaClauses;
|
||||
struct static_index *DeadStaticIndices;
|
||||
struct logic_upd_clause *DBErasedList;
|
||||
struct logic_upd_index *DBErasedIList;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar DeadStaticClausesLock;
|
||||
lockvar DeadMegaClausesLock;
|
||||
lockvar DeadStaticIndicesLock;
|
||||
#endif
|
||||
#ifdef COROUTINING
|
||||
|
||||
int NUM_OF_ATTS;
|
||||
|
||||
UInt Yap_AttsSize;
|
||||
#endif
|
||||
|
||||
struct operator_entry *OpList;
|
||||
|
||||
struct ForeignLoadItem *ForeignCodeLoaded;
|
||||
ADDR ForeignCodeBase;
|
||||
ADDR ForeignCodeTop;
|
||||
ADDR ForeignCodeMax;
|
||||
|
||||
struct record_list *Yap_Records;
|
||||
|
||||
Atom *SWI_Atoms;
|
||||
Functor *SWI_Functors;
|
||||
swi_rev_hash SWI_ReverseHash[N_SWI_HASH];
|
||||
|
||||
Int AtomTranslations;
|
||||
Int MaxAtomTranslations;
|
||||
|
||||
Int FunctorTranslations;
|
||||
Int MaxFunctorTranslations;
|
||||
Atom EmptyWakeups[MAX_EMPTY_WAKEUPS];
|
||||
int MaxEmptyWakeups;
|
||||
|
||||
struct YAP_blob_t *BlobTypes;
|
||||
struct AtomEntryStruct *Blobs;
|
||||
UInt NOfBlobs;
|
||||
UInt NOfBlobsMax;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar Blobs_Lock;
|
||||
#endif
|
||||
} w_local;
|
20
misc/ATOMS
20
misc/ATOMS
@ -68,7 +68,7 @@ A Chars N "chars"
|
||||
A Charset N "charset"
|
||||
A ChType F "$char_type"
|
||||
A CleanCall F "$clean_call"
|
||||
A Colomn N ":"
|
||||
A Colon N ":"
|
||||
A CodeSpace N "code_space"
|
||||
A Codes N "codes"
|
||||
A CoInductive N "coinductive"
|
||||
@ -84,6 +84,7 @@ A Cputime N "cputime"
|
||||
A Create N "create"
|
||||
A Creep F "$creep"
|
||||
A CryptAtoms N "crypt_atoms"
|
||||
A Curly N "{}"
|
||||
A Csult F "$csult"
|
||||
A CurrentModule F "$current_module"
|
||||
A Cut N "!"
|
||||
@ -183,6 +184,7 @@ A HeapUsed N "heapused"
|
||||
A HugeInt N "huge_int"
|
||||
A IDB N "idb"
|
||||
A IOMode N "io_mode"
|
||||
A I N "i"
|
||||
A Id N "id"
|
||||
A Ignore N "ignore"
|
||||
A Inf N "inf"
|
||||
@ -197,6 +199,7 @@ A IntOverflow N "int_overflow"
|
||||
A Integer N "integer"
|
||||
A InternalCompilerError N "internal_compiler_error"
|
||||
A Is N "is"
|
||||
A J N "j"
|
||||
A Key N "key"
|
||||
A LDLibraryPath N "LD_LIBRARY_PATH"
|
||||
A LONGINT N "LongInt"
|
||||
@ -255,6 +258,7 @@ A NotLessThanZero N "not_less_than_zero"
|
||||
A NotNewline N "not_newline"
|
||||
A NotZero N "not_zero"
|
||||
A Number N "number"
|
||||
A Obj N "o__bj__"
|
||||
A Off N "off"
|
||||
A Offline N "offline"
|
||||
A On N "on"
|
||||
@ -378,9 +382,10 @@ A SyntaxErrorHandler N "syntax_error_handler"
|
||||
A System N "system"
|
||||
A SystemError N "SYSTEM_ERROR_INTERNAL"
|
||||
A SystemLibraryDir N "system_library_directory"
|
||||
A Term N "term"
|
||||
A Terms N "terms"
|
||||
A T N "t"
|
||||
A Term N "term"
|
||||
A TermExpansion N "term_expansion"
|
||||
A Terms N "terms"
|
||||
A Text N "text"
|
||||
A TextStream N "text_stream"
|
||||
A Thread N "thread"
|
||||
@ -395,6 +400,7 @@ A Trail N "trail"
|
||||
A True N "true"
|
||||
A Tty N "tty"
|
||||
A Ttys N "ttys"
|
||||
A Tuple N "tuple"
|
||||
A Txt N "txt"
|
||||
A TypeError N "type_error"
|
||||
A Undefined N "undefined"
|
||||
@ -449,6 +455,7 @@ F CleanCall CleanCall 2
|
||||
F Clist When 4
|
||||
F Codes Codes 2
|
||||
F Codes1 Codes 1
|
||||
F Colon Colon 2
|
||||
F Comma Comma 2
|
||||
F CommentHook CommentHook 3
|
||||
F Context2 Context 2
|
||||
@ -457,12 +464,14 @@ F Creep Creep 1
|
||||
F Csult Csult 2
|
||||
F CurrentModule CurrentModule 1
|
||||
F CutBy CutBy 1
|
||||
F Curly Curly 1
|
||||
F DBREF DBREF 1
|
||||
F Diff Diff 2
|
||||
F DoLogUpdClause DoLogUpdClause 6
|
||||
F DoLogUpdClause0 DoLogUpdClause0 6
|
||||
F DoLogUpdClauseErase DoLogUpdClauseErase 6
|
||||
F DoStaticClause DoStaticClause 5
|
||||
F Dollar Dollar 1
|
||||
F DollarVar DollarVar 1
|
||||
F DomainError DomainError 2
|
||||
F Dot Dot 2
|
||||
@ -504,21 +513,24 @@ F GoalExpansion2 GoalExpansion 2
|
||||
F GoalExpansion GoalExpansion 3
|
||||
F HandleThrow HandleThrow 3
|
||||
F Hat Hat 2
|
||||
F I I 2
|
||||
F Id Id 1
|
||||
F Is Is 2
|
||||
F J J 2
|
||||
F LastExecuteWithin LastExecuteWithin 1
|
||||
F List Dot 2
|
||||
F LOOP LOOP 1
|
||||
F MegaClause MegaClause 2
|
||||
F MetaCall MetaCall 4
|
||||
F Minus Minus 2
|
||||
F Module Colomn 2
|
||||
F Module Colon 2
|
||||
F MultiFileClause MfClause 5
|
||||
F Mutable MutableVariable (sizeof(timed_var)/sizeof(CELL))
|
||||
F Mutex Mutex 2
|
||||
F NotImplemented NotImplemented 2
|
||||
F NBQueue Queue 4
|
||||
F Not Not 1
|
||||
F Obj Obj 1
|
||||
F Or Semic 2
|
||||
F PermissionError PermissionError 3
|
||||
F Plus Plus 2
|
||||
|
@ -13,9 +13,9 @@
|
||||
|
||||
main :-
|
||||
warning(Warning),
|
||||
file_filter_with_init('misc/ATOMS','H/generated/tatoms.h',gen_fields, Warning, ['tatoms.h']),
|
||||
file_filter_with_init('misc/ATOMS','H/generated/iatoms.h',gen_decl, Warning, ['iatoms.h']),
|
||||
file_filter_with_init('misc/ATOMS','H/generated/ratoms.h',gen_rcov, Warning, ['ratoms.h']).
|
||||
file_filter_with_init('H/ATOMS','H/generated/tatoms.h',gen_fields, Warning, ['tatoms.h']),
|
||||
file_filter_with_init('H/ATOMS','H/generated/iatoms.h',gen_decl, Warning, ['iatoms.h']),
|
||||
file_filter_with_init('H/ATOMS','H/generated/ratoms.h',gen_rcov, Warning, ['ratoms.h']).
|
||||
|
||||
warning('~n /* This file, ~a, was generated automatically by \"yap -L misc/buildatoms\"~n {lease do not update, update misc/ATOMS instead */~n~n').
|
||||
|
||||
|
343
misc/buildheap
343
misc/buildheap
@ -1,343 +0,0 @@
|
||||
|
||||
:- use_module(library(lineutils),
|
||||
[file_filter_with_initialization/5,
|
||||
split/3,
|
||||
glue/3]).
|
||||
|
||||
:- use_module(library(lists),
|
||||
[append/2,
|
||||
append/3]).
|
||||
|
||||
:- initialization(main).
|
||||
|
||||
:- dynamic globals/1.
|
||||
|
||||
:- yap_flag(write_strings,on).
|
||||
|
||||
:- style_check(all).
|
||||
|
||||
main :-
|
||||
warning(Warning),
|
||||
file_filter_with_initialization('misc/HEAPFIELDS','H/hstruct.h',gen_struct,Warning,['hstruct.h','HEAPFIELDS']),
|
||||
file_filter_with_initialization('misc/HEAPFIELDS','H/dhstruct.h',gen_dstruct,Warning,['dhstruct.h','HEAPFIELDS']),
|
||||
file_filter_with_initialization('misc/HEAPFIELDS','H/rhstruct.h',gen_hstruct,Warning,['rhstruct.h','HEAPFIELDS']),
|
||||
file_filter_with_initialization('misc/HEAPFIELDS','H/ihstruct.h',gen_init,Warning,['ihstruct.h','HEAPFIELDS']).
|
||||
%file_filter_with_initialization('misc/GLOBALS','H/hglobals.h',gen_struct,Warning,['hglobals.h','GLOBALS']),
|
||||
%file_filter_with_initialization('misc/GLOBALS','H/dglobals.h',gen_dstruct,Warning,['dglobals.h','GLOBALS']),
|
||||
%file_filter_with_initialization('misc/GLOBALS','H/rglobals.h',gen_hstruct,Warning,['rglobals.h','GLOBALS']),
|
||||
%file_filter_with_initialization('misc/GLOBALS','H/iglobals.h',gen_init,Warning,['iglobals.h','GLOBALS']),
|
||||
%file_filter_with_initialization('misc/LOCALS','H/hlocals.h',gen_struct,Warning,['hlocals.h','LOCALS']),
|
||||
%file_filter_with_initialization('misc/LOCALS','H/dlocals.h',gen_dstruct,Warning,['dlocals.h','LOCALS']),
|
||||
%file_filter_with_initialization('misc/LOCALS','H/rlocals.h',gen_hstruct,Warning,['rlocals.h','LOCALS']),
|
||||
%file_filter_with_initialization('misc/LOCALS','H/ilocals.h',gen_init,Warning,['ilocals.h','LOCALS']).
|
||||
|
||||
warning('~n /* This file, ~a, was generated automatically by \"yap -L misc/buildheap\"~n please do not update, update misc/~a instead */~n~n').
|
||||
|
||||
/* define the field */
|
||||
gen_struct(Inp,"") :-
|
||||
Inp = [0'/,0'/|_], !.
|
||||
gen_struct(Inp,"") :-
|
||||
Inp = [0'/,0'*|_], !.
|
||||
gen_struct(Inp, Out) :-
|
||||
Inp = [0'#|_], !, Out = Inp. % '
|
||||
gen_struct(Inp,"") :-
|
||||
Inp = [0'.|_], !. %'
|
||||
gen_struct(Inp,Out) :-
|
||||
Inp = "START_WORKER_LOCAL", !,
|
||||
Out = "typedef struct worker_local {".
|
||||
gen_struct(Inp,Out) :-
|
||||
Inp = "END_WORKER_LOCAL", !,
|
||||
Out = "} w_local;".
|
||||
gen_struct(Inp,Out) :-
|
||||
Inp = "START_HEAP", !,
|
||||
Out = "typedef struct worker_local {".
|
||||
gen_struct(Inp,Out) :-
|
||||
Inp = "END_HEAP", !,
|
||||
Out = "} w_local;".
|
||||
gen_struct(Inp,Out) :-
|
||||
Inp = "START_GLOBAL_DATA", !,
|
||||
Out = "typedef struct global_data {".
|
||||
gen_struct(Inp,Out) :-
|
||||
Inp = "END_GLOBAL_DATA", !,
|
||||
Out = "} w_shared;".
|
||||
gen_struct(Inp,Out) :-
|
||||
Inp = "ATOMS", !,
|
||||
Out = "#include \"tatoms.h\"".
|
||||
gen_struct(Inp,Out) :-
|
||||
split(Inp," ",["struct",Type, Field|_]), !,
|
||||
append([" struct ",Type," ",Field,";"], Out).
|
||||
gen_struct(Inp,Out) :-
|
||||
split(Inp," ",["union",Type, Field|_]), !,
|
||||
append([" union ",Type," ",Field,";"], Out).
|
||||
gen_struct(Inp,Out) :-
|
||||
split(Inp," ",["const",Type, Field|_]), !,
|
||||
append([" const ",Type," ",Field,";"], Out).
|
||||
gen_struct(Inp,"") :-
|
||||
split(Inp," ",["void","void"|_]), !.
|
||||
gen_struct(Inp,Out) :-
|
||||
split(Inp," ",[Type, Field|_]), !,
|
||||
append([" ",Type," ",Field,";"], Out).
|
||||
gen_struct(Inp,_) :-
|
||||
split(Inp," ",[_, _, _| _]),
|
||||
format(user_error,"OOPS: could not gen_struct for ~s~n",[Inp]).
|
||||
|
||||
gen_dstruct(Inp,"") :-
|
||||
Inp = [0'/,0'/|_], !.
|
||||
gen_dstruct(Inp,"") :-
|
||||
Inp = [0'/,0'*|_], !.
|
||||
gen_dstruct(Inp, Out) :-
|
||||
Inp = [0'#|_], !, Out = Inp. % '
|
||||
gen_dstruct(Inp,"") :-
|
||||
Inp = "START_WORKER_LOCAL", !,
|
||||
assert(globals(worker)).
|
||||
gen_dstruct(Inp,"") :-
|
||||
Inp = "END_WORKER_LOCAL", !,
|
||||
retract(globals(worker)).
|
||||
gen_dstruct(Inp,"") :-
|
||||
Inp = "START_GLOBAL_DATA", !,
|
||||
assert(globals(all)).
|
||||
gen_dstruct(Inp,"") :-
|
||||
Inp = "END_GLOBAL_DATA", !,
|
||||
retract(globals(all)).
|
||||
gen_dstruct(Inp,Out) :-
|
||||
Inp = "ATOMS", !,
|
||||
Out = "".
|
||||
gen_dstruct(Inp,"") :-
|
||||
split(Inp," ",["void","void"|_]), !.
|
||||
gen_dstruct(Inp,Out) :-
|
||||
split(Inp," ",["struct"|Inp2]), !,
|
||||
glue(Inp2, " ", Inp3),
|
||||
gen_dstruct(Inp3, Out).
|
||||
gen_dstruct(Inp,Out) :-
|
||||
split(Inp," ",["union"|Inp2]), !,
|
||||
glue(Inp2, " ", Inp3),
|
||||
gen_dstruct(Inp3, Out).
|
||||
gen_dstruct(Inp,Out) :-
|
||||
split(Inp," ",["const"|Inp2]), !,
|
||||
glue(Inp2, " ", Inp3),
|
||||
gen_dstruct(Inp3, Out).
|
||||
gen_dstruct(Inp,Out) :-
|
||||
split(Inp," ",[_, Field, Name|_]), !,
|
||||
cut_c_stuff(Field, RField),
|
||||
fetch_name(Global),
|
||||
append(["#define ",Name," ",Global,RField], Out).
|
||||
gen_dstruct(Inp,_) :-
|
||||
split(Inp," ",[_, _, _| _]),
|
||||
format(user_error,"OOPS: could not gen_dstruct for ~s~n",[Inp]).
|
||||
|
||||
fetch_name(Global) :-
|
||||
globals(all), !,
|
||||
Global = "Yap_global->".
|
||||
fetch_name(Global) :-
|
||||
globals(worker), !,
|
||||
Global = "LOCAL->".
|
||||
fetch_name(Global) :-
|
||||
globals(worker_init), !,
|
||||
Global = "REMOTE(wid)->".
|
||||
fetch_name(Global) :-
|
||||
Global = "Yap_heap_regs->".
|
||||
|
||||
fetch_name(Global,RField,_) :-
|
||||
globals(worker_init), !,
|
||||
append("REMOTE(wid)->",RField,Global).
|
||||
fetch_name(Global,_,Global).
|
||||
|
||||
% handle *field[4]
|
||||
cut_c_stuff([0'*|Name], RName) :- !, % 'cut *
|
||||
cut_c_stuff(Name, RName).
|
||||
cut_c_stuff(Name, RName) :-
|
||||
cut_mat(Name, RName).
|
||||
|
||||
cut_mat([], []).
|
||||
cut_mat([0'[|_], []) :- !. %'
|
||||
cut_mat([H|Name], [H|RName]) :-
|
||||
cut_mat(Name, RName).
|
||||
|
||||
gen_hstruct(Inp,"") :-
|
||||
Inp = [0'/,0'/|_], !.
|
||||
gen_hstruct(Inp,"") :-
|
||||
Inp = [0'.|_], !. %'
|
||||
gen_hstruct(Inp,"") :-
|
||||
Inp = [0'/,0'*|_], !.
|
||||
gen_hstruct(Inp,Out) :-
|
||||
Inp = "ATOMS", !,
|
||||
Out = "#include \"ratoms.h\"".
|
||||
gen_hstruct(Inp,Out) :-
|
||||
Inp = "START_WORKER_LOCAL", !,
|
||||
Out = "static void RestoreWorker(int wid USES_REGS) {",
|
||||
assert(globals(worker_init)).
|
||||
gen_hstruct(Inp,Out) :-
|
||||
Inp = "END_WORKER_LOCAL", !,
|
||||
Out = "}",
|
||||
retract(globals(worker_init)).
|
||||
gen_hstruct(Inp,Out) :-
|
||||
Inp = "START_GLOBAL_DATA", !,
|
||||
Out = "static void RestoreGlobal(void) {",
|
||||
assert(globals(all)).
|
||||
gen_hstruct(Inp,Out) :-
|
||||
Inp = "END_GLOBAL_DATA", !,
|
||||
Out = "}",
|
||||
retract(globals(all)).
|
||||
gen_hstruct(Inp, Out) :-
|
||||
Inp = [0'#|_], !, Out = Inp. % '
|
||||
gen_hstruct(Inp,Out) :-
|
||||
split(Inp," ",["struct"|Inp2]), !,
|
||||
glue(Inp2, " ", Inp3),
|
||||
gen_hstruct(Inp3,Out).
|
||||
gen_hstruct(Inp,Out) :-
|
||||
split(Inp," ",["union"|Inp2]), !,
|
||||
glue(Inp2, " ", Inp3),
|
||||
gen_hstruct(Inp3,Out).
|
||||
gen_hstruct(Inp,Out) :-
|
||||
split(Inp," ",["const"|Inp2]), !,
|
||||
glue(Inp2, " ", Inp3),
|
||||
gen_hstruct(Inp3,Out).
|
||||
gen_hstruct(Inp,Out) :-
|
||||
split(Inp," ",[_, Field, MacroName, "MkAT", _]), !,
|
||||
fetch_name(Global,Field,MacroName),
|
||||
append([" ",Global," = AtomTermAdjust(",Global,");"], Out).
|
||||
gen_hstruct(Inp,Out) :-
|
||||
split(Inp," ",[_, Field, MacroName, "MkPred"| _]), !,
|
||||
cut_c_stuff(Field, RField),
|
||||
fetch_name(Global,RField,MacroName),
|
||||
append([" ",Global," = PtoPredAdjust(",Global,");"], Out).
|
||||
gen_hstruct(Inp,Out) :-
|
||||
split(Inp," ",[_, Field, MacroName, "MkOp", Name]), !,
|
||||
fetch_name(Global,Field,MacroName),
|
||||
append([" ",Global," = Yap_opcode(",Name,");"], Out).
|
||||
gen_hstruct(Inp,Out) :-
|
||||
split(Inp," ",[_, Field, MacroName, "MkLock"]), !,
|
||||
fetch_name(Global,Field,MacroName),
|
||||
append([" REINIT_LOCK(",Global,");"], Out).
|
||||
gen_hstruct(Inp,Out) :-
|
||||
split(Inp," ",[_, Field, MacroName, "MkRWLock"]), !,
|
||||
fetch_name(Global,Field,MacroName),
|
||||
append([" REINIT_RWLOCK(",Global,");"], Out).
|
||||
gen_hstruct(Inp,Out) :-
|
||||
split(Inp," ",[_, Field, MacroName, "MkInstE",OP]), !,
|
||||
cut_c_stuff(Field, RField),
|
||||
fetch_name(Global,RField,MacroName),
|
||||
append([" ",Global,"->opc = Yap_opcode(",OP,");"], Out).
|
||||
gen_hstruct(Inp,"") :-
|
||||
split(Inp," ",[_, _, _, _]), !.
|
||||
gen_hstruct(Inp,"") :-
|
||||
split(Inp," ",[_, _, _, _, "void"]), !.
|
||||
gen_hstruct(Inp,Restore) :-
|
||||
split(Inp," ",[_, _, _, _, Restore0]),
|
||||
append("Restore",_,Restore0), !,
|
||||
append([" ",Restore0,";"],Restore). %'
|
||||
gen_hstruct(Inp,Out) :-
|
||||
split(Inp," ",[_, Field, MacroName, _, Adjust]),
|
||||
append(Adjust,"Adjust",_), !,
|
||||
cut_c_stuff(Field, RField),
|
||||
fetch_name(Global,RField,MacroName),
|
||||
append([" ",Global," = ",Adjust,"(",Global,");"], Out).
|
||||
gen_hstruct(Inp,_) :-
|
||||
split(Inp," ",[_, _, _| _]),
|
||||
format(user_error,"OOPS: could not gen_hstruct for ~s~n",[Inp]).
|
||||
|
||||
gen_init(Inp,"") :-
|
||||
Inp = [0'/,0'*|_], !.
|
||||
gen_init(Inp,"") :-
|
||||
Inp = [0'/,0'/|_], !.
|
||||
gen_init(Inp, Out) :-
|
||||
Inp = [0'#|_], !, Out = Inp. % '
|
||||
gen_init(Inp,Out) :-
|
||||
Inp = "ATOMS", !,
|
||||
Out = "#include \"iatoms.h\"".
|
||||
gen_init(Inp,Out) :-
|
||||
Inp = "START_WORKER_LOCAL", !,
|
||||
Out = "static void InitWorker(int wid) {",
|
||||
assert(globals(worker_init)).
|
||||
gen_init(Inp,Out) :-
|
||||
Inp = "END_WORKER_LOCAL", !,
|
||||
Out = "}",
|
||||
retract(globals(worker_init)).
|
||||
gen_init(Inp,Out) :-
|
||||
Inp = "START_GLOBAL_DATA", !,
|
||||
Out = "static void InitGlobal(void) {",
|
||||
assert(globals(all)).
|
||||
gen_init(Inp,Out) :-
|
||||
Inp = "END_GLOBAL_DATA", !,
|
||||
Out = "}",
|
||||
retract(globals(all)).
|
||||
gen_init(Inp,Out) :-
|
||||
Inp = "START_HEAP", !,
|
||||
Out = "static void InitGlobal(void) {",
|
||||
assert(globals(heap)).
|
||||
gen_init(Inp,Out) :-
|
||||
Inp = "END_HEAP", !,
|
||||
Out = "}",
|
||||
retract(globals(heap)).
|
||||
gen_init(Inp,Out) :-
|
||||
split(Inp," ",["struct"|Inp2]), !,
|
||||
glue(Inp2, " ", Inp3),
|
||||
gen_init(Inp3, Out).
|
||||
gen_init(Inp,Out) :-
|
||||
split(Inp," ",["union"|Inp2]), !,
|
||||
glue(Inp2, " ", Inp3),
|
||||
gen_init(Inp3, Out).
|
||||
gen_init(Inp,Out) :-
|
||||
split(Inp," ",["const"|Inp2]), !,
|
||||
glue(Inp2, " ", Inp3),
|
||||
gen_init(Inp3, Out).
|
||||
gen_init(Inp,"") :-
|
||||
split(Inp," ",[_, _, _, "void"|_]), !.
|
||||
gen_init(Inp,Init) :-
|
||||
split(Inp," ",[_, _, _, Init0| _]),
|
||||
append("Init",_,Init0), !,
|
||||
append([" ",Init0,";"],Init).
|
||||
gen_init(Inp,Init) :-
|
||||
split(Inp," ",[_, _, _, Init0| _]),
|
||||
append("Yap_Init",_,Init0), !,
|
||||
append([" ",Init0,";"],Init).
|
||||
gen_init(Inp,Init) :-
|
||||
split(Inp," ",[_, _, _, Init0| _]),
|
||||
append("Yap_init",_,Init0), !,
|
||||
append([" ",Init0,";"],Init).
|
||||
gen_init(Inp,Out) :-
|
||||
split(Inp," ",[_, Field, MacroName, "MkAT", AtomName]), !,
|
||||
cut_c_stuff(Field, RField),
|
||||
fetch_name(Global,RField,MacroName),
|
||||
append([" ",Global," = MkAtomTerm(",AtomName,");"], Out).
|
||||
gen_init(Inp,Out) :-
|
||||
split(Inp," ",[_, Field, MacroName, "MkOp", Name]), !,
|
||||
fetch_name(Global,Field,MacroName),
|
||||
append([" ",Global," = Yap_opcode(",Name,");"], Out).
|
||||
gen_init(Inp,Out) :-
|
||||
split(Inp," ",[_, Field, MacroName, "MkLock"]), !,
|
||||
fetch_name(Global,Field,MacroName),
|
||||
append([" INIT_LOCK(",Global,");"], Out).
|
||||
gen_init(Inp,Out) :-
|
||||
split(Inp," ",[_, Field, MacroName, "MkRWLock"]), !,
|
||||
fetch_name(Global,Field,MacroName),
|
||||
append([" INIT_RWLOCK(",Global,");"], Out).
|
||||
gen_init(Inp,Out) :-
|
||||
split(Inp," ",[_, Field, MacroName, "MkInstE",OP]), !,
|
||||
cut_c_stuff(Field, RField),
|
||||
fetch_name(Global,RField,MacroName),
|
||||
append([" ",Global,"->opc = Yap_opcode(",OP,");"], Out).
|
||||
gen_init(Inp,Out) :-
|
||||
split(Inp," ",[_, Field, MacroName, "MkLogPred", Atom, "0", Module]), !,
|
||||
cut_c_stuff(Field, RField),
|
||||
fetch_name(Global,RField,MacroName),
|
||||
append([" ",Global," = Yap_MkLogPred(RepPredProp(PredPropByAtom(",Atom,",",Module,")));"], Out).
|
||||
gen_init(Inp,Out) :-
|
||||
split(Inp," ",[_, Field, MacroName, "MkLogPred", Atom, Arity, Module]), !,
|
||||
cut_c_stuff(Field, RField),
|
||||
fetch_name(Global,RField,MacroName),
|
||||
append([" ",Global," = Yap_MkLogPred(RepPredProp(PredPropByFunc(Yap_MkFunctor(",Atom,",",Arity,"),",Module,")));"], Out).
|
||||
gen_init(Inp,Out) :-
|
||||
split(Inp," ",[_, Field, MacroName, "MkLogPred", Fun, Module]), !,
|
||||
cut_c_stuff(Field, RField),
|
||||
fetch_name(Global,RField,MacroName),
|
||||
append([" ",Global," = Yap_MkLogPred(RepPredProp(PredPropByFunc(",Fun,",",Module,")));"], Out).
|
||||
gen_init(Inp,Out) :-
|
||||
split(Inp," ",[_, Field, MacroName, F0|_]),
|
||||
append("=",F,F0), !,
|
||||
cut_c_stuff(Field, RField),
|
||||
fetch_name(Global,RField,MacroName),
|
||||
append([" ",Global," = ",F,";"], Out).
|
||||
gen_init(Inp,_) :-
|
||||
split(Inp," ",[_, _, _| _]),
|
||||
format(user_error,"OOPS: could not gen_init for ~s~n",[Inp]).
|
@ -21,22 +21,22 @@ file_filter_with_initialization(A,B,C,D,E) :-
|
||||
|
||||
main :-
|
||||
warning(Warning),
|
||||
file_filter_with_initialization('misc/HEAPFIELDS','H/generated/hstruct.h',gen_struct,Warning,['hstruct.h','HEAPFIELDS']),
|
||||
file_filter_with_initialization('misc/HEAPFIELDS','H/generated/dhstruct.h',gen_dstruct,Warning,['dhstruct.h','HEAPFIELDS']),
|
||||
file_filter_with_initialization('misc/HEAPFIELDS','H/generated/h0struct.h',gen_0struct,Warning,['d0hstruct.h','HEAPFIELDS']),
|
||||
file_filter_with_initialization('misc/HEAPFIELDS','H/generated/rhstruct.h',gen_hstruct,Warning,['rhstruct.h','HEAPFIELDS']),
|
||||
file_filter_with_initialization('misc/HEAPFIELDS','H/generated/ihstruct.h',gen_init,Warning,['ihstruct.h','HEAPFIELDS']),
|
||||
file_filter_with_initialization('misc/GLOBALS','H/generated/h0globals.h',gen_0struct,Warning,['hglobals.h','GLOBALS']),
|
||||
file_filter_with_initialization('misc/GLOBALS','H/generated/hglobals.h',gen_struct,Warning,['hglobals.h','GLOBALS']),
|
||||
file_filter_with_initialization('misc/GLOBALS','H/generated/dglobals.h',gen_dstruct,Warning,['dglobals.h','GLOBALS']),
|
||||
file_filter_with_initialization('misc/GLOBALS','H/generated/iglobals.h',gen_init,Warning,['iglobals.h','GLOBALS']),
|
||||
%% file_filter_with_initialization('misc/GLOBALS','H/generated/i0globals.h',gen_0init,Warning,['iglobals.h','GLOBALS']),
|
||||
file_filter_with_initialization('misc/LOCALS','H/generated/hlocals.h',gen_struct,Warning,['hlocals.h','LOCALS']),
|
||||
file_filter_with_initialization('misc/LOCALS','H/generated/dlocals.h',gen_dstruct,Warning,['dlocals.h','LOCALS']),
|
||||
file_filter_with_initialization('misc/LOCALS','H/generated/rlocals.h',gen_hstruct,Warning,['rlocals.h','LOCALS']),
|
||||
file_filter_with_initialization('misc/LOCALS','H/generated/ilocals.h',gen_init,Warning,['ilocals.h','LOCALS']).
|
||||
file_filter_with_initialization('H/HEAPFIELDS','H/generated/hstruct.h',gen_struct,Warning,['hstruct.h','HEAPFIELDS']),
|
||||
file_filter_with_initialization('H/HEAPFIELDS','H/generated/dhstruct.h',gen_dstruct,Warning,['dhstruct.h','HEAPFIELDS']),
|
||||
file_filter_with_initialization('H/HEAPFIELDS','H/generated/h0struct.h',gen_0struct,Warning,['d0hstruct.h','HEAPFIELDS']),
|
||||
file_filter_with_initialization('H/HEAPFIELDS','H/generated/rhstruct.h',gen_hstruct,Warning,['rhstruct.h','HEAPFIELDS']),
|
||||
file_filter_with_initialization('H/HEAPFIELDS','H/generated/ihstruct.h',gen_init,Warning,['ihstruct.h','HEAPFIELDS']),
|
||||
file_filter_with_initialization('H/GLOBALS','H/generated/h0globals.h',gen_0struct,Warning,['hglobals.h','GLOBALS']),
|
||||
file_filter_with_initialization('H/GLOBALS','H/generated/hglobals.h',gen_struct,Warning,['hglobals.h','GLOBALS']),
|
||||
file_filter_with_initialization('H/GLOBALS','H/generated/dglobals.h',gen_dstruct,Warning,['dglobals.h','GLOBALS']),
|
||||
file_filter_with_initialization('H/GLOBALS','H/generated/iglobals.h',gen_init,Warning,['iglobals.h','GLOBALS']),
|
||||
%% file_filter_with_initialization('H/GLOBALS','H/generated/i0globals.h',gen_0init,Warning,['iglobals.h','GLOBALS']),
|
||||
file_filter_with_initialization('H/LOCALS','H/generated/hlocals.h',gen_struct,Warning,['hlocals.h','LOCALS']),
|
||||
file_filter_with_initialization('H/LOCALS','H/generated/dlocals.h',gen_dstruct,Warning,['dlocals.h','LOCALS']),
|
||||
file_filter_with_initialization('H/LOCALS','H/generated/rlocals.h',gen_hstruct,Warning,['rlocals.h','LOCALS']),
|
||||
file_filter_with_initialization('H/LOCALS','H/generated/ilocals.h',gen_init,Warning,['ilocals.h','LOCALS']).
|
||||
|
||||
warning('~n /* This file, ~a, was generated automatically by \"yap -L misc/buildlocalglobal\"~n please do not update, update misc/~a instead */~n~n').
|
||||
warning('~n /* This file, ~a, was generated automatically by \"yap -L misc/buildlocalglobal\"~n please do not update, update H/~a instead */~n~n').
|
||||
|
||||
|
||||
|
||||
@ -121,19 +121,19 @@ gen_0struct(Inp,Out) :-
|
||||
Inp = "ATOMS", !,
|
||||
Out = "#include \"tatoms.h\"".
|
||||
gen_0struct(Inp,Out) :-
|
||||
split(Inp," ",["struct",Type, Field|L]), !,
|
||||
split(Inp," ",["struct",_Type, _Field|_L]), !,
|
||||
extract("struct", Inp, NInp),
|
||||
gen_0struct( NInp, NOut ),
|
||||
extract("EXTERNAL", NOut, IOut),
|
||||
append("EXTERNAL struct ", IOut, Out).
|
||||
gen_0struct(Inp,Out) :-
|
||||
split(Inp," ",["const",Type, Field|L]), !,
|
||||
split(Inp," ",["const",_Type, _Field|_L]), !,
|
||||
extract("const", Inp, NInp),
|
||||
gen_0struct( NInp, NOut ),
|
||||
extract("EXTERNAL", NOut, IOut),
|
||||
append("EXTERNAL const ", IOut, Out).
|
||||
gen_0struct(Inp,Out) :-
|
||||
split(Inp," ",["union",Type, Field|L]), !,
|
||||
split(Inp," ",["union",_Type, _Field|_L]), !,
|
||||
extract("union", Inp, NInp),
|
||||
gen_0struct( NInp, NOut ),
|
||||
extract("EXTERNAL", NOut, IOut),
|
||||
|
Reference in New Issue
Block a user