1 // 2 // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 3 // Free Software Foundation, Inc 4 // 5 // This program is free software; you can redistribute it and/or modify 6 // it under the terms of the GNU General Public License as published by 7 // the Free Software Foundation; either version 3 of the License, or 8 // (at your option) any later version. 9 // 10 // This program is distributed in the hope that it will be useful, 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 // GNU General Public License for more details. 14 // 15 // You should have received a copy of the GNU General Public License 16 // along with this program; if not, write to the Free Software 17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 19 #ifndef GNASH_SWF_H 20 #define GNASH_SWF_H 21 22 #include <iosfwd> 23 24 namespace gnash { 25 26 /// SWF format parsing classes 27 namespace SWF { 28 29 /// SWF tag types. Symbolic names copied from Ming 30 enum TagType 31 { 32 END = 0, 33 SHOWFRAME = 1, 34 DEFINESHAPE = 2, 35 FREECHARACTER = 3, 36 PLACEOBJECT = 4, 37 REMOVEOBJECT = 5, 38 DEFINEBITS = 6, 39 DEFINEBUTTON = 7, 40 JPEGTABLES = 8, 41 SETBACKGROUNDCOLOR = 9, 42 DEFINEFONT = 10, 43 DEFINETEXT = 11, 44 DOACTION = 12, 45 DEFINEFONTINFO = 13, 46 DEFINESOUND = 14, 47 STARTSOUND = 15, 48 STOPSOUND = 16, 49 DEFINEBUTTONSOUND = 17, 50 SOUNDSTREAMHEAD = 18, 51 SOUNDSTREAMBLOCK = 19, 52 DEFINELOSSLESS = 20, 53 DEFINEBITSJPEG2 = 21, 54 DEFINESHAPE2 = 22, 55 DEFINEBUTTONCXFORM = 23, 56 PROTECT = 24, 57 PATHSAREPOSTSCRIPT = 25, 58 PLACEOBJECT2 = 26, 59 REMOVEOBJECT2 = 28, 60 SYNCFRAME = 29, 61 FREEALL = 31, 62 DEFINESHAPE3 = 32, 63 DEFINETEXT2 = 33, 64 DEFINEBUTTON2 = 34, 65 DEFINEBITSJPEG3 = 35, 66 DEFINELOSSLESS2 = 36, 67 DEFINEEDITTEXT = 37, 68 DEFINEVIDEO = 38, 69 DEFINESPRITE = 39, 70 NAMECHARACTER = 40, 71 SERIALNUMBER = 41, 72 DEFINETEXTFORMAT = 42, 73 FRAMELABEL = 43, 74 DEFINEBEHAVIOR = 44, 75 SOUNDSTREAMHEAD2 = 45, 76 DEFINEMORPHSHAPE = 46, 77 FRAMETAG = 47, 78 DEFINEFONT2 = 48, 79 GENCOMMAND = 49, 80 DEFINECOMMANDOBJ = 50, 81 CHARACTERSET = 51, 82 FONTREF = 52, 83 DEFINEFUNCTION = 53, 84 PLACEFUNCTION = 54, 85 GENTAGOBJECT = 55, 86 EXPORTASSETS = 56, 87 IMPORTASSETS = 57, 88 ENABLEDEBUGGER = 58, 89 INITACTION = 59, 90 DEFINEVIDEOSTREAM = 60, 91 VIDEOFRAME = 61, 92 DEFINEFONTINFO2 = 62, 93 DEBUGID = 63, 94 ENABLEDEBUGGER2 = 64, 95 SCRIPTLIMITS = 65, 96 SETTABINDEX = 66, 97 DEFINESHAPE4_ = 67, 98 DEFINEMORPHSHAPE2_ = 68, 99 FILEATTRIBUTES = 69, 100 PLACEOBJECT3 = 70, 101 IMPORTASSETS2 = 71, 102 DOABC = 72, 103 DEFINEALIGNZONES = 73, 104 CSMTEXTSETTINGS = 74, 105 DEFINEFONT3 = 75, 106 SYMBOLCLASS = 76, 107 METADATA = 77, 108 DEFINESCALINGGRID = 78, 109 DOABCDEFINE = 82, 110 DEFINESHAPE4 = 83, 111 DEFINEMORPHSHAPE2 = 84, 112 DEFINESCENEANDFRAMELABELDATA = 86, 113 DEFINEBINARYDATA = 87, 114 DEFINEFONTNAME = 88, 115 STARTSOUND2 = 89, 116 DEFINEBITSJPEG4 = 90, 117 REFLEX = 777, 118 DEFINEBITSPTR = 1023 119 }; 120 121 std::ostream& operator<<(std::ostream& o, TagType t); 122 123 /// SWF action ids. Symbolic names copied from Ming. 124 enum ActionType 125 { 126 ACTION_END = 0x00, 127 ACTION_NEXTFRAME = 0x04, 128 ACTION_PREVFRAME = 0x05, 129 ACTION_PLAY = 0x06, 130 ACTION_STOP = 0x07, 131 ACTION_TOGGLEQUALITY = 0x08, 132 ACTION_STOPSOUNDS = 0x09, 133 ACTION_GOTOFRAME = 0x81, /* >= 0x80 means record has args */ 134 ACTION_GETURL = 0x83, 135 ACTION_WAITFORFRAME = 0x8A, 136 ACTION_SETTARGET = 0x8B, 137 ACTION_GOTOLABEL = 0x8C, 138 ACTION_ADD = 0x0A, 139 ACTION_SUBTRACT = 0x0B, 140 ACTION_MULTIPLY = 0x0C, 141 ACTION_DIVIDE = 0x0D, 142 ACTION_EQUAL = 0x0E, 143 ACTION_LESSTHAN = 0x0F, 144 ACTION_LOGICALAND = 0x10, 145 ACTION_LOGICALOR = 0x11, 146 ACTION_LOGICALNOT = 0x12, 147 ACTION_STRINGEQ = 0x13, 148 ACTION_STRINGLENGTH = 0x14, 149 ACTION_SUBSTRING = 0x15, 150 ACTION_POP = 0x17, 151 ACTION_INT = 0x18, 152 ACTION_GETVARIABLE = 0x1C, 153 ACTION_SETVARIABLE = 0x1D, 154 ACTION_SETTARGETEXPRESSION = 0x20, 155 ACTION_STRINGCONCAT = 0x21, 156 ACTION_GETPROPERTY = 0x22, 157 ACTION_SETPROPERTY = 0x23, 158 ACTION_DUPLICATECLIP = 0x24, 159 ACTION_REMOVECLIP = 0x25, 160 ACTION_TRACE = 0x26, 161 ACTION_STARTDRAGMOVIE = 0x27, 162 ACTION_STOPDRAGMOVIE = 0x28, 163 ACTION_STRINGCOMPARE = 0x29, 164 ACTION_THROW = 0x2A, 165 166 /// SWF7 167 /// 168 /// The Cast Object action makes sure that the object 169 /// o1 is an instance of the class s2. If it is the case, 170 /// then o1 is pushed back onto the stack. Otherwise Null is 171 /// pushed back onto the stack. The comparison is identical 172 /// to the one applied by the Instance Of action. 173 ACTION_CASTOP = 0x2B, 174 175 /// SWF7 176 /// 177 /// This action declares an object as a sub-class of 178 /// one or more interfaces. The number of interfaces has to 179 /// be indicated by i2. An interface is referenced by its 180 /// name (which happens to be the same as the constructor 181 /// function name.) 182 ACTION_IMPLEMENTSOP = 0x2C, 183 184 /// SWF7 185 // 186 /// This is Flash Lite only and is ignored in the full player. 187 // 188 /// This action executes an fscommand. 189 /// Stack In: 190 /// i1 -- number of arguments (int) 191 /// s2 -- command string 192 /// [s3..sn] -- arguments, as many as specified in i1 193 /// Stack Out: 194 /// not known 195 ACTION_FSCOMMAND2 = 0x2D, 196 ACTION_RANDOM = 0x30, 197 ACTION_MBLENGTH = 0x31, 198 ACTION_ORD = 0x32, 199 ACTION_CHR = 0x33, 200 ACTION_GETTIMER = 0x34, 201 ACTION_MBSUBSTRING = 0x35, 202 ACTION_MBORD = 0x36, 203 ACTION_MBCHR = 0x37, 204 ACTION_STRICTMODE = 0x89, 205 ACTION_WAITFORFRAMEEXPRESSION = 0x8D, 206 ACTION_PUSHDATA = 0x96, 207 ACTION_BRANCHALWAYS = 0x99, 208 ACTION_GETURL2 = 0x9A, 209 ACTION_BRANCHIFTRUE = 0x9D, 210 ACTION_CALLFRAME = 0x9E, 211 212 /// aka GOTOFRAME2 213 ACTION_GOTOEXPRESSION = 0x9F, 214 ACTION_DELETE = 0x3A, 215 ACTION_DELETE2 = 0x3B, 216 ACTION_VAREQUALS = 0x3C, // DEFINELOCAL actually 217 ACTION_CALLFUNCTION = 0x3D, 218 ACTION_RETURN = 0x3E, 219 ACTION_MODULO = 0x3F, 220 221 /// SWF5 222 /// 223 /// Pop the number of arguments. Pop each argument. 224 /// Create an object of class s1. Call the 225 /// constructor function (which has the same name as 226 /// the object class: s1). The result of the 227 /// constructor is discarded. Push the created object 228 /// on the stack. The object should then be saved in 229 /// a variable or object method. 230 ACTION_NEW = 0x40, 231 ACTION_VAR = 0x41, 232 ACTION_INITARRAY = 0x42, 233 234 /// Pops the number of members in the object. Pop 235 /// one value and one name per member and set the 236 /// corresponding member in the object. The resulting 237 /// object is pushed on the stack. It can later be sent 238 /// to a function or set in a variable. Note: the member 239 /// names are converted to strings; they certainly should 240 /// be strings thought anything is supported. 241 /// 242 /// Also known as 'ACTION_DECLAREOBJECT'. 243 ACTION_INITOBJECT = 0x43, 244 ACTION_TYPEOF = 0x44, 245 246 /// Pop a value from the stack. If it is a valid movieclip push 247 /// its target back on the stack (example: _level0.sprite1.sprite2). 248 ACTION_TARGETPATH = 0x45, 249 ACTION_ENUMERATE = 0x46, 250 ACTION_NEWADD = 0x47, 251 ACTION_NEWLESSTHAN = 0x48, 252 253 /// ECMA-262 "Abstract Equality Comparison" 254 // 255 /// See section 11.9.3 of the ECMA 262 spec 256 ACTION_NEWEQUALS = 0x49, 257 ACTION_TONUMBER = 0x4A, 258 ACTION_TOSTRING = 0x4B, 259 ACTION_DUP = 0x4C, 260 ACTION_SWAP = 0x4D, 261 ACTION_GETMEMBER = 0x4E, 262 ACTION_SETMEMBER = 0x4F, 263 ACTION_INCREMENT = 0x50, 264 ACTION_DECREMENT = 0x51, 265 266 /// Pops the name of a method (can be the empty string), 267 /// pop an object, pop the number of arguments, pop each 268 /// argument, call the method (function) of the object, 269 /// push the returned value on the stack. 270 ACTION_CALLMETHOD = 0x52, 271 272 /// Pops the name of a method (can be the empty string), 273 /// pop an object (created with the Declare Object,) 274 /// pop the number of arguments, pop each argument, 275 /// create a new object, then call the specified method 276 /// (function) as the constructor function of the object, 277 /// push the returned value on the stack. This allows 278 /// for overloaded constructors as in C++. 279 ACTION_NEWMETHOD = 0x53, 280 281 /// Pops the name of a constructor (s1 - ie. "Color") 282 /// then the name of an object (s2). Checks whether the 283 /// named object is part of the class defined by the 284 /// constructor. If so, then true is push on the stack, 285 /// otherwise false. Since SWF version 7, it is possible 286 /// to cast an object to another using the Cast Object 287 /// action. This action returns a copy of the object or 288 /// Null, which in many cases can be much more practical. 289 ACTION_INSTANCEOF = 0x54, 290 291 /// Pops an object from the stack, push a null, then 292 /// push the name of each member on the stack. 293 ACTION_ENUM2 = 0x55, 294 ACTION_BITWISEAND = 0x60, 295 ACTION_BITWISEOR = 0x61, 296 ACTION_BITWISEXOR = 0x62, 297 ACTION_SHIFTLEFT = 0x63, 298 ACTION_SHIFTRIGHT = 0x64, 299 ACTION_SHIFTRIGHT2 = 0x65, 300 ACTION_STRICTEQ = 0x66, 301 302 /// Similar to Swap + Less Than. It checks whether the 303 /// second parameter is greater than the first and return 304 /// the boolean result on the stack. 305 ACTION_GREATER = 0x67, 306 307 /// Similar to Swap + String Less Than. It checks whether 308 /// the second string is greater than the first and 309 /// return the boolean result on the stack. 310 ACTION_STRINGGREATER = 0x68, 311 312 /// The Extends action will be used to define a new object 313 /// which extends another object. The declaration in 314 /// ActionScript is: 315 /// 316 /// class A extends B; 317 /// 318 /// In an SWF action script, you don't exactly declare 319 /// objects, you actually instantiate them and define their 320 /// functions. This action creates a new object named s2 321 /// which is an extension of the object s1. 322 /// 323 /// Use this action whenever you need to inherit an object 324 /// without calling its constructor. 325 ACTION_EXTENDS = 0x69, 326 ACTION_CONSTANTPOOL = 0x88, 327 ACTION_DEFINEFUNCTION2 = 0x8E, 328 ACTION_TRY = 0x8F, 329 ACTION_WITH = 0x94, 330 ACTION_DEFINEFUNCTION = 0x9B, 331 ACTION_SETREGISTER = 0x87 332 333 }; 334 335 std::ostream& operator<<(std::ostream& o, ActionType a); 336 337 enum abc_action_type 338 { 339 /// AS3 Actions go below here. 340 ABC_ACTION_END = 0x00, 341 342 /// Do: Enter the debugger if one has been invoked. 343 ABC_ACTION_BKPT = 0x01, 344 345 /// Do: Nothing. 346 ABC_ACTION_NOP = 0x02, 347 348 /// Stack In: 349 /// obj -- an object 350 /// Stack Out: 351 /// . 352 /// Do: Throw obj as an exception 353 /// Equivalent: ACTIONTHROW 354 ABC_ACTION_THROW = 0X03, 355 356 /// Stream: 357 /// name_id -- V32 index to multiname 'name' 358 /// Stack In: 359 /// obj -- an object 360 /// [ns [n]] -- Namespace stuff. 361 /// Stack Out: 362 /// super -- if obj.name is a method, the super of that method. 363 /// -- if obj.name is write-only data, throw ReferenceError. 364 /// -- if obj.name is readable, the return of the getter of super. 365 ABC_ACTION_GETSUPER = 0X04, 366 367 /// Stream: UV32 index to multiname 'name' 368 /// Stack In: 369 /// obj -- an object 370 /// val -- an object 371 /// [ns [n]] -- Namespace stuff. 372 /// Stack Out: 373 /// . 374 /// Do: Make val the super of obj.name ; throw ReferenceError if obj.name is 375 /// not writable. 376 ABC_ACTION_SETSUPER = 0X05, 377 378 /// Dynamically eXtend Name Space? 379 /// Stream: UV32 index to string pool 'nsname' 380 /// Do: Create a new public namespace with name nsname, enter the namespace. 381 ABC_ACTION_DXNS = 0X06, 382 383 /// Stack In: 384 /// nsname -- a string object 385 /// Stack Out: 386 /// . 387 /// Do: Create a new public namespace with name nsname, but don't enter it. 388 ABC_ACTION_DXNSLATE = 0X07, 389 390 /// Stream: UV32 frame pointer offset 'offset' 391 /// Frame: 392 /// Kill at offset 393 /// Equivalent: ACTION_DELETE 394 ABC_ACTION_KILL = 0X08, 395 396 /// Do: Unknown purpose, Tamarin does nothing. 397 ABC_ACTION_LABEL = 0X09, 398 399 ABC_ACTION_0x0A = 0X0A, 400 ABC_ACTION_0X0B = 0X0B, 401 402 /// Stream: S24 jump offset 'jump' 403 /// Stack In: 404 /// a -- an object 405 /// b -- an object 406 /// Stack Out: 407 /// . 408 /// Do: If !(a < b) move by jump in stream, as ABC_ACTION_JUMP does. 409 ABC_ACTION_IFNLT = 0X0C, 410 411 /// Stream: S24 jump offset 'jump' 412 /// Stack In: 413 /// a -- an object 414 /// b -- an object 415 /// Stack Out: 416 /// . 417 /// Do: If !(a <= b) move by jump in stream, as ABC_ACTION_JUMP does. 418 ABC_ACTION_IFNLE = 0X0D, 419 420 /// Stream: S24 jump offset 'jump' 421 /// Stack In: 422 /// a -- an object 423 /// b -- an object 424 /// Stack Out: 425 /// . 426 /// Do: If !(a > b) move by jump in stream, as ABC_ACTION_JUMP does. 427 ABC_ACTION_IFNGT = 0X0E, 428 429 /// Stream: S24 jump offset 'jump' 430 /// Stack In: 431 /// a -- an object 432 /// b -- an object 433 /// Stack Out: 434 /// . 435 /// Do: If !(a >= b) move by jump in stream, as ABC_ACTION_JUMP does. 436 ABC_ACTION_IFNGE = 0X0F, 437 438 /// Stream: S24 jump offset 'jump' 439 /// Do: If jump is negative, check for interrupts. Move by jump in stream. 440 /// Equivalent: ACTION_BRANCHALWAYS 441 ABC_ACTION_JUMP = 0X10, 442 443 /// Stream: S24 jump offset 'jump' 444 /// Stack In: 445 /// a -- an object 446 /// Stack Out: 447 /// . 448 /// Do: If a is 'true', move by jump in stream, as ABC_ACTION_JUMP does. 449 /// Equivalent: ACTION_BRANCHIFTRUE 450 ABC_ACTION_IFTRUE = 0X11, 451 452 /// Stream: S24 jump offset 'jump' 453 /// Stack In: 454 /// a -- an object 455 /// Stack Out: 456 /// . 457 /// Do: If a is 'false', move by jump in stream, as ABC_ACTION_JUMP does. 458 ABC_ACTION_IFFALSE = 0X12, 459 460 /// Stream: S24 jump offset 'jump' 461 /// Stack In: 462 /// a -- an object 463 /// b -- an object 464 /// Stack Out: 465 /// . 466 /// Do: If a == b (weakly), move by jump in stream, as ABC_ACTION_JUMP does. 467 ABC_ACTION_IFEQ = 0x13, 468 469 /// Stream: S24 jump offset 'jump' 470 /// Stack In: 471 /// a -- an object 472 /// b -- an object 473 /// Stack Out: 474 /// . 475 /// Do: If a != b (weakly), move by jump in stream, as ABC_ACTION_JUMP does. 476 ABC_ACTION_IFNE = 0X14, 477 478 /// Stream: S24 jump offset 'jump' 479 /// Stack In: 480 /// a -- an object 481 /// b -- an object 482 /// Stack Out: 483 /// . 484 /// Do: If a < b move by jump in stream, as ABC_ACTION_JUMP does. 485 ABC_ACTION_IFLT = 0X15, 486 487 /// Stream: S24 jump offset 'jump' 488 /// Stack In: 489 /// a -- an object 490 /// b -- an object 491 /// Stack Out: 492 /// . 493 /// Do: If a <= b move by jump in stream, as ABC_ACTION_JUMP does. 494 ABC_ACTION_IFLE = 0x16, 495 496 /// Stream: S24 jump offset 'jump' 497 /// Stack In: 498 /// a -- an object 499 /// b -- an object 500 /// Stack Out: 501 /// . 502 /// Do: If a > b move by jump in stream, as ABC_ACTION_JUMP does. 503 ABC_ACTION_IFGT = 0x17, 504 505 /// Stream: S24 jump offset 'jump' 506 /// Stack In: 507 /// a -- an object 508 /// b -- an object 509 /// Stack Out: 510 /// . 511 /// Do: If a >= b move by jump in stream, as ABC_ACTION_JUMP does. 512 ABC_ACTION_IFGE = 0x18, 513 514 /// Stream: S24 jump offset 'jump' 515 /// Stack In: 516 /// a -- an object 517 /// b -- an object 518 /// Stack Out: 519 /// . 520 /// Do: If a == b (strictly), move by jump in stream, as ABC_ACTION_JUMP 521 ABC_ACTION_IFSTRICTEQ = 0x19, 522 523 /// Stream: S24 jump offset 'jump' 524 /// Stack In: 525 /// a -- an object 526 /// b -- an object 527 /// Stack Out: 528 /// . 529 /// Do: If a != b (strongly), move by jump in stream, as ABC_ACTION_JUMP 530 ABC_ACTION_IFSTRICTNE = 0x1A, 531 532 /// Stream: 3 bytes | V32 count as 'case_count - 1' | case_count of S24 533 /// as 'cases' 534 /// Stack In: 535 /// index -- an integer object 536 /// Stack Out: 537 /// . 538 /// Do: If index >= case_count, reset stream to position on op entry. 539 /// Otherwise, move by cases[index] - 1 from stream position on op entry. 540 ABC_ACTION_LOOKUPSWITCH = 0x1B, 541 542 /// Stack In: 543 /// scope -- a scope 544 /// Stack Out: 545 /// . 546 /// Do: Enter scope with previous scope as its base, unless it already had 547 /// a base, in which case leave that alone. 548 ABC_ACTION_PUSHWITH = 0x1C, 549 550 /// Do: exit current scope. Clear the base if the depth is now 551 /// shallower than the base's depth. 552 ABC_ACTION_POPSCOPE = 0x1D, 553 554 /// Stack In: 555 /// obj -- an object 556 /// index -- an integer object 557 /// Stack Out: 558 /// name -- the key name at index in obj (not next after index). 559 /// Do: If obj is a namespace index 1 is the uri of the namespace, 560 /// index 2 is the prefix of the namespace, and any other value is a 561 /// null string object. If obj is an immutable object, like a number, 562 /// operate on its prototype instead. If there is no such index, 563 /// name is null. 564 ABC_ACTION_NEXTNAME = 0x1E, 565 566 /// Stack In: 567 /// obj -- an object 568 /// index -- an integer object 569 /// Stack Out: 570 /// next_index -- next index after index in obj, or 0 if none. 571 /// Do: If there is a key/val pair after index, make next_index as it. 572 /// Otherwise, make next_index 0. 573 ABC_ACTION_HASNEXT = 0x1F, 574 575 /// Stack Out: 576 /// n -- a Null object. 577 ABC_ACTION_PUSHNULL = 0x20, 578 579 /// n -- an Undefined object. 580 ABC_ACTION_PUSHUNDEFINED = 0x21, 581 582 ABC_ACTION_0x22 = 0x22, 583 584 /// Stack In: 585 /// obj -- an object (namespaces okay) 586 /// index -- an integer object 587 /// Stack Out: 588 /// value -- the value of the key value pair in obj at index. 589 ABC_ACTION_NEXTVALUE = 0x23, 590 591 /// Stream: S8 as 'byte' 592 /// Stack Out: 593 /// byte -- as a raw byte 594 ABC_ACTION_PUSHBYTE = 0x24, 595 596 /// Stream: V32 as 'value' 597 /// Stack Out: 598 /// value -- as a raw integer 599 ABC_ACTION_PUSHSHORT = 0x25, 600 601 /// Stack Out: 602 /// true -- the True object 603 ABC_ACTION_PUSHTRUE = 0x26, 604 605 /// Stack Out: 606 /// false -- the False object 607 ABC_ACTION_PUSHFALSE = 0x27, 608 609 /// Stack Out: 610 /// NaN -- the NaN object 611 ABC_ACTION_PUSHNAN = 0x28, 612 613 /// Stack In: 614 /// a -- anything 615 /// Stack Out: 616 /// . 617 ABC_ACTION_POP = 0x29, 618 619 /// Stack In: 620 /// a -- anything 621 /// Stack Out: 622 /// a 623 /// a 624 ABC_ACTION_DUP = 0x2A, 625 626 /// Stack In: 627 /// a -- anything 628 /// b -- anything 629 /// Stack Out: 630 /// b 631 /// a 632 ABC_ACTION_SWAP = 0x2B, 633 634 /// Stream: V32 string pool index 'index' 635 /// Stack Out: 636 /// value -- String object from string_pool[index] 637 ABC_ACTION_PUSHSTRING = 0x2C, 638 639 /// Stream: V32 int pool index 'index' 640 /// Stack Out: 641 /// value -- Integer object from integer_pool[index] 642 ABC_ACTION_PUSHINT = 0x2D, 643 644 /// Stream: V32 uint pool index 'index' 645 /// Stack Out: 646 /// value -- Unsigned Integer object from unsigned_integer_pool[index] 647 ABC_ACTION_PUSHUINT = 0x2E, 648 649 /// Stream: V32 double pool index 'index' 650 /// Stack Out: 651 /// value -- Double object from double_pool[index] 652 ABC_ACTION_PUSHDOUBLE = 0x2F, 653 654 /// Stack In: 655 /// scope -- a scope 656 /// Stack Out: 657 /// . 658 /// Do: Enter scope without altering base. 659 ABC_ACTION_PUSHSCOPE = 0x30, 660 661 /// Stream: V32 namespace pool index 'index' 662 /// Stack Out: 663 /// ns -- Namespace object from namespace_pool[index] 664 ABC_ACTION_PUSHNAMESPACE = 0x31, 665 666 /// Stream: V32 frame location 'objloc' | V32 frame location 'indexloc' 667 /// Stack Out: 668 /// truth -- True if frame[objloc] has key/val pair after frame[indexloc], 669 /// following delagates (__proto__) objects if needed. False, otherwise. 670 /// Frame: 671 /// Change at objloc to object which possessed next value. 672 /// Change at indexloc to index (as object) of the next value. 673 ABC_ACTION_HASNEXT2 = 0x32, 674 675 ABC_ACTION_0x33 = 0x33, 676 ABC_ACTION_0x34 = 0x34, 677 ABC_ACTION_0x35 = 0x35, 678 ABC_ACTION_0x36 = 0x36, 679 ABC_ACTION_0x37 = 0x37, 680 ABC_ACTION_0x38 = 0x38, 681 ABC_ACTION_0x39 = 0x39, 682 ABC_ACTION_0x3A = 0x3A, 683 ABC_ACTION_0x3B = 0x3B, 684 ABC_ACTION_0x3C = 0x3C, 685 ABC_ACTION_0x3D = 0x3D, 686 ABC_ACTION_0x3E = 0x3E, 687 ABC_ACTION_0x3F = 0x3F, 688 689 /// Stream: V32 'index' 690 /// Stack Out: 691 /// func -- the function object 692 /// Do: Information about function is in the pool at index. Construct the 693 /// function from this information, current scope, and base of the scope. 694 ABC_ACTION_NEWFUNCTION = 0x40, 695 696 /// Stream: V32 'arg_count' 697 /// Stack In: 698 /// func -- the function to be called 699 /// obj -- the object to which the function belongs 700 /// arg1 ... argN -- the arg_count arguments to pass 701 /// Stack Out: 702 /// value -- the value returned by obj->func(arg1, ...., argN) 703 ABC_ACTION_CALL = 0x41, 704 705 /// Stream: V32 'arg_count' 706 /// Stack In: 707 /// obj -- the object to be constructed 708 /// arg1 ... argN -- the arg_count arguments to pass 709 /// Stack Out: 710 /// value -- obj after it has been constructed as obj(arg1, ..., argN) 711 ABC_ACTION_CONSTRUCT = 0x42, 712 713 /// Stream: V32 'method_id + 1' | V32 'arg_count' 714 /// Stack In: 715 /// obj -- the object to be called 716 /// arg1 ... argN -- the arg_count arguments to pass 717 /// Stack Out: 718 /// value -- the value returned by obj::'method_id'(arg1, ..., argN) 719 ABC_ACTION_CALLMETHOD = 0x43, 720 721 /// Stream: V32 'method_id' | V32 'arg_count' 722 /// Stack In: 723 /// obj -- the object to act as a receiver for the static call 724 /// arg1 ... argN -- the arg_count arguments to pass 725 /// Stack Out: 726 /// value -- the value returned by obj->ABC::'method_id'(arg1, ..., argN) 727 ABC_ACTION_CALLSTATIC = 0x44, 728 729 /// Stream: V32 'name_offset' | V32 'arg_count' 730 /// Stack In: 731 /// obj -- the object whose super is to be called 732 /// [ns [n]] -- Namespace stuff 733 /// arg1 ... argN -- the arg_count arguments to pass 734 /// Stack Out: 735 /// value -- the value returned by obj::(resolve)'name_offset'::super(arg1, 736 /// ..., argN) 737 ABC_ACTION_CALLSUPER = 0x45, 738 739 /// Stream: V32 'name_offset' | V32 'arg_count' 740 /// Stack In: 741 /// obj -- The object whose property is to be accessed. 742 /// [ns [n]] -- Namespace stuff 743 /// arg1 ... argN -- the arg_count arguments to pass 744 /// Stack Out: 745 /// value -- the value from obj::(resolve)'name_offset'(arg1, ..., argN) 746 /// NB: Calls getter/setter if they exist. 747 ABC_ACTION_CALLPROPERTY = 0x46, 748 749 /// Do: Return an Undefined object up the callstack. 750 ABC_ACTION_RETURNVOID = 0x47, 751 752 /// Stack In: 753 /// value -- value to be returned 754 /// Stack Out: 755 /// . 756 /// Do: Return value up the callstack. 757 ABC_ACTION_RETURNVALUE = 0x48, 758 759 /// Stream: V32 'arg_count' 760 /// Stack In: 761 /// obj -- the object whose super's constructor should be invoked 762 /// arg1 ... argN -- the arg_count arguments 763 /// Stack Out: 764 /// value -- obj after obj::super(arg1, ..., argN) has been invoked 765 ABC_ACTION_CONSTRUCTSUPER = 0x49, 766 767 /// Stream: V32 'name_offset' | V32 'arg_count' 768 /// Stack In: 769 /// obj -- the object whose property should be constructed 770 /// [ns [n]] -- Namespace stuff 771 /// arg1 ... argN -- the arg_count arguments to pass 772 /// Stack Out: 773 /// value -- the newly constructed prop from obj::(resolve) 774 /// 'name_offset'(arg1, ..., argN) 775 ABC_ACTION_CONSTRUCTPROP = 0x4A, 776 777 /// Do: Nothing, this is an intermediate code op, should not appear in ABC. 778 ABC_ACTION_CALLSUPERID = 0x4B, 779 780 /// Stream: V32 'name_offset' | V32 'arg_count' 781 /// Stack In: 782 /// obj -- The object whose property is to be accessed. 783 /// [ns [n]] -- Namespace stuff 784 /// arg1 ... argN -- the arg_count arguments to pass 785 /// Stack Out: 786 /// value -- the value from by obj::(resolve)'name_offset'(arg1, ..., argN) 787 /// NB: It seems like this does _not_ call getter/setter if they exist, 788 /// but is otherwise identical to ABC_ACTION_CALLPROPERTY 789 ABC_ACTION_CALLPROPLEX = 0x4C, 790 791 /// Do: Nothing, this is an intermediate code op, should not appear in ABC. 792 ABC_ACTION_CALLINTERFACE = 0x4D, 793 794 /// See: 0x45 (ABC_ACTION_CALLSUPER), but 795 /// Stack Out: 796 /// . 797 ABC_ACTION_CALLSUPERVOID = 0x4E, 798 799 /// See: 0x46 (ABC_ACTION_CALLPROPERTY), but 800 /// Stack Out: 801 /// . 802 ABC_ACTION_CALLPROPVOID = 0x4F, 803 804 ABC_ACTION_0x50 = 0x50, 805 ABC_ACTION_0x51 = 0x51, 806 ABC_ACTION_0x52 = 0x52, 807 ABC_ACTION_0x53 = 0x53, 808 ABC_ACTION_0x54 = 0x54, 809 810 /// Stream: V32 'arg_count' 811 /// Stack In: 812 /// prop_name_1 -- a string 813 /// prop_value_1 -- a value object 814 /// . 815 /// . (arg_count name/value pairs in all) 816 /// . 817 /// prop_name_n -- a string 818 /// prop_value_n -- a value object 819 /// Stack Out: 820 /// obj -- A new object which contains all of the given properties. 821 /// NB: This builds an object from its properties, it's not a constructor. 822 ABC_ACTION_NEWOBJECT = 0x55, 823 824 /// Stream: V32 'array_size' 825 /// Stack In: 826 /// value_1 -- a value 827 /// . 828 /// . (array_size of these) 829 /// . 830 /// value_n -- a value 831 /// Stack Out: 832 /// array -- an array { value_1, value_2, ..., value_n } 833 ABC_ACTION_NEWARRAY = 0x56, 834 835 /// Stack Out: 836 /// vtable -- A new virtual table, which has the previous one as a parent. 837 ABC_ACTION_NEWACTIVATION = 0x57, 838 839 /// Stream: V32 'class_id' 840 /// Stack In: 841 /// obj -- An object to be turned into a class 842 /// Stack Out: 843 /// class -- The newly made class, made from obj and the information at 844 /// cinits_pool[class_id] 845 /// NB: This depends on scope and scope base (to determine base class) 846 ABC_ACTION_NEWCLASS = 0x58, 847 848 /// Stream: V32 'name_id' 849 /// Stack In: 850 /// value -- Whose descendants to get 851 /// [ns [n]] -- Namespace stuff 852 /// Stack Out: 853 /// ? 854 /// NB: This op seems to always throw a TypeError in Tamarin, though I 855 /// assume that it ought to do something to yield a list of 856 /// descendants of a class. 857 ABC_ACTION_GETDESCENDANTS = 0x59, 858 859 /// Stream: V32 'catch_id' 860 /// Stack Out: 861 /// vtable -- vtable suitable to catch an exception of type in catch_id. 862 /// NB: Need more information on how exceptions are set up. 863 ABC_ACTION_NEWCATCH = 0x5A, 864 865 ABC_ACTION_0x5B = 0x5B, 866 ABC_ACTION_0x5C = 0x5C, 867 868 /// Stream: V32 'name_id' 869 /// Stack In: 870 /// [ns [n]] -- Namespace stuff 871 /// Stack Out: 872 /// owner -- object which owns property given by looking up the name_id, 873 /// or throw a ReferenceError if none exists. 874 ABC_ACTION_FINDPROPSTRICT = 0x5D, 875 876 /// Stream: V32 'name_id' 877 /// Stack In: 878 /// [ns [n]] -- Namespace stuff 879 /// Stack Out: 880 /// owner -- object which owns property given by looking up the name_id, 881 /// or an Undefined object if none exists. 882 ABC_ACTION_FINDPROPERTY = 0x5E, 883 884 /// Stream: V32 'name_id' (no ns expansion) 885 /// Stack Out: 886 /// def -- The definition of the name at name_id. 887 ABC_ACTION_FINDDEF = 0x5F, 888 889 /// Stream: V32 'name_id' (no ns expansion) 890 /// Stack Out: 891 /// property -- The result of 0x5D (ABC_ACTION_FINDPROPSTRICT) 892 /// + 0x66 (ABC_ACTION_GETPROPERTY) 893 ABC_ACTION_GETLEX = 0x60, 894 895 /// Stream: V32 'name_id' 896 /// Stack In: 897 /// obj -- The object whose property is to be set 898 /// [ns [n]] -- Namespace stuff 899 /// [key] -- Key name for property. Will not have both Namespace and key. 900 /// value -- The value to be used 901 /// Stack Out: 902 /// . 903 /// Do: Set obj::(resolve)'name_id' to value, or set obj::key to value. 904 /// NB: I'm not yet clear which should be used when. (Chad) 905 ABC_ACTION_SETPROPERTY = 0x61, 906 907 /// Stream: V32 'frame_index' 908 /// Frame: value at frame_index is needed 909 /// Stack Out: 910 /// value 911 ABC_ACTION_GETLOCAL = 0x62, 912 913 /// Stream: V32 'frame_index' 914 /// Frame: obj at frame_index is set to value 915 /// Stack In: 916 /// value 917 /// Stack Out: 918 /// . 919 ABC_ACTION_SETLOCAL = 0x63, 920 921 /// Stack Out: 922 /// global -- The global scope object 923 ABC_ACTION_GETGLOBALSCOPE = 0x64, 924 925 /// Stream: S8 'depth' 926 /// Stack Out: 927 /// scope -- The scope object at depth 928 ABC_ACTION_GETSCOPEOBJECT = 0x65, 929 930 /// Stream: V32 'name_id' 931 /// Stack In: 932 /// obj -- The object whose property is to be retrieved 933 /// [ns [n]] -- Namespace stuff 934 /// [key] -- Key name for property. Will not have both Namespace and key. 935 /// Stack Out: 936 /// prop -- The requested property. 937 /// NB: As with 0x61 (ABC_ACTION_SETPROPERTY) it's unclear to me when 938 /// key gets used and when the namespace (or nothing) is used. 939 ABC_ACTION_GETPROPERTY = 0x66, 940 941 ABC_ACTION_0x67 = 0x67, 942 943 /// Stream V32 'name_id' 944 /// Stack In: 945 /// obj -- The object whose property is to be initialized 946 /// [ns [n]] -- Namespace stuff 947 /// value -- The value to be put into the property. 948 /// Stack Out: 949 /// . 950 /// Do: 951 /// Set obj::(resolve)'name_id' to value, set bindings from the context. 952 ABC_ACTION_INITPROPERTY = 0x68, 953 954 ABC_ACTION_0x69 = 0x69, 955 956 /// Stream: V32 'name_id' 957 /// Stack In: 958 /// obj -- The object whose property should be deleted. 959 /// [ns [n]] -- Namespace stuff 960 /// Stack Out: 961 /// truth -- True if property was deleted or did not exist, else False. 962 ABC_ACTION_DELETEPROPERTY = 0x6A, 963 964 ABC_ACTION_0x6B = 0x6B, 965 966 /// Stream: V32 'slot_index + 1' 967 /// Stack In: 968 /// obj -- The object which owns the desired slot. 969 /// Stack Out: 970 /// slot -- obj.slots[slot_index] 971 ABC_ACTION_GETSLOT = 0x6C, 972 973 /// Stream: V32 'slot_index + 1' 974 /// Stack In: 975 /// obj -- The object whose slot should be set. 976 /// value -- The value intended for the slot. 977 /// Stack Out: 978 /// . 979 /// Do: obj.slots[slot_index] = value 980 ABC_ACTION_SETSLOT = 0x6D, 981 982 /// Stream: V32 'slot_index + 1' 983 /// Stack In: 984 /// . 985 /// Stack Out: 986 /// slot -- globals.slots[slot_index] 987 /// NB: Deprecated 988 ABC_ACTION_GETGLOBALSLOT = 0x6E, 989 990 /// Stream: V32 'slot_index + 1' 991 /// Stack In: 992 /// value -- The value to be placed into the slot. 993 /// Stack Out: 994 /// . 995 /// Do: globals[slot_index] = value 996 /// NB: Deprecated 997 ABC_ACTION_SETGLOBALSLOT = 0x6F, 998 999 /// Stack In: 1000 /// value -- An object 1001 /// Stack Out: 1002 /// str_value -- value as a string 1003 ABC_ACTION_CONVERT_S = 0x70, 1004 1005 /// Stack In: 1006 /// value -- An object to be escaped 1007 /// Stack Out: 1008 /// str_value -- value as a string, escaped suitably for an XML element. 1009 ABC_ACTION_ESC_XELEM = 0x71, 1010 1011 /// Stack In: 1012 /// value -- An object to be escaped 1013 /// Stack Out: 1014 /// str_value -- value as a string, escaped suitably for an XML attribute. 1015 ABC_ACTION_ESC_XATTR = 0x72, 1016 1017 /// Stack In: 1018 /// value -- An object to be converted to Integer 1019 /// Stack Out: 1020 /// int_value -- value as an integer object 1021 ABC_ACTION_CONVERT_I = 0x73, 1022 1023 /// Stack In: 1024 /// value -- An object to be converted to unsigned integer 1025 /// Stack Out: 1026 /// int_value -- value as an unsigned integer object 1027 ABC_ACTION_CONVERT_U = 0X74, 1028 1029 /// Stack In: 1030 /// value -- An object to be converted to a double 1031 /// Stack Out: 1032 /// double_value -- value as a double object 1033 ABC_ACTION_CONVERT_D = 0X75, 1034 1035 /// Stack In: 1036 /// value -- An object to be converted to a boolean 1037 /// Stack Out: 1038 /// bool_value -- value as a boolean object 1039 ABC_ACTION_CONVERT_B = 0X76, 1040 1041 /// Stack In: 1042 /// obj -- An object 1043 /// Stack Out: 1044 /// obj -- An object 1045 /// Do: If obj is Undefined or Null, throw TypeError 1046 ABC_ACTION_CONVERT_O = 0X77, 1047 1048 /// Stack In: 1049 /// obj -- An object 1050 /// Stack Out: 1051 /// obj -- An object 1052 /// Do: If obj is not XML based, throw TypeError 1053 ABC_ACTION_CHECKFILTER = 0x78, 1054 1055 ABC_ACTION_0x79 = 0x79, 1056 ABC_ACTION_0x7A = 0x7A, 1057 ABC_ACTION_0x7B = 0x7B, 1058 ABC_ACTION_0x7C = 0x7C, 1059 ABC_ACTION_0x7D = 0x7D, 1060 ABC_ACTION_0x7E = 0x7E, 1061 ABC_ACTION_0x7F = 0x7F, 1062 1063 /// Stream: V32 'name_index' 1064 /// Stack In: 1065 /// obj -- An object to be converted 1066 /// Stack Out: 1067 /// coerced_obj -- The object as the desired (resolve)'name_index' type. 1068 ABC_ACTION_COERCE = 0x80, 1069 1070 /// See: 0x76 (ABC_ACTION_CONVERT_B) 1071 /// NB: Deprecated 1072 ABC_ACTION_COERCE_B = 0x81, 1073 1074 /// Stack In: 1075 /// obj -- An object to be converted 1076 /// Stack Out: 1077 /// obj 1078 /// Do: Nothing. (The 'a' is for atom, and this already is.) 1079 ABC_ACTION_COERCE_A = 0x82, 1080 1081 /// See: 0x73 ABC_ACTION_CONVERT_I 1082 /// NB: Deprecated 1083 /// NOMING 20 Aug 2007 1084 ABC_ACTION_COERCE_I = 0x83, 1085 1086 /// See: 0x75 ABC_ACTION_CONVERT_D 1087 /// NB: Deprecated 1088 /// NOMING 20 Aug 2007 1089 ABC_ACTION_COERCE_D = 0x84, 1090 1091 /// Stack In: 1092 /// obj -- An object to be converted 1093 /// Stack Out: 1094 /// str_obj -- obj as string. nullString object if obj is Null or Undefined 1095 ABC_ACTION_COERCE_S = 0x85, 1096 1097 /// Stream: V32 'name_index' (no namespace) 1098 /// Stack In: 1099 /// obj -- An object to be checked 1100 /// Stack Out: 1101 /// cobj -- obj if obj is of type (resolve)'name_index', otherwise Null 1102 ABC_ACTION_ASTYPE = 0x86, 1103 1104 /// Stack In: 1105 /// obj -- An object to be checked 1106 /// valid -- The object whose type is to be matched 1107 /// Stack Out: 1108 /// cobj -- obj if type of obj is type of valid, otherwise Null 1109 ABC_ACTION_ASTYPELATE = 0x87, 1110 1111 /// See: 0x74 (ABC_ACTION_CONVERT_U) 1112 /// NB: Deprecated 1113 ABC_ACTION_COERCE_U = 0x88, 1114 1115 /// Stack In: 1116 /// obj -- An object 1117 /// Stack Out: 1118 /// cobj -- obj if obj is not Undefined, otherwise Null 1119 ABC_ACTION_COERCE_O = 0x89, 1120 1121 ABC_ACTION_0x8A = 0x8A, 1122 ABC_ACTION_0x8B = 0x8B, 1123 ABC_ACTION_0x8C = 0x8C, 1124 ABC_ACTION_0x8D = 0x8D, 1125 ABC_ACTION_0x8E = 0x8E, 1126 ABC_ACTION_0x8F = 0x8F, 1127 1128 /// Stack In: 1129 /// obj -- An object 1130 /// Stack Out: 1131 /// negdouble -- -1.0 * (double) obj 1132 ABC_ACTION_NEGATE = 0x90, 1133 1134 /// Stack In: 1135 /// num -- A number, integer or double 1136 /// Stack Out: 1137 /// num2 -- The same value, but new object. 1138 /// Do: 1139 /// num = num + 1 (post-increment) 1140 ABC_ACTION_INCREMENT = 0x91, 1141 1142 /// Stream: V32 'frame_addr' 1143 /// Frame: Load i from frame_addr. Store clone(i) at frame_addr. i = i + 1 1144 /// (post-increment in frame) 1145 ABC_ACTION_INCLOCAL = 0x92, 1146 1147 /// Stack In: 1148 /// num -- A number, integer or double 1149 /// Stack Out: 1150 /// num2 -- The same value, but new object. 1151 /// Do: 1152 /// num = num - 1 (post-decrement) 1153 ABC_ACTION_DECREMENT = 0x93, 1154 1155 /// Stream: V32 'frame_addr' 1156 /// Frame: Load i from frame_addr. Store clone(i) at frame_addr. i = i - 1 1157 /// (post-decrement in frame) 1158 ABC_ACTION_DECLOCAL = 0x94, 1159 1160 /// Stack In: 1161 /// obj -- An object 1162 /// Stack Out: 1163 /// type -- typeof(obj) 1164 ABC_ACTION_ABC_TYPEOF = 0x95, 1165 1166 /// Stack In: 1167 /// obj -- An object 1168 /// Stack Out: 1169 /// nobj -- A truth object with value !((Boolean) obj) 1170 ABC_ACTION_NOT = 0x96, 1171 1172 /// Stack In: 1173 /// obj -- An object 1174 /// Stack Out: 1175 /// nint -- ~((Int) obj) 1176 ABC_ACTION_BITNOT = 0x97, 1177 1178 ABC_ACTION_0x98 = 0x98, 1179 ABC_ACTION_0x99 = 0x99, 1180 1181 /// NB: It is an error for this to appear. 1182 ABC_ACTION_CONCAT = 0x9A, 1183 1184 /// NB: It is an error for this to appear. 1185 ABC_ACTION_ADD_D = 0x9B, 1186 1187 ABC_ACTION_0x9C = 0x9C, 1188 ABC_ACTION_0x9D = 0x9D, 1189 ABC_ACTION_0x9E = 0x9E, 1190 ABC_ACTION_0x9F = 0x9F, 1191 1192 /// Stack In: 1193 /// a 1194 /// b 1195 /// Stack Out: 1196 /// a + b (double if numeric) 1197 ABC_ACTION_ADD = 0xA0, 1198 1199 /// Stack In: /// Stack In: 1200 /// a 1201 /// b 1202 /// Stack Out: 1203 /// a - b (double) 1204 ABC_ACTION_SUBTRACT = 0xA1, 1205 1206 /// Stack In: 1207 /// a 1208 /// b 1209 /// Stack Out: 1210 /// a * b (double) 1211 ABC_ACTION_MULTIPLY = 0xA2, 1212 1213 /// Stack In: 1214 /// a 1215 /// b 1216 /// Stack Out: 1217 /// a / b (double) 1218 ABC_ACTION_DIVIDE = 0xA3, 1219 1220 /// Stack In: 1221 /// a 1222 /// b 1223 /// Stack Out: 1224 /// a % b 1225 ABC_ACTION_MODULO = 0xA4, 1226 1227 /// Stack In: 1228 /// a 1229 /// b 1230 /// Stack Out: 1231 /// a << b 1232 ABC_ACTION_LSHIFT = 0xA5, 1233 1234 /// Stack In: 1235 /// a 1236 /// b 1237 /// Stack Out: 1238 /// a >> b 1239 ABC_ACTION_RSHIFT = 0xA6, 1240 1241 /// Stack In: 1242 /// a 1243 /// b 1244 /// Stack Out: 1245 /// ((unsigned) a) >> b 1246 ABC_ACTION_URSHIFT = 0xA7, 1247 1248 /// a 1249 /// b 1250 /// Stack Out: 1251 /// a & b 1252 ABC_ACTION_BITAND = 0xA8, 1253 1254 /// Stack In: 1255 /// a 1256 /// b 1257 /// Stack Out: 1258 /// a | b 1259 ABC_ACTION_BITOR = 0xA9, 1260 1261 /// Stack In: 1262 /// a 1263 /// b 1264 /// Stack Out: 1265 /// a ^ b 1266 ABC_ACTION_BITXOR = 0xAA, 1267 1268 /// Stack In: 1269 /// a 1270 /// b 1271 /// Stack Out: 1272 /// truth -- Truth of (a == b) (weakly) 1273 ABC_ACTION_EQUALS = 0xAB, 1274 1275 /// Stack In: 1276 /// a 1277 /// b 1278 /// Stack Out: 1279 /// truth -- Truth of (a == b) (strongly, as in 1280 /// 0x19 (ABC_ACTION_IFSTRICTEQ)) 1281 ABC_ACTION_STRICTEQUALS = 0xAC, 1282 1283 /// Stack In: 1284 /// a 1285 /// b 1286 /// Stack Out: 1287 /// truth -- Truth of (a < b) 1288 ABC_ACTION_LESSTHAN = 0xAD, 1289 1290 /// Stack In: 1291 /// a 1292 /// b 1293 /// Stack Out: 1294 /// truth -- Truth of (a <= b) 1295 ABC_ACTION_LESSEQUALS = 0xAE, 1296 1297 /// Stack In: 1298 /// a 1299 /// b 1300 /// Stack Out: 1301 /// truth -- Truth of (a > b) 1302 ABC_ACTION_GREATERTHAN = 0xAF, 1303 1304 /// Stack In: 1305 /// a 1306 /// b 1307 /// Stack Out: 1308 /// truth -- Truth of (a >= b) 1309 ABC_ACTION_GREATEREQUALS = 0xB0, 1310 1311 /// Stack In: 1312 /// val -- An object 1313 /// super -- An object 1314 /// Stack Out: 1315 /// truth -- Truth of "val is an instance of super" 1316 ABC_ACTION_INSTANCEOF = 0xB1, 1317 1318 /// Stream: V32 'name_id' 1319 /// Stack In: 1320 /// obj -- An object 1321 /// Stack Out: 1322 /// truth -- Truth of "obj is of the type given in (resolve)'name_id'" 1323 ABC_ACTION_ISTYPE = 0xB2, 1324 1325 /// Stack In: 1326 /// obj -- An object 1327 /// type -- A type to match 1328 /// Stack Out: 1329 /// truth -- Truth of "obj is of type" 1330 ABC_ACTION_ISTYPELATE = 0xB3, 1331 1332 /// Stack In: 1333 /// name -- The name to find 1334 /// obj -- The object to search for it 1335 /// Stack Out: 1336 /// truth -- True if name is in current namespace or anywhere in object. 1337 /// Don't look in the namespace if obj is a dictionary. 1338 ABC_ACTION_IN = 0xB4, 1339 1340 ABC_ACTION_0xB5 = 0xB5, 1341 ABC_ACTION_0xB6 = 0xB6, 1342 ABC_ACTION_0xB7 = 0xB7, 1343 ABC_ACTION_0xB8 = 0xB8, 1344 ABC_ACTION_0xB9 = 0xB9, 1345 ABC_ACTION_0xBA = 0xBA, 1346 ABC_ACTION_0xBB = 0xBB, 1347 ABC_ACTION_0xBC = 0xBC, 1348 ABC_ACTION_0xBD = 0xBD, 1349 ABC_ACTION_0xBE = 0xBE, 1350 ABC_ACTION_0xBF = 0xBF, 1351 1352 /// See: 0x91 (ABC_ACTION_INCREMENT), but forces types to int, not double 1353 ABC_ACTION_INCREMENT_I = 0xC0, 1354 1355 /// See: 0x93 (ABC_ACTION_DECREMENT), but forces types to int, not double 1356 ABC_ACTION_DECREMENT_I = 0xC1, 1357 1358 /// See: 0x92 (ABC_ACTION_INCLOCAL), but forces types to int, not double 1359 ABC_ACTION_INCLOCAL_I = 0xC2, 1360 1361 /// See: 0x94 (ABC_ACTION_DECLOCAL), but forces types to int, not double 1362 ABC_ACTION_DECLOCAL_I = 0xC3, 1363 1364 /// See: 0x90 (ABC_ACTION_NEGATE), but forces type to int, not double 1365 ABC_ACTION_NEGATE_I = 0xC4, 1366 1367 /// See: 0xA0 (ABC_ACTION_ADD), but forces type to int 1368 ABC_ACTION_ADD_I = 0xC5, 1369 1370 /// See: 0xA1 (ABC_ACTION_SUBTRACT), but forces type to int 1371 ABC_ACTION_SUBTRACT_I = 0xC6, 1372 1373 /// See: 0xA2 (ABC_ACTION_MULTIPLY), but forces type to int 1374 ABC_ACTION_MULTIPLY_I = 0xC7, 1375 1376 ABC_ACTION_0xC8 = 0xC8, 1377 ABC_ACTION_0xC9 = 0xC9, 1378 ABC_ACTION_0xCA = 0xCA, 1379 ABC_ACTION_0xCB = 0xCB, 1380 ABC_ACTION_0xCC = 0xCC, 1381 ABC_ACTION_0xCD = 0xCD, 1382 ABC_ACTION_0xCE = 0xCE, 1383 ABC_ACTION_0xCF = 0xCF, 1384 1385 /// Frame: Load frame[0] as val 1386 /// Stack Out: 1387 /// val 1388 ABC_ACTION_GETLOCAL0 = 0xD0, 1389 1390 /// Frame: Load frame[1] as val 1391 /// Stack Out: 1392 /// val 1393 ABC_ACTION_GETLOCAL1 = 0xD1, 1394 1395 /// Frame: Load frame[2] as val 1396 /// Stack Out: 1397 /// val 1398 ABC_ACTION_GETLOCAL2 = 0xD2, 1399 1400 /// Frame: Load frame[3] as val 1401 /// Stack Out: 1402 /// val 1403 ABC_ACTION_GETLOCAL3 = 0xD3, 1404 1405 /// Frame: Store val as frame[0] 1406 /// Stack In: 1407 /// val 1408 /// Stack Out: 1409 /// . 1410 ABC_ACTION_SETLOCAL0 = 0xD4, 1411 1412 /// Frame: Store val as frame[1] 1413 /// Stack In: 1414 /// val 1415 /// Stack Out: 1416 /// . 1417 ABC_ACTION_SETLOCAL1 = 0xD5, 1418 1419 /// Frame: Store val as frame[2] 1420 /// Stack In: 1421 /// val 1422 /// Stack Out: 1423 /// . 1424 ABC_ACTION_SETLOCAL2 = 0xD6, 1425 1426 /// Frame: Store val as frame[3] 1427 /// Stack In: 1428 /// val 1429 /// Stack Out: 1430 /// . 1431 ABC_ACTION_SETLOCAL3 = 0xD7, 1432 1433 ABC_ACTION_0xD8 = 0xD8, 1434 ABC_ACTION_0xD9 = 0xD9, 1435 ABC_ACTION_0xDA = 0xDA, 1436 ABC_ACTION_0xDB = 0xDB, 1437 ABC_ACTION_0xDC = 0xDC, 1438 ABC_ACTION_0xDD = 0xDD, 1439 ABC_ACTION_0xDE = 0xDE, 1440 ABC_ACTION_0xDF = 0xDF, 1441 ABC_ACTION_0xE0 = 0xE0, 1442 ABC_ACTION_0xE1 = 0xE1, 1443 ABC_ACTION_0xE2 = 0xE2, 1444 ABC_ACTION_0xE3 = 0xE3, 1445 ABC_ACTION_0xE4 = 0xE4, 1446 ABC_ACTION_0xE5 = 0xE5, 1447 ABC_ACTION_0xE6 = 0xE6, 1448 ABC_ACTION_0xE7 = 0xE7, 1449 ABC_ACTION_0xE8 = 0xE8, 1450 ABC_ACTION_0xE9 = 0xE9, 1451 ABC_ACTION_0xEA = 0xEA, 1452 ABC_ACTION_0xEB = 0xEB, 1453 ABC_ACTION_0xEC = 0xEC, 1454 ABC_ACTION_0xED = 0xED, 1455 1456 /// NB: It is an error for this to appear. 1457 ABC_ACTION_ABS_JUMP = 0xEE, 1458 1459 /// Stream: 7 bytes of unknown stuff to be skipped 1460 /// Do: skip ahead 7 bytes in stream 1461 ABC_ACTION_DEBUG = 0xEF, 1462 1463 /// Stream: V32 'line_number' 1464 /// Do: Nothing, but line_number is for the debugger if wanted. 1465 ABC_ACTION_DEBUGLINE = 0xF0, 1466 1467 /// Stream: V32 'name_offset' 1468 /// Do: Nothing. 'name_offset' into string pool is the file name if wanted. 1469 ABC_ACTION_DEBUGFILE = 0xF1, 1470 1471 /// Stream: V32 'line_number' 1472 /// Do: Enter debugger if present, line_number is the line number in source. 1473 ABC_ACTION_BKPTLINE = 0xF2, 1474 1475 /// Do: Nothing. 1476 ABC_ACTION_TIMESTAMP = 0xF3, 1477 1478 ABC_ACTION_0xF4 = 0xF4, 1479 1480 /// NB: It seems an error for this to appear. 1481 ABC_ACTION_VERIFYPASS = 0xF5, 1482 1483 /// NB: Error to appear in ABC 1484 ABC_ACTION_ALLOC = 0xF6, 1485 1486 /// NB: Error to appear in ABC 1487 ABC_ACTION_MARK = 0xF7, 1488 1489 /// NB: Error to appear in ABC 1490 ABC_ACTION_WB = 0xF8, 1491 1492 /// NB: Error to appear in ABC 1493 ABC_ACTION_PROLOGUE = 0xF9, 1494 1495 /// NB: Error to appear in ABC 1496 ABC_ACTION_SENDENTER = 0xFA, 1497 1498 /// NB: Error to appear in ABC 1499 ABC_ACTION_DOUBLETOATOM = 0xFB, 1500 1501 /// NB: Error to appear in ABC 1502 ABC_ACTION_SWEEP = 0xFC, 1503 1504 /// NB: Error to appear in ABC 1505 ABC_ACTION_CODEGENOP = 0xFD, 1506 1507 /// NB: Error to appear in ABC 1508 ABC_ACTION_VERIFYOP = 0xFE 1509 1510 }; 1511 1512 /// Output operator for abc_action_type 1513 std::ostream& operator<< (std::ostream& os, const abc_action_type& typ); 1514 1515 1516 /// SWF fill style types. Symbolic names copied from Ming. 1517 // 1518 /// For more info see: 1519 /// http://sswf.sourceforge.net/SWFalexref.html#swf_FillStyle 1520 enum FillType 1521 { 1522 FILL_SOLID = 0x00, 1523 FILL_LINEAR_GRADIENT = 0x10, 1524 FILL_RADIAL_GRADIENT = 0x12, 1525 FILL_FOCAL_GRADIENT = 0x13, 1526 FILL_TILED_BITMAP = 0x40, 1527 FILL_CLIPPED_BITMAP = 0x41, 1528 1529 /// swf8 (alexis is wrong), non-smoothed / hard edges 1530 FILL_TILED_BITMAP_HARD = 0x42, 1531 1532 /// swf8 (alexis is wrong), non-smoothed / hard edges 1533 FILL_CLIPPED_BITMAP_HARD = 0x43 1534 }; 1535 1536 enum SpreadMode 1537 { 1538 GRADIENT_SPREAD_PAD, 1539 GRADIENT_SPREAD_REFLECT, 1540 GRADIENT_SPREAD_REPEAT 1541 }; 1542 1543 enum InterpolationMode 1544 { 1545 GRADIENT_INTERPOLATION_NORMAL, 1546 GRADIENT_INTERPOLATION_LINEAR 1547 }; 1548 1549 1550 1551 1552 } // namespace gnash::SWF 1553 1554 } // namespace gnash 1555 1556 1557 #endif // GNASH_SWF_H 1558