aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code
diff options
context:
space:
mode:
authorNick Barnes2002-06-20 16:58:59 +0100
committerNick Barnes2002-06-20 16:58:59 +0100
commit0e2cfd7e35c6e52fef64d8f3a4871ce1feda41f7 (patch)
tree5194cd9983de7344a9dee8ebd7fe7d4ed23a8197 /mps/code
parentfb1e4c0060992313204a9deade76938ab41bf2cd (diff)
downloademacs-0e2cfd7e35c6e52fef64d8f3a4871ce1feda41f7.tar.gz
emacs-0e2cfd7e35c6e52fef64d8f3a4871ce1feda41f7.zip
Dependencies for fmthe.
Copied from Perforce Change: 30345 ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
-rw-r--r--mps/code/comm.gmk3
-rw-r--r--mps/code/fmthe.c15
-rw-r--r--mps/code/fmthe.h18
3 files changed, 21 insertions, 15 deletions
diff --git a/mps/code/comm.gmk b/mps/code/comm.gmk
index 1d0da403bf6..1714cf46d5a 100644
--- a/mps/code/comm.gmk
+++ b/mps/code/comm.gmk
@@ -251,6 +251,7 @@ FMTDYOBJ = $(FMTDY:%.c=$(PFM)/$(VARIETY)/%.o)
251FMTDYDEP = $(FMTDY:%.c=$(PFM)/$(VARIETY)/%.d) 251FMTDYDEP = $(FMTDY:%.c=$(PFM)/$(VARIETY)/%.d)
252FMTDYTSTOBJ = $(FMTDYTST:%.c=$(PFM)/$(VARIETY)/%.o) 252FMTDYTSTOBJ = $(FMTDYTST:%.c=$(PFM)/$(VARIETY)/%.o)
253FMTHETSTOBJ = $(FMTHETST:%.c=$(PFM)/$(VARIETY)/%.o) 253FMTHETSTOBJ = $(FMTHETST:%.c=$(PFM)/$(VARIETY)/%.o)
254FMTHETSTDEP = $(FMTHETST:%.c=$(PFM)/$(VARIETY)/%.d)
254PLINTHOBJ = $(PLINTH:%.c=$(PFM)/$(VARIETY)/%.o) 255PLINTHOBJ = $(PLINTH:%.c=$(PFM)/$(VARIETY)/%.o)
255PLINTHDEP = $(PLINTH:%.c=$(PFM)/$(VARIETY)/%.d) 256PLINTHDEP = $(PLINTH:%.c=$(PFM)/$(VARIETY)/%.d)
256EVENTPROCOBJ = $(EVENTPROC:%.c=$(PFM)/$(VARIETY)/%.o) 257EVENTPROCOBJ = $(EVENTPROC:%.c=$(PFM)/$(VARIETY)/%.o)
@@ -505,7 +506,7 @@ ifdef VARIETY
505ifdef TARGET 506ifdef TARGET
506# %%PART: Add the dependency file macro for the new part here. 507# %%PART: Add the dependency file macro for the new part here.
507include $(MPMDEP) $(AMSDEP) $(AMCDEP) $(LODEP) $(SWDEP) \ 508include $(MPMDEP) $(AMSDEP) $(AMCDEP) $(LODEP) $(SWDEP) \
508 $(AWLDEP) $(POOLNDEP) $(TESTLIBDEP) $(FMTDYDEP) \ 509 $(AWLDEP) $(POOLNDEP) $(TESTLIBDEP) $(FMTDYDEP) $(FMTHETSTDEP) \
509 $(PLINTHDEP) $(EVENTPROCDEP) 510 $(PLINTHDEP) $(EVENTPROCDEP)
510endif 511endif
511endif 512endif
diff --git a/mps/code/fmthe.c b/mps/code/fmthe.c
index bf37111e7a5..2e291b52553 100644
--- a/mps/code/fmthe.c
+++ b/mps/code/fmthe.c
@@ -36,6 +36,7 @@ static mps_res_t dylan_header_scan(mps_ss_t mps_ss,
36 int header = *(int*)((char*)p - headerSIZE); 36 int header = *(int*)((char*)p - headerSIZE);
37 switch(headerType(header)) { 37 switch(headerType(header)) {
38 case realTYPE: 38 case realTYPE:
39 assert(header == realHeader);
39 break; 40 break;
40 case padTYPE: 41 case padTYPE:
41 p = (mps_addr_t)((char*)p + headerPadSize(header)); 42 p = (mps_addr_t)((char*)p + headerPadSize(header));
@@ -66,6 +67,7 @@ static mps_res_t dylan_header_scan_weak(mps_ss_t mps_ss,
66 header = *(int*)((char*)base - headerSIZE); 67 header = *(int*)((char*)base - headerSIZE);
67 switch(headerType(header)) { 68 switch(headerType(header)) {
68 case realTYPE: 69 case realTYPE:
70 assert(header == realHeader);
69 break; 71 break;
70 case padTYPE: 72 case padTYPE:
71 base = (mps_addr_t)((char*)base + headerPadSize(header)); 73 base = (mps_addr_t)((char*)base + headerPadSize(header));
@@ -92,6 +94,7 @@ static mps_addr_t dylan_header_skip(mps_addr_t object)
92 header = *(int*)((char*)object - headerSIZE); 94 header = *(int*)((char*)object - headerSIZE);
93 switch(headerType(header)) { 95 switch(headerType(header)) {
94 case realTYPE: 96 case realTYPE:
97 assert(header == realHeader);
95 break; 98 break;
96 case padTYPE: 99 case padTYPE:
97 return (mps_addr_t)((char*)object + headerPadSize(header)); 100 return (mps_addr_t)((char*)object + headerPadSize(header));
@@ -114,6 +117,8 @@ static mps_addr_t dylan_header_isfwd(mps_addr_t object)
114 if (headerType(header) != realTYPE) 117 if (headerType(header) != realTYPE)
115 return NULL; 118 return NULL;
116 119
120 assert(header == realHeader);
121
117 return dylan_format->isfwd(object); 122 return dylan_format->isfwd(object);
118} 123}
119 124
@@ -199,18 +204,18 @@ mps_res_t HeaderWeakFormatCheck(mps_addr_t addr)
199 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 204 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>.
200 * All rights reserved. This is an open source license. Contact 205 * All rights reserved. This is an open source license. Contact
201 * Ravenbrook for commercial licensing options. 206 * Ravenbrook for commercial licensing options.
202 * 207 *
203 * Redistribution and use in source and binary forms, with or without 208 * Redistribution and use in source and binary forms, with or without
204 * modification, are permitted provided that the following conditions are 209 * modification, are permitted provided that the following conditions are
205 * met: 210 * met:
206 * 211 *
207 * 1. Redistributions of source code must retain the above copyright 212 * 1. Redistributions of source code must retain the above copyright
208 * notice, this list of conditions and the following disclaimer. 213 * notice, this list of conditions and the following disclaimer.
209 * 214 *
210 * 2. Redistributions in binary form must reproduce the above copyright 215 * 2. Redistributions in binary form must reproduce the above copyright
211 * notice, this list of conditions and the following disclaimer in the 216 * notice, this list of conditions and the following disclaimer in the
212 * documentation and/or other materials provided with the distribution. 217 * documentation and/or other materials provided with the distribution.
213 * 218 *
214 * 3. Redistributions in any form must be accompanied by information on how 219 * 3. Redistributions in any form must be accompanied by information on how
215 * to obtain complete source code for this software and any accompanying 220 * to obtain complete source code for this software and any accompanying
216 * software that uses this software. The source code must either be 221 * software that uses this software. The source code must either be
@@ -221,7 +226,7 @@ mps_res_t HeaderWeakFormatCheck(mps_addr_t addr)
221 * include source code for modules or files that typically accompany the 226 * include source code for modules or files that typically accompany the
222 * major components of the operating system on which the executable file 227 * major components of the operating system on which the executable file
223 * runs. 228 * runs.
224 * 229 *
225 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 230 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
226 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 231 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
227 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 232 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
diff --git a/mps/code/fmthe.h b/mps/code/fmthe.h
index 5033a9a1bf3..391ead0ef55 100644
--- a/mps/code/fmthe.h
+++ b/mps/code/fmthe.h
@@ -17,10 +17,10 @@ extern mps_res_t HeaderFormatCheck(mps_addr_t addr);
17extern mps_res_t HeaderWeakFormatCheck(mps_addr_t addr); 17extern mps_res_t HeaderWeakFormatCheck(mps_addr_t addr);
18 18
19#define headerSIZE (32) 19#define headerSIZE (32)
20#define headerTypeBits 1 20#define headerTypeBits 8
21#define realTYPE 0 21#define realTYPE 0x33
22#define realHeader realTYPE 22#define realHeader (realTYPE + 0x12345600)
23#define padTYPE 1 23#define padTYPE 0xaa
24#define headerType(header) ((header) & ((1 << headerTypeBits) - 1)) 24#define headerType(header) ((header) & ((1 << headerTypeBits) - 1))
25#define headerPadSize(header) ((header) >> headerTypeBits) 25#define headerPadSize(header) ((header) >> headerTypeBits)
26#define padHeader(size) ((size << headerTypeBits) | padTYPE) 26#define padHeader(size) ((size << headerTypeBits) | padTYPE)
@@ -33,18 +33,18 @@ extern mps_res_t HeaderWeakFormatCheck(mps_addr_t addr);
33 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. 33 * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>.
34 * All rights reserved. This is an open source license. Contact 34 * All rights reserved. This is an open source license. Contact
35 * Ravenbrook for commercial licensing options. 35 * Ravenbrook for commercial licensing options.
36 * 36 *
37 * Redistribution and use in source and binary forms, with or without 37 * Redistribution and use in source and binary forms, with or without
38 * modification, are permitted provided that the following conditions are 38 * modification, are permitted provided that the following conditions are
39 * met: 39 * met:
40 * 40 *
41 * 1. Redistributions of source code must retain the above copyright 41 * 1. Redistributions of source code must retain the above copyright
42 * notice, this list of conditions and the following disclaimer. 42 * notice, this list of conditions and the following disclaimer.
43 * 43 *
44 * 2. Redistributions in binary form must reproduce the above copyright 44 * 2. Redistributions in binary form must reproduce the above copyright
45 * notice, this list of conditions and the following disclaimer in the 45 * notice, this list of conditions and the following disclaimer in the
46 * documentation and/or other materials provided with the distribution. 46 * documentation and/or other materials provided with the distribution.
47 * 47 *
48 * 3. Redistributions in any form must be accompanied by information on how 48 * 3. Redistributions in any form must be accompanied by information on how
49 * to obtain complete source code for this software and any accompanying 49 * to obtain complete source code for this software and any accompanying
50 * software that uses this software. The source code must either be 50 * software that uses this software. The source code must either be
@@ -55,7 +55,7 @@ extern mps_res_t HeaderWeakFormatCheck(mps_addr_t addr);
55 * include source code for modules or files that typically accompany the 55 * include source code for modules or files that typically accompany the
56 * major components of the operating system on which the executable file 56 * major components of the operating system on which the executable file
57 * runs. 57 * runs.
58 * 58 *
59 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 59 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
60 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 60 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
61 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 61 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR