Closed Bug 486418 Opened 16 years ago Closed 16 years ago

AVMPLUS_UNCHECKED_HACK needs to apply only to prototype functions

Categories

(Tamarin Graveyard :: Virtual Machine, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: stejohns, Assigned: stejohns)

Details

Attachments

(1 file)

Recent MethodSignature code unintentionally allowed this code to apply to methods as well as prototype functions, which is incorrect.
Attached patch PatchSplinter Review
Fix unchecked_hack to apply only to prototype functions. Includes acceptance test.
Attachment #370526 - Flags: review?(edwsmith)
Attachment #370526 - Flags: review?(edwsmith) → review+
Comment on attachment 370526 [details] [diff] [review] Patch - "prototype functions" means functions on SomeObject.prototype, but this applies to all functions that are closures as opposed to methods. ie all methodenv's attached to a Function (built with OP_newfunction). So, a FUNCTION flag makes more sense than PROTOFUNC. - we never test with !defined(AVMPLUS_UNCHECKED_HACK), if its not too much churn, we should rip out that ifdef. (not a new bug, so its your choice).
(In reply to comment #2) > (From update of attachment 370526 [details] [diff] [review]) > - "prototype functions" means functions on SomeObject.prototype, but this > applies to all functions that are closures as opposed to methods. ie all > methodenv's attached to a Function (built with OP_newfunction). So, a FUNCTION > flag makes more sense than PROTOFUNC. this flag really means "makeIntoPrototypeFunction has been called on me", not "I am a function on a prototype object" -- I'm happy to change the name but imho FUNCTION would be a poor choice (smells ripe for evil preprocessors to use). > - we never test with !defined(AVMPLUS_UNCHECKED_HACK), if its not too much > churn, we should rip out that ifdef. (not a new bug, so its your choice). agreed, I'll look at nukage
(1) I'm tempted to leave it named PROTOFUNC and just comment as per above to avoid confusion (2) part of me is tempted to leave in the #ifdef AVMPLUS_UNCHECKED_HACK bits just to make clear where the extent of the hack is. but then again, it's misleading to have ifdefs that aren't ever disabled -- perhaps changing the ifdefs to comments would be more appropriate at this point.
sounds good to me
pushed to redux as changeset: 1662:fa61bc214f42
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Resolved fixed engineering / work item that has been pushed. Setting status to verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: