Commit Graph

5170 Commits

Author SHA1 Message Date
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
dbradley%netscape.com
572096c8b6 Bug 201084 - [AxPlugin] mozilla crashing in new ActiveXObject(). r=adamlock, sr=alecf (Not part of build) 2003-04-10 07:06:52 +00:00
joshua.xia%sun.com
4bed3d7dff bug=201164 Crash when java applet returns a number as a string to a javascript, and the script modifyes the number.
r/sr=brendan@mozilla.org sr=beard@netscape.com
2003-04-10 05:45:48 +00:00
dbradley%netscape.com
f7b64929d9 bug 199122 - IDispatch logic should not depend on order of properties. r=adamlock, sr=alecf (Not part of the build) 2003-04-04 15:32:30 +00:00
seawood%netscape.com
12f0a8dbf1 Purge XP_PC.
Bug #74999
2003-04-04 05:26:58 +00:00
seawood%netscape.com
890f5269df Purge XP_PC.
Bug #74999
2003-04-04 03:00:58 +00:00
seawood%netscape.com
1ccbc63c38 Purge XP_PC.
Bug #74999
2003-04-04 00:37:30 +00:00
seawood%netscape.com
bf5970191d Purge XP_PC.
Bug #56767 r=mkaply sr=alecf
2003-04-03 22:42:02 +00:00
seawood%netscape.com
42ee530683 Purge XP_PC.
Bug #74999 r=mkaply sr=brendan
2003-04-03 19:35:29 +00:00
igor%mir2.org
e70e26e2a5 Working on http://bugzilla.mozilla.org/show_bug.cgi?id=198208 :
I removed deprecated methods to access ClassNameHelper functionality through Context instance.
2003-04-01 14:52:27 +00:00
igor%mir2.org
601bdbff9a Work for http://bugzilla.mozilla.org/show_bug.cgi?id=198208 :
I removed deprecated since 1.5R3 omj.ClassOutput and moved some of code from omj/ClassNameHelper.java to omj/optimizer/OptClassNameHelper so if one does not need the optimizer package, the jar will be smaller.
2003-04-01 11:39:08 +00:00
louie.zhao%sun.com
1fcd577b0b fix bug 183092 "Buffer overrun calling Java from JS"
patch = joshua.xia@sun.com; r = rogerl; sr = beard; approval = asa
2003-04-01 03:11:53 +00:00
igor%mir2.org
a8882e7d5a Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=199051 :
Initialize invoker in FunctionObject constructor, not during first call and catch possible SecurityException. In this way initialization will happen without script code on java stack which may not have permissions to create class loaders.
2003-03-31 13:18:04 +00:00
igor%mir2.org
eb1ab4ff3a Removal of deprecated SecuritySupport as a part of work on 198208. 2003-03-31 08:43:40 +00:00
timeless%mozdev.org
9ccc80889c Bug 191778 Fix minor errors in perlconnect readme
r=brendan
2003-03-27 17:18:39 +00:00
brendan%mozilla.org
f0404b0df8 Work around OpenVMS compiler bug: it reserves |readonly| (199366, r=me, patch from colin@theblakes.com). 2003-03-27 00:04:51 +00:00
pschwartau%netscape.com
0845ca0953 The fix in rev 1.48 was not placed high enough in the program. Correcting that now. 2003-03-26 21:28:19 +00:00
dbradley%netscape.com
371eebbe33 Bug 198668 - [AxPlugin] Ofoto control does not return the value of properties correctly. r=dbradley/adamloc, sr=jst
IDispatch only changes, not part of the regular build
2003-03-26 04:20:33 +00:00
nboyd%atg.com
aaabfae631 change to 1.5R5 prerelease 2003-03-25 19:13:29 +00:00
nboyd%atg.com
0917d39fa2 Switch to 1.5R5pre. 2003-03-25 19:11:58 +00:00
timeless%mozdev.org
a4413bbc8a Bug 101198 nsXPCToolsCompiler.cpp > xpctools_private.h incorrectly uses LL_INIT which breaks for !*HAVE_LONG_LONG
removing unused include
r=dbradley sr=dmose
2003-03-25 07:18:15 +00:00
timeless%mozdev.org
072e6da90b Bug 101198 nsXPCToolsCompiler.cpp > xpctools_private.h incorrectly uses LL_INIT which breaks for !*HAVE_LONG_LONG
r=dbradley sr=dmose
2003-03-25 06:57:55 +00:00
pschwartau%netscape.com
78a75752a7 Revising test to match style of testcase for duplicate bug 192414. That is, use an eval string and try...catch. See bug 192414 comment 25 etc. - 2003-03-25 01:45:29 +00:00
bryner%netscape.com
84d98f2f3e Another leak fix from bug 198655 that it turns out we do need. r/sr=brendan. 2003-03-25 00:41:13 +00:00
pschwartau%netscape.com
47ab4eca5b Adding standard lines to report bug number and summary, which were missing from this testcase for some reason. 2003-03-23 20:24:34 +00:00
cbiesinger%web.de
c0e941dfb3 22984 r=cls Remove MOZ_JAVA references from the build 2003-03-23 19:36:00 +00:00
bryner%netscape.com
3e84c4969c - Fix some JS component loader shutdown leaks.
- Ensure that we use JSPRINCIPALS_DROP() where needed to avoid leaking principals.
- Clear newborn roots when we've finished with a JSContext, so we don't keep objects from being gc'd if there are no other references.

Part of bug 198655.  Thanks to dbaron for much of the component loader patch.  r=shaver, sr=brendan.
2003-03-23 07:22:18 +00:00
dbradley%netscape.com
394011eae7 Minor comment fix 2003-03-23 00:28:40 +00:00
dbaron%dbaron.org
51d4f67690 Add DEBUG_dbaron to the DEBUG_xpc_hacker list. 2003-03-22 17:26:29 +00:00
rogerl%netscape.com
c6d91b4c6a Fix bug #122076. r=brendan. Stop [] parse loop from wandering off into the
weeds.
2003-03-22 03:42:22 +00:00
dbradley%netscape.com
bfd19c222e bug 197281 - Introduction of XPCConvert::GetNativeInterfaceFromJSObject is causing problems r=jst, sr=alecf 2003-03-22 02:13:38 +00:00
mkaply%us.ibm.com
f6bcf1c153 #188249
s/r=brendan
Cleanup #ifdef and add EMX
2003-03-21 22:18:12 +00:00
bolian.yin%sun.com
be94514e09 Bug 197088, Netscape 7.02 crashes when my JavaScript accesses a Java string or int. r=av, sr=beard. patch by joshua.xia@sun.com 2003-03-21 03:37:18 +00:00
pschwartau%netscape.com
c78c022a6a Removing the early return, and adjusting |N| downward from 1000 to 90 instead. 2003-03-21 02:02:59 +00:00
igor%mir2.org
59d6f7f69d Added ScriptRuntime.newInstanceOrNull to call class.newInstance() and return null if it fails. It allows to replace in few places try/3 different catch by a simple method call. 2003-03-20 15:46:37 +00:00
brendan%mozilla.org
cba834a969 Saner ReportReadOnlyScope message names the sealed object, not an undefined property that can't be created in its scope (94693, r=me). 2003-03-20 11:27:33 +00:00
brendan%mozilla.org
86e5524746 Fix JSOP_BINDNAME to have JOF_SET (which is now the same as JOF_ASSIGNING, so use that where it's a clearer name; 94693, r=me). 2003-03-20 11:05:10 +00:00
brendan%mozilla.org
23d950dbcf Fix broken left-associativity and constant folding for + chains involving some string terms (196290, r=shaver by telepathy). 2003-03-19 19:33:33 +00:00
igor%mir2.org
5aa0865e56 Make ScriptRuntime.getClassOrNull() package private and use it in place of Class.forName() to avoid ever catching ClassNotFind and Security exceptions. 2003-03-19 19:04:24 +00:00
igor%mir2.org
ad1ace93ca Removal of deprecated classes from the list of API docs 2003-03-19 14:14:29 +00:00
igor%mir2.org
067aaa3e0b Fixing JavaSoc documentation tag usage 2003-03-19 14:13:41 +00:00
igor%mir2.org
255e90bedc For concatenation of 2 strings that are not null use str1.concat(str2) instead of str1+str2 to avoid construction of temporary StringBuffer all together. 2003-03-19 12:36:48 +00:00
igor%mir2.org
12ada0ce5c Use ClassFileWriter.addInvoke to add method invocation code instead of deprecated 4-argument ClassFileWriter.add() to avoid unnecessary string concatenation to build full method signature from parameter and result signatures. 2003-03-19 11:19:21 +00:00
bzbarsky%mit.edu
83e46b1a49 Fix some spelling errors in comments. Bug 106386, patch by Nicholas Bebout
<nb@ipnode.info>, r=doron, sr=dmose
2003-03-19 04:35:08 +00:00
brendan%mozilla.org
c0fc066a01 Don't override a prototype property iff it is JSPROP_SHARED (not also if it's a JSPROP_SETTER; 197940, r=rogerl). 2003-03-19 02:25:39 +00:00
brendan%mozilla.org
f2c8bb3531 Move readonly pre-ECMA error report down to new place peculiar to sealed
scopes, and share it via downward goto from the old place (which should go
away when a bug on khanson's list whose # I forget is fixed).  This fixes
the hole in sealed scope support mentioned in bug 94693 (r=rogerl/shaver).
2003-03-19 00:53:45 +00:00
seawood%netscape.com
64b0b42708 Fix --enable-xpctools post-minimo bustage 2003-03-17 23:40:16 +00:00
pschwartau%netscape.com
36cbc846da Improving comments. 2003-03-17 14:12:41 +00:00
igor%mir2.org
4c4f4e4fc8 Use ClassFileWriter.addInvoke() instead of ClassFileWriter.add() to add method calls to avoid string concatenation when constructing full method signature from separated parameter and return signatures. 2003-03-17 12:39:19 +00:00
pschwartau%netscape.com
76558f94fa Improving comments. 2003-03-16 23:38:45 +00:00
pschwartau%netscape.com
14da98f00f Improving readability. 2003-03-16 23:31:49 +00:00
igor%mir2.org
9a9f82103c A version of the add method to add an invoke bytecode is deprectaed in favor of addInvoke that takes a full method signature in place of separated parameter and result signatures. It allow not use a string concatenination to build a full signature. 2003-03-16 17:45:34 +00:00
igor%mir2.org
254d313fa4 Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=197682 :
replace static fields to hold targets of direct call optimization by an instance fields in the class representing the main script object.
2003-03-16 13:53:41 +00:00
pschwartau%netscape.com
5aadc424fa Adding more cases to test. 2003-03-15 02:25:25 +00:00
dougt%netscape.com
0d2808c511 Create a new xpcom obsolete library (and component library).
Moved nsFileSpec and related classes into this obsolete library.
  Moved nsRegistry and related libreg functionality into the obsolete library.

Updated many callers using the obsolete nsFile spec to use nsIFile and Necko to do file IO.

Combined the following DLLs (source -> dest)
  uriloader -> docshell
  shistory -> docshell
  jsurl -> jsdom
  gkview -> gklayout

Moved nsAdapterEnumerator out of xpcom/ds and into mailnews, since they're the only consumer

Modifed the xpt_link tool so that you can specify a �only include� cid list that can mask CID�s that you are not interested in.

Added build options:
Prevent the building of xpinstall (--disable-xpinstall)
Prevent the building js component loader (--disable-jsloader)
A build option to only build a single profile (--enable-single-profile)
A build flag to only built the required xpfe components (--disable-xpfe-components).

Removal or hiding of unused functions and classes including nsEscape*, nsDequeIterator, nsRecyclingAllocatorImpl, nsDiscriminatedUnion, nsOpaqueKey, nsCRT::strlen, NS_NewCommandLineService

Bug 194240, r/sr = darin, alec.
2003-03-15 01:04:32 +00:00
pschwartau%netscape.com
5dfc4c8609 Improving comments. 2003-03-15 00:07:50 +00:00
pschwartau%netscape.com
c62eac8089 Adding more cases inspired by bug 197451. 2003-03-14 23:55:37 +00:00
pschwartau%netscape.com
df718533bc Initial add. Regression test for bug 196290, testing left-associativity of the + operator (cf. ECMA-262 Ed.3 Section 11.6.1) 2003-03-14 20:40:05 +00:00
igor%mir2.org
200e03d717 1. When generating various support methods like script main, function constructor etc., use classFile.startMethod instead of startNewMethod since the later is intended for generation of main code for script/function.
2. Do not use trivialInit optimization for scripts since the following changes makes generation of initScript function mandatory.
2003-03-14 10:05:01 +00:00
brendan%mozilla.org
25b813e602 Implement SCOPE_IS_SEALED, JS_SealObject, JS_UnsealObject, etc. to support
sealed standard object graphs, as well as to pave the way for optimizations
to object literals (94693, r=shaver).
2003-03-14 05:24:58 +00:00
igor%mir2.org
23f35a0f28 Inlinning of generateRegExpLiterals into generateInit for simple code 2003-03-13 22:50:04 +00:00
pschwartau%netscape.com
67bb0020b2 Improving comments. 2003-03-13 22:07:02 +00:00
igor%mir2.org
cdd74e7e8c I changes ClassFileField to store its attribute as simple short fields to avoid allocation of short[4] array for each field. 2003-03-13 14:03:03 +00:00
igor%mir2.org
ddc73696f3 I replaced explicit encoding of int, long and short values into byte arrays by new utility methods putInt16, putInt32, putInt64 2003-03-13 13:59:02 +00:00
igor%mir2.org
e1320b934c 1.More checks are added for bad usage of ClassFileWriter methods.
2. Hashtable is replaced by ObjToIntMap or UintMap to minimize memory usage.

3. Converting of strings to utf8 encoding is coded  explicitly to avoid overhead  of creating many objects.
2003-03-13 09:31:01 +00:00
igor%mir2.org
67b44fd9d9 Making class public 2003-03-13 07:52:07 +00:00
beard%netscape.com
8ded18bc1b Fix for bug #53593, sr=brendan, r=beard 2003-03-13 05:37:07 +00:00
brendan%mozilla.org
dd545c2cb9 Fix JS_[GS]etContextThread return type; add JSCLASS_NEW_RESOLVE_GETS_START (196966, r=shaver). 2003-03-12 20:29:16 +00:00
dbradley%netscape.com
3b01ed08a0 bug 196241 - Refactors script evaluation pre and post logic into a class. r=timeless, sr=brendan 2003-03-12 20:26:21 +00:00
dbradley%netscape.com
f24cadaaaa bug 188229 - [AxPlugin] Security policy should be per-domain configurable r=adamlock, sr=alecf NOTE: these changes are not part of the regular build. 2003-03-12 20:05:54 +00:00
dbradley%netscape.com
612926a718 Bug 194043 - Refactor exception logic between IDispatch and XPConnect. r=adamlock@netscape.com, sr=jst@netscape.com 2003-03-12 15:21:06 +00:00
igor%mir2.org
bcd8181007 Removal of generation of non-operational dup/pop when creating function objects for function statements. 2003-03-12 09:39:16 +00:00
brendan%mozilla.org
67444da79d Give JSScope a proper flags member, without increasing its size (part of 196097, r=shaver). 2003-03-11 20:30:55 +00:00
igor%mir2.org
3bbdba7f56 Fixing a regression in Codegen.transform which effectively disabled direct call optimization: FunctionNode.FUNCTION_STATEMENT should be compared against fn.getFunctionType(), not fn.getType() 2003-03-11 17:17:57 +00:00
igor%mir2.org
90ebda38fe Introduction of Codegen.mainCodegen to hold the main generator object and layout cosmetics. 2003-03-11 10:01:32 +00:00
igor%mir2.org
47a9d77f0f Use (size + 31) >> 5, not (size >> 5) + 1 as a size for int array buffer so in the case when size % 32 == 0 array would not hold a never used tail element. 2003-03-11 09:59:39 +00:00
igor%mir2.org
134f5d732f 1. Consistently use Context.inFunction and Context.fnCurrent instead of calling instanceof/cast for OptFunctionNode on Context.scriptOrFn
2. Removal of Codegen.superClassSlashName field since Codegen.superSlashName since it is never used as a part of a signature and ClassFileWriter converts . into / in type name automatically.
2003-03-11 07:25:13 +00:00
cls%seawood.org
5738ef26f0 Adding mingw support to js.
Bug #134113 r=brendan
2003-03-11 03:27:07 +00:00
seawood%netscape.com
a115192b1a Remove unneeded local win32 jsinterop.obj target that's causing dependency issuees.
Thanks to John Morrison <jrgm@netscape.com> for the patch.
Bug #196633 r=cls sr=brendan
2003-03-11 00:13:44 +00:00
igor%mir2.org
26a9318291 Since NodeTransformer.transform(tree) never replaces tree, change its signature to return void which allows to eliminate ScriptOrFnNode.replaceFunctionNode. 2003-03-10 20:26:58 +00:00
igor%mir2.org
c0145a6724 Simplification of optimized node transformer: search for direct call optimization targets in Codegen.transform before constructing ObjTransformer instance to avoid additional checks for top-level script in ObjTransformer.transform 2003-03-10 20:24:06 +00:00
igor%mir2.org
bc0b7a93d9 Added API to make array read only, after which any attempt to modify it will trigger RuntimeException 2003-03-10 20:19:22 +00:00
igor%mir2.org
9d6bb8957e 1. Removal of unused fields and methods:
Codegen.java:
-    private int ordinal;
-    private short scriptRuntimeIndex;
-    private short debug_pcLocal;
-    private short debugStopSubRetLocal;

OptFunctionNode.java
-    private ObjArray itsDirectCallTargets;
-    void addDirectCallTarget(FunctionNode target) {
-    ObjArray getDirectCallTargets() {

2. Better naming and method moves in Codegen.java for better readability
2003-03-10 17:46:32 +00:00
seawood%netscape.com
06d44dbda8 Fix dependency problems with local targets.
Bug #196633 r=jrgm
2003-03-10 05:16:06 +00:00
brendan%mozilla.org
6ef9f45d83 [Second check-in attempt; last night's was backed out, but I claim it was because of bad dependencies or timestamp problems in the Win32 builds. /be] Add cx->lastAtom, a long overdue addition to the per-context GC root set (196461, r=shaver). 2003-03-09 18:16:27 +00:00
jrgm%netscape.com
b14fbf087b backout changes for bug 196461, due to startup crash on win32 2003-03-09 05:57:23 +00:00
brendan%mozilla.org
73a99565bc Add cx->lastAtom, a long overdue addition to the per-context GC root set (196461, r=shaver). 2003-03-09 03:12:56 +00:00
cls%seawood.org
d1479589a2 Adding mingw makefile changes.
Bug #134113 r=bryner
2003-03-08 05:57:15 +00:00
brendan%mozilla.org
ae0c4d3804 Reorder static and const to match tradition; reomve DEBUG_brendan cruft. 2003-03-08 01:28:02 +00:00
cls%seawood.org
d1079607df XP code changes required for mingw landing.
Add NS_STDCALL macros for functions that require stdcall declarations.
Add NS_STDCALL_FUNCPROTO macro for stdcall function prototype typedefs.
Bug #134113 r=dougt sr=dbaron
2003-03-07 06:07:56 +00:00
brendan%mozilla.org
dcad0d8960 Infrastructure for bug 92773, r=shaver@mozilla.org:
- call the JSRuntime's checkObjectAccess callback, if configured, for each
  get or set that invokes a user-defined function (a user-defined function is
  a scripted or native function object, not a native JSPropertyOp C function).
  The value passed as an in-out parameter in *vp is the function object, so
  the callback could, e.g., clone function objects and configure them with
  different parent objects, if that helped import them into a trust domain.
- Fix a long-standing bug that broke the deprecated, old-style, and rarely-
  used top-level getter/setter function declaration form:

    getter function f()  { return ++x; }
    setter function f(y) { return x = y; }

  We want js_CheckRedeclaration to complain only if a permanent getter is
  being redefined by another getter, likewise for a setter -- but not when
  (as above) a setter is being added to a top-level object for the same id
  as a pre-existing getter (or vice versa).
2003-03-06 19:45:18 +00:00
igor%mir2.org
1b6885bd21 Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=196017 :
Use Thread.getContextClassLoader() as the last resort when searching for classes.
2003-03-06 09:29:00 +00:00
dougt%netscape.com
c5ac287dab removing NS_MT_SUPPORTED define. b=186494, r=dougt, r=seawood 2003-03-05 23:30:22 +00:00
dougt%netscape.com
d707cba238 backing out js changes which may have caused tbox test failures 2003-03-05 05:05:39 +00:00
timeless%mozdev.org
727e7a086b Bug 195289 Enable people to use DumpJSStack and friends from nondebug builds if they list themselves as xpc_hackers
r=dbradley sr=jst
2003-03-05 03:12:04 +00:00
brendan%mozilla.org
25e042cd77 Infrastructure for bug 92773, r=shaver@mozilla.org:
- call the JSRuntime's checkObjectAccess callback, if configured, for each
  get or set that invokes a user-defined function (a user-defined function is
  a scripted or native function object, not a native JSPropertyOp C function).
  The value passed as an in-out parameter in *vp is the function object, so
  the callback could, e.g., clone function objects and configure them with
  different parent objects, if that helped import them into a trust domain.
- Fix a long-standing bug that broke the deprecated, old-style, and rarely-
  used top-level getter/setter function declaration form:

    getter function f()  { return ++x; }
    setter function f(y) { return x = y; }

  We want js_CheckRedeclaration to complain only if a permanent getter is
  being redefined by another getter, likewise for a setter -- but not when
  (as above) a setter is being added to a top-level object for the same id
  as a pre-existing getter (or vice versa).
2003-03-05 01:33:19 +00:00
igor%mir2.org
c6efcf460c Integration of VariableTable into ScriptOrFnNode to avoid the need to have a separated wrapper class around ObjArray/ObjToIntMap 2003-03-04 15:10:20 +00:00
brendan%mozilla.org
cf97227e83 Quick followup to patch for 174341. 2003-03-04 00:01:21 +00:00
brendan%mozilla.org
020aef7d75 My take on a patch and great idea from igor@icesoft.com (Igor Bukanov) for bug 195385, r=shaver. 2003-03-01 06:39:51 +00:00
timeless%mozdev.org
df64a519af Bug 136264 HTMLCollection Object wrapped by XPConnect has members whose names shadow each other
r=jst sr=jst
2003-02-28 19:07:51 +00:00
brendan%mozilla.org
68cef095fc Fix typo in old comment. 2003-02-28 07:18:40 +00:00
brendan%mozilla.org
6e0c7cdde4 Constipation of (JS|PL)DHashTableOps (195298, r/sr=shaver/alecf). 2003-02-28 07:17:59 +00:00
timeless%mozdev.org
d11119926a Bug 136260 ChromeWindow Object wrapped by XPConnect has members whose names shadow each other
r=jst sr=jst
2003-02-28 02:34:01 +00:00
pschwartau%netscape.com
a953b34fcf Adding an early return to this test, due to problems on Linux RedHat8. See bug 174341 comment 24 and following. 2003-02-28 00:33:44 +00:00
brendan%mozilla.org
4f5a98cd5c - Move left-associative binary tree flattening from the post-order position
in js_FoldConstants where it was added (suboptimally: it worked, but it ran
  so late that js_FoldConstants recursion was not reduced, only js_EmitTree
  recursion), to NewBinary, where it avoids JSParseNode allocations up front
  and reduces recursion in all parse-tree walking.
- This change enables js_FoldConstants to see a very long concatenation of
  string literals as a PN_LIST node, so it can quickly concatenate without
  running afoul of O(n^2) problems inherent in js_ConcatStrings applied to
  two atomized strings (the old way of folding string concatenations, still
  used for any pairwise string literal concatenation).
- Further optimize the first change for the second by having NewBinary set a
  new pn_strcat flag (overlaying the pn_extra field) of the PN_LIST arm of
  the JSParseNode.pn_u union, whenever it sees at least one string literal in
  a concatenation that might be folded (whose operands might all be constants
  of string or number type).
- Notes:
  - only string and number constants are folded (not boolean or null
  constants);
  - only all-constant left-associated binary expression chains are folded,
    so 2 * foo * 3 is not folded using commutativity of * over numbers, nor
    is "hi" + " there" + foo folded to "hi there" + foo.
  - gcc3.2 -O and objdump -x say I added 708 bytes of instructions with this
    change.  I tried to keep it down to what was necessary for common script;
    I don't think JS needs an optimizing-compiler-strength constant folder,
    and I don't think this 1K bloat is too high a price to pay for this fix.
    But I'll certainly work on reducing footprint elsewhere, if I can.
- Bug 174341, r=shaver.
2003-02-27 23:04:46 +00:00
pschwartau%netscape.com
2f97a8c92b Get JS standalone building with Makefile.ref on Mac OSX (195134, r=cls). Not part of browser build. 2003-02-27 21:52:13 +00:00
brendan%mozilla.org
1d7a5aa298 Checking in heap-sort speedup from Igor Bukanov <igor@icesoft.no> (bug 181828, r=me). 2003-02-27 01:43:44 +00:00
mkaply%us.ibm.com
7b82e8d993 #156505
r=dbradley, sr=brendan
If you ask for input, you should fflush after the fprintf
2003-02-26 15:22:03 +00:00
brendan%mozilla.org
7915c3d008 Optimize the foo = '' + bar; case in js_ConcatStrings to do foo = bar -- patch from Tim Lundeen <tlundeen@webcrossing.com>, r=me. 2003-02-26 01:49:32 +00:00
brendan%mozilla.org
c68f6d3980 Fix misspelling in comment. 2003-02-26 01:29:55 +00:00
igor%mir2.org
11d0e9760b Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=96270 :
proper implementation of Scriptable.has in ImporterTopLevel and NativeJavaPackages
2003-02-25 09:17:43 +00:00
igor%mir2.org
fd3dee4c56 Fix http://bugzilla.mozilla.org/show_bug.cgi?id=194364:
no assignment of function expression statements to script result
2003-02-25 09:15:08 +00:00
mkaply%us.ibm.com
907ef1cd66 Overzealous -removed a paren 2003-02-25 05:59:50 +00:00
mkaply%us.ibm.com
5e0e0118e6 IRIX bustage - for anyone blaming this code in the future, checkin was Bug 146873 by mstoltz 2003-02-25 05:58:21 +00:00
timeless%mozdev.org
2f675849fa Bug 131275 JS_AddRoot could provide a default root name if you define NAME_ALL_GC_ROOTS
r=brendan
2003-02-25 03:29:24 +00:00
mstoltz%netscape.com
db7833ec52 Bug 146873 - Check JS Enabled status before calling from java into JS. r=jst, sr=heikki. 2003-02-25 01:37:47 +00:00
pschwartau%netscape.com
5d7fb8b95b Oops; back out last change. No sense in try...catch if the code you're trying isn't hidden inside an eval string! 2003-02-24 22:33:01 +00:00
timeless%mozdev.org
0acb5ea8ca Bug 140031 Change jstypes.h to use __declspec instead of _declspec
r=rogerl
2003-02-24 21:37:54 +00:00
timeless%mozdev.org
08a077d57d Bug 75405 js benchmarks need strict mode cleaning
patch by petejc@collab.net r=rogerl
2003-02-24 21:37:37 +00:00
timeless%mozdev.org
0e996b7cf4 Bug 186937 JSLL_UCMP missing from !JS_HAVE_LONG_LONG builds
patch by scole@planetweb.com r=brendan
2003-02-24 21:37:23 +00:00
pschwartau%netscape.com
67070c0aad Add a try...catch around the recursion test to catch 'too much recursion' exceptions. They are OK; we are only testing against crashes in this test. 2003-02-24 20:04:07 +00:00
timeless%mozdev.org
8facc552af Bug 188398 JavaScript Engine doesn't work well for dates after 2038 on Windows
r=rogerl
2003-02-24 19:20:24 +00:00
timeless%mozdev.org
4d48249ffe Bug 134728 mozJSComponentLoader::UnloadAll => JSCLAutoContext::JSCLAutoContext Getting service @mozilla.org/js/xpc/ContextStack;1 on shutdown.
r=dbradley sr=brendan
2003-02-23 07:03:11 +00:00
seawood%netscape.com
7f752bf63b Use va_copy if available for VARARGS_ASSIGN
Bug #187180 r=blizzard sr=brendan
2003-02-23 06:59:39 +00:00
brendan%mozilla.org
9c387e3aa5 Cleanup GC_CALLBACK blunder (190813 followup, r=shaver). 2003-02-22 22:56:57 +00:00
pschwartau%netscape.com
75d9c50f73 Initial add. Regression test for bug 194364. 2003-02-21 22:07:21 +00:00
brendan%mozilla.org
ed7dbec5c1 Fix from pthomas@suse.de (Philipp Thomas) for 64-bit conflict between ptrdiff_t and JS_BIT/JSUint32 (r=shaver, a=dbaron). 2003-02-20 22:23:03 +00:00
igor%mir2.org
a8e6f7c025 Parsing changes: for regular expression literals construct a tree node with regular expression number during parsing instead of generating a special subtree that is converted to such node during tree transformation. 2003-02-20 13:11:21 +00:00
igor%mir2.org
406437f686 Praising changes: remove direct access to VariableTable in ScriptOrFnNode and instead provide methods to access its functionality. In this way VariableTable can be changed without affecting the rest of code. 2003-02-20 09:18:12 +00:00
igor%mir2.org
3f34720cd5 More parser internal changes: move all logic to initialize variable table to ScriptOrFnNode.finishParsing and its overrides in FunctionNode/OptFunctionNode so it will be constructed during parsing to avoid checks for function types in NodeTransformer. 2003-02-19 23:50:42 +00:00
mkaply%us.ibm.com
a77ccce713 #193611
r=rginda, sr=brendan, a=dbaron
Set the MAX_INTERP_LEVEL for OS/2 to something lower than 1000 (250)
2003-02-19 21:19:54 +00:00
dbradley%netscape.com
74be079a50 Bug 192281 - Error calling IDispatch.setCallback on active-x control. This patch turns on wrapping of JS objects by an IDispatch interface. All changes are outside of Mozilla build. r=adamlock, sr=jst, a=dbaron 2003-02-19 15:19:22 +00:00
igor%mir2.org
3a43240845 During parsing collect all nested function in script or function directly into array in ScriptOrFnNode. In this way there is no need to walk over tree to find nested functions during tree transformation since the function nodes are available directly. 2003-02-19 14:50:30 +00:00
igor%mir2.org
ae7bb2620d Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=193700 :
Attempts to access/modify properties of null or undefined are explicitly checked to include in error messages the property name so it would be possible on error in x.y.z to know if it is x or y that was undefined or null.

Inspired by suggestion from Russell Gold.
2003-02-19 08:51:51 +00:00
pschwartau%netscape.com
081f5e3864 Correcting a typo in the test that had made it pass vacuously. 2003-02-19 01:51:38 +00:00
pschwartau%netscape.com
0b4ad224e7 Correcting a typo in the test that had made it pass vacuously. 2003-02-19 01:43:27 +00:00
brendan%mozilla.org
9fd257d039 Hack around OBJ_ENUMERATE design flaw that requires the property iterator object to root its parent slot (193393, r=shaver, a=asa). 2003-02-18 20:08:21 +00:00
igor%mir2.org
2b5b9f76d8 Allow to set null for sourceName, encodedSource and originalSource 2003-02-18 00:52:34 +00:00
pschwartau%netscape.com
54518d9c36 Initial add. Regression test for bug 193555. 2003-02-17 23:08:59 +00:00
pschwartau%netscape.com
c2b61e9dfb Initial add. Regression test for bug 193418. 2003-02-17 22:24:26 +00:00
igor%mir2.org
511c2e945f Store number of locals as a field in ScriptOrFnNode and not as int node property. 2003-02-17 17:41:04 +00:00
igor%mir2.org
7c4d921fe0 Store function array inside ScriptOrFnNode as field, not as a node property. 2003-02-17 17:39:26 +00:00
igor%mir2.org
3abddeba71 Pass ScriptOrFnNode explicitly to function expecting script or function top node and fix OptTransformer problem where it marked nested functions of function as suitable for direct call optimization which was caused by removal of parameter name subtree in FunctionNode. 2003-02-17 17:34:20 +00:00
dbradley%netscape.com
92aa9a24b8 Bug 140852 (160602) - String(819187200000) == '8191871:0000' in xpcshell, browser. r=seawood, a=brendan 2003-02-17 13:02:08 +00:00
igor%mir2.org
5a9259c0aa Introduction of ScriptOrFnNode as a Node to represent scripts and a base class for FunctionNode so it can be used to store variable tables, line information, regular expressions etc. instead of using special Node properties. 2003-02-17 08:51:00 +00:00
igor%mir2.org
2e981e4365 Removal of a separated tree walking phase in NodeTransformer to collect variables as this is done now during parsing 2003-02-17 00:10:24 +00:00
igor%mir2.org
ca4e80328a Adjusted to refer to 1.5R4 as the last release 2003-02-17 00:06:06 +00:00
igor%mir2.org
32a501abe2 Fixing links 2003-02-17 00:05:27 +00:00
igor%mir2.org
19e12f45e4 Remove code duplication when reporting syntax errors in NodeTransformer, ToekStream, IRFactory and Parser and add a method to create FunctionNode to Interpreter/Codegen to remove the need to have OptIRFactory. 2003-02-16 20:28:56 +00:00
igor%mir2.org
9ad003b9a0 *** empty log message *** 2003-02-16 20:28:55 +00:00
locka%iol.ie
b864237a15 Fix blacklist/whitelist registry code in COM connect. b=193256 r=dbradley sr=alecf a=dbaron 2003-02-16 19:50:14 +00:00
igor%mir2.org
bed15cd944 Creating and filling VariableTable directly during parsing phase and then accessing it in NodeTransformer. It still does not remove the need to have a separated walk through the tree for variables but now it only checks for function name / variable name clashes.
And http://bugzilla.mozilla.org/show_bug.cgi?id=193555 is now fixed as well.
2003-02-16 11:34:54 +00:00
igor%mir2.org
56c3f65ac9 Do explicit parsing of function expression statements so a correct function type will be passed to IRFactory during node creation and fix incorrect code generation when FEATURE_MEMBER_EXPR_AS_FUNCTION_NAME is true.
I also added explicit flags to Parser: languageVersion and allowMemberExprAsFunctionName and set them from Context. In this way Parser can be used without Context which is useful for debugging.
2003-02-15 23:30:02 +00:00
igor%mir2.org
2c7161713c VariableTable changes toward removal of a separated NodeTransformer pass over the parser tree for variable initialization: the code to support a table of optimized variables for functions in the optimizer is moved to optimizer/OptFunctionNode and VariableTable holds only parameters/variables names now. It allowed to simplify VariableTable initialization in NodeTransformer. 2003-02-15 21:35:58 +00:00
igor%mir2.org
75697022cf Remove synchronization on Context instances as Context should only be accessed from one thread. 2003-02-15 21:23:54 +00:00
igor%mir2.org
c914122b03 Decoupling JavaAdapter from ClassRepository logic: JavaAdapter.createAdapterClass is replaced by JavaAdapter.createAdapterCode which just generates byte array with the adapter class file code and Codegen then passes this array to ClassRepository to save the class if necessary. In this way if repository do not need to load classes, adapter class will not be loaded at all. 2003-02-15 17:47:13 +00:00