~ubuntu-branches/ubuntu/wily/coq-doc/wily

« back to all changes in this revision

Viewing changes to kernel/byterun/coq_gc.h

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu, Stéphane Glondu, Samuel Mimram
  • Date: 2010-01-07 22:50:39 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100107225039-n3cq82589u0qt0s2
Tags: 8.2pl1-1
[ Stéphane Glondu ]
* New upstream release (Closes: #563669)
  - remove patches
* Packaging overhaul:
  - use git, advertise it in Vcs-* fields of debian/control
  - use debhelper 7 and dh with override
  - use source format 3.0 (quilt)
* debian/control:
  - set Maintainer to d-o-m, set Uploaders to Sam and myself
  - add Homepage field
  - bump Standards-Version to 3.8.3
* Register PDF documentation into doc-base
* Add debian/watch
* Update debian/copyright

[ Samuel Mimram ]
* Change coq-doc's description to mention that it provides documentation in
  pdf format, not postscript, closes: #543545.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***********************************************************************/
 
2
/*                                                                     */
 
3
/*                           Coq Compiler                              */
 
4
/*                                                                     */
 
5
/*        Benjamin Gregoire, projets Logical and Cristal               */
 
6
/*                        INRIA Rocquencourt                           */
 
7
/*                                                                     */
 
8
/*                                                                     */
 
9
/***********************************************************************/
 
10
 
 
11
#ifndef _COQ_CAML_GC_
 
12
#define _COQ_CAML_GC_
 
13
#include <caml/mlvalues.h>
 
14
#include <caml/alloc.h>
 
15
 
 
16
typedef void (*scanning_action) (value, value *);
 
17
 
 
18
 
 
19
CAMLextern char *young_ptr;
 
20
CAMLextern char *young_limit;
 
21
CAMLextern void (*scan_roots_hook) (scanning_action);
 
22
CAMLextern void minor_collection (void);
 
23
 
 
24
#define Caml_white (0 << 8)
 
25
#define Caml_black (3 << 8)
 
26
 
 
27
#define Make_header(wosize, tag, color)                                 \
 
28
  (((header_t) (((header_t) (wosize) << 10)                             \
 
29
                + (color)                                               \
 
30
                + (tag_t) (tag)))                                       \
 
31
   )
 
32
 
 
33
 
 
34
#define Alloc_small(result, wosize, tag) do{                            \
 
35
  young_ptr -= Bhsize_wosize (wosize);                                  \
 
36
  if (young_ptr < young_limit){                                         \
 
37
    young_ptr += Bhsize_wosize (wosize);                                \
 
38
    Setup_for_gc;                                                       \
 
39
    minor_collection ();                                                \
 
40
    Restore_after_gc;                                                   \
 
41
    young_ptr -= Bhsize_wosize (wosize);                                \
 
42
  }                                                                     \
 
43
  Hd_hp (young_ptr) = Make_header ((wosize), (tag), Caml_black);        \
 
44
  (result) = Val_hp (young_ptr);                                        \
 
45
  }while(0) 
 
46
 
 
47
 
 
48
#endif /*_COQ_CAML_GC_ */