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/runtime/smlnj-rt-lib/record-concat.c
ViewVC logotype

Annotation of /sml/branches/rt-transition/runtime/smlnj-rt-lib/record-concat.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2982 - (view) (download) (as text)

1 : jhr 2898 /* record-concat.c
2 :     *
3 :     * COPYRIGHT (c) 1998 Bell Labs, Lucent Technologies.
4 :     *
5 :     * Concatenation for records.
6 :     */
7 :    
8 :    
9 :     #include "ml-base.h"
10 :     #include "ml-values.h"
11 :     #include "ml-state.h"
12 :     #include "ml-objects.h"
13 :     #include "gc.h"
14 :     #include "smlnj-runtime.h"
15 :     #include "ml-c.h"
16 :    
17 :     /* recordConcat : (object * object) -> object
18 :     *
19 :     */
20 : jhr 2982 ML_object_t recordConcat (ml_state_t *msp, ML_object_t r1, ML_object_t r2)
21 : jhr 2898 {
22 :     if (r1 == ML_unit)
23 :     return r2;
24 :     else if (r2 == ML_unit)
25 :     return r1;
26 :     else {
27 :     ml_val_t res = RecordConcat (msp, r1, r2);
28 :    
29 :     if (res == ML_unit)
30 : jhr 2982 return RAISE_ERROR(msp, "recordConcat: not a record");
31 : jhr 2898 else
32 :     return res;
33 :     }
34 :    
35 :     }

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