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 named function, see afunc_dict.xml
14 for an anonymous function.
18 <Header framerate="12" frames="1">
20 <Rectangle left="0" right="12800" top="0" bottom="9600"/>
33 <!-- Function code -->
34 <DeclareFunction name="f" argc="0" length="17">
40 <StackDictionaryLookup index="0"/>
44 <!-- Dictionary 2 (in-function) -->
53 <StackDictionaryLookup index="0"/>
57 <!-- END OF FUNCTION BODY -->
59 <!-- Dictionary 3 (after function) -->
67 // Push "r" (to assign later)
70 <StackString value="r"/>
74 // Push dict[0] (expect 'b')
77 <StackDictionaryLookup index="0"/>
81 // Call the function (pushes 'a' and 'c')
84 <StackInteger value="0"/>
85 <StackString value="f"/>
92 // Push dict[0] (expect 'b')
95 <StackDictionaryLookup index="0"/>
105 // Verify we got 'bacb'
108 <StackString value="bacb"/>
113 // If true, jump to PASSED tracing
114 <BranchIfTrue byteOffset="51"/>
116 // Else, trace XFAILED
119 <StackString value="FAILED: func used overridden dictionary "/>
123 <BranchAlways byteOffset="44"/> // get to end
128 <StackString value="PASSED: func used original dictionary "/>
136 <StackString value="END OF TEST"/>