Closed Bug 589043 Opened 15 years ago Closed 15 years ago

Internal Vector implementations are not public

Categories

(Tamarin Graveyard :: Library, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: jstpierre, Unassigned)

Details

User-Agent: Mozilla/5.0 (X11; Linux i686; rv:2.0b2) Gecko/20100720 Firefox/4.0b2 Build Identifier: hg Yeah, yeah, terrible title. Compare: http://magcius.mecheye.net/vector_applytype.abc http://magcius.mecheye.net/vector_direct.abc Dumps for each: http://magcius.mecheye.net/vector_applytype.abc.dump http://magcius.mecheye.net/vector_direct.abc.dump The first works as expected, the second gives an error: > ReferenceError: Error #1065: Variable __AS3__.vec::Vector$int is not defined. Yes, they are internals. My take: once it's in builtin.abc (and by extension, playerglobal.abc), it's public. Reproducible: Always
> Yes, they are internals. My take: once it's in builtin.abc (and by extension, > playerglobal.abc), it's public. Maybe so. I will for sure agree that once they're referenced from an ABC created by one of our tools, they'll need to be available in the player indefinitely. Making them available to AS3 content is another matter however, because then people like you :-) will start assuming that Vector.<int> and __AS3__.vec::Vector$int are compatible, and that may or may not be true in the future: __AS3__.vec::Vector$int may stick around to support old content, but Vector.<int> may be supported by a different kind of structure as the compiler and language matures (and generics become generally supported).
A brief investigation reveals that when Vector.<int> is present as a type in the ABC then it is represented as a CONSTANT_TypeName reference where the base type is "__AS3__.vec"::"Vector" and the type operand is "int" - it is not present as "__AS3__.vec"::"Vector$int", for example. In a type context this is fine. In a value context we have bug #532690, of course, where peephole optimization in the JIT will presumably clean up the code generated by AS3 (the first five instructions of the eight comment on that bug).
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.