/usr/lib/mlton/include/interpret.h is in mlton-basis 20100608-5.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | /* Copyright (C) 2004-2007 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
* See the file MLton-LICENSE for details.
*/
#ifndef _INTERPRET_H_
#define _INTERPRET_H_
#include <stdio.h>
#include "assert.h"
#define regs(ty) \
PRIVATE extern int ty##RegI; \
PRIVATE extern ty ty##Reg[]
regs(CPointer);
regs(Objptr);
regs(Real32);
regs(Real64);
regs(Word8);
regs(Word16);
regs(Word32);
regs(Word64);
#undef regs
#define assertRegsEmpty() \
do { \
assert (0 == CPointerRegI); \
assert (0 == ObjptrRegI); \
assert (0 == Real32RegI); \
assert (0 == Real64RegI); \
assert (0 == Word8RegI); \
assert (0 == Word16RegI); \
assert (0 == Word32RegI); \
assert (0 == Word64RegI); \
} while (0)
typedef uintptr_t CodeOffset;
struct NameOffsets {
CodeOffset codeOffset; // An offset into code.
Word32 nameOffset; // An offset into addressNames.
};
typedef struct Bytecode {
char *addressNames;
Pointer code;
CodeOffset codeSize;
struct NameOffsets *nameOffsets;
Word32 nameOffsetsSize;
} *Bytecode;
#define PopReg(ty) (assert (ty##RegI > 0), ty##Reg [--ty##RegI])
#define PopRegX(ty) PopReg(ty)
#define PushReg(ty) ty##Reg [ty##RegI++]
#define PushRegX(ty) PushReg(ty)
PRIVATE void MLton_callC (int i); // provided by client
PRIVATE void MLton_Bytecode_interpret (Bytecode b, CodeOffset codeOffset);
#endif
|