source: release/1.7/source/lisp-kernel/lisp-errors.h @ 15267

Last change on this file since 15267 was 14807, checked in by gb, 8 years ago

Define and export the functions ALLOW-HEAP-ALLOCATION and
HEAP-ALLOCATION-ALLOWED-P and the condition type ALLOCATION-DISABLED.

(ALLOW-HEAP-ALLOCATION arg) : when ARG is NIL, causes any subsequent
attempts to heap-allocate lisp memory to signal (as if by CERROR)
an ALLOCATION-DISABLED condition. (Allocaton is enabled globally at
the point where the error is signaled.) Continuing from the CERROR
restarts the allocation attempt.

This is intended to help verify that code that's not expected to
cons doesn't do so.

(This is only implemented on the ARM at the moment, but the intent
is that it be supported on all platforms.)

Note that calling (ALLOW-HEAP-ALLOCATION NIL) in the REPL CERRORs
immediately, since the REPL will cons to create the new value of CL:/.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.1 KB
Line 
1/*
2   Copyright (C) 2009 Clozure Associates
3   Copyright (C) 1994-2001 Digitool, Inc
4   This file is part of Clozure CL. 
5
6   Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
7   License , known as the LLGPL and distributed with Clozure CL as the
8   file "LICENSE".  The LLGPL consists of a preamble and the LGPL,
9   which is distributed with Clozure CL as the file "LGPL".  Where these
10   conflict, the preamble takes precedence. 
11
12   Clozure CL is referenced in the preamble as the "LIBRARY."
13
14   The LLGPL is also available online at
15   http://opensource.franz.com/preamble.html
16*/
17
18#ifndef __ERRORS_X
19#define __ERRORS_X 1
20
21
22#define error_reg_regnum 0
23#define error_udf 1
24#define error_udf_call 2
25#define error_throw_tag_missing 3
26#define error_alloc_failed 4
27#define error_stack_overflow 5
28#define error_excised_function_call 6
29#define error_too_many_values 7
30#define error_propagate_suspend 10
31#define error_interrupt 11
32#define error_suspend 12
33#define error_suspend_all 13
34#define error_resume 14
35#define error_resume_all 15
36#define error_kill 16
37#define error_cant_call 17
38#define error_allocate_list 18
39#define error_allocation_disabled 19
40
41#define error_type_error 128
42
43typedef enum {
44  error_object_not_array = error_type_error,
45  error_object_not_bignum,
46  error_object_not_fixnum,
47  error_object_not_character,
48  error_object_not_integer,
49  error_object_not_list,
50  error_object_not_number,
51  error_object_not_sequence,
52  error_object_not_simple_string,
53  error_object_not_simple_vector,
54  error_object_not_string,
55  error_object_not_symbol,
56  error_object_not_macptr,
57  error_object_not_real,
58  error_object_not_cons,
59  error_object_not_unsigned_byte,
60  error_object_not_radix,
61  error_object_not_float,
62  error_object_not_rational,
63  error_object_not_ratio,
64  error_object_not_short_float,
65  error_object_not_double_float,
66  error_object_not_complex,
67  error_object_not_vector,
68  error_object_not_simple_base_string,
69  error_object_not_function,
70  error_object_not_unsigned_byte_16,
71  error_object_not_unsigned_byte_8,
72  error_object_not_unsigned_byte_32,
73  error_object_not_signed_byte_32,
74  error_object_not_signed_byte_16,
75  error_object_not_signed_byte_8,       
76  error_object_not_base_character,
77  error_object_not_bit,
78  error_object_not_unsigned_byte_24,
79  error_object_not_u64,
80  error_object_not_s64,
81  error_object_not_unsigned_byte_56,
82  error_object_not_simple_array_double_float_2d,
83  error_object_not_simple_array_single_float_2d,
84  error_object_not_mod_char_code_limit,
85  error_object_not_array_2d,
86  error_object_not_array_3d,
87  error_object_not_array_t,
88  error_object_not_array_bit,
89  error_object_not_array_s8,
90  error_object_not_array_u8,
91  error_object_not_array_s16,
92  error_object_not_array_u16,
93  error_object_not_array_s32,
94  error_object_not_array_u32,
95  error_object_not_array_s64,
96  error_object_not_array_u64,
97  error_object_not_array_fixnum,
98  error_object_not_array_single_float,
99  error_object_not_array_double_float,
100  error_object_not_array_char,
101  error_object_not_array_t_2d,
102  error_object_not_array_bit_2d,
103  error_object_not_array_s8_2d,
104  error_object_not_array_u8_2d,
105  error_object_not_array_s16_2d,
106  error_object_not_array_u16_2d,
107  error_object_not_array_s32_2d,
108  error_object_not_array_u32_2d,
109  error_object_not_array_s64_2d,
110  error_object_not_array_u64_2d,
111  error_object_not_array_fixnum_2d,
112  error_object_not_array_single_float_2d,
113  error_object_not_array_double_float_2d,
114  error_object_not_array_char_2d,
115  error_object_not_simple_array_t_2d,
116  error_object_not_simple_array_bit_2d,
117  error_object_not_simple_array_s8_2d,
118  error_object_not_simple_array_u8_2d,
119  error_object_not_simple_array_s16_2d,
120  error_object_not_simple_array_u16_2d,
121  error_object_not_simple_array_s32_2d,
122  error_object_not_simple_array_u32_2d,
123  error_object_not_simple_array_s64_2d,
124  error_object_not_simple_array_u64_2d,
125  error_object_not_simple_array_fixnum_2d,
126  error_object_not_simple_array_char_2d,
127  error_object_not_array_t_3d,
128  error_object_not_array_bit_3d,
129  error_object_not_array_s8_3d,
130  error_object_not_array_u8_3d,
131  error_object_not_array_s16_3d,
132  error_object_not_array_u16_3d,
133  error_object_not_array_s32_3d,
134  error_object_not_array_u32_3d,
135  error_object_not_array_s64_3d,
136  error_object_not_array_u64_3d,
137  error_object_not_array_fixnum_3d,
138  error_object_not_array_single_float_3d,
139  error_object_not_array_double_float_3d,
140  error_object_not_array_char_3d,
141  error_object_not_simple_array_t_3d,
142  error_object_not_simple_array_bit_3d,
143  error_object_not_simple_array_s8_3d,
144  error_object_not_simple_array_u8_3d,
145  error_object_not_simple_array_s16_3d,
146  error_object_not_simple_array_u16_3d,
147  error_object_not_simple_array_s32_3d,
148  error_object_not_simple_array_u32_3d,
149  error_object_not_simple_array_s64_3d,
150  error_object_not_simple_array_u64_3d,
151  error_object_not_simple_array_fixnum_3d,
152  error_object_not_simple_array_single_float_3d,
153  error_object_not_simple_array_double_float_3d,
154  error_object_not_simple_array_char_3d
155} type_error;
156
157#define error_FPU_exception_double 1024
158#define error_FPU_exception_short 1025
159
160#define error_memory_full 2048
161
162
163
164#endif /* __ERRORS_X */
Note: See TracBrowser for help on using the repository browser.