Changed `dethunking' to expect promises, so we can profile primitive
authorStephen Adams <edu/mit/csail/zurich/adams>
Tue, 5 Sep 1995 18:01:24 +0000 (18:01 +0000)
committerStephen Adams <edu/mit/csail/zurich/adams>
Tue, 5 Sep 1995 18:01:24 +0000 (18:01 +0000)
procedures.

v8/src/compiler/base/stats.scm

index 8e4f12668258f977696d17e7df91fd476d9f85ff..cd3781150b2c235f9401e2e66ad23bc62de685d6 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: stats.scm,v 1.4 1995/07/20 16:03:54 adams Exp $
+$Id: stats.scm,v 1.5 1995/09/05 18:01:24 adams Exp $
 
 Copyright (c) 1994 Massachusetts Institute of Technology
 
@@ -119,10 +119,10 @@ MIT in each case. |#
         (sample/2/really statistic datum1 datum2))))
 
 
-(define-integrable (dethunk possible-thunk)
+(define (dethunk possible-thunk)
   (let ((possible-thunk possible-thunk))
-    (if (procedure? possible-thunk)
-       (possible-thunk)
+    (if (promise? possible-thunk)
+       (force possible-thunk)
        possible-thunk)))
 
 (define-integrable (find-statistic specification)