3
$Id: prims.h,v 9.48 2001/03/08 17:03:32 cph Exp $
5
Copyright (c) 1987-2001 Massachusetts Institute of Technology
7
This program is free software; you can redistribute it and/or modify
3
$Id: prims.h,v 9.52 2003/02/14 18:28:22 cph Exp $
5
Copyright (c) 1987-2002 Massachusetts Institute of Technology
7
This file is part of MIT/GNU Scheme.
9
MIT/GNU Scheme is free software; you can redistribute it and/or modify
8
10
it under the terms of the GNU General Public License as published by
9
11
the Free Software Foundation; either version 2 of the License, or (at
10
12
your option) any later version.
12
This program is distributed in the hope that it will be useful, but
14
MIT/GNU Scheme is distributed in the hope that it will be useful, but
13
15
WITHOUT ANY WARRANTY; without even the implied warranty of
14
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
17
General Public License for more details.
17
19
You should have received a copy of the GNU General Public License
18
along with this program; if not, write to the Free Software
19
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20
along with MIT/GNU Scheme; if not, write to the Free Software
21
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
22
26
/* This file contains some macros for defining primitives,
41
45
/* Primitives should have this as their first statement. */
42
46
#ifdef ENABLE_PRIMITIVE_PROFILING
43
#define PRIMITIVE_HEADER(n_args) record_primitive_entry (Fetch_Expression ())
47
#define PRIMITIVE_HEADER(n_args) record_primitive_entry (exp_register)
45
49
#define PRIMITIVE_HEADER(n_args) {}
74
78
#define ARG_LOC(argument) (STACK_LOC (argument - 1))
75
79
#define ARG_REF(argument) (STACK_REF (argument - 1))
76
#define LEXPR_N_ARGUMENTS() (Regs [REGBLOCK_LEXPR_ACTUALS])
80
#define LEXPR_N_ARGUMENTS() (Registers[REGBLOCK_LEXPR_ACTUALS])
78
82
extern void EXFUN (signal_error_from_primitive, (long error_code));
79
83
extern void EXFUN (signal_interrupt_from_primitive, (void));