2 <swf version="6" compressed="0">
6 Test file for https://savannah.gnu.org/bugs/?33521
8 Shows that functions keep a reference on the constant
9 pool in place at time of their definition, even if
10 the pool in the action buffer is overridden at time
13 This file uses anonymous function, see func_dict.xml
18 <Header framerate="12" frames="1">
20 <Rectangle left="0" right="12800" top="0" bottom="9600"/>
26 <!-- Dictionary at time of function definition -->
33 <!-- Name we'll assign to the function -->
36 <StackString value="f"/>
40 <!-- Function code -->
41 <DeclareFunction name="" argc="0" length="15">
46 <StackString value="r"/>
53 <StackDictionaryLookup index="0"/>
59 <!-- Assigning the anonymous function to the variable `f' -->
62 <!-- Dictionary after function definition -->
72 // Append dict[0] to `r'
75 <StackString value="r"/>
82 <StackDictionaryLookup index="0"/>
88 // Call the function appending dict[0] to `r'
91 <StackInteger value="0"/>
92 <StackString value="f"/>
98 // Verify `r' equals 'ba'
101 <StackString value="ba"/>
102 <StackString value="r"/>
108 // If true, jump to PASSED tracing
109 <BranchIfTrue byteOffset="51"/>
111 // Else, trace XFAILED
114 <StackString value="FAILED: func used overridden dictionary "/>
118 <BranchAlways byteOffset="44"/> // get to end
123 <StackString value="PASSED: func used original dictionary "/>
131 <StackString value="END OF TEST"/>