Closed Bug 460283 Opened 17 years ago Closed 16 years ago

Use "nicer" names for generated classes

Categories

(Rhino Graveyard :: Compiler, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mguillemot, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092510 Ubuntu/8.04 (hardy) Firefox/3.0.3 Build Identifier: Classes generated from scripts are currently named c1, c2, ... no matter what the provided script name was. It would make stack traces as well as debugging a little bit easier if generated names were "derived" from the provided script names. Reproducible: Always Steps to Reproduce: 1. 2. 3.
The provided patch generates a class name from the script name replacing illegal characters with "_" with the usual serial number as suffix.
Could a Rhino committer apply this patch or explain why it is not wanted?
I tried this patch and the class naming one as well, and after applying it several of my other unit tests fail in odd ways. On my Windows machine, I get a bunch of org.mozilla.javascript.tests.ObserveInstructionCountTest$QuotaExceeded exceptions, and on my Linux box I get a variety of errors, like org.mozilla.javascript.EcmaError: TypeError: Cannot call property newInstance in object [JavaPackage java.lang.reflect.Array]. It is not a function, it is "object" on org.mozilla.javascript.tests.Bug467396Test. I ran both in Eclipse.
I swapped tests and code in and out and the problem was in the test for Bug 460726 - Use "nicer" names for generated methods, not this patch.
Committed patch.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Cool! Thanks.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: