Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/branches/rt-transition/idl-specs/smlnj-runtime.idl
ViewVC logotype

View of /sml/branches/rt-transition/idl-specs/smlnj-runtime.idl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3424 - (download) (annotate)
Mon Jul 27 20:18:56 2009 UTC (11 years, 9 months ago) by afix
File size: 4714 byte(s)
Adding type for sysconst list option
/* smlnj-runtime.idl
 *
 * COPYRIGHT (c) 2001 Bell Labs, Lucent Technologies.
 *
 * This file is a ML-IDL specification of the SML/NJ run-time
 * interfaces that are callable by SML.
 */

sml_structure ("SMLNJRuntime");
sml_signature ("SMLNJ_RUNTIME");
clib_name ("SMLNJRuntime");

cpp_quote("#include \"SMLNJ/ml-values.hxx\"");
cpp_quote("#include \"value-access.hxx\"");

/******************** Useful IDL types ********************/

typedef [string] char* idl_string;

/******************** Common SML types ********************/

typedef [sml_type ("Word8Vector.vector"), cpp_type ("ML_Word8Vector")] sml_value ML_word8vec_t;
typedef [sml_type ("Word8Vector.vector option"), cpp_type ("ML_Option<ML_Word8Vector>")] sml_value ML_word8vec_opt_t;
typedef [sml_type ("Word8Array.array"), cpp_type ("ML_Word8Array")] sml_value ML_word8arr_t;
typedef [sml_type ("CharVector.vector"), cpp_type ("ML_String")] sml_value ML_charvec_t;
typedef [sml_type ("CharVector.vector option"), cpp_type ("ML_Option<ML_String>")] sml_value ML_charvec_opt_t;
typedef [sml_type ("CharArray.array")] sml_value ML_chararr_t;
typedef [sml_type ("unit")] sml_value ML_unit_t;
typedef [sml_type ("bool"), cpp_type ("ML_Bool")] sml_value ML_bool_t;
typedef [sml_type ("int"), cpp_type ("ML_Int")] sml_value ML_int_t;
typedef [sml_type ("Int32.int"), cpp_type ("ML_Int32")] sml_value ML_int32_t;
typedef [sml_type ("string"), cpp_type ("ML_String")] sml_value ML_string_t;
typedef [sml_type ("string option"), cpp_type ("ML_Option<ML_String>")] sml_value ML_string_opt_t;
typedef [sml_type ("string list"), cpp_type ("ML_List<ML_String>")] sml_value ML_string_list_t;
typedef [sml_type ("int option"), cpp_type ("ML_Option<ML_Int>")] sml_value ML_int_opt_t;
typedef [sml_type ("word array option")] sml_value ML_word_arr_opt_t;
typedef [sml_type ("int array option")] sml_value ML_int_arr_opt_t;
typedef [sml_type ("(Int32.int * int) option"), cpp_type ("ML_Option<ML_Tuple2<ML_Int32, ML_Int> >")] sml_value ML_int_pair_opt_t;
typedef [sml_type ("(string * int ref) list"), cpp_type ("ML_List<ML_Tuple2<ML_String, ML_Ref<ML_Int> > >")] sml_value ML_string_intref_list_t;
typedef [sml_type ("CInterface.system_const"), cpp_type ("ML_Tuple2<ML_Int, ML_String>")] sml_value ML_sysconst_t;
typedef [sml_type ("CInterface.system_const list"), cpp_type ("ML_List<ML_Tuple2<ML_Int, ML_String> >")] sml_value ML_sysconst_list_t;
typedef [sml_type ("CInterface.system_const list option"), cpp_type ("ML_Option<ML_List<ML_Tuple2<ML_Int, ML_String> > >")] sml_value ML_sysconst_list_opt_t;
typedef [sml_type ("Unsafe.Object.object")] sml_value ML_object_t;
typedef [sml_type ("Unsafe.Object.object Vector.vector"), cpp_type ("ML_Vector<ML_Value>")] sml_value ML_objectvec_t;
typedef [sml_type ("Unsafe.Object.object -> Unsafe.Object.object")] sml_value ML_object_object_fn_t;

/******************** Code objects ********************/
//getCodeName
[sml_context] ML_word8arr_t allocCode([in] sml_int nbytes);
//flushCache
[sml_context] ML_object_object_fn_t mkExec([in] ML_word8arr_t code, [in] sml_int entrypoint);
[sml_context] ML_objectvec_t mkLiterals([in] ML_word8vec_t arg);

/******************** Profiling ********************/
[sml_context] void setTimer([in] ML_bool_t sts);
sml_int getQuantum();
[sml_context] void setTimeArray([in] ML_int_arr_opt_t prof_cnt_array);

/******************** Interval timers ********************/
[sml_context] void intervalTick([out, ref] ML_int32_t *a, [out, ref] sml_int *b);
[sml_context] void setIntTimer([in] ML_int_pair_opt_t itv);

/******************** Heap export ********************/
// [sml_context] void exportFn
[sml_context] ML_bool_t exportHeap([in] string fname);

/******************** Signals ********************/
const sml_int IGNORE_SIG = 0;
const sml_int DEFAULT_SIG = 1;
const sml_int ENABLED_SIG = 2;
[sml_context] ML_sysconst_list_t listSignals();
[sml_context] sml_int getSigState([in] ML_sysconst_t sc);
[sml_context] void setSigState([in] ML_sysconst_t sc, [in] sml_int i);
[sml_context] ML_sysconst_list_opt_t getSigMask();
[sml_context] void setSigMask([in] ML_sysconst_list_opt_t m);
[sml_context] void pauseUntilSig();

/******************** Misc. ********************/
[sml_context] ML_string_list_t rawArgv ();
void shiftArgv();
[sml_context] ML_string_opt_t sysInfo([in] string name);
[sml_context] void gcControl([in] ML_string_intref_list_t cmds);
[sml_context] void debug([in] string s);

void dummy([in] string s);

[sml_context] ML_object_t recordConcat([in] ML_object_t rec1, [in] ML_object_t rec2);
[sml_context] ML_object_t record1([in] ML_object_t obj);
[sml_context] ML_object_t blastIn([in] string s);
[sml_context] ML_word8vec_t blastOut([in] ML_object_t obj);

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0