igor%mir2.org
295fe24122
1. Consistently use ScriptRutime.<ClassName>Class instead of Classname.class to decrease code size and loading time
...
2. Small optimization in ScriptRuntime.toNuber
2003-04-26 12:01:38 +00:00
igor%mir2.org
2918d030b3
Deprecation of toObject in Context and ScriptRuntime forms that takes a static type argument.
...
The static type argument to toObject is effectively never used since it always assumes that instances of String, Number and Boolean represent primitive JS values and handled via ScriptRuntime.newObject and in the rest of cases static type was not checked by WrapFactory.
2003-04-25 10:08:44 +00:00
igor%mir2.org
a5416922ec
More comments about NativeJavaMethod.findFunction requirements
2003-04-24 17:16:21 +00:00
igor%mir2.org
641fa5d534
Changing NativeJavaClass.construct and NativeJavaMethod.call not to modify passed argument array with unwrapped values. Instead a new array is allocated if any unwrapped value would be different from the original JS argument.
2003-04-24 17:13:57 +00:00
nboyd%atg.com
4fe813ef6f
Add new document on scripting java.
2003-04-24 13:14:00 +00:00
igor%mir2.org
2548b9ede0
Resolving http://bugzilla.mozilla.org/show_bug.cgi?id=203013 :
...
Changing semantics of a sealed object to mean that all its properties are ReadOnly in addition to DontDelete.
2003-04-24 12:15:30 +00:00
igor%mir2.org
d8fc5c127a
Resolving http://bugzilla.mozilla.org/show_bug.cgi?id=202872 :
...
public static Method[] findMethods(Class clazz, String name)
is replaced by
static Method findSingleMethod(Method[] methods, String name)
2003-04-24 12:08:23 +00:00
igor%mir2.org
2356e59c9d
Replacing try { cast } catch (ClassCastException ex) { action if not instance } by if (instanceof) { } else { action if not instance }.
...
Such optimization wins very little with modern JVMs if cast succeeds and produces very big overhead if cast fails. Moreover, it may prevent jits from doing more aggressive optimizations and makes class files bigger.
The change also made code in many places smaller since insanceof check take ensure that object is not null as well and with ClassCastException such check had to be done explicitly.
2003-04-23 14:47:09 +00:00
igor%mir2.org
6439f590c7
Removal of support for special handling of this for read-only methods exposed by IdScriptable under dynamic scoping. It was never used and its semantic had little to do with dynamic scoping itself.
2003-04-22 16:09:40 +00:00
nboyd%atg.com
2fbf6fd77b
Update for 1.5R4.1.
2003-04-22 00:27:10 +00:00
igor%mir2.org
823fff54a0
Resolving http://bugzilla.mozilla.org/show_bug.cgi?id=202255 :
...
Support for pre 1.5R1 rules for defining JS classes by ScriptableObject.defineClass is removed.
2003-04-21 23:53:24 +00:00
nboyd%atg.com
09fe5de968
Fix bug 202344 (which was not fully fixed by the previous change.)
2003-04-21 19:43:45 +00:00
nboyd%atg.com
9f67dc975f
Fix bug 202344.
2003-04-21 14:59:22 +00:00
nboyd%atg.com
64f029e08f
Restore method used by Batik.
2003-04-21 13:38:49 +00:00
dbradley%netscape.com
f19f82960a
Bug 196683 - Remove infinite recursion loop check in XPC_WN_Helper_NewResolve (And other resolvers). r=brendan, sr=jst
2003-04-21 13:05:25 +00:00
brendan%mozilla.org
a27d392059
Fix switch case statement-list beginning line number (111352, r=shaver).
2003-04-20 17:10:15 +00:00
pschwartau%netscape.com
f6482b0f22
Improving readability.
2003-04-20 03:36:11 +00:00
pschwartau%netscape.com
f54cb8642f
Initial add. Regression test for bug 202678.
2003-04-20 03:30:04 +00:00
brendan%mozilla.org
b61c9af5b1
Fix call_enumerate to reflect argv/vars stack slot values into their call object properties, in case of early environment capture due to a nested function resolving an outer function's arg or var (202678, r=shaver).
2003-04-20 03:16:45 +00:00
pschwartau%netscape.com
0a82dfbe20
Initial add. Regression test for bug 202564.
2003-04-18 22:31:12 +00:00
rginda%netscape.com
9e509d59ec
fix tbox bustage.
2003-04-18 20:48:43 +00:00
seawood%netscape.com
f7bf89f618
Remove global _POSIX_SOURCE & _SVID_SOURCE defines for linux.
...
Bug #202510 r=darin
2003-04-18 20:14:17 +00:00
rginda%netscape.com
a692705849
bug 200591, "File Options > Don't Debug Eval/Timeouts isn't working", r=brendan
...
prevent any stack with a disabled frame from being debugged during single-stepping, or break-on-throw. Also adds versioning support to the jsdIDebuggerService interface.
2003-04-18 20:12:11 +00:00
seawood%netscape.com
fd2883713e
Implement mozcomps static build variant.
...
Remove unnecessary EXPORT_LIBRARY settings.
Bug #201602 r=bryner
2003-04-17 19:19:42 +00:00
igor%mir2.org
92a551206e
FunctionObject changes:
...
1. Disable invoker optimization for methods with variable number of arguments since currently to call optimized invoker a new argument array has to be allocated in any case which makes the optimization irrelevant.
2. Never modify elements of the args array in constructor, instead avoid allocation of the new argument array iff all js argument can be passed to java without type conversion.
2003-04-16 13:05:48 +00:00
igor%mir2.org
10ade407d8
In NativeString.js_concat in the case of single argument call target.concat(arg) to avoid allocating StringBuffer instance.
2003-04-16 12:51:20 +00:00
rginda%netscape.com
726f74bf63
bug 202177, "cached interrupt hook goes stale", r=brendan@mozilla.org, sr=jsengine
...
refresh the interruptHandler after calling out to the debugger
2003-04-16 00:54:03 +00:00
igor%mir2.org
20b582d079
In callVarargs to test if it is called from construct use thisObj==null condition instead of using separated flag.
2003-04-15 18:45:57 +00:00
igor%mir2.org
a3b7d765da
Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=200551 :
...
I added Context.getApplicationClassLoader() that is now used in all
cases as a parent loader for generated classes and as the default class loader
for NativeJavaPackage. The default implementation tries to use
Thread.getContextClassLoader, but only when it is available and if Rhino
classes is available through it. Otherwise the loader for Context instance is
used. In this way if Rhino is loaded through a custom loader, it will be used,
and if Rhino classes are placed in lib/ext, Thread.getContextClassLoader still
give the application loader.
And if this default policy would not work in a particular application,
Context.getApplicationClassLoader() can be overridden to in that application.
2003-04-15 07:48:18 +00:00
igor%mir2.org
9aa69b8a87
Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=201989 :
...
use IdFunction.initAsConstructor to initialize Error constructors in
NativeGlobal.init and remove setFunctionType and corresponding getFunctionType in IdFunction and use a simple private boolean field there to mark functions that can be called as constructors since NativeGlobal.init was the only place that used that.
2003-04-15 07:43:30 +00:00
igor%mir2.org
4fa07f31de
Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=201987 :
...
Use toObject() in ScriptRuntime.delete to convert non-Scriptable delete target to Object which required to pass Context and scope to the method and update Interpreter and optimizer/Codegen accordingly.
2003-04-15 07:33:17 +00:00
pschwartau%netscape.com
c161deac2b
Initial add. Tests ECMA-262 Edition 3, Section 15.11.7.6.
2003-04-14 23:18:36 +00:00
pschwartau%netscape.com
d21e255825
Moving from ecma_3/Object/ to ecma_3/Exceptions/ directory.
2003-04-14 23:14:42 +00:00
pschwartau%netscape.com
7916024a8e
Initial add. Regression test for EMCA-262 Ed.3, Section 15.11.7.6.
2003-04-14 23:04:52 +00:00
pschwartau%netscape.com
cc85cc491c
Initial add. Tests ECMA-262 Ed.3, Section 11.4.1, the |delete| operator. See bug 201987.
2003-04-14 18:45:45 +00:00
igor%mir2.org
88b8903a58
Duplicated code from IdFunction and FunctionObject to initialize prototype and scope of the result of call invocation when it is used as a part of constructor code is moved to a utility method initCallResultAsNewObject in BaseFunction.
2003-04-14 14:38:04 +00:00
igor%mir2.org
b5b153abb8
Replace code to generate:
...
if (val != null && val != Undefined.instance && val instanceof Scriptable) ...
by code to generate:
if (val instanceof Scriptable && val != Undefined.instance) ...
since (val instanceof Scriptable) => (val != null)
2003-04-14 13:53:18 +00:00
brendan%mozilla.org
4b0d94c93a
More cleanup/followup: eliminate single-use rt variable in js_SetProperty, move clasp decl and first-def down, fix comments, strip trailing whitespace.
2003-04-14 04:14:57 +00:00
brendan%mozilla.org
3fb113994f
Improve one comment slightly.
2003-04-14 03:32:55 +00:00
brendan%mozilla.org
40334ba064
Quick followup to last checkin, to optimize OBJ_DROP_PROPERTY to JS_UNLOCK_SCOPE in the one place in js_SetProperty that didn't follow the comments and do that.
2003-04-14 03:26:47 +00:00
brendan%mozilla.org
fd011d535b
Fix ancient ECMA violation where proto-property attrs, etc., were inherited when shadowing (90596, r=rogerl).
2003-04-13 23:33:34 +00:00
igor%mir2.org
a055ed5694
Instead of using the special _packages_ properties to store imported packages, use a field in ImporterTopLevel for simpler code.
2003-04-13 10:57:06 +00:00
igor%mir2.org
607b4b7a6c
Switch to use IdFunction to define ImporterTopLevel script methods. A separated class is used to implement IdFunctionMaster interface to avoid interface clashes with possible ImporterTopLevel subclasses implementing the same interface.
2003-04-13 08:57:57 +00:00
igor%mir2.org
4588ddb780
1. In NativeJavaPackage.init define global properties only when NativeJavaPackage instance is fully initialized.
...
2. Memory optimization: instead of string array for predefined known packages, use single string which is split into substrings when necessary.
2003-04-13 08:54:09 +00:00
igor%mir2.org
483f99db82
Switch to use the new utility IdFunction.define() method to define function properties instead of explicit code for function initialization and inlining of getMethod call since it is used only once to make code smaller.
2003-04-13 08:47:19 +00:00
igor%mir2.org
e326be8a4b
I added static IdFunction.define utility method to define IdFunction instances as properties in the given scope.
2003-04-13 08:40:43 +00:00
igor%mir2.org
9222756901
Switch to use ClassFileWriter.addInvoke() taking full method signature including the result part as a single argument instead of deprecated 4-argument ClassFileWriter.add().
2003-04-13 08:38:52 +00:00
igor%mir2.org
e87a1ef790
Commiting Hannes Wallnoefer patch to allow LiveConnect to convert JS Date to Java Data, see http://bugzilla.mozilla.org/show_bug.cgi?id=201326
2003-04-12 10:48:39 +00:00
brendan%mozilla.org
c251d3600f
Fix set-property on sealed object to throw error (94693, r=rogerl).
2003-04-11 21:02:29 +00:00
brendan%mozilla.org
05f54166a9
Fix JS_CompileUCFunctionForPrincipals to allow null obj with non-null funAtom, for precompiling a named function against no scope (no bug, r=self trivial change).
2003-04-10 23:38:59 +00:00