1227 Commits

Author SHA1 Message Date
mkaply%us.ibm.com
4d9b865091 OS/2 TB breakage
Need cast to pass C++ function


git-svn-id: svn://10.0.0.236/trunk@86089 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-02 13:54:03 +00:00
jband%netscape.com
6afc607467 the rest of the fix for bug 66950 to add nsISupportsWeakReference support of xpconnect wrapped JSObjects. r=rogerl sr=brendan
git-svn-id: svn://10.0.0.236/trunk@86074 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-02 10:01:56 +00:00
jband%netscape.com
19a022fd40 the rest of the fix for bug 67258 to avoid empry Components.results and the similar pattern in nsJSIID. r=dmose sr=brendan
git-svn-id: svn://10.0.0.236/trunk@86063 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-02 08:57:47 +00:00
jband%netscape.com
34256201c6 backing out two changed inadvertantly committed!
git-svn-id: svn://10.0.0.236/trunk@86062 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-02 08:52:22 +00:00
jband%netscape.com
9806ddbcdd part of the fix for bug 67258 to avoid empry Components.results. r=dmose sr=brendan xpccomponents.cpp
git-svn-id: svn://10.0.0.236/trunk@86061 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-02 08:48:28 +00:00
jband%netscape.com
5c45f126ae part of the fix to bug 66950. Add support for cheaply tracking the lifetime of arbitrary JSObject by extending the GC callback mechanism to notify after marking is done but before sweeping, and by providing an api function that can be called at that point to determine if any given gcthing is about to be finalized. r=rogerl sr=brendan
git-svn-id: svn://10.0.0.236/trunk@86060 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-02 08:44:24 +00:00
mkaply%us.ibm.com
b59476b60e OS/2 TB break
Need JS_STATIC_DLL_CALLBACK


git-svn-id: svn://10.0.0.236/trunk@85980 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-01 18:39:38 +00:00
disttsc%bart.nl
6f82cd744a Fix senna bustage, add REQUIRES line. r=mkaply
git-svn-id: svn://10.0.0.236/trunk@85975 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-01 18:07:08 +00:00
sspitzer%netscape.com
7bf846da9b fix for #67205. get --enable-xpctools to work again.
it will build the JS profiler.  r=leaf,bryner, sr=cls


git-svn-id: svn://10.0.0.236/trunk@85970 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-01 15:36:59 +00:00
mkaply%us.ibm.com
28ff7a5167 Putting it back until I figure out the bustage
git-svn-id: svn://10.0.0.236/trunk@85909 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-01 00:03:12 +00:00
mkaply%us.ibm.com
fc3730319c OS/2 only
r=dbaron
Add static to OS/2 JS_STATIC_CALLBACK so I don't break the build like I did yesterday


git-svn-id: svn://10.0.0.236/trunk@85902 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-31 23:40:42 +00:00
mkaply%us.ibm.com
33096635e1 #59855
r=mccabe, sr=brendan
Proper building of fdlibm standalone


git-svn-id: svn://10.0.0.236/trunk@85898 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-31 23:26:00 +00:00
mkaply%us.ibm.com
36d7476c0f #59855
r=mccabe, sr=brendan
OS/2 needs fdlibm copysign


git-svn-id: svn://10.0.0.236/trunk@85895 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-31 23:24:27 +00:00
mkaply%us.ibm.com
cde5530610 #59855
r=mccabe, sr=brendan
Fix Javascript to get Endianness from jstypes.h


git-svn-id: svn://10.0.0.236/trunk@85894 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-31 23:23:42 +00:00
mkaply%us.ibm.com
6b8f3aa5a1 #59855
r=mccabe, sr=brendan
Fix Javascript to get Endianness from jstypes.h - start with a Makefile change and let it cycle once


git-svn-id: svn://10.0.0.236/trunk@85873 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-31 21:07:16 +00:00
dveditz%netscape.com
79219dcf9f enable win32 XPC_TOOLS_SUPPORT environment var to turn on js profiler hooks. r=mcafee,sr=jband
git-svn-id: svn://10.0.0.236/trunk@85810 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-31 03:26:31 +00:00
jband%netscape.com
c4d3afea71 NOT PART OF THE BUILD - simple observer test to demonstrate use of weak references
git-svn-id: svn://10.0.0.236/trunk@85803 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-31 02:32:39 +00:00
brendan%mozilla.org
960e43639c Throw EvalError for indirect eval calls iff strict+werror (38512, r=rogerl, sr=shaver).
git-svn-id: svn://10.0.0.236/trunk@85796 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-31 01:12:15 +00:00
dbaron%fas.harvard.edu
844a7882f7 Attempt to fix build bustage from mkaply's checkin. r=kin
git-svn-id: svn://10.0.0.236/trunk@85759 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-30 16:31:43 +00:00
mkaply%us.ibm.com
ceb8b2cef8 #62003
r=mccabe, sr=brendan
Fixing up some Javascript CALLBACKs


git-svn-id: svn://10.0.0.236/trunk@85758 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-30 15:53:38 +00:00
mkaply%us.ibm.com
2ca45a2991 #62003
r=mccabe, sr=brendan
Fixing up some Javascript CALLBACKs


git-svn-id: svn://10.0.0.236/trunk@85757 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-30 15:43:35 +00:00
brendan%mozilla.org
c9caa129f3 Better branch callback failure message.
git-svn-id: svn://10.0.0.236/trunk@85677 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-29 20:32:57 +00:00
brendan%mozilla.org
cfe27a306d Make branch callback optional, parameterize its limit, and give a warning when it fails.
git-svn-id: svn://10.0.0.236/trunk@85676 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-29 20:27:30 +00:00
brendan%mozilla.org
88999be56e Fixes for bug 33390 (r=mccabe, sr=shaver)
- Optimize compile (parse+emit) operation to generate code for each top-level
  statement or function in turn, recycling JSParseNodes as we go for greatly
  reduced "long linear script" footprint.
- Fix O(n**2) growth problems in bytecode and srcnote generation.
- Add js_ParseTokenStream entry point to compiler, for tree-generation without
  code-generation.  Move JSOP_EVAL instruction selection from code-generator to
  parser, to match other such specializations and enable js_ParseTokenStream.
- Fix js_CompileTokenStream (and get it right in new js_ParseTokenStream) to
  respect JSOPTION_VAROBJFIX.
- Clean up bracing, multi-line conditions, and overlong lines.


git-svn-id: svn://10.0.0.236/trunk@85619 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-27 08:00:45 +00:00
rogerl%netscape.com
336b3f3b1f Fixes for bugs #66234 (57572, 57631, 61266, 61766) sr=brendan, r=mccabe,
r=rginda,r=rogerl. Also 60925, 60926 by virtue of being subsumed by above.


git-svn-id: svn://10.0.0.236/trunk@85596 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-27 00:31:32 +00:00
jband%netscape.com
a90787454e fix jump in leaks caused by previous checkin by commenting out the offending code that roots Object.prototype
git-svn-id: svn://10.0.0.236/trunk@85565 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-26 08:02:23 +00:00
jband%netscape.com
0169a67b12 backing out the unreviewed change to the loader for bug 63027 that I checked in with the other xpconnect changes by mistake.
git-svn-id: svn://10.0.0.236/trunk@85548 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-26 02:35:22 +00:00
jband%netscape.com
d15f323b49 add xpidl support for DOMString to fix bug 65762. r=jst sr=brendan
git-svn-id: svn://10.0.0.236/trunk@85546 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-26 02:32:18 +00:00
jband%netscape.com
a930e22667 This is mostly to fix bug 64111 - XPConnect vs. Object.prototype.toSource woes.
Some other small fixes are included. Here is the list...

- Make nsIJSID::id [noscript] because xpconnect automatically builds a nsIJSID
wrapper around nsid values. However, xpconnect does not maintain a table of
those wrappers. So, given the same id twice it will make two nsIJSID wrappers.
This means that property walking could get foo.id.id.id... and not detect that
the different objects represent the same id. nsIJSID already exposes 'number'
so that JS can get the stringified value of the nsid. The nsid struct returned
by 'id' is useful for C++, but only causes problems for JS.

- Fix the nsIXPCScriptable 'IGNORE' handler for GetAttributes to not fail
silently.

- Add 'Components' to global objects as a non-enumerable property for backwards
compatibility and to avoid additional work in property enumeration (esp. in
win.toSource!)

- Expose toSource on wrapped native JSObjects. This just returns an empty object
string: '{}'. It can be overridden by an interface method if present.

- Expose toString on wrapped native JSObjects. It can be overridden by an
interface method if present. Previously we only did this as part of the
Convert op. Now someWrapper.toString will return a callable function.

- Extend the toString behaviour to also print the address of the wrapper in
DEBUG builds only: e.g. "xpconnect wrapped nsIFoo @ 0x12345678". mccabe
convinced me this would be useful. Release build behaviour is unchanged - we
worried that exposing addresses might contribute to possible security exploits.

- Have wrapped native JSObjects use Object.prototype as their proto rather than
have a null proto. Originally this was going to allow delegation to
Object.prototype.toSource, but even without that, this seems like a good thing.
This is implemented by getting Object.prototype from the global object each
time we create a wrapper to allow for spify JS dynamic craziness.

- Use 16bit values in wrappednative property descriptors to save space. It was
only possible to use 16 bits of the pointer-sized ints in the structs anyway.

- Do a security check at enumeration time and only expose those properties that
the caller can actually 'Get'. This fixes the toSource security exception
problem.

- Add a big comment about the problem of reporting uncaught exceptions.

- Fix crashing bug for case where object has no enumerable properties and
xpconnect failed to fill in the zero count.

- Fix NewInstanceJSObject to dig in and find the 'ultimate' parent when
parenting new wrapper JSObject. The old scheme was ending up with hugely
long parent chains in some cases.

r=jst, sr=brendan


git-svn-id: svn://10.0.0.236/trunk@85545 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-26 02:25:09 +00:00
jband%netscape.com
dd4fb834f5 WHITESPACE ONLY CHANGE. Detabbing this stuff cuz it bothers me (tabbing didn't match 'Mode' line's tab-width)
git-svn-id: svn://10.0.0.236/trunk@85540 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-26 01:53:22 +00:00
brendan%mozilla.org
1c7d4471fa Fixes for bug 61898 (which has morphed), r=rogerl, sr=jband.
- Optimize integer ++ and -- to avoid double-to-int, which is quite costly for
  some compilers (ftol on Windows with MSVC).
- Optimized arguments[i] and arguments.length references to use bytecodes that
  avoid creating an arguments object for the current frame.  This entailed
  simplifying the compiler to avoid flagging functions and scripts that set
  arguments, since we have code in jsfun.c to catch such sets at runtime.
- The code generator now eliminates useless expression statements, giving a
  strict warning about them.
- Rationalized jsemit.c's LookupArgOrVar to have well-defined results in *pn.
  Eliminate bytecode specializations for argument and local variable gets and
  sets from jsparse.c -- these precede jsemit.c's LookupArgOrVar and frustrate
  it, by setting pn_slot non-negative too early.
- Code generation errors set report->filename and report->lineno, rather than
  hacking "{0}, line {1}: " into the localized message.
- Bogus JSFRAME_VAROBJBUG removed, JSOPTION_VAROBJFIX is sufficient.
- Spruce up jsinterp.c macros to use JS_BEGIN/END_MACRO brackets if possible.
- Avoid calling JS_PropertyStub.  The call is too costly compared to a branch
  in the caller.


git-svn-id: svn://10.0.0.236/trunk@85537 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-26 00:59:50 +00:00
sspitzer%netscape.com
7305affabb back out brendan (Career Limiting Move) to fix blocker bug #66545.
a=leaf


git-svn-id: svn://10.0.0.236/trunk@85497 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-25 18:06:57 +00:00
brendan%mozilla.org
c1463a8801 Fixes for bug 61898 (which has morphed), r=rogerl, sr=jband.
- Optimize integer ++ and -- to avoid double-to-int, which is quite costly for
  some compilers (ftol on Windows with MSVC).
- Optimized arguments[i] and arguments.length references to use bytecodes that
  avoid creating an arguments object for the current frame.  This entailed
  simplifying the compiler to avoid flagging functions and scripts that set
  arguments, since we have code in jsfun.c to catch such sets at runtime.
- The code generator now eliminates useless expression statements, giving a
  strict warning about them.
- Rationalized jsemit.c's LookupArgOrVar to have well-defined results in *pn.
- Code generation errors set report->filename and report->lineno, rather than
  hacking "{0}, line {1}: " into the localized message.
- Bogus JSFRAME_VAROBJBUG removed, JSOPTION_VAROBJFIX is sufficient.
- Spruce up jsinterp.c macros to use JS_BEGIN/END_MACRO brackets if possible.
- Avoid calling JS_PropertyStub.  The call is too costly compared to a branch
  in the caller.


git-svn-id: svn://10.0.0.236/trunk@85488 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-25 09:22:19 +00:00
beard%netscape.com
f0878fb57e [not part of build] Added UTCUtils to reflect new dependencies in JS engine.
git-svn-id: svn://10.0.0.236/trunk@85371 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-23 19:54:49 +00:00
brendan%mozilla.org
60ae4af073 Followup to last checkin, comment change only, r=mccabe.
git-svn-id: svn://10.0.0.236/trunk@85201 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-20 02:02:48 +00:00
brendan%mozilla.org
e92f541879 2nd attempt: Fix API botch where 'var x=0' vs. 'x=0' could put x in a different object (65553, r=mccabe, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@85199 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-20 01:41:55 +00:00
kin%netscape.com
b027ec74ff Temporary fix for Bug #65828: mozilla installer.exe fails with "-229 script error"
Backing out Brendan's previous checkin for bug #65553 (jsapi.c, jsdbgapi.c, jsemit.c, jsinterp.c, jsinterp.h, jsobj.c, and jsscript.c), so we can get smoke tests going.

r=attinasi@netscape.com (sheriff)


git-svn-id: svn://10.0.0.236/trunk@85091 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-18 22:10:12 +00:00
brendan%mozilla.org
a8e8c0ed81 Fix API botch where 'var x=0' vs. 'x=0' could put x in a different object (65553, r=mccabe, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@85067 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-18 03:00:31 +00:00
brendan%mozilla.org
a7c505139b Fix ABW impurities under JS_ClearScope on an unmutated obj (64958, r=shaver, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@84825 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-11 23:55:30 +00:00
brendan%mozilla.org
79aefcf7d3 Speed up js_qsort_r a bit (64065, r=mccabe, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@84368 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-04 10:13:18 +00:00
mccabe%netscape.com
61da61c5b4 Add emacs makefile modeline.
Not part of the Mozilla build.


git-svn-id: svn://10.0.0.236/trunk@84208 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-29 23:23:52 +00:00
rogerl%netscape.com
4e44ac8f21 Fix for #60164, more failure testing during exception processing.
r=mccabe, a=brendan


git-svn-id: svn://10.0.0.236/trunk@84202 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-29 22:19:09 +00:00
mccabe%netscape.com
3ca285bf65 Fix courtesy jband to quiet unused variable warning.
Move 'dlsoffset' to the block where it's used, inside #ifdef XP_MAC.

r=mccabe


git-svn-id: svn://10.0.0.236/trunk@83936 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-21 04:32:13 +00:00
brendan%mozilla.org
1f9562bcf1 Don't fatten a flyweight lock unnecessarily in JS_SetPrototype; misc. cleanups (63097, r=mccabe, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@83914 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-20 22:36:01 +00:00
mccabe%netscape.com
a7edd5be7f Fix to 62309. Change JS_AddRoot to JS_AddNamedRoot in Liveconnect to aid leak diagnoses.
r=beard
sr=brendan


git-svn-id: svn://10.0.0.236/trunk@83423 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-09 01:35:46 +00:00
mccabe%netscape.com
8db0182d42 More licenses and modelines.
Not part of the Mozilla build.


git-svn-id: svn://10.0.0.236/trunk@83402 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-08 10:19:59 +00:00
mccabe%netscape.com
fd0f0e8d79 Add informative comment.
Not part of the Mozilla build.


git-svn-id: svn://10.0.0.236/trunk@83401 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-08 10:01:35 +00:00
mccabe%netscape.com
1214194bac Whoops, wrong license.
git-svn-id: svn://10.0.0.236/trunk@83400 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-08 10:00:20 +00:00
mccabe%netscape.com
ee9dc32154 Add -p flags to several Makefile mkdir commands, to allow parallel gmakes. Still not sure how to make js/src/liveconnect/classes/*.java happy with parallel. gmakes...
Also add some #modelines to makefiles, and some more NPL licenses.

None of these files are part of the Mozilla build.


git-svn-id: svn://10.0.0.236/trunk@83399 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-08 09:56:47 +00:00
mccabe%netscape.com
c09cda8e4e Update to last fix of js.c. Multiple versions of functions #ifdef'ed to take different numbers of arguments (in C) are a pain. Use #ifdef-safe JS_GET_CLASS, instead.
Not part of the Mozilla build.


git-svn-id: svn://10.0.0.236/trunk@83397 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-08 06:30:57 +00:00