From: Chris Hanson Date: Wed, 29 Apr 1987 20:12:20 +0000 (+0000) Subject: Change profile recording hook to use 32 bit C long arithmetic rather X-Git-Tag: 20090517-FFI~13565 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=4fb44333c4983678c57d80f53f4bc0ecae5d4dad;p=mit-scheme.git Change profile recording hook to use 32 bit C long arithmetic rather than 24 bit fixnum arithmetic. --- diff --git a/v7/src/microcode/utils.c b/v7/src/microcode/utils.c index 51ce05690..8c78f6cae 100644 --- a/v7/src/microcode/utils.c +++ b/v7/src/microcode/utils.c @@ -30,7 +30,7 @@ Technology nor of any adaptation thereof in any advertising, promotional, or sales literature without prior written consent from MIT in each case. */ -/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/utils.c,v 9.26 1987/04/29 19:46:39 cph Exp $ */ +/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/utils.c,v 9.27 1987/04/29 20:12:20 cph Exp $ */ /* This file contains utilities for interrupts, errors, etc. */ @@ -892,7 +892,7 @@ record_primitive_entry (primitive) ((Get_Fixed_Obj_Slot (Primitive_Profiling_Table)) != NIL)) { Pointer table; - long index; + long index, old_value; /* Test for TC_PRIMITIVE_EXTERNAL rather than TC_PRIMITIVE here because the compiled code interface will use 0 rather than @@ -902,11 +902,8 @@ record_primitive_entry (primitive) ((Get_Fixed_Obj_Slot (Primitive_Profiling_Table)), (((pointer_type (primitive)) == TC_PRIMITIVE_EXTERNAL) ? 1 : 0))); index = (1 + (pointer_datum (primitive))); - Vector_Set (table, index, - (C_Integer_To_Scheme_Integer - (1 + - (Scheme_Integer_To_C_Integer - (Vector_Ref (table, index)))))); + Scheme_Integer_To_C_Integer ((Vector_Ref (table, index)), &old_value); + Vector_Set (table, index, (C_Integer_To_Scheme_Integer (1 + old_value))); } }