Force evaluate!

Satoshi NISHIHARA nishis at urban.ne.jp
Mon Feb 16 03:51:06 UTC 1998


On Conventional Squeak VM raises the walkback below.
Jitter VM never show this walkback.
What should I do?

Attempt to evaluate a block that is already being evaluated.
BlockContext(Object)>>error:
BlockContext>>valueWithArguments:
BlockContext>>value:
[] in SmopstoneBenchmark>>primesUpTo:
SmopstoneBenchmark>>primesUpTo:

the method is

primesUpTo: n
    "Return the prime numbers between 2 and n.

    This method tests the efficiency of recursively calling a block
    that does some collection enumeration based on integer arithmetic."

    | nSqrt lowPrimes highPrimes genNext first abb |
    n < 5 | (n > 16363) ifTrue: [self halt: 'Prime limit(s) out of
range.'].
    nSqrt _ n sqrt rounded.
    lowPrimes _ OrderedCollection with: 2.
    highPrimes _ 5 to: n by: 2.
    genNext _
        [:nextPrime |
        lowPrimes add: nextPrime.
        highPrimes _ highPrimes select: [:k | k \\ nextPrime ~= 0].
        (first _ highPrimes first) <= nSqrt ifTrue: [genNext value:
first]].
                                                            
^^^^^^^^^^^^
    genNext value: 3.
    ^lowPrimes , highPrimes


regards

-- 
--------------------------------------------
$B@>86Ao;N(J (NISHIHARA Satoshi)
e-mail: adwin at urban.ne.jp (office)
      : nishis at urban.ne.jp (private)
      : tcc00164 at niftyserve.or.jp (private)
URL:    http://www.urban.ne.jp/home/nishis/
--------------------------------------------





More information about the Squeak-dev mailing list