Closed Bug 459440 Opened 17 years ago Closed 16 years ago

TM: jit calls to remaining Date constructors

Categories

(Core :: JavaScript Engine, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 487134

People

(Reporter: duncan.loveday, Unassigned)

References

Details

(Keywords: testcase)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2pre) Gecko/20081009 Minefield/3.1b2pre Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2pre) Gecko/20081009 Minefield/3.1b2pre Work out a good way to allow all Date constructors to be handled by tracemonkey, as discussed by BZ's in bug 456165 comment #25 Reproducible: Always Steps to Reproduce: 1. 2. 3.
Attached file Test case
This is a page that lets you run whatever constructors you want, as many times as you want - might be useful or might not.
Boris, according to the docs at http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date it's only the last four numerics that are optional but there are also constructors from a formatted date string and from a single numeric timestamp so still quite a few.
Keywords: testcase
Right. So the last 4 args are optional no matter what, but if you leave off the last 5 args then the remaining one is treated as a timestamp or string... no matter how you slice it, that means seven different constructors. I talked to gal about this a little bit today, and we might just do this by boxing the args.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Just a silly thought: You couldn't do a transformation along the lines of d=new Date(a,b,c) => { d=new Date(); d.setA(s); d.setB(b); d.setC(c); } taking advantage of the fact that Date happens to provide setter methods for all the constructor args ?
Not easily, especially for |new Data(a)|. Note that we don't trace any of those setter methods yet either.
Blocks: 458016
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: