File: genSym.js

package info (click to toggle)
ghc 9.10.3-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 169,076 kB
  • sloc: haskell: 713,554; ansic: 84,184; cpp: 30,255; javascript: 9,003; sh: 7,870; fortran: 3,527; python: 3,228; asm: 2,523; makefile: 2,324; yacc: 1,570; lisp: 532; xml: 196; perl: 111; csh: 2
file content (18 lines) | stat: -rw-r--r-- 735 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//#OPTIONS: CPP
#include "Unique.h"

// We assume that the unique tag occupies less than 32 bits (should be safe)
#define HIGH_UNIQUE_BITS (32 - UNIQUE_TAG_BITS)
#define HIGH_UNIQUE_MASK ((1 << HIGH_UNIQUE_BITS) - 1)

// The 'ghc_unique_inc' and 'ghc_unique_counter64' are in the native RTS. It allows them to be
// shared with plugins even if two different instances of the GHC library are
// loaded at the same time (#19940)
// However, cross compilers do not support plugins so we have moved these globals back
// into the compiler.
var h$ghc_unique_inc       = h$newByteArray(4);
h$ghc_unique_inc.i3[0]     = 1;
var h$ghc_unique_counter64   = h$newByteArray(8);
h$ghc_unique_counter64.i3[0] = 0;
h$ghc_unique_counter64.i3[1] = 0;