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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3424 - (view) (download)

1 : jhr 2848 /* smlnj-runtime.idl
2 :     *
3 :     * COPYRIGHT (c) 2001 Bell Labs, Lucent Technologies.
4 :     *
5 :     * This file is a ML-IDL specification of the SML/NJ run-time
6 :     * interfaces that are callable by SML.
7 :     */
8 :    
9 :     sml_structure ("SMLNJRuntime");
10 :     sml_signature ("SMLNJ_RUNTIME");
11 :     clib_name ("SMLNJRuntime");
12 :    
13 : afix 3421 cpp_quote("#include \"SMLNJ/ml-values.hxx\"");
14 :     cpp_quote("#include \"value-access.hxx\"");
15 :    
16 : jhr 2848 /******************** Useful IDL types ********************/
17 :    
18 :     typedef [string] char* idl_string;
19 :    
20 :     /******************** Common SML types ********************/
21 :    
22 : afix 3421 typedef [sml_type ("Word8Vector.vector"), cpp_type ("ML_Word8Vector")] sml_value ML_word8vec_t;
23 :     typedef [sml_type ("Word8Vector.vector option"), cpp_type ("ML_Option<ML_Word8Vector>")] sml_value ML_word8vec_opt_t;
24 :     typedef [sml_type ("Word8Array.array"), cpp_type ("ML_Word8Array")] sml_value ML_word8arr_t;
25 :     typedef [sml_type ("CharVector.vector"), cpp_type ("ML_String")] sml_value ML_charvec_t;
26 :     typedef [sml_type ("CharVector.vector option"), cpp_type ("ML_Option<ML_String>")] sml_value ML_charvec_opt_t;
27 : jhr 2848 typedef [sml_type ("CharArray.array")] sml_value ML_chararr_t;
28 :     typedef [sml_type ("unit")] sml_value ML_unit_t;
29 : afix 3421 typedef [sml_type ("bool"), cpp_type ("ML_Bool")] sml_value ML_bool_t;
30 :     typedef [sml_type ("int"), cpp_type ("ML_Int")] sml_value ML_int_t;
31 :     typedef [sml_type ("Int32.int"), cpp_type ("ML_Int32")] sml_value ML_int32_t;
32 :     typedef [sml_type ("string"), cpp_type ("ML_String")] sml_value ML_string_t;
33 :     typedef [sml_type ("string option"), cpp_type ("ML_Option<ML_String>")] sml_value ML_string_opt_t;
34 :     typedef [sml_type ("string list"), cpp_type ("ML_List<ML_String>")] sml_value ML_string_list_t;
35 :     typedef [sml_type ("int option"), cpp_type ("ML_Option<ML_Int>")] sml_value ML_int_opt_t;
36 : jhr 2848 typedef [sml_type ("word array option")] sml_value ML_word_arr_opt_t;
37 :     typedef [sml_type ("int array option")] sml_value ML_int_arr_opt_t;
38 : afix 3421 typedef [sml_type ("(Int32.int * int) option"), cpp_type ("ML_Option<ML_Tuple2<ML_Int32, ML_Int> >")] sml_value ML_int_pair_opt_t;
39 :     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;
40 : afix 3424 typedef [sml_type ("CInterface.system_const"), cpp_type ("ML_Tuple2<ML_Int, ML_String>")] sml_value ML_sysconst_t;
41 :     typedef [sml_type ("CInterface.system_const list"), cpp_type ("ML_List<ML_Tuple2<ML_Int, ML_String> >")] sml_value ML_sysconst_list_t;
42 :     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;
43 : jhr 2848 typedef [sml_type ("Unsafe.Object.object")] sml_value ML_object_t;
44 : afix 3421 typedef [sml_type ("Unsafe.Object.object Vector.vector"), cpp_type ("ML_Vector<ML_Value>")] sml_value ML_objectvec_t;
45 : jhr 2848 typedef [sml_type ("Unsafe.Object.object -> Unsafe.Object.object")] sml_value ML_object_object_fn_t;
46 :    
47 :     /******************** Code objects ********************/
48 :     //getCodeName
49 :     [sml_context] ML_word8arr_t allocCode([in] sml_int nbytes);
50 :     //flushCache
51 :     [sml_context] ML_object_object_fn_t mkExec([in] ML_word8arr_t code, [in] sml_int entrypoint);
52 :     [sml_context] ML_objectvec_t mkLiterals([in] ML_word8vec_t arg);
53 :    
54 :     /******************** Profiling ********************/
55 :     [sml_context] void setTimer([in] ML_bool_t sts);
56 :     sml_int getQuantum();
57 :     [sml_context] void setTimeArray([in] ML_int_arr_opt_t prof_cnt_array);
58 :    
59 :     /******************** Interval timers ********************/
60 :     [sml_context] void intervalTick([out, ref] ML_int32_t *a, [out, ref] sml_int *b);
61 :     [sml_context] void setIntTimer([in] ML_int_pair_opt_t itv);
62 :    
63 :     /******************** Heap export ********************/
64 :     // [sml_context] void exportFn
65 :     [sml_context] ML_bool_t exportHeap([in] string fname);
66 :    
67 :     /******************** Signals ********************/
68 : jhr 3422 const sml_int IGNORE_SIG = 0;
69 :     const sml_int DEFAULT_SIG = 1;
70 :     const sml_int ENABLED_SIG = 2;
71 : jhr 2848 [sml_context] ML_sysconst_list_t listSignals();
72 :     [sml_context] sml_int getSigState([in] ML_sysconst_t sc);
73 :     [sml_context] void setSigState([in] ML_sysconst_t sc, [in] sml_int i);
74 :     [sml_context] ML_sysconst_list_opt_t getSigMask();
75 :     [sml_context] void setSigMask([in] ML_sysconst_list_opt_t m);
76 :     [sml_context] void pauseUntilSig();
77 :    
78 :     /******************** Misc. ********************/
79 :     [sml_context] ML_string_list_t rawArgv ();
80 :     void shiftArgv();
81 :     [sml_context] ML_string_opt_t sysInfo([in] string name);
82 :     [sml_context] void gcControl([in] ML_string_intref_list_t cmds);
83 :     [sml_context] void debug([in] string s);
84 :    
85 :     void dummy([in] string s);
86 :    
87 :     [sml_context] ML_object_t recordConcat([in] ML_object_t rec1, [in] ML_object_t rec2);
88 :     [sml_context] ML_object_t record1([in] ML_object_t obj);
89 :     [sml_context] ML_object_t blastIn([in] string s);
90 :     [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