Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Artifact ID: | c74dfd69c9ba7655fa46214971166670ef1f0179 |
---|---|
Page Name: | RecursionErrorRepro? |
Date: | 2017-07-05 07:39:48 |
Original User: | yumaikas |
Mimetype: | text/x-markdown |
Parent: | cebc81cd85d66286693feada58c6ff2f2590fe5a |
Content
There was a recursion error coming out of a while loop:
Gopherjs version: 1.8-2
Browser: Firefox Dev Edition 55.0b6 (32-bit)
PISC commit: 4e87750ed75f3ed1
In the playground, running the following code:
: build ( counter list -- list )
:list :counter
$counter 0 = [ $list ] [ $counter 1 - { $counter $list } build ] if ;
: build-loop ( counter list -- list )
:list :counter
[ $counter 0 = not ] [ { $counter $list } :list $counter 1 - :counter ] while
$list
;
: cons-test ( -- )
# "Code took" is prefixed by time atm.
${ [ 10000 <vector> build-loop ] time " for loop version" } print
# ${ [ 10000 <vector> build drop ] time " for recursive version" } print
;
/* Run a test and see what this ends up doing */
[ 100000 <vector> build-loop drop ] time
Was causing a "Recursion Error" in Firefox developer edition.
Unfortunately, I cannot reproduce this error at this time. I'll update if it comes up again.