]> gitweb.factorcode.org Git - factor.git/commitdiff
vm: don't scribble memory handling leaf signals
authorJoe Groff <arcata@gmail.com>
Wed, 14 Dec 2011 03:36:05 +0000 (19:36 -0800)
committerJoe Groff <arcata@gmail.com>
Wed, 14 Dec 2011 17:56:50 +0000 (09:56 -0800)
vm/cpu-x86.cpp

index bb52f406af734c1853ccb745eba9daff8a9b771a..8db0ae5d4b26ac76f17d47673de59a9bf1b1f696 100644 (file)
@@ -48,13 +48,10 @@ void factor_vm::dispatch_signal_handler(cell *sp, cell *pc, cell handler)
                else if (offset == 16 - sizeof(cell))
                {
                        // Make a fake frame for the leaf procedure
-                       code_block *leaf_block = code->code_block_for_address(*pc);
-                       FACTOR_ASSERT(leaf_block != NULL);
+                       FACTOR_ASSERT(code->code_block_for_address(*pc) != NULL);
 
                        cell newsp = *sp - LEAF_FRAME_SIZE;
-                       *(cell*)(newsp + 3*sizeof(cell)) = 4*sizeof(cell);
-                       *(cell*)(newsp + 2*sizeof(cell)) = (cell)leaf_block->entry_point();
-                       *(cell*) newsp                   = *pc;
+                       *(cell*)newsp = *pc;
                        *sp = newsp;
                        handler_word = tagged<word>(special_objects[LEAF_SIGNAL_HANDLER_WORD]);
                }