vm: change some push/pop to replace/peek.

db4
John Benediktsson 2014-06-07 12:16:43 -07:00
parent e9e1fd4e6a
commit 82f9f21a50
2 changed files with 6 additions and 6 deletions

View File

@ -263,22 +263,22 @@ void factor_vm::primitive_float_greatereq() {
/* Allocates memory */
void factor_vm::primitive_float_bits() {
ctx->push(
from_unsigned_cell(float_bits((float)untag_float_check(ctx->pop()))));
ctx->replace(
from_unsigned_cell(float_bits((float)untag_float_check(ctx->peek()))));
}
/* Allocates memory */
void factor_vm::primitive_bits_float() {
ctx->push(allot_float(bits_float((uint32_t)to_cell(ctx->pop()))));
ctx->replace(allot_float(bits_float((uint32_t)to_cell(ctx->peek()))));
}
void factor_vm::primitive_double_bits() {
ctx->push(from_unsigned_8(double_bits(untag_float_check(ctx->pop()))));
ctx->replace(from_unsigned_8(double_bits(untag_float_check(ctx->peek()))));
}
/* Allocates memory */
void factor_vm::primitive_bits_double() {
ctx->push(allot_float(bits_double(to_unsigned_8(ctx->pop()))));
ctx->replace(allot_float(bits_double(to_unsigned_8(ctx->peek()))));
}
/* Cannot allocate. */

View File

@ -69,7 +69,7 @@ cell factor_vm::object_size(cell tagged) {
/* Allocates memory */
void factor_vm::primitive_size() {
ctx->push(from_unsigned_cell(object_size(ctx->pop())));
ctx->replace(from_unsigned_cell(object_size(ctx->peek())));
}
struct slot_become_fixup : no_fixup {