vm: small cleanup

release
Slava Pestov 2010-04-13 21:24:42 -07:00
parent 8f4210436b
commit 216a05e68a
2 changed files with 2 additions and 2 deletions

View File

@ -122,7 +122,7 @@ cell factor_vm::frame_scan(stack_frame *frame)
if(obj.type_p(QUOTATION_TYPE)) if(obj.type_p(QUOTATION_TYPE))
{ {
char *return_addr = (char *)FRAME_RETURN_ADDRESS(frame,this); char *return_addr = (char *)FRAME_RETURN_ADDRESS(frame,this);
char *quot_entry_point = (char *)(frame_code(frame) + 1); char *quot_entry_point = (char *)frame_code(frame)->entry_point();
return tag_fixnum(quot_code_offset_to_scan( return tag_fixnum(quot_code_offset_to_scan(
obj.value(),(cell)(return_addr - quot_entry_point))); obj.value(),(cell)(return_addr - quot_entry_point)));

View File

@ -216,7 +216,7 @@ void factor_vm::primitive_fread()
if(feof(file)) if(feof(file))
{ {
byte_array *new_buf = allot_byte_array(c); byte_array *new_buf = allot_byte_array(c);
memcpy(new_buf + 1, buf.untagged() + 1,c); memcpy(new_buf->data<char>(), buf->data<char>(),c);
buf = new_buf; buf = new_buf;
} }