added VM relocation type
parent
d48dffcfa0
commit
a5f24c8fb9
|
@ -50,6 +50,7 @@ CONSTANT: rt-immediate 8
|
||||||
CONSTANT: rt-stack-chain 9
|
CONSTANT: rt-stack-chain 9
|
||||||
CONSTANT: rt-untagged 10
|
CONSTANT: rt-untagged 10
|
||||||
CONSTANT: rt-megamorphic-cache-hits 11
|
CONSTANT: rt-megamorphic-cache-hits 11
|
||||||
|
CONSTANT: rt-vm 12
|
||||||
|
|
||||||
: rc-absolute? ( n -- ? )
|
: rc-absolute? ( n -- ? )
|
||||||
${ rc-absolute-ppc-2/2 rc-absolute-cell rc-absolute } member? ;
|
${ rc-absolute-ppc-2/2 rc-absolute-cell rc-absolute } member? ;
|
||||||
|
|
|
@ -44,6 +44,7 @@ int factorvm::number_of_parameters(relocation_type type)
|
||||||
case RT_THIS:
|
case RT_THIS:
|
||||||
case RT_STACK_CHAIN:
|
case RT_STACK_CHAIN:
|
||||||
case RT_MEGAMORPHIC_CACHE_HITS:
|
case RT_MEGAMORPHIC_CACHE_HITS:
|
||||||
|
case RT_VM:
|
||||||
return 0;
|
return 0;
|
||||||
default:
|
default:
|
||||||
critical_error("Bad rel type",type);
|
critical_error("Bad rel type",type);
|
||||||
|
@ -186,6 +187,8 @@ cell factorvm::compute_relocation(relocation_entry rel, cell index, code_block *
|
||||||
return untag_fixnum(ARG);
|
return untag_fixnum(ARG);
|
||||||
case RT_MEGAMORPHIC_CACHE_HITS:
|
case RT_MEGAMORPHIC_CACHE_HITS:
|
||||||
return (cell)&megamorphic_cache_hits;
|
return (cell)&megamorphic_cache_hits;
|
||||||
|
case RT_VM:
|
||||||
|
return (cell)this;
|
||||||
default:
|
default:
|
||||||
critical_error("Bad rel type",rel);
|
critical_error("Bad rel type",rel);
|
||||||
return 0; /* Can't happen */
|
return 0; /* Can't happen */
|
||||||
|
|
|
@ -26,6 +26,8 @@ enum relocation_type {
|
||||||
RT_UNTAGGED,
|
RT_UNTAGGED,
|
||||||
/* address of megamorphic_cache_hits var */
|
/* address of megamorphic_cache_hits var */
|
||||||
RT_MEGAMORPHIC_CACHE_HITS,
|
RT_MEGAMORPHIC_CACHE_HITS,
|
||||||
|
/* address of vm object*/
|
||||||
|
RT_VM,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum relocation_class {
|
enum relocation_class {
|
||||||
|
|
|
@ -35,8 +35,8 @@
|
||||||
|
|
||||||
/* Factor headers */
|
/* Factor headers */
|
||||||
#include "layouts.hpp"
|
#include "layouts.hpp"
|
||||||
#include "platform.hpp"
|
|
||||||
#include "primitives.hpp"
|
#include "primitives.hpp"
|
||||||
|
#include "platform.hpp"
|
||||||
#include "stacks.hpp"
|
#include "stacks.hpp"
|
||||||
#include "segments.hpp"
|
#include "segments.hpp"
|
||||||
#include "contexts.hpp"
|
#include "contexts.hpp"
|
||||||
|
|
Loading…
Reference in New Issue