Commit Graph

3184 Commits

Author SHA1 Message Date
brendan%mozilla.org
2ea8983c5d Forgot to check this in as part of 54743's big patch, d'oh\! 2000-12-05 06:42:14 +00:00
mccabe%netscape.com
bdcc22b5e1 Fix to 45590. Beard untangled ancient and wrong code from prmjtime.c interacting with the Mac OS; 45590 is fixed by actually treating the date offset as a signed value (it should be!) rather than adding a day when east of Greenwich.
Along the way, Patrick also fixed a bug that's been with the JS engine on the mac for more than three years; used to be that Mac dates throughout the year were displayed according to the machine's *current* daylight savings time setting; now they display properly and all is well with the world.

Dependent on recent checkin fixing 61577, adding needed time library to the mac build.X

r=mccabe
2000-12-05 05:17:30 +00:00
brendan%mozilla.org
80aac2bbcf Checkin for art@halogen.kharkov.ua, bug 61899, r=mccabe, sr=brendan. 2000-12-05 03:16:41 +00:00
pschwartau%netscape.com
52aa420b05 Replaced hard-coded TZ_DIFF = -8 with a dynamically-calculated value 2000-12-05 01:47:15 +00:00
jeff.dyer%compilercompany.com
d6b97f2277 Fixed type bugs and header comments. 2000-12-04 18:47:28 +00:00
brendan%mozilla.org
5f161e7819 A bit over-aggressive with that static keyword last time... 2000-12-04 04:34:18 +00:00
brendan%mozilla.org
b4b7a14cc7 Fix NSPR_LOCK ifdefs (for JS_NO_THIN_LOCKS mode, enabled due to a configure.in bug on gcc/sparc5 systems). Fixes speedracer build bustage. 2000-12-04 04:02:27 +00:00
brendan%mozilla.org
0e3fd5e8ba All this r=mccabe, r=beard, and sr=jband -- many thanks to all who helped,
especially to jband for his great stress-test setup and particularly helpful
(in terms of reproducing bugs in draft patches) MP and laptop machines.

- Radical(*) object (scope) locking optimization: don't lock if a scope is
  accessed on the context that exclusively owns it (initially, the context
  on which the scope was created).  Once a scope becomes shared among more
  than one owner-context, give it the usual thin or fat lock, per existing
  jslock.c code.

  I did this at the memory cost of another word per JSScope, ownercx, which
  raised scope size from 12 to 13 words if !DEBUG.  I also added a linked
  list head pointer, rt->scopeSharingTodo, and a scopeSharingDone condition
  variable to JSRuntime, and a scopeToShare pointer to JSContext that's
  necessary for deadlock avoidance.

  The rt->scopeSharingTodo list links JSScopes through the scope->u.link
  union arm, which overlays the pre-existing scope->count (now u.count)
  member.  This list holds scopes still exclusively owned by a context, but
  wanted by js_LockScope calls active on other threads.  Those calls wait
  on the rt->scopeSharingDone condition, which is notified every time an
  owner-context ends the request running on it, in which code active on
  that context may be using scope freely until end of request.

  The code that waits on rt->scopeSharingDone must first suspend any and
  all requests active on the calling context, and resume those contexts
  after the wait is notified.  This means a GC could happen while the
  thread locking a scope owned by another thread's context blocks; all
  calls to JS_LOCK_OBJ must therefore first home fp->sp above any live
  operands, e.g.  The interpreter takes care to do that already.

  To avoid AB-BA deadlocks, if a js_LockScope attempt on one context finds
  that the owner-context of the scope is already waiting on a scope owned
  by the current context (or indirectly depending on such a scope lock),
  the attempt converts the scope from lock-free exclusive ownership to
  shared ownership (thin or fat lock).

- Fix js_SetupLocks and the js_LockGlobal/js_UnlockGlobal code to avoid
  divmod instruction costs, strength-reducing to bit-mask instructions.

- The radical lock-free scope change required care in handling the 0=>1
  and 1=>0 transitions of cx->requestDepth, which was till now thread-local
  because part of the JSContext not manipulated by other threads.  It's
  still updated only by cx's thread, but it is read by other threads in
  the course of attempting to claim exclusive ownership of a scope for more
  lock-free JS object operations.

- The JS_SuspendRequest and JS_ResumeRequest APIs have changed incompatibly
  to require their caller to save and restore the requestCount found when
  JS_SuspendRequest is called.  This is necessary to avoid deadlock; sorry
  for the incompatible change.

- Fixed various nits in jslock.[ch], including using Init/Finish rather
  than New/Destroy for the methods that take a JSThinLock and initialize
  and finish/free its members.  Another example: JS_ATOMIC_ADDREF is now
  JS_ATOMIC_INCREMENT and JS_ATOMIC_DECREMENT, so the two cases can be
  mapped to PR_AtomicIncrement and PR_AtomicDecrement.  This entailed
  changing jsrefcount from jsword to int32 (PRInt32).

- No need to use JS_ATOMIC_INCREMENT on JSScopeProperty.nrefs, as it is
  always and everywhere protected by the property's JSScope.lock.

- Cleaned up gratuitous casts in jscntxt.c by using &cx->links, etc.

- The lock used for mutual exclusion around both request begin and end vs.
  GC synchronization is rt->gcLock, and this lock now also protects all
  scope->ownercx pointer changes from non-null (exclusive) to null (shared),
  the rt->scopeSharingTodo/scope->u.link list operations, and of course the
  rt->scopeSharingDone condition.

  But this means that js_GC cannot hold rt->gcLock across the bulk of its
  body, in particular the mark phase, during which JS_GetPrivate calls,
  e.g., may need to "promote" scope locks from lock-free to thin or fat,
  because doing so would double-trip.  There never was any good reason to
  hold rt->gcLock so long, of course -- locks are for mutual exclusion, not
  for waiting or notifying a thread -- those operations require a condition,
  rt->gcDone, which we already use along with rt->gcLevel to keep racing GC
  attempts at bay.

  So now that rt->gcLock does not protect the mark phase, the enumeration
  of rt->gcRootsHash can race badly with JS_RemoveRootRT, an API that may
  legitimately be called outside of a request, without even a context.  It
  turns out that people may be cheating on the request model even with
  JS_AddRoot, JS_AddNamedRoot, and JS_RemoveRoot calls, so we must make
  all of those interlock with the GC using gcLevel and gcDone, unless they
  are called on the gcThread.

  Also, since bug 49816 was fixed, there has been no need for a separate
  finalize phase, or for rt->gcFinalVec.  Finalizers can no longer allocate
  newborn GC-things that might be swept (because unmarked), or double-trip
  on rt->gcLock (which is no longer held).  So js_GC finalizes as it sweeps,
  just as it did in days of old.

- I added comments to jslock.h making it plain that callers of JS_LOCK_OBJ
  and JS_UNLOCK_OBJ must either be implementations of js_ObjectOps hooks,
  or code reachable only from those hooks; or else must be predicated on
  OBJ_IS_NATIVE tests.  It turns out jsinterp.c's CACHED_GET and CACHED_SET
  macros neglected to do such tests, limiting the ability of JS embeddings
  to implement JSObjectOps with their own non-JSScope JSObjectMap subclass.
  Fixed, small performance hit that the lock-free optimization should more
  than make up for.

- jslock.c now gives a #error if you try to compile it on a platform that
  lacks a compare-and-swap instruction.  The #error says to use NSPR locks.
  Before this change, some platforms would emulate compare-and-swap using
  a global PRLock, which is always worse in runtime than using per-scope
  PRLocks.
2000-12-04 02:43:31 +00:00
jband%netscape.com
7a40c13587 remove unnecessary nested JS_{Begin,End}Request in Load. r=beard 2000-12-04 02:13:13 +00:00
cls%seawood.org
a208c58c4e Update REQUIRES. 2000-12-03 22:33:51 +00:00
pschwartau%netscape.com
f4a7e0b9b1 Removed hard-coded line var TZ_DIFF = -8. It's already set in the pre-loaded shell.js file. 2000-12-02 23:59:58 +00:00
waldemar%netscape.com
1cb8489414 Made 'super' into an operator. Added syntax for operator overloading. 2000-12-02 09:10:12 +00:00
waldemar%netscape.com
d5ecb8fde4 Added 'operator' non-reserved word 2000-12-02 09:09:41 +00:00
jeff.dyer%compilercompany.com
9187c93f00 Fixed a couple typos. 2000-12-02 02:04:51 +00:00
jeff.dyer%compilercompany.com
f9a2854819 Updated to reflect latest changes. 2000-12-02 01:49:18 +00:00
jeff.dyer%compilercompany.com
8d92d194b7 Import of Initial Source from MVCC 2000-12-02 00:46:31 +00:00
pschwartau%netscape.com
aa456cab4f Initial add; see Bugzilla bug 61266 - 2000-12-01 20:20:43 +00:00
pschwartau%netscape.com
482fa18cd7 Initial add; see Bugzilla bug 57631 2000-12-01 20:17:11 +00:00
jband%netscape.com
947e54ba96 fixes for bug 60303, bug 60356, bug 57370, and bug 58982 r=mccabe sr=hyatt sr=brendan 2000-11-30 06:58:37 +00:00
mccabe%netscape.com
51e20d88e5 Fix to 61183. Detect whether the OS has given us a date string ending in /xx (as in xx/xx/xx) for Date.prototype.toLocale[Date]String, and pad it out to the real number of digits.
r=rogerl
2000-11-30 05:52:44 +00:00
mccabe%netscape.com
2dbc59dbed Remove unused property definitions and fix some errors that had crept in. 2000-11-29 23:32:53 +00:00
mccabe%netscape.com
0c5501eef0 Twiddle Make usage message. 2000-11-29 22:36:06 +00:00
mccabe%netscape.com
45db29b063 Fix to 58673. Alias Date.prototype.toGMTString to Date.prototype.toUTCString (rather than defining seperate function objects for each). ECMA conformance.
r=rogerl
2000-11-29 03:03:05 +00:00
mccabe%netscape.com
239ac07da7 Fix to 57048. Bring the JS engine's implementation of Object.prototype.propertyIsEnumerable in line with the ECMA spec.
Thanks to David Flanagan for noticing this problem.

r=rogerl
2000-11-29 02:05:10 +00:00
mccabe%netscape.com
559fa4d1eb Restore toplevel Makefile (with an added note in the usage message about it's new limitations wrt debugger and bsf) and update the js library makefile to account for changed files. 2000-11-28 21:24:41 +00:00
nboyd%atg.com
e297628504 Fix bug 61267. 2000-11-28 16:23:24 +00:00
mstoltz%netscape.com
a62ae1df4d bug 59766. Added code to push current JS context onto context stack before all LC calls into JS, becuase the security manager looks on the context stack for permission info. r=jband, mccabe 2000-11-28 02:50:21 +00:00
beard%netscape.com
a6859a2ef4 Keep JDK 1.1 compatible. 2000-11-27 23:40:15 +00:00
nboyd%atg.com
bf6799f305 Sense JDK1.3 dependencies. 2000-11-27 22:23:40 +00:00
pschwartau%netscape.com
05e4c72c57 Removing outdated testcase. See Bugzilla bug 49233. 2000-11-27 19:39:18 +00:00
pschwartau%netscape.com
98fd208cac Removing outdated testcase. See bug 49233. 2000-11-27 19:32:41 +00:00
nboyd%atg.com
b3de2be49d Add hasProperty and use it for the 'in' operator 2000-11-27 17:46:56 +00:00
nboyd%atg.com
26ab0bb603 Fix 19734, accepting patch 2000-11-27 15:13:35 +00:00
nboyd%atg.com
0c163f803c Switch to ant for building. 2000-11-27 15:04:48 +00:00
nboyd%atg.com
0c1b050f8c Add debugger contribution from Christopher Oliver. 2000-11-27 15:00:45 +00:00
pschwartau%netscape.com
6284dfe441 Initital add - 2000-11-27 01:22:47 +00:00
pschwartau%netscape.com
c55db2b118 Adding shell.js for ECMA3 Date tests, and tests for ECMA3 15.9.5.3 - 15.9.5.7 2000-11-25 01:17:24 +00:00
beard%netscape.com
456312842b importable XML project for CWPro6. 2000-11-23 04:27:33 +00:00
beard%netscape.com
07a119a7ed removed import of non-existent org.mozilla.javascript.tools.debugger.* package. 2000-11-23 04:24:34 +00:00
nboyd%atg.com
e2c5be11b5 * Add ContextListener interface
* Add ability to access shell functions from compiled scripts, and to
  add shell functions to embedded apps more easily
2000-11-22 15:00:05 +00:00
waldemar%netscape.com
72079cafdb Added support for white space. Removed initial / production. 2000-11-21 04:07:05 +00:00
waldemar%netscape.com
bcfad386e1 Renamed simple to span 2000-11-21 04:06:44 +00:00
brendan%mozilla.org
ebcad77254 Store real JSString*, not address of auto JSSubString, in local root (60674, r=beard, sr=jband). 2000-11-21 00:51:43 +00:00
beard%netscape.com
8831ac82be updated dependencies 2000-11-21 00:31:10 +00:00
beard%netscape.com
b36e637399 added explicit getString() method to StringFormatter, and removed operator String() methods. 2000-11-21 00:29:39 +00:00
beard%netscape.com
73fda2e03f Made getStaticSlot() static, to remove warning. 2000-11-21 00:15:39 +00:00
beard%netscape.com
9c337d0b4d fixing unsigned/signed conversion warnings. 2000-11-21 00:14:55 +00:00
nboyd%atg.com
428ac32f72 Merge debugger changes into trunk. 2000-11-20 16:16:32 +00:00
nboyd%atg.com
439a621e0a Fix for updated filename. 2000-11-20 14:44:56 +00:00
cls%seawood.org
66a18fcbbf Resurrect REQUIRES so that we have some sort of means to track intermodule dependencies. Bug #59454 r=blizzard@mozilla.org 2000-11-20 07:16:06 +00:00
pavel%gingerall.cz
989cb4c77a - script compilation support (JS::CompileScript)
- compiled script may be executed (JS::exec)
- memory leak fixed
  (JSVALtoSV returning objects; magic has to to a mortal value)
2000-11-19 14:40:33 +00:00
beard%netscape.com
fa3c57b737 CW Pro 6 compatibility. 2000-11-18 03:14:07 +00:00
nboyd%atg.com
0d26acf3ed timestamping file 2000-11-18 02:24:06 +00:00
nboyd%atg.com
ec7864e0d5 Add support in Rhino for BSF without the bsfengines.jar. 2000-11-18 02:14:46 +00:00
danm%netscape.com
2c6d578e14 removing glowcode directives. won't affect you unless you use an obsolete version of glowcode. 2000-11-18 02:13:42 +00:00
nboyd%atg.com
571a5c5624 Fix 60184, and add SwingApplication.js example, with change
to shell to prevent early exit.
2000-11-17 13:05:46 +00:00
rogerl%netscape.com
e5147e7dc9 Added lexutils & exception... to default build. 2000-11-16 23:58:53 +00:00
rogerl%netscape.com
d4fc752316 Example from Waldemar's spec. 2000-11-16 23:50:37 +00:00
rogerl%netscape.com
5e1372ac60 Added BindThis argument, removed 'this' arg from Call. 2000-11-16 23:49:29 +00:00
rogerl%netscape.com
e73ca123f0 Added notion of binding a 'this' to a method to construct a mini-closure
for call semantics. Fixed MSVC warnings from lexutils. Added BindThis
instructionand removed 'this' from Call instruction (is now extracted
from target argument).
2000-11-16 23:48:42 +00:00
mccabe%netscape.com
20aac0252c Not part of the Mozilla build. Update tool paths for server build. 2000-11-16 00:03:20 +00:00
mccabe%netscape.com
5a4d42637c Not part of the Mozilla build. Add js and liveconnect config files for OSFV5.0 2000-11-15 23:57:49 +00:00
nboyd%atg.com
88a011def8 Subject:
[Rhino] importPackage() when not in Rhino shell?
        Date:
             Tue, 14 Nov 2000 09:37:39 -0000
       From:
             "Benjamin Geer" <geerb@midas-kapiti.com>
 Organization:
             Another Netscape Collabra Server User
 Newsgroups:
             netscape.public.mozilla.jseng




The importPackage() and importClass() functions provided by the Rhino shell
seems as if they would be very generally useful.  Unless I've missed
something, they don't seem to be available to scripts compiled using the
JavaScript compiler, or to scripts that are run using Script.exec().  Is
there any chance these functions could be made available for all scripts to
use?  This would save a lot of typing; one could then always write a = new
Foo() instead of a = new Package.com.baz.bar.foo.Foo().

--Benjamin Geer
2000-11-14 20:10:42 +00:00
nboyd%atg.com
0c77e5b5dc Update javadoc. 2000-11-14 20:08:53 +00:00
nboyd%atg.com
f66f393b8d Fix bug:
slobo@espial.com wrote:
>
> Hello Mike
>
> In the following test case, tester returns "undefined cat" in Rhino
> while in NN it returns "meow cat".
>
> Thanks
>
> Steven
>
> /////////////////////////////////////////////////////////////////////
> function tester(nest){
>     var nest = nest+" cat";
>     alert(nest);
>     // nest now contains the value undefined.
> }
>
> tester("meow");
2000-11-14 13:30:55 +00:00
rginda%netscape.com
2c4646c800 refactored lexer bits from icodeasm into lexutils
refactored exceptions from icodeasm into exception*
fixed LeadingCap method names to be interCapped
added string8 and string16 typedefs (as opposed to string vs String)
2000-11-14 03:11:54 +00:00
nboyd%atg.com
d550dceb79 Subject:
More changes to support non NativeJavaObject wrappers
   Date:
        Fri, 03 Nov 2000 17:56:38 +0100
   From:
        Igor Bukanov <igor@icesoft.no>
     To:
        nboyd@atg.com




Hi, Norris,

In post 1.5 rhino one can introduce own wrappers for arbitrary Java
objects. But I think to fully support this
org.mozilla.javascript.ScriptRuntime should be changes as well: its eq
and shallow_eq contain references to NativeJavaObject, this should be
replaced at least to Wrapper (see the atached patch). Even better
solution would be to add to WrapHandler methods to compare wrappers: I
can send a patch for that as well.

There is a small usability problem as well: if
org.mozilla.javascript.JavaMembers would be public I do not need to copy
it to a package with non NativeJavaObject.java wrapper.

Regards, Igor
2000-11-13 22:10:35 +00:00
jeff.dyer%compilercompany.com
7c6f29466f Fix the first startup test. 2000-11-08 21:05:58 +00:00
mccabe%netscape.com
ea579e0496 Fix to 58946.
Make try { ... } catch(exn) { return exn } work by ensuring that the return value (exn) is maintained on the stack as we pop off scopes to return from the try/catch/finally.  The newly added JSOP_SWAP opcode helps us bubble.

This fixes a regression uncovered by the fix to 56716.

(I've noticed that this causes *depend* builds of the standalone JS shell to crash on this construct, but I've tested in the Mozilla build, and the dependencies seem to solve the problem there.)

r=brendan.mozilla.org
sr=jband@netscape.com
2000-11-08 20:39:43 +00:00
beard%netscape.com
be65966d92 Replaced occurrences of $$, $1, $2 with result, first, second. CodeWarrior doesn't like $ characters in identifiers. 2000-11-08 19:50:39 +00:00
pschwartau%netscape.com
443dc25546 The const keyword is non-ECMA and not currently implemented in Rhino 2000-11-08 01:10:43 +00:00
pavel%gingerall.cz
5ea133c95a - jsperl.c compiled with js programm, not with libjs
- better JS value tie methods
- memory leaks fixed
- support of digging native js error from exception
2000-11-07 15:24:49 +00:00
nboyd%atg.com
629043f2b8 Clean up debug APIs 2000-11-07 03:20:56 +00:00
rogerl%netscape.com
ec89b08c8b Fixed warnings & bogus qualifier. 2000-11-07 01:09:45 +00:00
rogerl%netscape.com
d2f5ecf8ff Fixed statics and constructors bitrot. 2000-11-07 00:59:27 +00:00
rogerl%netscape.com
3e4ebc2d54 More tests and changed 'verify' to live separately. 2000-11-07 00:58:42 +00:00
rogerl%netscape.com
30fd08d267 Testcase for adding setter to non-final field. 2000-11-06 23:00:00 +00:00
rogerl%netscape.com
67413c204e Fixed compare bugs. Report results from js2 test cases. Rewrote generic
equal to match ECMA 1.5
2000-11-06 22:57:10 +00:00
waldemar%netscape.com
3bc827cfed Defined UseIncludesExcludes. Removed support for a:🅱️:c. 2000-11-04 10:47:47 +00:00
waldemar%netscape.com
8b66cf247e Added 'include' and 'exclude' non-reserved words 2000-11-04 10:46:24 +00:00
mccabe%netscape.com
ca67aac5d5 Fix to 58008. Add missing ECMA-specified fuctions Date.prototype.toDateString, toTimeString, toLocaleDateString, toLocaleTimeString. Commoned some code to toLocale_helper and date_format.
Also make several formerly class static variables lazily initialized.
2000-11-03 21:28:49 +00:00
rogerl%netscape.com
2322a26c61 More tests 2000-11-03 02:42:23 +00:00
rogerl%netscape.com
06dade6b2e Fixed adding setter to virtual inherited field. 2000-11-03 02:42:01 +00:00
pschwartau%netscape.com
df5477c1c4 initial add 2000-11-03 02:27:44 +00:00
jeff.dyer%compilercompany.com
125d51cbe9 Don't care if required named come after optional named parameters. 2000-11-03 01:44:30 +00:00
rogerl%netscape.com
854f8c34f8 Fixed bogus rest reference, added named tests. 2000-11-02 19:40:42 +00:00
mccabe%netscape.com
6af283c263 Fix previous fix to conform to brendan-nit. 2000-11-02 03:38:09 +00:00
mccabe%netscape.com
b37e1ddf8a Fix to 58007. Add Date.prototype.toDateString, toTimeString methods, by commoning existing date_format helper function with toString. ECMA-262 ed. 3 conformance.
r=brendan@mozilla.org
sr=jband@mozilla.org
2000-11-01 23:57:37 +00:00
nboyd%atg.com
c82387d076 Upgrade to Ant 1.2 and remove deprecated tasks. 2000-11-01 18:43:55 +00:00
rogerl%netscape.com
0ad52b2c9b Fixed signed/unsigned whinage. 2000-11-01 02:04:04 +00:00
rogerl%netscape.com
25a870f386 Simple call tests. 2000-11-01 01:55:46 +00:00
rogerl%netscape.com
25d50d736d Fixed rest parameter index handling. 2000-11-01 01:55:13 +00:00
rogerl%netscape.com
c6dbe02e61 Fixed signed/unsigned whine. 2000-11-01 01:48:15 +00:00
rogerl%netscape.com
c8d1c1d0bb Fixed JSArray for 1.5 semantics stuff. Changed readEvalFile to stop
doing line at a time nonsense. Fixed ExprNode::Index cases to use
InvokeExprNode instead of Binary.
2000-11-01 01:39:43 +00:00
mccabe%netscape.com
a6e9551a7c Fix sense of don't-fail-on-warning check propagated from js.c.
Thanks to John Bandhauer for the catch.

Not part of Mozilla.
2000-10-30 22:42:48 +00:00
nboyd%atg.com
2a73169e97 Fix bug 57060 for/in loop enumerates array elements as numbers, not strings 2000-10-30 19:46:02 +00:00
nboyd%atg.com
0470e048ab Fix bugs:
56318  function literals with names don't work right
57045  negative integers as object properties: weird behavior
58479  functions defined within conditional phrases are always crea
2000-10-30 19:34:11 +00:00
shaver%mozilla.org
3b105350a3 #56716, run finally{} before return from try{}/catch{}, r=mccabe, sr=brendan 2000-10-29 18:54:58 +00:00
brendan%mozilla.org
bc3f635a48 Use 0 - i rather than -i to avoid unsigned warning on Windows. 2000-10-29 18:08:40 +00:00
nboyd%atg.com
13c17e9f43 Fix formatting 2000-10-29 18:07:26 +00:00
brendan%mozilla.org
12e9876d3d Handle negative-int-fits-in-jsval string literals as property names equivalent to their int conversions (57043, r=shaver, sr=jband). 2000-10-29 01:30:16 +00:00
waldemar%netscape.com
76e8bcd8d6 Allowed multiple units in a unit expression 2000-10-28 05:55:47 +00:00
waldemar%netscape.com
e84153e3fc Renamed OrdinaryInitialIdentifierCharacter and OrdinaryContinuingIdentifierCharacter to InitialIdentifierCharacter and ContinuingIdentifierCharacter 2000-10-28 05:55:19 +00:00
waldemar%netscape.com
4489b4c7f0 Initial version 2000-10-28 05:54:44 +00:00
waldemar%netscape.com
8df2f5a1c4 Added JS20/Units 2000-10-28 05:53:23 +00:00
rogerl%netscape.com
71aae60c11 Fixed gcc whine about char16. 2000-10-28 00:07:36 +00:00
rogerl%netscape.com
2d9a47fce0 Removed unused parameter. 2000-10-28 00:01:58 +00:00
rogerl%netscape.com
ddf915e607 Named parameter work. 2000-10-27 23:55:31 +00:00
nboyd%atg.com
af79f7675a Add javadoc. 2000-10-27 20:17:56 +00:00
nboyd%atg.com
577b2d7b62 Fix tree and icode printing. 2000-10-27 20:17:19 +00:00
mccabe%netscape.com
bf56ffa531 Changes to update standalone JavaScript and Liveconnect library builds to the New Era of NSPR 4 and JDK 1.2.
Fixes for OSF; they they assume the existence of /share/builds/components/[jdk|nspr]/SOME_VERSION/etc/etc.  Sorry, external folks!

Not part of the Mozilla build.
2000-10-27 01:10:09 +00:00
mccabe%netscape.com
eedc61dabe Changes to update standalone JavaScript and Liveconnect library builds to the New Era of NSPR 4 and JDK 1.2.
Fixes for Linux and SunOS; they assume the existence of /share/builds/components/[jdk|nspr]/SOME_VERSION/etc/etc.  Sorry, external folks!

Not part of the Mozilla build.
2000-10-27 00:08:31 +00:00
mccabe%netscape.com
cf952461b1 Fix standalone liveconnect build to not complain about missing fdlibm when asked to clean or clobber.
Not part of the Mozilla build.
2000-10-26 23:48:16 +00:00
mccabe%netscape.com
acde6ae541 Make commandline shells for javascript and xpconnect-enabled javascript not return failure error codes when a warning occurs.
The failure codes were confusing our test drivers.

Not part of the Mozilla product.
2000-10-26 23:45:43 +00:00
jeff.dyer%compilercompany.com
e48821d2b3 Added a couple missing redesignates. 2000-10-26 19:51:31 +00:00
beard%netscape.com
6822ac75c4 adding nodefactory.h to dependency mix 2000-10-26 03:43:41 +00:00
beard%netscape.com
7ac1d2ad6d fixing confusing code for linux, static Arena() -> getArena() 2000-10-26 03:40:51 +00:00
mccabe%netscape.com
0073517078 Add magic emacs modeline comment to make it display in Makefile mode.
Not part of the Mozilla build.
2000-10-26 02:59:03 +00:00
mccabe%netscape.com
8533da2b3b Add magic emacs modeline comment to make it display in Makefile mode.
Not part of the Mozilla build.
2000-10-26 02:13:07 +00:00
jeff.dyer%compilercompany.com
83f1b1e028 Added to FunctionDefinition a pointer that marks the position in the
parameter list that the named parameter marker occurs. The names at or
after that position may or may not have aliases associated with them.
2000-10-25 12:46:23 +00:00
brendan%mozilla.org
1dbf40a31a Fix obj.toSource to get attributes using the object in which id was found (56482, r=jband, sr=shaver). 2000-10-25 07:00:31 +00:00
brendan%mozilla.org
cfb8447863 Home sp before calling js_ValueToStringAtom and js_ValueToFunction (bug 57826, r=mccabe, sr=jband). 2000-10-25 04:04:29 +00:00
jeff.dyer%compilercompany.com
bee1460e55 Fix assertions that I missed in partial debug mode. Also fixed problem with
optional parameter after the named parameter marker.
2000-10-23 22:23:32 +00:00
jeff.dyer%compilercompany.com
2fe8a9cd77 Parsing named parameters and arguments according to the Sep-23rd revision
of the grammar. WARNING: struct VariableBinding has grown. Recompile all
after getting this revision.
2000-10-23 19:39:55 +00:00
nboyd%atg.com
116febeef1 Subject:
[Rhino] Optimization for OptRuntime.thisGet
        Date:
             Mon, 23 Oct 2000 17:50:53 +0200
       From:
             Hannes Wallnoefer <hannes@helma.at>
 Organization:
             Another Netscape Collabra Server User
 Newsgroups:
             netscape.public.mozilla.jseng




I found a little oddity in
org.mozilla.javascript.optimizer.OptRuntime.thisGet().

get() is called twice on thisObj, once right at the beginning, and once
when starting to walk down the prototype chain. Below is what I think
this should look like - the prototype walk now begins with thisObj's
prototype, if it exists.

Also, (thisObj == null) was checked only after thisObj.get() was called,
so I moved that up in front.

Hannes
PS: I just made the changes in the news msg editor, so there may be
stupid mistakes.
2000-10-23 17:48:27 +00:00
nboyd%atg.com
006574d547 Subject:
updated Global, Main and ImporterTopLevel
   Date:
        Mon, 23 Oct 2000 14:37:45 +0100
   From:
        Matthias Radestock <matthias@lshift.net>
     To:
        nboyd@atg.com




Norris,

I've made some more changes to shell.Main and shell.Global in order to
reduce their mutual dependency, enable "quit" and get "load" to operate
in the local scope.

see attachments for updated .diffs.


Matthias.
2000-10-23 15:55:42 +00:00
beard%netscape.com
26cffce30e Fixed typo in package target. 2000-10-23 15:44:05 +00:00
nboyd%atg.com
ca002f3c20 Fix 56883. 2000-10-23 14:31:05 +00:00
nboyd%atg.com
ec341691ee Patch from beard@netscape.com to fix 56879. 2000-10-23 14:30:40 +00:00
brendan%mozilla.org
d910b78a0c Comment change only: document TOK_TRY and TOK_CATCH nodes. 2000-10-22 22:47:40 +00:00
beard%netscape.com
b4afdbb7d0 Fixed access paths, link errors. [Not part of build.] 2000-10-21 07:29:53 +00:00
beard%netscape.com
115a9169e3 Added static library targets, JSRef.o and JSRefDebug.o. [Not part of build.] 2000-10-21 06:46:21 +00:00
beard%netscape.com
306fcd0fcf LiveConnect support for Mac. [Not part of standard build.] 2000-10-21 06:44:54 +00:00
beard%netscape.com
f6446960c2 fixed some spacing problems, Makefiles use hard tabs! 2000-10-21 00:57:54 +00:00
beard%netscape.com
60dcd1863c update depenencies for linux 2000-10-21 00:55:59 +00:00
beard%netscape.com
7b4dd42256 added xmlparser.cpp. 2000-10-21 00:51:32 +00:00
beard%netscape.com
f34200b426 fixing unsigned warnings, a leetle error checking. 2000-10-21 00:50:44 +00:00
beard%netscape.com
88fee00305 fixing unsigned/signed conversion warnings. 2000-10-21 00:43:35 +00:00
rogerl%netscape.com
1e4fe6a77b Fixed signed/unsigned warning. 2000-10-21 00:38:59 +00:00
rogerl%netscape.com
0d709f17f8 Changed ArgumentList to ArgumentList*. (Still need to handle the
destructor though).
2000-10-21 00:31:22 +00:00
rogerl%netscape.com
699cd8646f Changed ArgumentList to ArgumentList*. Changed ICodeGenerator to take a
Context instead of world & global pair. Connected to ICodeAssembler from
XMLParser.
2000-10-21 00:30:23 +00:00
rginda%netscape.com
ac1ca3b9f0 fixups for lame windows parser, and multiple parse per instance issues. 2000-10-20 22:18:52 +00:00
rginda%netscape.com
fdb5df401b lalala, things run, lalala. (well, kinda.) 2000-10-20 10:33:57 +00:00
rginda%netscape.com
d4c43e16e7 more work on producing real live instructionstreams 2000-10-20 03:33:37 +00:00
rginda%netscape.com
70055678b6 starting to turn the icode StatementNode vector into actual Instructions... 2000-10-20 01:13:03 +00:00
rogerl%netscape.com
5edeb1ee3d changes to XMLLexer etc. 2000-10-19 23:07:58 +00:00
rogerl%netscape.com
dca0647bab Adding xmlparser stuff 2000-10-19 22:34:23 +00:00
brendan%mozilla.org
1ccb4a996e - Treat 08, 09, 078, 079, etc. as decimal, but warn that they're not legal
ECMA-262 octal literals.  Old code would split 08 into 0 and 8 if JS1.2 or
  other non-ECMA version, and always split 078 into 07 and 8, resulting in
  missing ; syntax errors.

- Fix CheckFinalReturn to be aware of JS_HAS_EXCEPTIONS, finally (sic).  Lots
  of help from jag (Peter Annema, disttsc@bart.nl), thank him.

Both changes got lumped under bug 49233, and are r=jband, sr=shaver.
2000-10-19 19:21:53 +00:00
jeff.dyer%compilercompany.com
c194d27da3 b=53849, r=mstoltz@netscape.com,edburns@acm.org, a=brendan@mozilla.org.
This fix makes Liveconnect smarter about getting a security principal
when verifying that call from an applet to JS should be allowed.
2000-10-19 11:51:22 +00:00
beard%netscape.com
a85ec92774 More const String& happiness. 2000-10-19 03:37:02 +00:00
beard%netscape.com
1352d297a2 const String& to soothe g++ 2000-10-19 03:33:51 +00:00
beard%netscape.com
6561f9adaf Fixing linux breakage, incorrect constructor name. 2000-10-19 03:32:23 +00:00
rginda%netscape.com
05f1f7e5e5 made (most) parse*operand functions do the right thing... the rest choke for now. 2000-10-19 00:03:12 +00:00
rogerl%netscape.com
68b8fcce5f More warning whining. 2000-10-19 00:02:37 +00:00
rogerl%netscape.com
216cd29273 Quiet warnings 2000-10-18 23:55:47 +00:00
rogerl%netscape.com
274ac67b4a Added icodeasm & xmlparser to build 2000-10-18 23:46:39 +00:00
rogerl%netscape.com
7806a764aa Added XMLparsing to load a class. Fixed handling of forward references to
class methods/fields.
2000-10-18 23:37:44 +00:00
brendan%mozilla.org
c2d6de8a37 Don't nuke the stackPool in JS_GC if it's in use by cx->stackHeaders or cx->fp (or other future users; 57096, r=shaver, a=jband). 2000-10-18 22:21:46 +00:00
rginda%netscape.com
f983d862e9 making argument name optional in argumetlists 2000-10-18 22:01:17 +00:00
rginda%netscape.com
2662739c56 waugh, "..." isn't supported on windows. Added full icode map generated by the new perl script. Added a comment character to the assembler, and required newlines after instructions. 2000-10-18 20:44:14 +00:00
rginda%netscape.com
83ad281615 adding genmap.pl to generate the icode map 2000-10-18 20:41:03 +00:00
brendan%mozilla.org
e582a264b6 Fix cx-for-acx typo-blunder (57070, r=mccabe, a=jband). 2000-10-18 16:00:39 +00:00
rginda%netscape.com
80d2831bce fixed testcase and icodemap size 2000-10-18 04:33:54 +00:00
rginda%netscape.com
8d5c21f096 whee! the parse "tree" minimally "works" 2000-10-18 03:12:42 +00:00
rginda%netscape.com
9a4a9a865d more icodeasm work... parse "tree" is finally testable... it might even work. 2000-10-18 01:02:13 +00:00
rginda%netscape.com
ab377fd783 working in labels 2000-10-17 08:02:16 +00:00
rginda%netscape.com
169089589e icode assembler changes 2000-10-17 00:41:54 +00:00
jband%netscape.com
2fd2e32188 fix crasher bug 56843 in case of if('wrappedJSObject' in foo). Better solution for bigger problem in the works. a=brendan@mozilla.org r=shaver@mozilla.org 2000-10-16 22:34:26 +00:00
jband%netscape.com
af4e110500 remove JS gc roots on wrappedjs objects during xpconnect shutdown to avoid needless rooting and noise in root leak logs. bug 55426. a=brendan@mozilla.org r=mccabe@netscape.com 2000-10-15 05:42:25 +00:00
jband%netscape.com
c88c9a1fa4 only emit leaked root warnings when the JSRuntime is being deleted. This changes around the fix of bug 55117 and cleans up the incorrect leaked root warnings in bug 55426. a=brendan@mozilla.org r=mccabe@netscape.com 2000-10-15 00:20:48 +00:00
rginda%netscape.com
6a0f4f16a9 guess what? yep, more icode asm hacking. 2000-10-14 00:06:42 +00:00
rogerl%netscape.com
6331af284f Bug #46196, a=brendan, r=mccabe. Fixed recursive death in out of memory
situation.
2000-10-13 22:11:52 +00:00
brendan%mozilla.org
4174a19961 Checking in for rogerl (53614, r=mccabe, a=me). 2000-10-13 01:58:40 +00:00
rginda%netscape.com
074349e52d adding some comments 2000-10-12 23:59:25 +00:00
rginda%netscape.com
f74b1d34dd icode assembler still in progress 2000-10-12 23:58:51 +00:00
rginda%netscape.com
cdb2f4b71c move # to first column for Very Lame Compilers. 2000-10-12 23:58:30 +00:00
nboyd%atg.com
024a61b8eb Fix bug 56185. 2000-10-12 16:10:55 +00:00
nboyd%atg.com
dbbc5437de Fix bug 56158 2000-10-12 14:59:19 +00:00
rginda%netscape.com
a7476e025b more icodeasm hacks 2000-10-12 07:55:13 +00:00
beard%netscape.com
4966a3bd51 Outer class loader support, using ClassManager. 2000-10-12 06:30:29 +00:00
rginda%netscape.com
fad36a7a42 more hacking (flailing, maybe) on the icode assembler 2000-10-12 01:32:01 +00:00
rginda%netscape.com
8cf3b758ad initial checkin of simple query script for the icode hash 2000-10-12 01:31:33 +00:00
rogerl%netscape.com
8b43517097 Bug #55114, a=brendan, r=mccabe. Fixed failure in enumerating Java string
objects.
2000-10-12 01:23:13 +00:00
rogerl%netscape.com
629af4f7ab Bug #53614, a=brendan,r=mccabe. Fixed crash for calling RegExp literal. 2000-10-12 00:18:40 +00:00
rogerl%netscape.com
9573843374 Bug #52479 , a=brendan,r=mccabe. Fixed crash on bad \uXXXX in input. 2000-10-11 22:34:40 +00:00
rginda%netscape.com
efb89b56d0 initial checkin of icode assembler 2000-10-11 02:44:14 +00:00
rginda%netscape.com
a5b6788b8d seperate icode hash into module 2000-10-11 02:42:39 +00:00
waldemar%netscape.com
7d5f2e430b Added s flag 2000-10-11 02:28:13 +00:00
beard%netscape.com
db34dd11a5 Map all exceptions to just return null. 2000-10-10 18:14:20 +00:00
nboyd%atg.com
4a13805f10 More javadoc. 2000-10-10 14:58:47 +00:00
waldemar%netscape.com
bdc17dc404 Changed classof x to x.class. Removed eval. Made include be a non-reserved word. Changed syntax of import to allow an automatic use of selected namespaces. 2000-10-10 02:49:34 +00:00
waldemar%netscape.com
98479bac77 Removed "eval" and "include" keywords 2000-10-10 02:48:17 +00:00
rogerl%netscape.com
1db3618a98 Mods for getter/setter methods. 2000-10-09 22:21:26 +00:00
rogerl%netscape.com
f9deb5124e Bug #54408, r=mccabe, a=brendan. LiveConnect top-level property names
predefined readonly.
2000-10-09 21:39:22 +00:00
beard%netscape.com
0adc2a998b Added ClassManager.java. 2000-10-09 18:16:06 +00:00
beard%netscape.com
c45770cc40 Manages interactions with outer class loaders. 2000-10-09 17:43:51 +00:00
brendan%mozilla.org
616048726d Remove not-found property caching (55624, r=shaver a=jband). 2000-10-09 14:38:21 +00:00
nboyd%atg.com
890b3a1a48 Add support for new Ant-based buildfile. 2000-10-06 16:26:17 +00:00
nboyd%atg.com
d8cbaa15f2 Remove reference that javadoc couldn't find 2000-10-06 16:25:36 +00:00
nboyd%atg.com
f8476f784b Reformat code. 2000-10-06 16:25:14 +00:00
mccabe%netscape.com
4af35f0767 Fix to 55117. Warn on DEBUG of any GC roots remaining at engine shutdown.
r=rogerl@netscape.com
a=brendan@mozilla.org
2000-10-05 21:55:38 +00:00
jband%netscape.com
1fde59425a fix bug 55139. fix broken JSObject parenting of wrapped natives for JS components. r=shaver@mozilla.org a=brendan@mozilla.org 2000-10-05 04:15:43 +00:00
jband%netscape.com
48b834136a part of bug 55139. Add debug only diagnostic code for dump JSObjects. r=shaver@mozilla.org a=brendan@mozilla.org 2000-10-05 04:13:53 +00:00
jband%netscape.com
b34f60f9ae fix bug 55151. This fixes a trunk only regression caused by me in a previous checkin. I missed that an 'if' block contained both a report of an error (that we might want to skip) and also a few lines of necessary error handling code. r=mccabe@netscape.com a=brendan@mozilla.org 2000-10-05 04:13:48 +00:00
brendan%mozilla.org
1e327cdaa4 Fix old bug that stored iter_state even after OBJ_ENUMERATE error (55201, r=rogerl, a=jband). 2000-10-05 00:43:17 +00:00
nboyd%atg.com
ac09dd90be Allow superclass to appear anywhere in the list of classes in the JavaAdapter argument list. 2000-10-03 18:34:02 +00:00
beard%netscape.com
f6acc78141 avoid an infinite loop on EOF. 2000-10-03 06:23:11 +00:00
nboyd%atg.com
f294ddcb34 Avoid creating multiple wrappers. 2000-10-02 20:46:08 +00:00
nboyd%atg.com
7a015db6df Do cheap test first. 2000-10-02 17:10:00 +00:00
jband%netscape.com
b1a79c9199 Mostly submitted patches...
- Fix bug 54264 from Jon Smirl <jonsmirl@mediaone.net>
  Do cleanup of thread local storage on main thread.

- Fix bug 54275 from Jon Smirl <jonsmirl@mediaone.net>
  Release components in shell before shutting down xpcom

- Fix bug 54310 from Jon Smirl <jonsmirl@mediaone.net>
  Call JS_DestroyScript in xpcshell and js.c

- Fix bug 54352 from Jon Smirl <jonsmirl@mediaone.net>
  Cleanup what static data we can in xpclog.

- Initial fix of bug 54473
  Don't report warnings as errors in wrapped JS calls.

- Fix bug 54462 from Mark Hammond <MarkH@ActiveState.com>
  Fix jband's stupid use of uint8 for method indexes.

- Use environment rather than prefs for #ifdef'd debug options

- Don't report NS_ERROR_FACTORY_REGISTER_AGAIN as an error.

r=mccabe@netscape.com a=jband@netscape.com
2000-09-30 08:16:09 +00:00
mccabe%netscape.com
465dd07c7a Propagate fix to 41872 from the standalone JS shell to the standalone XPConnect-enabled JS shell. Make warnings on by default in the standalone JS shell, and introduce the -W option to suppress warnings if needed. Retained the -w option (enable warnings) in case somebody was using it.
This file doesn't go into the Mozilla distribution.

r=brendan,r=jband
2000-09-30 01:42:29 +00:00
mccabe%netscape.com
d11d44e014 Fix to 41872. Make warnings on by default in the standalone JS shell, and introduce the -W option to suppress warnings if needed. Retained the -w option (enable warnings) in case somebody was using it.
This file is not part of the Mozilla build.

r=brendan
2000-09-30 00:24:22 +00:00
nboyd%atg.com
d52574f9e0 Allow null returns from SecuritySupport methods if someone only
wants to implement LiveConnect filtering
2000-09-29 13:49:47 +00:00
brendan%mozilla.org
9f53fa4c3a Fix bungled GC_KEEP_ATOMS logic (51954, r=mccabe, a=jband). 2000-09-29 00:18:15 +00:00
brendan%mozilla.org
b28c211264 Don't leave fp->sp above fp->spbase when returning, js_Invoke may GC on the way out (53123, r=mccabe, a=jband). 2000-09-29 00:11:49 +00:00
cls%seawood.org
cee73d49c2 Do not use c++ comments in c file. Breaks WS5.0 compiler. 2000-09-28 08:08:02 +00:00
mccabe%netscape.com
fe00fedb87 Fix to 54307. Patch courtesy Jon Smirl <jon@mediaone.net>.
Clean up several locks that jsdtoa uses, when JS_THREADSAFE.

a=brendan
r=mccabe
2000-09-28 05:14:32 +00:00
mccabe%netscape.com
2b876917e6 Remove unused function prototype.
r=jband
2000-09-28 02:47:40 +00:00
mccabe%netscape.com
bec36231b6 Fix to 54305, free array holding fat locks. Patch courtesy Jon Smirl <jonsmirl@mediaone.net>.
a=brendan
r=mccabe
2000-09-27 21:52:27 +00:00
jband%netscape.com
c54594db31 NOT PART OF BUILD. fixing tools bustage 2000-09-26 10:23:23 +00:00
pschwartau%netscape.com
2e458fb55e Adding new test case for scope check and creating js1_5 test suite. 2000-09-25 21:24:09 +00:00
nboyd%atg.com
f9df3eebdf Miscellaneous formatting changes. 2000-09-25 14:07:45 +00:00
nboyd%atg.com
cca63b74af Drop unneeded references. 2000-09-25 14:06:47 +00:00
nboyd%atg.com
7c22356d9a Fix enum.js regression. 2000-09-25 14:04:20 +00:00
waldemar%netscape.com
ec904909e9 Added void and classof operators 2000-09-24 06:08:53 +00:00
waldemar%netscape.com
4e0482b40b Made implements clauses js2-only 2000-09-23 08:15:06 +00:00
brendan%mozilla.org
cd4a57e441 Fix two distinct bugs with similar symptoms (53123, r=law, a=jband). 2000-09-23 01:23:53 +00:00
jeff.dyer%compilercompany.com
5db74564d0 #45692:r=edburns,a=brendan. Followup fixes for oji liveconnect security. 2000-09-22 13:48:20 +00:00
waldemar%netscape.com
e020824d43 Major revisions for Sep 18 and 21 language changes 2000-09-22 08:16:22 +00:00
waldemar%netscape.com
20e9a49178 Removed "constructor" keyword 2000-09-22 08:14:56 +00:00
jband%netscape.com
dba5e6f4f1 - Use the thread context service rather than our own JSContext. This makes
us less unthreadsafe. Use THREADSAFE nsISupports impl macro. bug 52936
- Add JS_{Begin,End}Request. bug 39373
- Call xpc->InitClass on each global - not just the superglobal. bug 52591
- Remove some gotos using auto classes for cleanup.
- Converted WITH_SERVICE calls to do_GetService.
- Consistent placement of contractID strings.
a=shaver@mozilla.org
2000-09-21 04:30:32 +00:00
jband%netscape.com
1d7edfaa2e rest of the fix for bug 53268. a=brendan@mozilla.org 2000-09-21 03:56:42 +00:00
brendan%mozilla.org
3fb6399734 Fix 53268, r=jband. 2000-09-21 01:37:02 +00:00
rogerl%netscape.com
6a6ec06924 Cleanup warning fix. 2000-09-19 20:56:49 +00:00
rogerl%netscape.com
6f4f3db7ad Fixed warnings for gcc build. 2000-09-19 20:35:05 +00:00
beard%netscape.com
63c790b90b Fixed startup/terminate routines. 2000-09-19 05:38:23 +00:00
beard%netscape.com
560a653ad5 [Not part of build] Really increase default heap size, to 8192. 2000-09-19 02:50:00 +00:00
beard%netscape.com
353f308977 Bumped up memory/stack. 2000-09-19 02:34:41 +00:00
brendan%mozilla.org
293ddb04d6 Add strict warning for undefined property reference (foo.bar where bar names no object in foo or its prototypes; r=jband). 2000-09-19 02:24:11 +00:00
brendan%mozilla.org
dc510bc6a5 Fix JS_BeginRequest to avoid self-deadlock if called from a finalizer (52808, r=jband). 2000-09-19 02:18:17 +00:00
jband%netscape.com
8769f0cf40 fix shutdown crasher bug 52940. We can't leave the thread context stack service thinking that the context we are about to delete is still valid. a,r=brendan@mozilla.org 2000-09-19 01:09:48 +00:00
beard%netscape.com
0c16b3c574 Create SIOUX console with menus, etc. r=jband, a=brendan 2000-09-18 23:49:46 +00:00
brendan%mozilla.org
bea5c86c60 Censor all Call objects, per ECMA-262 (r=rogerl, 53037). 2000-09-18 23:35:22 +00:00
brendan%mozilla.org
7f91358ad8 - Fix encodeURI, decodeURI, etc. common subroutines to avoid realloc'ing char
by char, by using a larger chunk size (64 chars) for linear growth.  Also got
  rid of ASCII-oriented add_bytes subroutine and related sprintf usage.
- Avoid reloading loop invariant str->chars all the time in encode and decode.
- Avoid creating garbage strings for unescaped and reserved character sets, by
  using statically initialized jschar array constants.
- Expand tabs, clean up 80th column violations, use prevailing style, etc.
2000-09-18 22:17:30 +00:00
nboyd%atg.com
26a444c83d Expand javadoc. 2000-09-18 18:38:02 +00:00
nboyd%atg.com
358852ab05 Remove old-style debug codegen. 2000-09-18 17:57:02 +00:00
nboyd%atg.com
7f1be5b439 Better error message for common error. 2000-09-18 17:28:59 +00:00
beard%netscape.com
d91a2944d5 Make XPC shell compile on XP_MAC. r=jband, a=brendan 2000-09-17 15:34:39 +00:00
jband%netscape.com
6cca586d48 NOT PART OF BUILD. Fix xpconenct test uses of progids missed in the big progid to contractid renaming 2000-09-16 22:17:23 +00:00
brendan%mozilla.org
3fae06f653 - Back out part of patch from tlundeen@webcrossing.com, my fault for taking it
in part (the entire patch made JSContexts ref-counted, but that is not an API
  compatible change, and it doesn't help clean up at JS_Finish time if the API
  user leaks JSContext refs anyway).  52835, r=jband.
- First part of 64-bit portability fix for 52792, r=jnance.  More work needed.
- Fix bogus assert and minimization in js_AllocStack, too.
2000-09-16 22:17:22 +00:00
jband%netscape.com
8b640618cc NOT PART OF BUILD. Fix xpconenct test uses of progids missed in the big progid to contractid renaming 2000-09-16 21:47:32 +00:00
beard%netscape.com
11d6570dc7 [Not part of build] Project to build XPConnect shell testbed. 2000-09-16 02:43:29 +00:00
jband%netscape.com
fae201b405 fix bug 39373. make xpconnect calls into JS within a request for safety. a,r=brendan@mozilla.org 2000-09-15 06:59:38 +00:00
jband%netscape.com
317a99cdd1 fix bug 52579. Avoid infinite recursion dialog when JS is run by xpconnect on DOM context. a,r=brendan@mozilla.org 2000-09-15 06:17:08 +00:00
brendan%mozilla.org
324d1a170d Better patch for bug and bogus assertion found by rogerc@geocast.com. 2000-09-15 06:05:28 +00:00
rayw%netscape.com
3cd14f5878 Bug fix for 52648 -- remaining stash of progids which I missed on
the mega-change yesterday.  This will fix a few more issues.

r=warren
2000-09-14 23:20:49 +00:00
rogerl%netscape.com
b9fca9000b Bug #46429. r=rginda. Fixed bug in nested quantifiers. 2000-09-14 22:39:21 +00:00
brendan%mozilla.org
81ead0f52a Fix bogus new assertion in js_AllocGCThing (r=rogerc@geocast.com). 2000-09-14 19:58:11 +00:00
brendan%mozilla.org
76a1bda8a7 Fixes to make JS GC truly exact:
- All jsvals for which JSVAL_IS_GCTHING evaluates to true must contain tagged
pointers into the GC heap -- therefore jsapi.c's JS_DefineConstDoubles cannot
"cheat" by tagging addresses of static jsdoubles to avoid js_NewNumberValue.

- Finalization is now interleaved with the Sweep phase, to avoid allocating
memory for finalization records while sweeping.  Instead, the JSRuntime holds a
preallocated JSGCThing vector (gcFinalVec) that the Sweep phase fills and
flushes via gc_finalize_phase, repeatedly.

This means that finalizers cannot allocate a new GC thing, an incompatible but
plausible change.  js_AllocGCThing asserts and then checks whether it is called
while rt->gcLevel is non-zero, and fails the allocation attempt if so.  But this
fixes bug 38942, where the old sweep-then-finalize with a sweep => malloc
dependency could lead to memory exhaustion.

- Instead of scanning whole stackPool arenas, which led to UMRs (bug 27924) and
sometimes to gross over-scanning that depended on the GC bounds-checking all
thing pointers against its heap, we scan exactly those stack slots in use:
  - arguments reachable from fp->argv;
  - variables reachable from fp->vars;
  - operands now reachable from fp->spbase, bounded above by the lesser of
    fp->sp or fp->spbase + fp->script->depth for an interpreted frame; if the
    latter, fp->sp has advanced logically above the operand budget, in order to
    call a native method, and all unused slots from fp->sp up to depth slots
    above fp->spbase must be set to JSVAL_VOID;
  - stack segments pushed when calling native methods, prefixed by JSStackHeader
    structs and linked from cx->stackSegments through each header.
The stack segment headers help the GC avoid scanning unused portions of the
stack: the generating pc slots running depth slots below fp->spbase, and slots
at the end of an arena that aren't sufficient to satisfy a contiguous allocation
for more args, vars, or operands.

- Exact GC means the stack pointer must remain above live operands until the
interpreter is done with them, so jsinterp.c got heavily whacked.  Instead of
POPs of various kinds followed by a PUSH for binary operators (e.g.), we use
FETCH and STORE macros that index by -1 and -2 from sp, and minimize adjustments
to sp.  When sp is homed to fp->sp, this allows js_DecompileValueGenerator to
find the value reliably, and if possible its generating pc.

- Finally, the O(n**2) growth rate of gc_find_flags has been fixed, using the
scheme sketched in bug 49816 and documented in a new major comment in jsgc.c.
Briefly, by allocating flags and things from one arena, we can align things on
1024-byte "thing page" boundaries, and use JSGCPageInfo headers in each page to
find a given thing's flags in O(1) time.

/be
2000-09-14 06:14:45 +00:00
rayw%netscape.com
f00b08f5d0 fix to mal-formed contract id introduced in mega-check-in:x 2000-09-14 04:18:07 +00:00
rayw%netscape.com
0257791053 Bug 37275, Changing value of all progids, and changing everywhere a progid
is mentioned to mention a contractid, including in identifiers.

r=warren
2000-09-13 23:57:52 +00:00
brendan%mozilla.org
ba1429cb0b Fix uninitialized var bug found by one warning, silence another that's a can't-happen (r=jwbaker@acm.org). 2000-09-12 19:42:01 +00:00
nboyd%atg.com
5e562540ba Fix infinite loop in new code. 2000-09-12 17:06:15 +00:00
jeff.dyer%compilercompany.com
abacae9d59 b=45692 r=rogerl a=brendan: Enable liveconnect security. 2000-09-12 11:50:49 +00:00
beard%netscape.com
7cfe830e81 Fixing scope problems on Linux 2000-09-12 00:53:33 +00:00
waldemar%netscape.com
1a342812e7 Renamed target files 2000-09-11 23:49:53 +00:00
rogerl%netscape.com
9538af446c Removed unnecessary arg. from Call instruction. 2000-09-11 22:11:55 +00:00
rogerl%netscape.com
e9324adac8 Added getter/setter for names. 2000-09-11 22:10:44 +00:00
rginda%netscape.com
84d6c25c59 reverting old volatile fix for 24892 and replacing with cls' union patch.
spider and xpshell now pass the related testcases.
author=cls, r=me
2000-09-11 20:56:33 +00:00
nboyd%atg.com
f61a4fa629 Fix bug 49350 2000-09-11 15:12:04 +00:00
nboyd%atg.com
20778e1dde version with debugger directories 2000-09-11 14:10:23 +00:00
brendan%mozilla.org
f76a0a2d6b Fix C++ portability and AIX compilation problem due to last C++ porting attempt (48976, r=jdunn@netscape.com). 2000-09-09 05:53:00 +00:00
waldemar%netscape.com
a6d92aa305 Added support for highlights. Made @ operator js2-only. 2000-09-09 02:15:37 +00:00
waldemar%netscape.com
dc4e188aea Updated to correspond to js2 site 2000-09-09 02:15:06 +00:00
waldemar%netscape.com
8f752abf38 Added support for highlights. 2000-09-09 02:14:35 +00:00
rginda%netscape.com
5b17fd66d3 add fileName and lineNumber to Error.prototype for bug #50447
r=a=brendan
2000-09-09 00:41:15 +00:00
brendan%mozilla.org
69580434a7 Comments and white-space cleanup. 2000-09-08 21:24:14 +00:00
alla%lysator.liu.se
96b564fb5b Implement js_CompareAndSwap for GCC x86 (Linux, FreeBSD etc). This gives us fast thin locks on Linux. bug 20357 r=brendan a=brendan
This version should now work on older binutils too.
2000-09-08 12:13:39 +00:00
alla%lysator.liu.se
4b900e3e5a Reverting last change. 2000-09-08 09:28:56 +00:00
alla%lysator.liu.se
919d491e71 Implement js_CompareAndSwap for GCC x86 (Linux, FreeBSD etc). This gives us fast thin locks on linux.
bug 20357, r=brendan a=brendan
2000-09-08 08:59:37 +00:00
beard%netscape.com
61de6a40df All JSValue constructors are explicit. 2000-09-08 01:16:03 +00:00
rogerl%netscape.com
64cc59fc91 Added Branch_initialized for argument handling. 2000-09-07 19:23:24 +00:00
rogerl%netscape.com
091e41c301 Named arguments. 2000-09-07 19:22:59 +00:00
rogerl%netscape.com
18ad1c2378 Named arguments 2000-09-07 19:22:13 +00:00
jband%netscape.com
feb55a0191 fix bug 13125. Add support for wrapped native xpcom objects to be used as __proto__ objects for JavaScript objects. a,r=brendan@mozilla.org 2000-09-07 18:49:06 +00:00
brendan%mozilla.org
0fbbdd30a2 Improve JSNewEnumerateOp comment per recent exchange with Helge Hess. 2000-09-07 18:06:02 +00:00
rogerl%netscape.com
84fe8782a2 copy non-named args through 2000-09-06 02:17:47 +00:00
rogerl%netscape.com
6484d2a821 fix for redundancy 2000-09-06 02:17:18 +00:00
rogerl%netscape.com
7383f26d6a Fix for empty function body 2000-09-06 02:16:51 +00:00
brendan%mozilla.org
20e8384705 Improve a comment that implied a need to include jsstr.h. 2000-09-05 21:39:48 +00:00
brendan%mozilla.org
53ea2141f3 Must JS_SetGlobalObject at least, if not JS_InitStandardClasses, before defining native functions at startup. 2000-09-04 00:10:06 +00:00
scc%mozilla.org
37f44817be fixing bustage exposed by removing extra comparisons 2000-09-03 03:28:05 +00:00
brendan%mozilla.org
57422a219a Support external string GC types so XPConnect and other systems can optimize away copies (50602, r=jband). 2000-09-02 20:37:37 +00:00
jband%netscape.com
a1659d2bd2 fix crasher bug 51176. xpti semantics for GetParent changed sometime back and I did not find all the cases where this mattered. thanks to mang@subcarrier.org. a,r=brendan@mozilla.org 2000-09-02 20:30:56 +00:00
rogerl%netscape.com
b98c866d6f Switch from RegisterList to ArgumentList to handle named args.
Optional & rest parameter support.
2000-09-02 01:01:41 +00:00
rogerl%netscape.com
60221db240 Optional and rest parameters.
Named arguments (just begun).
2000-09-02 01:01:04 +00:00
brendan%mozilla.org
f4f8bbb650 Followup for 44997, r=shaver:
- #if JS_HAS_LVALUE_RETURN around cx->rval2/rval2set defs and uses.
- Instrument different kinds of invocations, #ifdef DEBUG only.
- Clean up basis case of empty switch statement to use high = -1, low = 0,
  requiring care when optimizing in-range tests using unsigned casts, but
  freeing the interpreter and decompiler from having to do an extra test
  before looping from low to high.
- Clean up all codegen to use JUMP_OFFSET_LEN, ATOM_INDEX_LEN, etc. instead of
  magic 2 or 4.
- Add JSOP_TRY and JSOP_FINALLY no-ops to save a srcnote per JSOP_NOP, and to
  make decompilation and jit'ing easier.
- Minimize number of source notes to maximize SRC_XDELTA span.
- Use JSSCRIPT_FIND_CATCH_START in throw code.
- Indentation and bracing nits picked.
2000-09-01 18:42:22 +00:00
brendan%mozilla.org
e185d5b9b7 Fix js_EnterSharpObject to clean up sharpObjectMap on error (44009, r=shaver). 2000-09-01 18:01:04 +00:00
jband%netscape.com
a7289b6668 fix bug 50941 by updating help text. r=shaver@mozilla.org a=brendan@mozilla.org 2000-09-01 01:02:39 +00:00
brendan%mozilla.org
38e38f2196 Support ECMA reference type return from native methods (44997, r=shaver). 2000-09-01 00:45:50 +00:00
waldemar%netscape.com
191f479b10 Added jsdhash.c 2000-08-31 20:41:33 +00:00
jband%netscape.com
8b20a44782 fix to un-bust XPCONNECT_STANDALONE build (#ifdef'd out code for the browser) from shaver@mozilla.org 2000-08-31 10:44:28 +00:00
brendan%mozilla.org
a951a13f16 Fix GC_MARK_DEBUG bustage (r=dbaron, not part of build unless you -D it). 2000-08-31 03:41:36 +00:00
brendan%mozilla.org
2b858a9a05 Forgot to round capacity up to nearest power of two\! r=bienvenu. 2000-08-31 03:12:40 +00:00
beard%netscape.com
ed0176a047 bug #44187: added guards to prevent crashes when Java not available. r=jband 2000-08-31 02:37:42 +00:00
brendan%mozilla.org
b4a84c6ca7 Script to NSPR-ize and 'PL-ize' jsdhash.[ch] so they fit (sort of) over in xpcom/ds. 2000-08-30 19:30:33 +00:00
nboyd%atg.com
95389f0d7e Better javadoc 2000-08-30 13:41:15 +00:00
mkaply%us.ibm.com
a7e2c5bb4c #50212
r=brendan, a=brendan
OS/2 GCC doesn't define _M_IX86
2000-08-30 01:04:59 +00:00
brendan%mozilla.org
20a51b8298 Finish fixing 42221, for sure. 2000-08-29 23:09:47 +00:00
mccabe%netscape.com
5c644e8fc3 Potential fix to 50313
Initialize stack variable to NULL on suspicion that later possibly-unset use of it is causing crash.
2000-08-26 07:10:31 +00:00
brendan%mozilla.org
c77f05ae2e Clean up JSObjectOps layering violations by adding mark and clear ops; JSClass gets a corresponding mark op so classes with unregistered roots in private data can mark them. The JS API gets a new JS_MarkGCThing entry point for JSObjectOps.mark implementors. Prerequisite check-in for bug 49816 and others (r=shaver). 2000-08-26 02:30:22 +00:00
brendan%mozilla.org
9f6b515501 Lazily define escape and unescape (via js_InitStringClass) only #ifndef MOZILLA_CLIENT, because the DOM must predefine backward-compatible versions of these functions that 'stick' (42221, r=mccabe). 2000-08-26 02:05:41 +00:00
mccabe%netscape.com
91dae5c247 Fix to 39141.
Check for empty element case in array literals ( first element in [,'foo'] ) now uses the next token instead of the previous one when constructing the node, so the first element gets TOK_COMMA instead of TOK_LB.

This fixes a crash from previously accepted JS.

r=rogerl
2000-08-26 01:44:35 +00:00
brendan%mozilla.org
53dfa73056 Macro-ize FPU mode fixing and do it on ever js_InitNumberClass; also, simplify #ifdefs to unify OS2 with XP_PC && _M_IX86 case (50212, r=mkaply@us.ibm.com). 2000-08-25 03:14:50 +00:00
jband%netscape.com
47af0b5999 bug 49748. Fix crash due to JS loader holding xpconnect service too long. Also add unimplemented method to xpconnect service and fix cast for bug 49641. r=shaver@mozilla.org a=brendan@mozilla.org 2000-08-24 07:50:27 +00:00
beard%netscape.com
85ec8a2278 use QueryElementAt() to save space and time. r=shaver 2000-08-24 04:10:47 +00:00
brendan%mozilla.org
f80865ab42 Eliminate silly gcc warning. 2000-08-24 03:14:17 +00:00
brendan%mozilla.org
0b6d9aa649 Add strict warning about trailing comma in object initializers being non-ECMA (50001, r=shaver). 2000-08-23 23:55:43 +00:00
rogerl%netscape.com
d7c5abb056 Fixed printOperands to handle <NaR> 2000-08-23 01:07:19 +00:00
rogerl%netscape.com
934c77a9b2 Fixed printOperand to handle <NaR> properly. Added missing 'return this' to
all constructors.
2000-08-23 01:06:52 +00:00
rogerl%netscape.com
d876d27a02 r,a=beard@netscape.com. Bug #45415, fix LiveConnect memory leak. 2000-08-22 23:31:09 +00:00
nboyd%atg.com
c03250308b Fix bug 48930: work around a MS JIT bug. 2000-08-22 17:04:21 +00:00
waldemar%netscape.com
8d725f1e58 Added arguments to attributes; made 'use', 'namespace', and 'constructor' into keywords and simplified resulting grammar; merged attribute definitions into const definitions; made eval use function call syntax; renamed 'language' to 'use'. 2000-08-22 04:31:37 +00:00
waldemar%netscape.com
37c88b80da Added \Q escape 2000-08-22 04:29:34 +00:00
waldemar%netscape.com
89765d999d Added line-break constraint 2000-08-22 04:29:01 +00:00
waldemar%netscape.com
b9ffa39439 Made terminal constraint error message more detailed 2000-08-22 04:28:01 +00:00
brendan%mozilla.org
f447340dff Fix UMR on ok in JS_ResolveStandardClass (46703, r=rogerl). 2000-08-22 00:25:17 +00:00
pavel%gingerall.cz
d24db69aaf - JSVALToSV handles perl objects in the right way 2000-08-21 16:52:49 +00:00
nboyd%atg.com
561cf27d98 Fix bug 49325. 2000-08-21 15:56:15 +00:00
nboyd%atg.com
06f16c883f Fix class path 2000-08-21 15:51:57 +00:00
brendan%mozilla.org
6aea0bf81f Re-constipate JSClass.name. 2000-08-19 19:17:32 +00:00
jband%netscape.com
577d93dfb4 fix the warnings that went along with the last bustage fix - in case one of the compilers needs it. brendan can fix as he likes in the morning 2000-08-19 10:36:45 +00:00
jband%netscape.com
598c2a90c2 fix bustage 2000-08-19 10:22:13 +00:00
brendan%mozilla.org
56c94e849a Move shell to DIRS from ENABLE_TESTS ifdef addition to DIRS (r=mccabe,leaf). 2000-08-19 08:41:34 +00:00
brendan%mozilla.org
f59c35edb2 Support lazy initialization of standard classes and their associated global functions/properties (46703, r=jband,rogerl). 2000-08-19 08:37:07 +00:00
brendan%mozilla.org
896fb216bc Add stub entry struct and ops for const void *keys, split out JS_DHashTableRawRemove, beefed up comments (part of 46703, r=jband). 2000-08-19 08:36:32 +00:00
cls%seawood.org
5ef043ad42 Use the -n32 ABI as the default for Irix 6.x but allow the option to disable it. 2000-08-19 08:05:05 +00:00
jband%netscape.com
77fff625c9 Add support for -w and -s for reporting warnings and doing strict JS checking (as supported by the engine). Also update the usage info. ra=brendan@mozilla.org 2000-08-19 03:28:01 +00:00
jband%netscape.com
870adce9bf Adding better diagnostic message to help in finding and fixing mismatched calls to JS_AddNamedRoot/JS_RemoveRoot. ra=brendan@mozilla.org 2000-08-19 03:25:16 +00:00
beard%netscape.com
e4a813ca47 added debugger classes. 2000-08-19 02:42:05 +00:00
brendan%mozilla.org
95c4e4dc86 Add jsdhash. 2000-08-18 00:04:53 +00:00
nboyd%atg.com
aad3b49e2b Fix for bug 49302 2000-08-17 12:37:32 +00:00
nboyd%atg.com
40ff06028a Fix 49301. 2000-08-17 12:28:46 +00:00
rogerl%netscape.com
2799c5b4ed Backing out fix to see if Linux build passes alivetest. 2000-08-17 00:30:57 +00:00
rogerl%netscape.com
d3804fb66f Bug #31255. r,a=brendan. Once more unto the '-->' accepted as line comment
fix.
2000-08-16 22:46:04 +00:00
rogerl%netscape.com
e1584cd317 Bug #39141, r=mccabe, a=beard. Fix crash for empty array initializer. 2000-08-16 22:43:26 +00:00
shaver%mozilla.org
f66cde2438 Fix 47354 and 39975 by providing a system-privileged scope backstop for
JS Components, and teaching the ScriptSecurityManager to check for
XPC-wrapped native objects in the scope chain when looking for an
object's principal. r=jband/a=brendan
2000-08-16 04:01:02 +00:00
nboyd%atg.com
9a21820390 Merge changes from EXP_DEBUGGER branch into tip.
Implements simple command-line debugger for scripts.
2000-08-15 15:54:46 +00:00
mccabe%netscape.com
d8cabef55b Fix to 39438.
Add a TokenStream entry to the regexp parser state so that regexps compiled at script-compilation time can report filename and line number on error.
2000-08-11 23:51:12 +00:00
conrad%ingress.com
d9e8edcf29 Changed from using strings for nsIDirectoryService props to using macro names defined in nsDirectoryServiceDefs.h r=valeski 2000-08-11 20:31:57 +00:00