igor%mir2.org
13d2351d26
Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=214608 :
...
The reason for the regression is that now JavaMembers.lookupClass never
attempts to reflect package-private classes. But this is wrong since even with
SecirutyManager installed JVM allows to call Class.getMethos()( and returns
list of all public methods in the class and its super classes.
The patch removes the restrictions while making JavaMembers.lookupClass much
simpler.
2003-07-31 17:08:58 +00:00
brendan%mozilla.org
90cd6a1b97
Fix off-by-N in CG_COUNT_FINAL_SRCNOTES (214210).
2003-07-29 09:11:04 +00:00
brendan%mozilla.org
878a435300
Fix 7x bloat bug due to off-by-1-level-of-indirection in sizeof type param typo (214176, r=Mitch@0Bits.COM).
2003-07-28 20:58:52 +00:00
brendan%mozilla.org
abac0ba1fe
Undo critical part of last change to try to fix crashing testerboxes.
2003-07-28 18:30:12 +00:00
brendan%mozilla.org
77f1747424
Minor cleanups to last checkin.
2003-07-28 05:46:18 +00:00
brendan%mozilla.org
32d941a463
Big dynamic footprint win via script filename caching, plus line number fix for strict/const diags (see http://bugzilla.mozilla.org/attachment.cgi?id=127130&action=view for detailed checkin comments; 208030, r/rs=shaver, r=rginda on the jsd change, r=jst on the dom change).
2003-07-26 22:37:11 +00:00
igor%mir2.org
5b5659a759
Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=213231 :
...
All information about exception handlers are stored in exception table eliminating the need to have TRY bytecode.
2003-07-24 10:50:29 +00:00
igor%mir2.org
c51b5baef2
Work in progress on http://bugzilla.mozilla.org/show_bug.cgi?id=213231 :
...
Replacing try stack by static table of exception handlers
2003-07-24 10:46:46 +00:00
igor%mir2.org
1c5587194f
Work in progress on http://bugzilla.mozilla.org/show_bug.cgi?id=213231 :
...
When handling exceptions, restore proper scope without using try stack
2003-07-24 10:45:30 +00:00
igor%mir2.org
3d44748251
Restoring NativeJavaMethod(Method, String) for backward compatibility.
2003-07-24 09:06:44 +00:00
caillon%returnzero.com
9c22160a4b
Bug 83536.
...
Merge script principal implementations into one class.
Should reduce footprint, speed up calls to caps a little bit, and fixes several memory leaks.
Also fixes bugs 211174 and 211263
r=jst@netscape.com
sr=bzbarsky@mit.edu
moa=mstoltz@netscape.com (he looked at an earlier patch and said it looked fine, and will do a retroactive review when he returns from vacation as well)
2003-07-24 05:15:20 +00:00
mkaply%us.ibm.com
539cfcb481
rs=leaf
...
Remove XP_OS2_VACPP from the tree
2003-07-22 21:08:40 +00:00
mkaply%us.ibm.com
1513a68f57
rs=leaf
...
Remove XP_OS2_VACPP from the tree
2003-07-22 20:29:43 +00:00
mkaply%us.ibm.com
56dc425c51
rs=leaf
...
Remove XP_OS2_VACPP from the tree
2003-07-22 18:38:01 +00:00
igor%mir2.org
44b2b7a51b
Move code to adjust stack depth for finally handler from TARGET case of the main switch in generateICode to TRY switch generating all the code for try. It allows to remove special marking of JSR targets with FINALLY_PROP and make stack handling for catch and finally block uniform.
2003-07-22 13:41:35 +00:00
igor%mir2.org
08be0f19ff
Removal of JTHROW byte code: instead of generation byte code pair [GOSUB exception handler], JTHROW, RETSUB from finally now supports re-throwing of exception object directly when called from exception handler.
...
Now the exception handler invokes finally code with the exception object on the stack top, not PC to return which allows RETSUB to distinguish between this and GOSUB invocation.
2003-07-22 13:04:07 +00:00
igor%mir2.org
b13e48a42a
Move ENDTRY, JTHROW, GOSUB and RETSUB from TokenStream to Interpreter as they specific only to Interpreter implementation.
2003-07-22 11:16:54 +00:00
igor%mir2.org
806103a6b0
Removal of code to handle stack chages when generationg GOSUB to finally code for finally handler: the stack size adjustments is done during FINALLY code generation already.
2003-07-22 08:58:08 +00:00
igor%mir2.org
293663835f
When generating code to invoke finally block from exception handler, do not store exception object in the local slot but rather leave it on JS stack and update finally block generation to expect potentially 2 objects on stack, not single return pc address.
2003-07-21 16:27:48 +00:00
igor%mir2.org
2d7d723eef
Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=201893 :
...
New class MemberBox wraps Method or Constructor instances to cache results of getParameterType() and other information and to to replace Method instance by more accessible one recovery from IllegalAccessException is possible.
2003-07-15 20:47:29 +00:00
igor%mir2.org
88bc61b4a7
Cosmetics: layot fixes
2003-07-15 20:44:17 +00:00
timeless%mozdev.org
2edc8745a1
Bug 212287 xpcwrappedjsclass.cpp:891: warning: unused variable `PRUnichar * sourceNameUni'
...
r=dbradley sr=kin
2003-07-14 21:13:46 +00:00
timeless%mozdev.org
186b4f709f
Bug 212266 xpcexception.cpp:236: warning: assignment of negative value `-1' to `unsigned int'
...
r=dbradley sr=kin
2003-07-14 21:12:24 +00:00
jaggernaut%netscape.com
20004e3489
Bug 73353: clean up MODULE/REQUIRES story. r=cls, sr=bryner
2003-07-13 22:29:00 +00:00
igor%mir2.org
425cf932f1
Throw IllegalArgumentException from compileString/compileReader if script line number is negative instead of catching it much later via Context.codeBug().
2003-07-09 19:27:46 +00:00
igor%mir2.org
911194379d
1. To evaluate script represented by String, use Context.evaluateString to avoid the need to create StringReader instances.
...
2. Catch VirtualMachineError so on out-of-memory/stack-overflow the shell will exit with System.exit(EXITCODE_RUNTIME_ERROR), not with 1. It will allow to distinguish cases when script tried to consume all available stack/memory with bugs in Rhino itself leading to NullPointerException etc.
3. Remove code to rethrow ThreadDeath from JavaScriptExcception since ThreadDeath is re-thrown by the engine itself.
2003-07-06 19:21:42 +00:00
igor%mir2.org
24a1f6c04d
Caching of Method/Constructor.getParameterType()
...
To avoid constant calling of Method/Constructor.getParameterType() which creates a new Class array on each call, NativeJavaMethod stores the parameter types for its methods in methodTypes array and similarly JavaMembers holds all constructor types in ctorTypes array. The cached Class arrays are passed explicitly to methods that previously called getParameterType().
2003-07-06 19:07:00 +00:00
igor%mir2.org
5cb6af55e7
Cosmetics: use
...
import java.lang.reflect.*;
import java.io.*;
instead of explicit importing multiple classes.
2003-07-06 19:02:03 +00:00
igor%mir2.org
90d98c2fd0
NativeJavaMethod.add is removed. It allows to assume that after NativeJavaMethod constructor methods array will remain the same, which I will use in the following patch to add caching of Method.getParameterTypes.
...
Instead of calling NativeJavaMethod.add, JavaMembers assemble the method list directly and then pass it to NativeJavaMethod when done.
2003-07-06 18:59:30 +00:00
igor%mir2.org
77e05e0e7b
Pass staticType to wrapAsJavaObject to restore an option to use it for reflection instead of dynamicType if a security manager prevents the later
2003-07-06 18:51:54 +00:00
igor%mir2.org
70cfc8b896
More JavaMembers cosmetics:
...
1. All its methods package private methods that are not accesible outside the class itself are made private.
2. Various package-private getters are removed in favor of direct field access.
2003-07-06 18:51:53 +00:00
igor%mir2.org
b0389f951d
1. Changing NativeJavaMethod.findFunction to return index of found method instead of the method itself to make smaller the following optimizations of findFunction.
...
2. Removal of NativeJavaMethod.getMethod that simply returned package-private field NativeJavaMethod.methods since the filed itself was accessed directly by other files.
2003-07-05 22:13:33 +00:00
igor%mir2.org
0ec6e88645
Added reportRuntimeError4 and getMessage4 to build 4-argument messages
2003-07-05 22:05:55 +00:00
igor%mir2.org
a6b675e615
For compatibility, resurrect unwrap as deprecated method.
2003-07-03 18:51:16 +00:00
pschwartau%netscape.com
388ff90850
Initial add. Regression test for bug 210682.
2003-07-02 23:43:09 +00:00
igor%mir2.org
82aeb6ef28
Added public FunctionObject.getMethodOrConstructor() to resolve
...
http://bugzilla.mozilla.org/show_bug.cgi?id=108719
2003-07-02 21:07:44 +00:00
igor%mir2.org
d5b6570f2f
Do not store dynamic scope flag in the object. Instead when checking thisObj against Java this type use scope != getParentScope() to detect such usage.
2003-07-02 19:41:48 +00:00
igor%mir2.org
63f322dbc8
Updating exception debugging to reflect changes due to http://bugzilla.mozilla.org/show_bug.cgi?id=210605 .
2003-07-02 16:37:29 +00:00
igor%mir2.org
0fd587e9cb
Reorganization of Java and JavaScript exception iteraction. See http://bugzilla.mozilla.org/show_bug.cgi?id=210605 for details.
2003-07-02 16:35:51 +00:00
igor%mir2.org
382a86a3ac
1. Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=102093 :
...
In NativeCall constructor adds argument object only if there is no parameters with this name and similarly do not set arguments to undefined if the function has "var arguments".
2. Split NativeCall into NativeCall and NativeCallPrototype to allow for smaller activation objects with faster property access.
2003-07-02 16:31:54 +00:00
igor%mir2.org
da994ea70d
Cosmetics: end-of-line junk space removal
2003-07-01 07:18:07 +00:00
igor%mir2.org
6884fa2379
Teach Committing.generateCatchBlock() to generate catch blocks for EcmaError exceptions to avoid code duplication.
2003-06-30 20:21:32 +00:00
igor%mir2.org
e7c259d18c
The code to deal with caught Java exceptions and transfer control to script finally/catch is transfered to CATCH bytecode which is now always added to the and of script bytecode. In this way if Context.observeInstructionCount throws an exception, a proper cleanup to restore Interpreter runtime will still be carried out. It also allowed to transfer control directly to catch/finally code when script call throw instead of throwing Java exception just to capture it immediately.
...
This special CATCH bytecode is a simple way to workaround lack of goto in Java which makes writing interpreters more complex then necessary...
2003-06-30 19:31:44 +00:00
igor%mir2.org
6edb24a69c
Added ScriptRuntime.getCatchObject() for extracting JS object to pass as the argument to JS catch statement.
2003-06-30 19:21:41 +00:00
igor%mir2.org
e9a24f4c38
Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=210682 :
...
A slightly modified version of Brian Gugliemetti fix for bad interaction in TokenStream.getToken()/peekTokenSameLine() when dealing with EOL.
2003-06-30 19:18:31 +00:00
igor%mir2.org
be6ac6dc93
Removal of deprecated DefiningClassLoader
2003-06-29 22:32:52 +00:00
igor%mir2.org
c3de7c7797
Exception handling cleanup: use CATCH bytecode to extract JS object from Trowable so any exception that happens during this process will be handled properly.
2003-06-29 22:12:48 +00:00
igor%mir2.org
fb888bfa6d
Cosmetics: removal of unused import
2003-06-29 21:58:01 +00:00
brendan%mozilla.org
dc0997645e
Argh, inverted logic bug.
2003-06-28 00:55:12 +00:00
brendan%mozilla.org
cd10d7379a
Try to fix IRIX port bustage.
2003-06-28 00:09:25 +00:00