// gets the address of an object representing a C pointer, with the
// intention of storing the pointer across code which may potentially GC.
char* factor_vm::pinned_alien_offset(cell obj) {
- switch (tagged<object>(obj).type()) {
+ switch (TAG(obj)) {
case ALIEN_TYPE: {
alien* ptr = untag<alien>(obj);
if (to_boolean(ptr->expired))
general_error(ERROR_EXPIRED, obj, false_object);
if (to_boolean(ptr->base))
type_error(ALIEN_TYPE, obj);
- else
- return (char*)ptr->address;
+ return (char*)ptr->address;
}
case F_TYPE:
return NULL;
cell alien = ctx->pop();
cell displacement = to_cell(ctx->pop());
- switch (tagged<object>(alien).type()) {
+ switch (TAG(alien)) {
case BYTE_ARRAY_TYPE:
case ALIEN_TYPE:
case F_TYPE:
// gets the address of an object representing a C pointer
char* factor_vm::alien_offset(cell obj) {
- switch (tagged<object>(obj).type()) {
+ switch (TAG(obj)) {
case BYTE_ARRAY_TYPE:
return untag<byte_array>(obj)->data<char>();
case ALIEN_TYPE: