diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1995-07-27 17:41:09 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1995-07-27 17:41:09 +0000 |
commit | 863984ea8ba4be4fc317680c3c457aa8f89c2c72 (patch) | |
tree | bf5238495f6f944178e294c623a68ceafee97df5 /byterun/mlvalues.h | |
parent | b44ab158b2735be981330ff8a0d696051a246cc6 (diff) |
Ajout du tag Double_array_tag.
Deplacement de copy_double dans floats.c.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@153 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/mlvalues.h')
-rw-r--r-- | byterun/mlvalues.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/byterun/mlvalues.h b/byterun/mlvalues.h index d9b1242f5..2f32ea70c 100644 --- a/byterun/mlvalues.h +++ b/byterun/mlvalues.h @@ -132,7 +132,7 @@ bits 63 10 9 8 7 0 #endif /* The lowest tag for blocks containing no value. */ -#define No_scan_tag (Num_tags - 5) +#define No_scan_tag (Num_tags - 6) /* 1- If tag < No_scan_tag : a tuple of fields. */ @@ -177,17 +177,23 @@ typedef opcode_t * code_t; #define Double_tag (No_scan_tag + 3) #define Double_wosize ((sizeof(double) / sizeof(value))) #ifndef ALIGN_DOUBLE -#define Double_val(v) (* (double *) (v)) -#define Store_double_val(v,d) (* (double *) (v) = (d)) +#define Double_val(v) (* (double *)(v)) +#define Store_double_val(v,d) (* (double *)(v) = (d)) #else double Double_val P((value)); void Store_double_val P((value,double)); #endif +/* Arrays of floating-point numbers. */ +#define Double_array_tag (No_scan_tag + 4) +#define Double_field(v,i) Double_val((value)((double *)(v) + (i))) +#define Store_double_field(v,i,d) \ + Store_double_val((value)((double *)(v) + (i)),d) + /* Finalized things. Just like abstract things, but the GC will call the [Final_fun] before deallocation. */ -#define Final_tag (No_scan_tag + 4) +#define Final_tag (No_scan_tag + 5) typedef void (*final_fun) P((value)); #define Final_fun(val) (((final_fun *) (val)) [0]) /* Also an l-value. */ |