@swf2es/runtime 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/LICENSE.third-party +422 -0
- package/README.md +29 -2
- package/dist/avm1/activation.d.ts +108 -0
- package/dist/avm1/activation.d.ts.map +1 -0
- package/dist/avm1/activation.js +90 -0
- package/dist/avm1/activation.js.map +1 -0
- package/dist/avm1/case.d.ts +3 -0
- package/dist/avm1/case.d.ts.map +1 -0
- package/dist/avm1/case.js +250 -0
- package/dist/avm1/case.js.map +1 -0
- package/dist/avm1/clips.d.ts +68 -0
- package/dist/avm1/clips.d.ts.map +1 -0
- package/dist/avm1/clips.js +335 -0
- package/dist/avm1/clips.js.map +1 -0
- package/dist/avm1/control.d.ts +54 -0
- package/dist/avm1/control.d.ts.map +1 -0
- package/dist/avm1/control.js +281 -0
- package/dist/avm1/control.js.map +1 -0
- package/dist/avm1/errors.d.ts +49 -0
- package/dist/avm1/errors.d.ts.map +1 -0
- package/dist/avm1/errors.js +51 -0
- package/dist/avm1/errors.js.map +1 -0
- package/dist/avm1/functions.d.ts +94 -0
- package/dist/avm1/functions.d.ts.map +1 -0
- package/dist/avm1/functions.js +250 -0
- package/dist/avm1/functions.js.map +1 -0
- package/dist/avm1/globals/array.d.ts +8 -0
- package/dist/avm1/globals/array.d.ts.map +1 -0
- package/dist/avm1/globals/array.js +550 -0
- package/dist/avm1/globals/array.js.map +1 -0
- package/dist/avm1/globals/broadcaster.d.ts +22 -0
- package/dist/avm1/globals/broadcaster.d.ts.map +1 -0
- package/dist/avm1/globals/broadcaster.js +132 -0
- package/dist/avm1/globals/broadcaster.js.map +1 -0
- package/dist/avm1/globals/date.d.ts +10 -0
- package/dist/avm1/globals/date.d.ts.map +1 -0
- package/dist/avm1/globals/date.js +437 -0
- package/dist/avm1/globals/date.js.map +1 -0
- package/dist/avm1/globals/global.d.ts +23 -0
- package/dist/avm1/globals/global.d.ts.map +1 -0
- package/dist/avm1/globals/global.js +345 -0
- package/dist/avm1/globals/global.js.map +1 -0
- package/dist/avm1/globals/math.d.ts +7 -0
- package/dist/avm1/globals/math.d.ts.map +1 -0
- package/dist/avm1/globals/math.js +140 -0
- package/dist/avm1/globals/math.js.map +1 -0
- package/dist/avm1/globals/number.d.ts +11 -0
- package/dist/avm1/globals/number.d.ts.map +1 -0
- package/dist/avm1/globals/number.js +94 -0
- package/dist/avm1/globals/number.js.map +1 -0
- package/dist/avm1/globals/string.d.ts +8 -0
- package/dist/avm1/globals/string.d.ts.map +1 -0
- package/dist/avm1/globals/string.js +202 -0
- package/dist/avm1/globals/string.js.map +1 -0
- package/dist/avm1/globals/timers.d.ts +49 -0
- package/dist/avm1/globals/timers.d.ts.map +1 -0
- package/dist/avm1/globals/timers.js +130 -0
- package/dist/avm1/globals/timers.js.map +1 -0
- package/dist/avm1/host.d.ts +146 -0
- package/dist/avm1/host.d.ts.map +1 -0
- package/dist/avm1/host.js +6 -0
- package/dist/avm1/host.js.map +1 -0
- package/dist/avm1/index.d.ts +15 -0
- package/dist/avm1/index.d.ts.map +1 -0
- package/dist/avm1/index.js +15 -0
- package/dist/avm1/index.js.map +1 -0
- package/dist/avm1/inheritance.d.ts +25 -0
- package/dist/avm1/inheritance.d.ts.map +1 -0
- package/dist/avm1/inheritance.js +133 -0
- package/dist/avm1/inheritance.js.map +1 -0
- package/dist/avm1/numbers.d.ts +21 -0
- package/dist/avm1/numbers.d.ts.map +1 -0
- package/dist/avm1/numbers.js +299 -0
- package/dist/avm1/numbers.js.map +1 -0
- package/dist/avm1/objects.d.ts +245 -0
- package/dist/avm1/objects.d.ts.map +1 -0
- package/dist/avm1/objects.js +897 -0
- package/dist/avm1/objects.js.map +1 -0
- package/dist/avm1/operators.d.ts +45 -0
- package/dist/avm1/operators.d.ts.map +1 -0
- package/dist/avm1/operators.js +171 -0
- package/dist/avm1/operators.js.map +1 -0
- package/dist/avm1/realm.d.ts +126 -0
- package/dist/avm1/realm.d.ts.map +1 -0
- package/dist/avm1/realm.js +530 -0
- package/dist/avm1/realm.js.map +1 -0
- package/dist/avm1/runtime.d.ts +294 -0
- package/dist/avm1/runtime.d.ts.map +1 -0
- package/dist/avm1/runtime.js +883 -0
- package/dist/avm1/runtime.js.map +1 -0
- package/dist/avm1/scope.d.ts +77 -0
- package/dist/avm1/scope.d.ts.map +1 -0
- package/dist/avm1/scope.js +386 -0
- package/dist/avm1/scope.js.map +1 -0
- package/dist/avm1/urls.d.ts +25 -0
- package/dist/avm1/urls.d.ts.map +1 -0
- package/dist/avm1/urls.js +181 -0
- package/dist/avm1/urls.js.map +1 -0
- package/dist/avm1/values.d.ts +52 -0
- package/dist/avm1/values.d.ts.map +1 -0
- package/dist/avm1/values.js +98 -0
- package/dist/avm1/values.js.map +1 -0
- package/dist/avm2/amf-classes.d.ts +28 -0
- package/dist/avm2/amf-classes.d.ts.map +1 -0
- package/dist/avm2/amf-classes.js +67 -0
- package/dist/avm2/amf-classes.js.map +1 -0
- package/dist/avm2/amf.d.ts +96 -0
- package/dist/avm2/amf.d.ts.map +1 -0
- package/dist/avm2/amf.js +802 -0
- package/dist/avm2/amf.js.map +1 -0
- package/dist/avm2/array-conversion.d.ts +31 -0
- package/dist/avm2/array-conversion.d.ts.map +1 -0
- package/dist/avm2/array-conversion.js +101 -0
- package/dist/avm2/array-conversion.js.map +1 -0
- package/dist/avm2/builtin-library.d.ts +2 -0
- package/dist/avm2/builtin-library.d.ts.map +1 -0
- package/dist/avm2/builtin-library.js +22 -0
- package/dist/avm2/builtin-library.js.map +1 -0
- package/dist/avm2/cache-fill.d.ts +14 -0
- package/dist/avm2/cache-fill.d.ts.map +1 -0
- package/dist/avm2/cache-fill.js +87 -0
- package/dist/avm2/cache-fill.js.map +1 -0
- package/dist/avm2/classes.d.ts +17 -0
- package/dist/avm2/classes.d.ts.map +1 -0
- package/dist/avm2/classes.js +212 -0
- package/dist/avm2/classes.js.map +1 -0
- package/dist/avm2/definitions.d.ts +28 -0
- package/dist/avm2/definitions.d.ts.map +1 -0
- package/dist/avm2/definitions.js +70 -0
- package/dist/avm2/definitions.js.map +1 -0
- package/dist/avm2/descriptors.d.ts +118 -0
- package/dist/avm2/descriptors.d.ts.map +1 -0
- package/dist/avm2/descriptors.js +6 -0
- package/dist/avm2/descriptors.js.map +1 -0
- package/dist/avm2/dictionary-keys.d.ts +73 -0
- package/dist/avm2/dictionary-keys.d.ts.map +1 -0
- package/dist/avm2/dictionary-keys.js +296 -0
- package/dist/avm2/dictionary-keys.js.map +1 -0
- package/dist/avm2/domain-memory.d.ts +23 -0
- package/dist/avm2/domain-memory.d.ts.map +1 -0
- package/dist/avm2/domain-memory.js +76 -0
- package/dist/avm2/domain-memory.js.map +1 -0
- package/dist/avm2/domain.d.ts +108 -0
- package/dist/avm2/domain.d.ts.map +1 -0
- package/dist/avm2/domain.js +281 -0
- package/dist/avm2/domain.js.map +1 -0
- package/dist/avm2/dynamic-properties.d.ts +62 -0
- package/dist/avm2/dynamic-properties.d.ts.map +1 -0
- package/dist/avm2/dynamic-properties.js +183 -0
- package/dist/avm2/dynamic-properties.js.map +1 -0
- package/dist/avm2/enumeration.d.ts +75 -0
- package/dist/avm2/enumeration.d.ts.map +1 -0
- package/dist/avm2/enumeration.js +394 -0
- package/dist/avm2/enumeration.js.map +1 -0
- package/dist/avm2/errors.d.ts +20 -0
- package/dist/avm2/errors.d.ts.map +1 -0
- package/dist/avm2/errors.js +46 -0
- package/dist/avm2/errors.js.map +1 -0
- package/dist/avm2/float-library.d.ts +2 -0
- package/dist/avm2/float-library.d.ts.map +1 -0
- package/dist/avm2/float-library.js +67 -0
- package/dist/avm2/float-library.js.map +1 -0
- package/dist/avm2/float.d.ts +9 -0
- package/dist/avm2/float.d.ts.map +1 -0
- package/dist/avm2/float.js +27 -0
- package/dist/avm2/float.js.map +1 -0
- package/dist/avm2/hooks.d.ts +77 -0
- package/dist/avm2/hooks.d.ts.map +1 -0
- package/dist/avm2/hooks.js +20 -0
- package/dist/avm2/hooks.js.map +1 -0
- package/dist/avm2/index.d.ts +32 -0
- package/dist/avm2/index.d.ts.map +1 -0
- package/dist/avm2/index.js +39 -0
- package/dist/avm2/index.js.map +1 -0
- package/dist/avm2/messages.d.ts +2 -0
- package/dist/avm2/messages.d.ts.map +1 -0
- package/dist/avm2/messages.js +178 -0
- package/dist/avm2/messages.js.map +1 -0
- package/dist/avm2/method-factories.d.ts +35 -0
- package/dist/avm2/method-factories.d.ts.map +1 -0
- package/dist/avm2/method-factories.js +96 -0
- package/dist/avm2/method-factories.js.map +1 -0
- package/dist/avm2/modules.d.ts +40 -0
- package/dist/avm2/modules.d.ts.map +1 -0
- package/dist/avm2/modules.js +106 -0
- package/dist/avm2/modules.js.map +1 -0
- package/dist/avm2/names.d.ts +143 -0
- package/dist/avm2/names.d.ts.map +1 -0
- package/dist/avm2/names.js +249 -0
- package/dist/avm2/names.js.map +1 -0
- package/dist/avm2/natives/aliases.d.ts +3 -0
- package/dist/avm2/natives/aliases.d.ts.map +1 -0
- package/dist/avm2/natives/aliases.js +48 -0
- package/dist/avm2/natives/aliases.js.map +1 -0
- package/dist/avm2/natives/array.d.ts +5 -0
- package/dist/avm2/natives/array.d.ts.map +1 -0
- package/dist/avm2/natives/array.js +391 -0
- package/dist/avm2/natives/array.js.map +1 -0
- package/dist/avm2/natives/bytearray.d.ts +180 -0
- package/dist/avm2/natives/bytearray.d.ts.map +1 -0
- package/dist/avm2/natives/bytearray.js +1228 -0
- package/dist/avm2/natives/bytearray.js.map +1 -0
- package/dist/avm2/natives/case.d.ts +5 -0
- package/dist/avm2/natives/case.d.ts.map +1 -0
- package/dist/avm2/natives/case.js +89 -0
- package/dist/avm2/natives/case.js.map +1 -0
- package/dist/avm2/natives/concurrent.d.ts +24 -0
- package/dist/avm2/natives/concurrent.d.ts.map +1 -0
- package/dist/avm2/natives/concurrent.js +200 -0
- package/dist/avm2/natives/concurrent.js.map +1 -0
- package/dist/avm2/natives/date.d.ts +5 -0
- package/dist/avm2/natives/date.d.ts.map +1 -0
- package/dist/avm2/natives/date.js +582 -0
- package/dist/avm2/natives/date.js.map +1 -0
- package/dist/avm2/natives/define.d.ts +58 -0
- package/dist/avm2/natives/define.d.ts.map +1 -0
- package/dist/avm2/natives/define.js +131 -0
- package/dist/avm2/natives/define.js.map +1 -0
- package/dist/avm2/natives/describe.d.ts +3 -0
- package/dist/avm2/natives/describe.d.ts.map +1 -0
- package/dist/avm2/natives/describe.js +352 -0
- package/dist/avm2/natives/describe.js.map +1 -0
- package/dist/avm2/natives/dictionary.d.ts +3 -0
- package/dist/avm2/natives/dictionary.d.ts.map +1 -0
- package/dist/avm2/natives/dictionary.js +13 -0
- package/dist/avm2/natives/dictionary.js.map +1 -0
- package/dist/avm2/natives/float-vector.d.ts +20 -0
- package/dist/avm2/natives/float-vector.d.ts.map +1 -0
- package/dist/avm2/natives/float-vector.js +82 -0
- package/dist/avm2/natives/float-vector.js.map +1 -0
- package/dist/avm2/natives/float.d.ts +5 -0
- package/dist/avm2/natives/float.d.ts.map +1 -0
- package/dist/avm2/natives/float.js +97 -0
- package/dist/avm2/natives/float.js.map +1 -0
- package/dist/avm2/natives/index.d.ts +7 -0
- package/dist/avm2/natives/index.d.ts.map +1 -0
- package/dist/avm2/natives/index.js +65 -0
- package/dist/avm2/natives/index.js.map +1 -0
- package/dist/avm2/natives/json.d.ts +3 -0
- package/dist/avm2/natives/json.d.ts.map +1 -0
- package/dist/avm2/natives/json.js +515 -0
- package/dist/avm2/natives/json.js.map +1 -0
- package/dist/avm2/natives/number.d.ts +15 -0
- package/dist/avm2/natives/number.d.ts.map +1 -0
- package/dist/avm2/natives/number.js +163 -0
- package/dist/avm2/natives/number.js.map +1 -0
- package/dist/avm2/natives/object.d.ts +8 -0
- package/dist/avm2/natives/object.d.ts.map +1 -0
- package/dist/avm2/natives/object.js +238 -0
- package/dist/avm2/natives/object.js.map +1 -0
- package/dist/avm2/natives/proxy.d.ts +5 -0
- package/dist/avm2/natives/proxy.d.ts.map +1 -0
- package/dist/avm2/natives/proxy.js +76 -0
- package/dist/avm2/natives/proxy.js.map +1 -0
- package/dist/avm2/natives/regexp.d.ts +21 -0
- package/dist/avm2/natives/regexp.d.ts.map +1 -0
- package/dist/avm2/natives/regexp.js +486 -0
- package/dist/avm2/natives/regexp.js.map +1 -0
- package/dist/avm2/natives/shell-workers.d.ts +140 -0
- package/dist/avm2/natives/shell-workers.d.ts.map +1 -0
- package/dist/avm2/natives/shell-workers.js +405 -0
- package/dist/avm2/natives/shell-workers.js.map +1 -0
- package/dist/avm2/natives/shell.d.ts +12 -0
- package/dist/avm2/natives/shell.d.ts.map +1 -0
- package/dist/avm2/natives/shell.js +558 -0
- package/dist/avm2/natives/shell.js.map +1 -0
- package/dist/avm2/natives/sort.d.ts +7 -0
- package/dist/avm2/natives/sort.d.ts.map +1 -0
- package/dist/avm2/natives/sort.js +378 -0
- package/dist/avm2/natives/sort.js.map +1 -0
- package/dist/avm2/natives/string.d.ts +5 -0
- package/dist/avm2/natives/string.d.ts.map +1 -0
- package/dist/avm2/natives/string.js +133 -0
- package/dist/avm2/natives/string.js.map +1 -0
- package/dist/avm2/natives/sync.d.ts +215 -0
- package/dist/avm2/natives/sync.d.ts.map +1 -0
- package/dist/avm2/natives/sync.js +822 -0
- package/dist/avm2/natives/sync.js.map +1 -0
- package/dist/avm2/natives/toplevel.d.ts +5 -0
- package/dist/avm2/natives/toplevel.d.ts.map +1 -0
- package/dist/avm2/natives/toplevel.js +140 -0
- package/dist/avm2/natives/toplevel.js.map +1 -0
- package/dist/avm2/natives/vector-elements.d.ts +10 -0
- package/dist/avm2/natives/vector-elements.d.ts.map +1 -0
- package/dist/avm2/natives/vector-elements.js +47 -0
- package/dist/avm2/natives/vector-elements.js.map +1 -0
- package/dist/avm2/natives/vector.d.ts +5 -0
- package/dist/avm2/natives/vector.d.ts.map +1 -0
- package/dist/avm2/natives/vector.js +407 -0
- package/dist/avm2/natives/vector.js.map +1 -0
- package/dist/avm2/natives/xml/access.d.ts +34 -0
- package/dist/avm2/natives/xml/access.d.ts.map +1 -0
- package/dist/avm2/natives/xml/access.js +634 -0
- package/dist/avm2/natives/xml/access.js.map +1 -0
- package/dist/avm2/natives/xml/build.d.ts +11 -0
- package/dist/avm2/natives/xml/build.d.ts.map +1 -0
- package/dist/avm2/natives/xml/build.js +292 -0
- package/dist/avm2/natives/xml/build.js.map +1 -0
- package/dist/avm2/natives/xml/chars.d.ts +9 -0
- package/dist/avm2/natives/xml/chars.d.ts.map +1 -0
- package/dist/avm2/natives/xml/chars.js +113 -0
- package/dist/avm2/natives/xml/chars.js.map +1 -0
- package/dist/avm2/natives/xml/escape.d.ts +5 -0
- package/dist/avm2/natives/xml/escape.d.ts.map +1 -0
- package/dist/avm2/natives/xml/escape.js +39 -0
- package/dist/avm2/natives/xml/escape.js.map +1 -0
- package/dist/avm2/natives/xml/names.d.ts +46 -0
- package/dist/avm2/natives/xml/names.d.ts.map +1 -0
- package/dist/avm2/natives/xml/names.js +205 -0
- package/dist/avm2/natives/xml/names.js.map +1 -0
- package/dist/avm2/natives/xml/node.d.ts +94 -0
- package/dist/avm2/natives/xml/node.d.ts.map +1 -0
- package/dist/avm2/natives/xml/node.js +273 -0
- package/dist/avm2/natives/xml/node.js.map +1 -0
- package/dist/avm2/natives/xml/operators.d.ts +7 -0
- package/dist/avm2/natives/xml/operators.d.ts.map +1 -0
- package/dist/avm2/natives/xml/operators.js +70 -0
- package/dist/avm2/natives/xml/operators.js.map +1 -0
- package/dist/avm2/natives/xml/parser.d.ts +51 -0
- package/dist/avm2/natives/xml/parser.d.ts.map +1 -0
- package/dist/avm2/natives/xml/parser.js +357 -0
- package/dist/avm2/natives/xml/parser.js.map +1 -0
- package/dist/avm2/natives/xml/strings.d.ts +10 -0
- package/dist/avm2/natives/xml/strings.d.ts.map +1 -0
- package/dist/avm2/natives/xml/strings.js +192 -0
- package/dist/avm2/natives/xml/strings.js.map +1 -0
- package/dist/avm2/natives/xml/values.d.ts +48 -0
- package/dist/avm2/natives/xml/values.d.ts.map +1 -0
- package/dist/avm2/natives/xml/values.js +123 -0
- package/dist/avm2/natives/xml/values.js.map +1 -0
- package/dist/avm2/natives/xml/xml.d.ts +5 -0
- package/dist/avm2/natives/xml/xml.d.ts.map +1 -0
- package/dist/avm2/natives/xml/xml.js +646 -0
- package/dist/avm2/natives/xml/xml.js.map +1 -0
- package/dist/avm2/number-strings.d.ts +28 -0
- package/dist/avm2/number-strings.d.ts.map +1 -0
- package/dist/avm2/number-strings.js +111 -0
- package/dist/avm2/number-strings.js.map +1 -0
- package/dist/avm2/numbers.d.ts +12 -0
- package/dist/avm2/numbers.d.ts.map +1 -0
- package/dist/avm2/numbers.js +559 -0
- package/dist/avm2/numbers.js.map +1 -0
- package/dist/avm2/options.d.ts +105 -0
- package/dist/avm2/options.d.ts.map +1 -0
- package/dist/avm2/options.js +17 -0
- package/dist/avm2/options.js.map +1 -0
- package/dist/avm2/player-messages.d.ts +3 -0
- package/dist/avm2/player-messages.d.ts.map +1 -0
- package/dist/avm2/player-messages.js +551 -0
- package/dist/avm2/player-messages.js.map +1 -0
- package/dist/avm2/property-cache.d.ts +61 -0
- package/dist/avm2/property-cache.d.ts.map +1 -0
- package/dist/avm2/property-cache.js +136 -0
- package/dist/avm2/property-cache.js.map +1 -0
- package/dist/avm2/runtime.d.ts +588 -0
- package/dist/avm2/runtime.d.ts.map +1 -0
- package/dist/avm2/runtime.js +2645 -0
- package/dist/avm2/runtime.js.map +1 -0
- package/dist/avm2/traits.d.ts +233 -0
- package/dist/avm2/traits.d.ts.map +1 -0
- package/dist/avm2/traits.js +510 -0
- package/dist/avm2/traits.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/package.json +43 -3
- package/src/avm1/activation.ts +114 -0
- package/src/avm1/case.ts +257 -0
- package/src/avm1/clips.ts +440 -0
- package/src/avm1/control.ts +339 -0
- package/src/avm1/errors.ts +60 -0
- package/src/avm1/functions.ts +271 -0
- package/src/avm1/globals/array.ts +676 -0
- package/src/avm1/globals/broadcaster.ts +185 -0
- package/src/avm1/globals/date.ts +548 -0
- package/src/avm1/globals/global.ts +420 -0
- package/src/avm1/globals/math.ts +152 -0
- package/src/avm1/globals/number.ts +122 -0
- package/src/avm1/globals/string.ts +254 -0
- package/src/avm1/globals/timers.ts +144 -0
- package/src/avm1/host.ts +155 -0
- package/src/avm1/index.ts +69 -0
- package/src/avm1/inheritance.ts +159 -0
- package/src/avm1/numbers.ts +348 -0
- package/src/avm1/objects.ts +1080 -0
- package/src/avm1/operators.ts +229 -0
- package/src/avm1/realm.ts +704 -0
- package/src/avm1/runtime.ts +1291 -0
- package/src/avm1/scope.ts +482 -0
- package/src/avm1/urls.ts +226 -0
- package/src/avm1/values.ts +145 -0
- package/src/avm2/amf-classes.ts +80 -0
- package/src/avm2/amf.ts +913 -0
- package/src/avm2/array-conversion.ts +117 -0
- package/src/avm2/builtin-library.ts +28 -0
- package/src/avm2/cache-fill.ts +124 -0
- package/src/avm2/classes.ts +235 -0
- package/src/avm2/definitions.ts +93 -0
- package/src/avm2/descriptors.ts +137 -0
- package/src/avm2/dictionary-keys.ts +345 -0
- package/src/avm2/domain-memory.ts +95 -0
- package/src/avm2/domain.ts +335 -0
- package/src/avm2/dynamic-properties.ts +209 -0
- package/src/avm2/enumeration.ts +506 -0
- package/src/avm2/errors.ts +54 -0
- package/src/avm2/float-library.ts +66 -0
- package/src/avm2/float.ts +31 -0
- package/src/avm2/hooks.ts +97 -0
- package/src/avm2/index.ts +84 -0
- package/src/avm2/messages.ts +178 -0
- package/src/avm2/method-factories.ts +130 -0
- package/src/avm2/modules.ts +120 -0
- package/src/avm2/names.ts +292 -0
- package/src/avm2/natives/aliases.ts +59 -0
- package/src/avm2/natives/array.ts +482 -0
- package/src/avm2/natives/bytearray.ts +1474 -0
- package/src/avm2/natives/case.ts +98 -0
- package/src/avm2/natives/concurrent.ts +268 -0
- package/src/avm2/natives/date.ts +678 -0
- package/src/avm2/natives/define.ts +176 -0
- package/src/avm2/natives/describe.ts +426 -0
- package/src/avm2/natives/dictionary.ts +18 -0
- package/src/avm2/natives/float-vector.ts +99 -0
- package/src/avm2/natives/float.ts +116 -0
- package/src/avm2/natives/index.ts +70 -0
- package/src/avm2/natives/json.ts +600 -0
- package/src/avm2/natives/number.ts +194 -0
- package/src/avm2/natives/object.ts +272 -0
- package/src/avm2/natives/proxy.ts +98 -0
- package/src/avm2/natives/regexp.ts +580 -0
- package/src/avm2/natives/shell-workers.ts +474 -0
- package/src/avm2/natives/shell.ts +707 -0
- package/src/avm2/natives/sort.ts +438 -0
- package/src/avm2/natives/string.ts +158 -0
- package/src/avm2/natives/sync.ts +964 -0
- package/src/avm2/natives/toplevel.ts +163 -0
- package/src/avm2/natives/vector-elements.ts +61 -0
- package/src/avm2/natives/vector.ts +511 -0
- package/src/avm2/natives/xml/access.ts +767 -0
- package/src/avm2/natives/xml/build.ts +381 -0
- package/src/avm2/natives/xml/chars.ts +127 -0
- package/src/avm2/natives/xml/escape.ts +46 -0
- package/src/avm2/natives/xml/names.ts +256 -0
- package/src/avm2/natives/xml/node.ts +339 -0
- package/src/avm2/natives/xml/operators.ts +90 -0
- package/src/avm2/natives/xml/parser.ts +414 -0
- package/src/avm2/natives/xml/strings.ts +241 -0
- package/src/avm2/natives/xml/values.ts +162 -0
- package/src/avm2/natives/xml/xml.ts +829 -0
- package/src/avm2/number-strings.ts +127 -0
- package/src/avm2/numbers.ts +605 -0
- package/src/avm2/options.ts +125 -0
- package/src/avm2/player-messages.ts +552 -0
- package/src/avm2/property-cache.ts +160 -0
- package/src/avm2/runtime.ts +3274 -0
- package/src/avm2/traits.ts +584 -0
- package/src/index.ts +8 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import { Avm1Throw } from "./errors.js";
|
|
2
|
+
import { Avm1Object } from "./objects.js";
|
|
3
|
+
import { MAX_SCOPES, SCOPE_With, Scope } from "./scope.js";
|
|
4
|
+
/** A With's object, or a catch's variable, on the scope chain. */
|
|
5
|
+
const HELD_Scope = 0;
|
|
6
|
+
const HELD_Try = 1;
|
|
7
|
+
/** A finally reached by a throw: `value` is thrown again as control leaves it. */
|
|
8
|
+
const HELD_Thrown = 2;
|
|
9
|
+
/** A finally reached by a Return, whose value is on the stack: it returns as control leaves it. */
|
|
10
|
+
const HELD_Returned = 3;
|
|
11
|
+
/** A Try's catch that a throw does not land in. */
|
|
12
|
+
const NO_CATCH = -2;
|
|
13
|
+
export class Held {
|
|
14
|
+
kind;
|
|
15
|
+
from;
|
|
16
|
+
to;
|
|
17
|
+
value;
|
|
18
|
+
constructor(kind,
|
|
19
|
+
/** The blocks it holds over, from `from` to `to`, excluded. */
|
|
20
|
+
from, to,
|
|
21
|
+
/** A finally's thrown value. */
|
|
22
|
+
value = undefined) {
|
|
23
|
+
this.kind = kind;
|
|
24
|
+
this.from = from;
|
|
25
|
+
this.to = to;
|
|
26
|
+
this.value = value;
|
|
27
|
+
}
|
|
28
|
+
holds(block) {
|
|
29
|
+
return this.from <= block && block < this.to;
|
|
30
|
+
}
|
|
31
|
+
/** Whether a scope holds as control goes to `block`: one of its body's, or the first past it. */
|
|
32
|
+
admits(block) {
|
|
33
|
+
return this.from <= block && block <= this.to;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
const isScope = (h) => h.kind === HELD_Scope;
|
|
37
|
+
/** A scope: the chain it made, and the chain under it, which it gives back as it comes off. */
|
|
38
|
+
class ScopeHeld extends Held {
|
|
39
|
+
chain;
|
|
40
|
+
below;
|
|
41
|
+
constructor(from, to, chain, below) {
|
|
42
|
+
super(HELD_Scope, from, to);
|
|
43
|
+
this.chain = chain;
|
|
44
|
+
this.below = below;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/** A Try's handlers, held over its try and catch bodies. */
|
|
48
|
+
class TryHeld extends Held {
|
|
49
|
+
catchFrom;
|
|
50
|
+
finallyFrom;
|
|
51
|
+
finallyTo;
|
|
52
|
+
catchAt;
|
|
53
|
+
into;
|
|
54
|
+
height;
|
|
55
|
+
constructor(from,
|
|
56
|
+
/** Where the catch body starts: before it, a throw is the catch's. */
|
|
57
|
+
catchFrom,
|
|
58
|
+
/** The finally body's blocks, none where it has none. */
|
|
59
|
+
finallyFrom, finallyTo,
|
|
60
|
+
/** Where a throw lands for the catch, -1 for the region's exit, NO_CATCH for none. */
|
|
61
|
+
catchAt,
|
|
62
|
+
/** The catch's variable, or its register. */
|
|
63
|
+
into,
|
|
64
|
+
/** The operand stack's height as the Try ran, which a throw cuts it back to. */
|
|
65
|
+
height) {
|
|
66
|
+
super(HELD_Try, from, finallyFrom);
|
|
67
|
+
this.catchFrom = catchFrom;
|
|
68
|
+
this.finallyFrom = finallyFrom;
|
|
69
|
+
this.finallyTo = finallyTo;
|
|
70
|
+
this.catchAt = catchAt;
|
|
71
|
+
this.into = into;
|
|
72
|
+
this.height = height;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function heldOf(cx) {
|
|
76
|
+
let held = cx.held;
|
|
77
|
+
if (held === null) {
|
|
78
|
+
held = [];
|
|
79
|
+
cx.held = held;
|
|
80
|
+
}
|
|
81
|
+
return held;
|
|
82
|
+
}
|
|
83
|
+
/** `object` on top of the scope chain, held over the blocks from `from` to `to`. */
|
|
84
|
+
function pushScope(cx, object, from, to) {
|
|
85
|
+
const below = cx.scope;
|
|
86
|
+
cx.scope = new Scope(below, SCOPE_With, object);
|
|
87
|
+
heldOf(cx).push(new ScopeHeld(from, to, cx.scope, below));
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Keeps of `held`, from index `from` up, the entries `keep` says, and the
|
|
91
|
+
* scope chain as the scopes kept make it: the top one's, or with none
|
|
92
|
+
* kept, the chain under the first one taken off.
|
|
93
|
+
*/
|
|
94
|
+
function keepFrom(cx, held, from, keep) {
|
|
95
|
+
let n = from;
|
|
96
|
+
let top = null;
|
|
97
|
+
let base = null;
|
|
98
|
+
for (let i = from; i < held.length; i++) {
|
|
99
|
+
const h = held[i];
|
|
100
|
+
if (keep(h)) {
|
|
101
|
+
held[n++] = h;
|
|
102
|
+
if (h instanceof ScopeHeld) {
|
|
103
|
+
top = h.chain;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
else if (h instanceof ScopeHeld && base === null) {
|
|
107
|
+
base = h.below;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
held.length = n;
|
|
111
|
+
if (top !== null) {
|
|
112
|
+
cx.scope = top;
|
|
113
|
+
}
|
|
114
|
+
else if (base !== null) {
|
|
115
|
+
cx.scope = base;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Control going to the start of block `at`: the scopes on top that do not
|
|
120
|
+
* hold there come off at once, as adl looks only at the top one.
|
|
121
|
+
*/
|
|
122
|
+
function reach(cx, held, at) {
|
|
123
|
+
let n = held.length;
|
|
124
|
+
while (n > 0 && held[n - 1].kind === HELD_Scope && !held[n - 1].admits(at)) {
|
|
125
|
+
n--;
|
|
126
|
+
}
|
|
127
|
+
if (n < held.length) {
|
|
128
|
+
keepFrom(cx, held, n, () => false);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
function cut(st, height) {
|
|
132
|
+
if (st.length > height) {
|
|
133
|
+
st.length = height;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* With: `value`, a primitive boxed, on the scope chain over the body's
|
|
138
|
+
* blocks; false, the body skipped, for undefined and null, and where the
|
|
139
|
+
* chain holds MAX_SCOPES already (adl).
|
|
140
|
+
*/
|
|
141
|
+
export function enterWith(cx, value, from, to, version) {
|
|
142
|
+
if (value === undefined || value === null || cx.scope.depth >= MAX_SCOPES) {
|
|
143
|
+
return false;
|
|
144
|
+
}
|
|
145
|
+
pushScope(cx, cx.realm.box(value, version), from, to);
|
|
146
|
+
return true;
|
|
147
|
+
}
|
|
148
|
+
/** Try: its handlers, held over its try and catch bodies. */
|
|
149
|
+
export function enterTry(cx, from, catchFrom, finallyFrom, finallyTo, catchAt, into) {
|
|
150
|
+
heldOf(cx).push(new TryHeld(from, catchFrom, finallyFrom, finallyTo, catchAt, into, cx.st.length));
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Where control goes from the block `at`, where `error` was thrown: the
|
|
154
|
+
* catch of the first Try whose try body holds it, its variable set, or the
|
|
155
|
+
* finally of the first whose try or catch body does, which throws the
|
|
156
|
+
* value again as control leaves it. The stack is cut back to its height
|
|
157
|
+
* as that Try ran. Another error, a bug's or the host's, a recursion
|
|
158
|
+
* limit's, passes through, as does a value no Try catches.
|
|
159
|
+
*/
|
|
160
|
+
export function caught(cx, error, at) {
|
|
161
|
+
const held = cx.held;
|
|
162
|
+
if (!(error instanceof Avm1Throw) || held === null) {
|
|
163
|
+
throw error;
|
|
164
|
+
}
|
|
165
|
+
cx.into = -1;
|
|
166
|
+
for (let i = held.length - 1; i >= 0; i--) {
|
|
167
|
+
const h = held[i];
|
|
168
|
+
if (!(h instanceof TryHeld) || !h.holds(at)) {
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
if (at < h.catchFrom && h.catchAt !== NO_CATCH) {
|
|
172
|
+
// The scopes where it was thrown hold over the catch body too, under
|
|
173
|
+
// its variable's (adl).
|
|
174
|
+
const from = h.catchFrom;
|
|
175
|
+
const to = h.finallyFrom;
|
|
176
|
+
keepFrom(cx, held, i + 1, isScope);
|
|
177
|
+
for (let j = i + 1; j < held.length; j++) {
|
|
178
|
+
held[j].from = from;
|
|
179
|
+
held[j].to = to;
|
|
180
|
+
}
|
|
181
|
+
cut(cx.st, h.height);
|
|
182
|
+
const into = h.into;
|
|
183
|
+
if (typeof into === "number") {
|
|
184
|
+
cx.into = into;
|
|
185
|
+
cx.thrown = error.value;
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
const scope = new Avm1Object();
|
|
189
|
+
scope.add(into, error.value, 0);
|
|
190
|
+
pushScope(cx, scope, from, to);
|
|
191
|
+
}
|
|
192
|
+
return h.catchAt;
|
|
193
|
+
}
|
|
194
|
+
if (h.finallyFrom < h.finallyTo) {
|
|
195
|
+
// The finally's mark goes under the scopes, which come off as control goes there.
|
|
196
|
+
held[i] = new Held(HELD_Thrown, h.finallyFrom, h.finallyTo, error.value);
|
|
197
|
+
keepFrom(cx, held, i + 1, isScope);
|
|
198
|
+
cut(cx.st, h.height);
|
|
199
|
+
reach(cx, held, h.finallyFrom);
|
|
200
|
+
return h.finallyFrom;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
throw error;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Control going to block `to` (-1: the exit) across the bounds of a body:
|
|
207
|
+
* the Trys that do not hold over it come off, and a finally that a throw
|
|
208
|
+
* or a Return reached throws or returns as control leaves it, even by a
|
|
209
|
+
* jump. The scopes on top that do not hold there come off; those whose
|
|
210
|
+
* body it is the first block past, after its first action (V.scopes).
|
|
211
|
+
*/
|
|
212
|
+
export function leave(cx, to) {
|
|
213
|
+
const held = cx.held;
|
|
214
|
+
if (held !== null) {
|
|
215
|
+
for (let i = held.length - 1; i >= 0; i--) {
|
|
216
|
+
const h = held[i];
|
|
217
|
+
if (h.holds(to)) {
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
if (h.kind === HELD_Scope) {
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
held.splice(i, 1);
|
|
224
|
+
if (h.kind === HELD_Thrown) {
|
|
225
|
+
throw new Avm1Throw(h.value);
|
|
226
|
+
}
|
|
227
|
+
if (h.kind === HELD_Returned) {
|
|
228
|
+
return returned(cx);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
if (to < 0) {
|
|
233
|
+
cx.ret = undefined;
|
|
234
|
+
}
|
|
235
|
+
else if (held !== null) {
|
|
236
|
+
reach(cx, held, to);
|
|
237
|
+
}
|
|
238
|
+
return to;
|
|
239
|
+
}
|
|
240
|
+
/** The scopes that do not hold over block `at`, where control is, come off. */
|
|
241
|
+
export function scopes(cx, at) {
|
|
242
|
+
const held = cx.held;
|
|
243
|
+
if (held === null) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
let n = held.length;
|
|
247
|
+
while (n > 0 && held[n - 1].kind === HELD_Scope && !held[n - 1].holds(at)) {
|
|
248
|
+
n--;
|
|
249
|
+
}
|
|
250
|
+
if (n < held.length) {
|
|
251
|
+
keepFrom(cx, held, n, () => false);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Return, its value on top of the stack: the finally of the first Try
|
|
256
|
+
* whose try or catch body holds control runs first, the stack cut back to
|
|
257
|
+
* its height as that Try ran with the value left on top, and the value is
|
|
258
|
+
* popped as control leaves it, the stack's top then (adl); a finally's own
|
|
259
|
+
* throw or Return gives way to this one.
|
|
260
|
+
*/
|
|
261
|
+
export function returned(cx) {
|
|
262
|
+
const held = cx.held;
|
|
263
|
+
if (held !== null) {
|
|
264
|
+
for (let i = held.length - 1; i >= 0; i--) {
|
|
265
|
+
const h = held[i];
|
|
266
|
+
if (h instanceof TryHeld && h.finallyFrom < h.finallyTo) {
|
|
267
|
+
const st = cx.st;
|
|
268
|
+
const value = st.pop();
|
|
269
|
+
cut(st, h.height);
|
|
270
|
+
st.push(value);
|
|
271
|
+
held[i] = new Held(HELD_Returned, h.finallyFrom, h.finallyTo);
|
|
272
|
+
keepFrom(cx, held, i + 1, isScope);
|
|
273
|
+
reach(cx, held, h.finallyFrom);
|
|
274
|
+
return h.finallyFrom;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
cx.ret = cx.st.pop();
|
|
279
|
+
return -1;
|
|
280
|
+
}
|
|
281
|
+
//# sourceMappingURL=control.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control.js","sourceRoot":"","sources":["../../src/avm1/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,GAAG,EAAE,CAAC,IAAI,CAAC;IACrB,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC1C,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,IAAI,CAAC,YAAY,OAAO,IAAI,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,SAAS,EAAE,CAAC;gBACxD,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;gBACjB,MAAM,KAAK,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC;gBACvB,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;gBAClB,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACf,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC;gBAC9D,QAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;gBACnC,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC;gBAC/B,OAAO,CAAC,CAAC,WAAW,CAAC;YACvB,CAAC;QACH,CAAC;IACH,CAAC;IAED,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC;IACrB,OAAO,CAAC,CAAC,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { Value } from "./values.js";
|
|
2
|
+
/** An action the runtime does not do yet: it ends the block it is in. */
|
|
3
|
+
export declare class NotYet extends Error {
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Thrown once the host has stopped the SWF at an action Flash cannot read,
|
|
8
|
+
* to end whatever runs; the player takes it for no error.
|
|
9
|
+
*/
|
|
10
|
+
export declare class Halt extends Error {
|
|
11
|
+
name: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Thrown after a call, a `new` or a CallFrame that took the clip whose
|
|
15
|
+
* code runs off the display list: that code's activation returns there,
|
|
16
|
+
* a function's with undefined, and the code that called it goes on to its
|
|
17
|
+
* own check (adl; Ruffle's continue_if_base_clip_exists). One instance,
|
|
18
|
+
* thrown as a signal and never shown.
|
|
19
|
+
*/
|
|
20
|
+
export declare class BaseRemoved extends Error {
|
|
21
|
+
name: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const BASE_REMOVED: BaseRemoved;
|
|
24
|
+
/**
|
|
25
|
+
* Thrown past Flash's recursion limit: Flash disables every action of the
|
|
26
|
+
* movie from there, and its timelines play on.
|
|
27
|
+
*/
|
|
28
|
+
export declare class Disabled extends Error {
|
|
29
|
+
name: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Thrown as scripts run past the script timeout, Flash's 15 seconds or a
|
|
33
|
+
* ScriptLimits tag's: Flash asks whether to stop them, and stopped, the
|
|
34
|
+
* movie's actions are disabled as past the recursion limit (Ruffle halts
|
|
35
|
+
* its AVM1 so too).
|
|
36
|
+
*/
|
|
37
|
+
export declare class TimedOut extends Disabled {
|
|
38
|
+
name: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A value AVM1 code throws (Throw), which a Try's catch or finally takes
|
|
42
|
+
* and which, caught by none, ends the block as Flash ends it, silently.
|
|
43
|
+
*/
|
|
44
|
+
export declare class Avm1Throw extends Error {
|
|
45
|
+
readonly value: Value;
|
|
46
|
+
name: string;
|
|
47
|
+
constructor(value: Value);
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/avm1/errors.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,yEAAyE;AACzE,qBAAa,MAAO,SAAQ,KAAK;IACtB,IAAI,SAAgB;CAC9B;AAED;;;GAGG;AACH,qBAAa,IAAK,SAAQ,KAAK;IACpB,IAAI,SAAc;CAC5B;AAED;;;;;;GAMG;AACH,qBAAa,WAAY,SAAQ,KAAK;IAC3B,IAAI,SAAqB;CACnC;AAED,eAAO,MAAM,YAAY,aAA0D,CAAC;AAEpF;;;GAGG;AACH,qBAAa,QAAS,SAAQ,KAAK;IACxB,IAAI,SAAkB;CAChC;AAED;;;;;GAKG;AACH,qBAAa,QAAS,SAAQ,QAAQ;IAC3B,IAAI,SAAkB;CAChC;AAED;;;GAGG;AACH,qBAAa,SAAU,SAAQ,KAAK;IAGtB,QAAQ,CAAC,KAAK,EAAE,KAAK;IAFxB,IAAI,SAAe;IAE5B,YAAqB,KAAK,EAAE,KAAK,EAEhC;CACF"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** An action the runtime does not do yet: it ends the block it is in. */
|
|
2
|
+
export class NotYet extends Error {
|
|
3
|
+
name = "Avm1NotYet";
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Thrown once the host has stopped the SWF at an action Flash cannot read,
|
|
7
|
+
* to end whatever runs; the player takes it for no error.
|
|
8
|
+
*/
|
|
9
|
+
export class Halt extends Error {
|
|
10
|
+
name = "Avm1Halt";
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Thrown after a call, a `new` or a CallFrame that took the clip whose
|
|
14
|
+
* code runs off the display list: that code's activation returns there,
|
|
15
|
+
* a function's with undefined, and the code that called it goes on to its
|
|
16
|
+
* own check (adl; Ruffle's continue_if_base_clip_exists). One instance,
|
|
17
|
+
* thrown as a signal and never shown.
|
|
18
|
+
*/
|
|
19
|
+
export class BaseRemoved extends Error {
|
|
20
|
+
name = "Avm1BaseRemoved";
|
|
21
|
+
}
|
|
22
|
+
export const BASE_REMOVED = new BaseRemoved("the clip whose code runs was removed");
|
|
23
|
+
/**
|
|
24
|
+
* Thrown past Flash's recursion limit: Flash disables every action of the
|
|
25
|
+
* movie from there, and its timelines play on.
|
|
26
|
+
*/
|
|
27
|
+
export class Disabled extends Error {
|
|
28
|
+
name = "Avm1Disabled";
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Thrown as scripts run past the script timeout, Flash's 15 seconds or a
|
|
32
|
+
* ScriptLimits tag's: Flash asks whether to stop them, and stopped, the
|
|
33
|
+
* movie's actions are disabled as past the recursion limit (Ruffle halts
|
|
34
|
+
* its AVM1 so too).
|
|
35
|
+
*/
|
|
36
|
+
export class TimedOut extends Disabled {
|
|
37
|
+
name = "Avm1TimedOut";
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A value AVM1 code throws (Throw), which a Try's catch or finally takes
|
|
41
|
+
* and which, caught by none, ends the block as Flash ends it, silently.
|
|
42
|
+
*/
|
|
43
|
+
export class Avm1Throw extends Error {
|
|
44
|
+
value;
|
|
45
|
+
name = "Avm1Throw";
|
|
46
|
+
constructor(value) {
|
|
47
|
+
super("an AVM1 value thrown and not caught");
|
|
48
|
+
this.value = value;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/avm1/errors.ts"],"names":[],"mappings":"AAKA,yEAAyE;AACzE,MAAM,OAAO,MAAO,SAAQ,KAAK;IACtB,IAAI,GAAG,YAAY,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,OAAO,IAAK,SAAQ,KAAK;IACpB,IAAI,GAAG,UAAU,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,MAAM,OAAO,WAAY,SAAQ,KAAK;IAC3B,IAAI,GAAG,iBAAiB,CAAC;CACnC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,WAAW,CAAC,sCAAsC,CAAC,CAAC;AAEpF;;;GAGG;AACH,MAAM,OAAO,QAAS,SAAQ,KAAK;IACxB,IAAI,GAAG,cAAc,CAAC;CAChC;AAED;;;;;GAKG;AACH,MAAM,OAAO,QAAS,SAAQ,QAAQ;IAC3B,IAAI,GAAG,cAAc,CAAC;CAChC;AAED;;;GAGG;AACH,MAAM,OAAO,SAAU,SAAQ,KAAK;IAGb,KAAK;IAFjB,IAAI,GAAG,WAAW,CAAC;IAE5B,YAAqB,KAAY;QAC/B,KAAK,CAAC,qCAAqC,CAAC,CAAC;qBAD1B,KAAK;IAE1B,CAAC;CACF"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Activation, type Region } from "./activation.js";
|
|
2
|
+
import type { Target } from "./host.js";
|
|
3
|
+
import { Avm1Function, Avm1Object, type Property } from "./objects.js";
|
|
4
|
+
import type { Realm } from "./realm.js";
|
|
5
|
+
import { Scope } from "./scope.js";
|
|
6
|
+
import { type Value } from "./values.js";
|
|
7
|
+
/** A DefineFunction or DefineFunction2's function. */
|
|
8
|
+
export declare class ScriptFunction extends Avm1Function {
|
|
9
|
+
readonly world: Realm;
|
|
10
|
+
/** The region of its body. */
|
|
11
|
+
readonly region: Region;
|
|
12
|
+
/** Its block's regions, which DefineFunction in its body makes functions of. */
|
|
13
|
+
readonly code: Region[];
|
|
14
|
+
/** Its parameters' names, null for those in a register. */
|
|
15
|
+
readonly params: (string | null)[];
|
|
16
|
+
/** DefineFunction2's flags, 0 for a DefineFunction. */
|
|
17
|
+
readonly flags: number;
|
|
18
|
+
/** The version of the SWF that defined it. */
|
|
19
|
+
readonly version: number;
|
|
20
|
+
/** The scope chain it was defined in, which it closes over from SWF 6. */
|
|
21
|
+
readonly scope: Scope;
|
|
22
|
+
/** The constant pool of the activation that defined it, as it was then. */
|
|
23
|
+
readonly pool: Value[];
|
|
24
|
+
/** The clip whose code defined it, its activation's base clip, its target from SWF 6. */
|
|
25
|
+
readonly target: Target;
|
|
26
|
+
readonly clip: Avm1Object;
|
|
27
|
+
/**
|
|
28
|
+
* The `this` of the activation that defined it, which is its own where
|
|
29
|
+
* DefineFunction2 preloads or suppresses `this`; undefined from SWF 5,
|
|
30
|
+
* whose functions close over nothing (adl; Ruffle takes the caller's).
|
|
31
|
+
*/
|
|
32
|
+
readonly definer: Value;
|
|
33
|
+
constructor(proto: Value, world: Realm,
|
|
34
|
+
/** The region of its body. */
|
|
35
|
+
region: Region,
|
|
36
|
+
/** Its block's regions, which DefineFunction in its body makes functions of. */
|
|
37
|
+
code: Region[],
|
|
38
|
+
/** Its parameters' names, null for those in a register. */
|
|
39
|
+
params: (string | null)[],
|
|
40
|
+
/** DefineFunction2's flags, 0 for a DefineFunction. */
|
|
41
|
+
flags: number,
|
|
42
|
+
/** The version of the SWF that defined it. */
|
|
43
|
+
version: number,
|
|
44
|
+
/** The scope chain it was defined in, which it closes over from SWF 6. */
|
|
45
|
+
scope: Scope,
|
|
46
|
+
/** The constant pool of the activation that defined it, as it was then. */
|
|
47
|
+
pool: Value[],
|
|
48
|
+
/** The clip whose code defined it, its activation's base clip, its target from SWF 6. */
|
|
49
|
+
target: Target, clip: Avm1Object,
|
|
50
|
+
/**
|
|
51
|
+
* The `this` of the activation that defined it, which is its own where
|
|
52
|
+
* DefineFunction2 preloads or suppresses `this`; undefined from SWF 5,
|
|
53
|
+
* whose functions close over nothing (adl; Ruffle takes the caller's).
|
|
54
|
+
*/
|
|
55
|
+
definer: Value);
|
|
56
|
+
/**
|
|
57
|
+
* Run its body with `self` as `this`, `depth` how far up `this`'s
|
|
58
|
+
* prototypes it was found (which `super` starts from), in an activation
|
|
59
|
+
* of its own above the scope it closes over, or from SWF 5 above the
|
|
60
|
+
* clip of `this` or of the caller's target, as Flash 5 ran functions.
|
|
61
|
+
*/
|
|
62
|
+
call(self: Value, args: Value[], version: number, depth?: number): Value;
|
|
63
|
+
/** As a constructor: its result is the object `new` made, whatever the body returns. */
|
|
64
|
+
initialize(self: Avm1Object, args: Value[], version: number): void;
|
|
65
|
+
callConstructor(self: Avm1Object, args: Value[], version: number, depth: number): Value;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* `super` in a method: an object whose prototype is the one above where
|
|
69
|
+
* the method was found, whose methods run with the method's `this`.
|
|
70
|
+
*/
|
|
71
|
+
export declare class Avm1Super extends Avm1Object {
|
|
72
|
+
/** The `this` of the method that made it. */
|
|
73
|
+
readonly self: Avm1Object;
|
|
74
|
+
/** How far up `self`'s prototypes the method was found. */
|
|
75
|
+
readonly depth: number;
|
|
76
|
+
constructor(
|
|
77
|
+
/** The `this` of the method that made it. */
|
|
78
|
+
self: Avm1Object,
|
|
79
|
+
/** How far up `self`'s prototypes the method was found. */
|
|
80
|
+
depth: number, version: number);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* `super` for an activation, undefined where it has none: a plain call has
|
|
84
|
+
* none, nor does a SWF 5 (adl).
|
|
85
|
+
*/
|
|
86
|
+
export declare function superOf(cx: Activation, self: Value, version: number): Value;
|
|
87
|
+
/** A function's `arguments`: an array of them, with `callee` and `caller`. */
|
|
88
|
+
export declare function argumentsOf(cx: Activation, args: Value[], version: number): Avm1Object;
|
|
89
|
+
/**
|
|
90
|
+
* `arguments` or `super` on a function's activation object `o`, as a
|
|
91
|
+
* lookup first misses it; any other name stays missing.
|
|
92
|
+
*/
|
|
93
|
+
export declare function pendingLocal(cx: Activation, o: Avm1Object, name: string, version: number): Property | undefined;
|
|
94
|
+
//# sourceMappingURL=functions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/avm1/functions.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAoC,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAG5F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE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