mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-24 22:40:51 -08:00
Integrate more highly-checking header format from masters.
Copied from Perforce Change: 30348 ServerID: perforce.ravenbrook.com
This commit is contained in:
commit
230b5bf00a
3 changed files with 21 additions and 15 deletions
|
|
@ -251,6 +251,7 @@ FMTDYOBJ = $(FMTDY:%.c=$(PFM)/$(VARIETY)/%.o)
|
|||
FMTDYDEP = $(FMTDY:%.c=$(PFM)/$(VARIETY)/%.d)
|
||||
FMTDYTSTOBJ = $(FMTDYTST:%.c=$(PFM)/$(VARIETY)/%.o)
|
||||
FMTHETSTOBJ = $(FMTHETST:%.c=$(PFM)/$(VARIETY)/%.o)
|
||||
FMTHETSTDEP = $(FMTHETST:%.c=$(PFM)/$(VARIETY)/%.d)
|
||||
PLINTHOBJ = $(PLINTH:%.c=$(PFM)/$(VARIETY)/%.o)
|
||||
PLINTHDEP = $(PLINTH:%.c=$(PFM)/$(VARIETY)/%.d)
|
||||
EVENTPROCOBJ = $(EVENTPROC:%.c=$(PFM)/$(VARIETY)/%.o)
|
||||
|
|
@ -505,7 +506,7 @@ ifdef VARIETY
|
|||
ifdef TARGET
|
||||
# %%PART: Add the dependency file macro for the new part here.
|
||||
include $(MPMDEP) $(AMSDEP) $(AMCDEP) $(LODEP) $(SWDEP) \
|
||||
$(AWLDEP) $(POOLNDEP) $(TESTLIBDEP) $(FMTDYDEP) \
|
||||
$(AWLDEP) $(POOLNDEP) $(TESTLIBDEP) $(FMTDYDEP) $(FMTHETSTDEP) \
|
||||
$(PLINTHDEP) $(EVENTPROCDEP)
|
||||
endif
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ static mps_res_t dylan_header_scan(mps_ss_t mps_ss,
|
|||
int header = *(int*)((char*)p - headerSIZE);
|
||||
switch(headerType(header)) {
|
||||
case realTYPE:
|
||||
assert(header == realHeader);
|
||||
break;
|
||||
case padTYPE:
|
||||
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,
|
|||
header = *(int*)((char*)base - headerSIZE);
|
||||
switch(headerType(header)) {
|
||||
case realTYPE:
|
||||
assert(header == realHeader);
|
||||
break;
|
||||
case padTYPE:
|
||||
base = (mps_addr_t)((char*)base + headerPadSize(header));
|
||||
|
|
@ -92,6 +94,7 @@ static mps_addr_t dylan_header_skip(mps_addr_t object)
|
|||
header = *(int*)((char*)object - headerSIZE);
|
||||
switch(headerType(header)) {
|
||||
case realTYPE:
|
||||
assert(header == realHeader);
|
||||
break;
|
||||
case padTYPE:
|
||||
return (mps_addr_t)((char*)object + headerPadSize(header));
|
||||
|
|
@ -114,6 +117,8 @@ static mps_addr_t dylan_header_isfwd(mps_addr_t object)
|
|||
if (headerType(header) != realTYPE)
|
||||
return NULL;
|
||||
|
||||
assert(header == realHeader);
|
||||
|
||||
return dylan_format->isfwd(object);
|
||||
}
|
||||
|
||||
|
|
@ -199,18 +204,18 @@ mps_res_t HeaderWeakFormatCheck(mps_addr_t addr)
|
|||
* Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
*
|
||||
* 3. Redistributions in any form must be accompanied by information on how
|
||||
* to obtain complete source code for this software and any accompanying
|
||||
* software that uses this software. The source code must either be
|
||||
|
|
@ -221,7 +226,7 @@ mps_res_t HeaderWeakFormatCheck(mps_addr_t addr)
|
|||
* include source code for modules or files that typically accompany the
|
||||
* major components of the operating system on which the executable file
|
||||
* runs.
|
||||
*
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ extern mps_res_t HeaderFormatCheck(mps_addr_t addr);
|
|||
extern mps_res_t HeaderWeakFormatCheck(mps_addr_t addr);
|
||||
|
||||
#define headerSIZE (32)
|
||||
#define headerTypeBits 1
|
||||
#define realTYPE 0
|
||||
#define realHeader realTYPE
|
||||
#define padTYPE 1
|
||||
#define headerTypeBits 8
|
||||
#define realTYPE 0x33
|
||||
#define realHeader (realTYPE + 0x12345600)
|
||||
#define padTYPE 0xaa
|
||||
#define headerType(header) ((header) & ((1 << headerTypeBits) - 1))
|
||||
#define headerPadSize(header) ((header) >> headerTypeBits)
|
||||
#define padHeader(size) ((size << headerTypeBits) | padTYPE)
|
||||
|
|
@ -33,18 +33,18 @@ extern mps_res_t HeaderWeakFormatCheck(mps_addr_t addr);
|
|||
* Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
*
|
||||
* 3. Redistributions in any form must be accompanied by information on how
|
||||
* to obtain complete source code for this software and any accompanying
|
||||
* software that uses this software. The source code must either be
|
||||
|
|
@ -55,7 +55,7 @@ extern mps_res_t HeaderWeakFormatCheck(mps_addr_t addr);
|
|||
* include source code for modules or files that typically accompany the
|
||||
* major components of the operating system on which the executable file
|
||||
* runs.
|
||||
*
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue