2241 Commits

Author SHA1 Message Date
brendan%mozilla.org
b0ea43af3b Decompile return from try or catch with finally correctly (255245, r=shaver, a=asa).
git-svn-id: svn://10.0.0.236/trunk@160688 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-11 23:07:15 +00:00
brendan%mozilla.org
8e4956796a Fix simple-match optimization for positive and negative lookahead assertions (254296, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@160646 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-11 02:27:29 +00:00
brendan%mozilla.org
98aac40feb Use JSPROP_SHARED for JSOP_DEFLOCALFUN-induced nested function local variable property to avoid claiming a slot later subject to reservation for a JSOP_REGEXP-induced regexp clone (254974, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@160591 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-10 05:13:17 +00:00
brendan%mozilla.org
a1895165ae Fix bug 254375 by quoting negative integer property ids in js_obj_toSource.
git-svn-id: svn://10.0.0.236/trunk@160391 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-05 08:06:26 +00:00
brendan%mozilla.org
90b882af41 Remove deadwood left by last checkin (254382, r=cst).
git-svn-id: svn://10.0.0.236/trunk@160390 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-05 07:52:45 +00:00
brendan%mozilla.org
65f01a3d29 Comment fixes to track bug 254067.
git-svn-id: svn://10.0.0.236/trunk@160363 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-04 18:40:55 +00:00
brendan%mozilla.org
8a13e960a1 JSOP_SETGVAR tweak: don't store rval needlessly in the optimized case, there's no chance it has changed.
git-svn-id: svn://10.0.0.236/trunk@160360 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-04 18:08:17 +00:00
brendan%mozilla.org
01497fded6 Remove bogus instanceof equivalence of distinct constructor function objects
that have the same native or script internally.  We no longer need this hack,
given regexp cloning done for precompiled scripts and functions (i.e., those
not eval'd or compile-and-go executed via a JS_Evaluate* API).

Fix a script_compile bug found during the scan of JSFRAME_EVAL occasioned by
the instanceof fix.

Bug 254067, r=shaver@mozilla.org.


git-svn-id: svn://10.0.0.236/trunk@160359 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-04 17:56:31 +00:00
brendan%mozilla.org
f17fbb8285 Whitespace cleanup.
git-svn-id: svn://10.0.0.236/trunk@160327 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-04 02:28:58 +00:00
brendan%mozilla.org
3928ffaab2 Fix trunk version of patch for bug 252892 to handle JSOP_{GET,SET}GVAR (253952).
git-svn-id: svn://10.0.0.236/trunk@160233 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-02 17:17:55 +00:00
brendan%mozilla.org
340570a787 - Decorate PN_LIST nodes with pn_extra flags whose constant names describe
their meaning better, adding a flag for 'for (var x ... in o)'.
- Set these flags from the parser, in a future-proof way (|=, not =, given the
  zero initialized pn_extra flags member of pn_list).
- Test list flags in the code generator, including PNX_FORINVAR in conjunction
  with whether the for..in loop is of the oddball form 'for (var x = i in o)'.
- Thereby fix failure to emit a JSOP_DEFVAR in the case that a function wraps
  a for..in loop in a with statement (252892, r=shaver).
- The same fix cured another bug, not reported, where 'for (var x = i in o)'
  in a function without any 'with' statement would emit the wrong opcode
  (JSOP_FORNAME, not JSOP_FORVAR).


git-svn-id: svn://10.0.0.236/trunk@160101 18797224-902f-48f8-a5cc-f745e15eee43
2004-07-30 00:00:09 +00:00
brendan%mozilla.org
0144b0c6a4 Improve JSRESOLVE_DETECTING to handle typeof, ==, !=, etc.; don't give undefined property strict warning for detecting cases (253150, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@160075 18797224-902f-48f8-a5cc-f745e15eee43
2004-07-29 20:44:20 +00:00
brendan%mozilla.org
f7b9ce6db4 Avoid harmless UMC from purify when XDR-decoding (252047, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@159893 18797224-902f-48f8-a5cc-f745e15eee43
2004-07-27 01:28:39 +00:00
mkaply%us.ibm.com
d924b7872b This stuff doesn't work on OS/2 and is causing thousands of warnings errors
git-svn-id: svn://10.0.0.236/trunk@159688 18797224-902f-48f8-a5cc-f745e15eee43
2004-07-22 20:27:48 +00:00
brendan%mozilla.org
6b7f7ecdc5 Update map->freeslot in js_SetRequiredSlot if obj has its own scope (245890, r=shaver); also clear pending exceptions as needed in js_TryMethod (old unreported bug, r=self).
git-svn-id: svn://10.0.0.236/trunk@159660 18797224-902f-48f8-a5cc-f745e15eee43
2004-07-22 15:47:22 +00:00
timeless%mozdev.org
4e31823e07 reverting 3.176 per brendan
git-svn-id: svn://10.0.0.236/trunk@159538 18797224-902f-48f8-a5cc-f745e15eee43
2004-07-20 16:11:53 +00:00
brendan%mozilla.org
dc606d6d85 Fix unused variable problem.
git-svn-id: svn://10.0.0.236/trunk@159382 18797224-902f-48f8-a5cc-f745e15eee43
2004-07-17 02:44:37 +00:00
brendan%mozilla.org
c7bb7a454c - Add JS_Has*Property and JS_HasElement APIs, for unambiguous testing of whether an object or one of its prototypes has an identified property.
- Add JS_ReportPendingException, and fix its js_ReportUncaughtException subroutine to (a) not return false on vacuous success; (b) fail to clear the pending exception it reports.


git-svn-id: svn://10.0.0.236/trunk@159381 18797224-902f-48f8-a5cc-f745e15eee43
2004-07-17 02:39:55 +00:00
brendan%mozilla.org
9d3428574c White space policing.
git-svn-id: svn://10.0.0.236/trunk@159380 18797224-902f-48f8-a5cc-f745e15eee43
2004-07-17 02:31:11 +00:00
tor%cs.brown.edu
61fec9ef22 Bug 165200 - Number.toLocaleString() localization. r=brendan
git-svn-id: svn://10.0.0.236/trunk@159366 18797224-902f-48f8-a5cc-f745e15eee43
2004-07-16 21:17:50 +00:00
timeless%mozdev.org
1dde0401e3 Bug 243869 js_ReportUncaughtException doesn't propagate filename/lineno from error object
These changes are a last ditch effort to provide filename info for certain failures.
r=shaver


git-svn-id: svn://10.0.0.236/trunk@159346 18797224-902f-48f8-a5cc-f745e15eee43
2004-07-16 17:30:23 +00:00
brendan%mozilla.org
53f0bf3fa1 Restore export/import support for 4.x signed script compatibility (249211, r=self).
git-svn-id: svn://10.0.0.236/trunk@159272 18797224-902f-48f8-a5cc-f745e15eee43
2004-07-15 19:21:35 +00:00
brendan%mozilla.org
9edbb0b2c1 Improve JSRESOLVE_DETECTING by treating 'terminal' uses of, e.g., document.all as detecting (248549, r=jst).
git-svn-id: svn://10.0.0.236/trunk@159266 18797224-902f-48f8-a5cc-f745e15eee43
2004-07-15 18:53:59 +00:00
dbaron%dbaron.org
6ba6a78f8e Only use __attribute__ on gcc 3 or higher. Fixing bustage. b=249652
git-svn-id: svn://10.0.0.236/trunk@159221 18797224-902f-48f8-a5cc-f745e15eee43
2004-07-15 00:00:43 +00:00
bryner%brianryner.com
e372b2e9a3 Add a NS_FASTCALL macro that specifies regparm(3) and stdcall on gcc/x86 to improve performance (passing up to 3 arguments in registers instead of on the stack, and having the caller pop any stack arguments). Apply NS_FASTCALL to our most frequently called non-public methods and functions. Also add NS_CDECL to explicitly specify the default calling convention and make it part of NS_IMETHOD, since xptcall can't deal with NS_FASTCALL. Bug 249652, r=darin, sr=dbaron.
git-svn-id: svn://10.0.0.236/trunk@159199 18797224-902f-48f8-a5cc-f745e15eee43
2004-07-14 22:14:34 +00:00
brendan%mozilla.org
0e385c551c Enhance RegExp.prototype.to{Source,String} to escape naked slashes in the regexp source (284444, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@158824 18797224-902f-48f8-a5cc-f745e15eee43
2004-07-07 03:58:26 +00:00
timeless%mozdev.org
27c47c4857 Bug 248458 Crash [@ nsJSIID::Equals] for null other
r=dbradley sr=shaver


git-svn-id: svn://10.0.0.236/trunk@158447 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-24 23:49:08 +00:00
brendan%mozilla.org
b3757f6391 NARCISSUS-only fix from Frierich Munch <colsebas@hotmail.com>.
git-svn-id: svn://10.0.0.236/trunk@158383 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-23 21:25:55 +00:00
bryner%brianryner.com
b9fee4bf3a Make jsdouble hashing code strict-aliasing safe (bug 247877). r=brendan.
git-svn-id: svn://10.0.0.236/trunk@158258 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-21 17:57:10 +00:00
brendan%mozilla.org
7cf55aa042 Mangle JS_STATIC_DLL_CALLBACK names a bit in case they're not hidden.
git-svn-id: svn://10.0.0.236/trunk@158200 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-20 02:29:19 +00:00
bsmedberg%covad.net
f9f20186ed Bug 239875 - fix xpconnect static guards so we can restart xpcom without crashing r=shaver sr=brendan
git-svn-id: svn://10.0.0.236/trunk@158170 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-19 01:19:27 +00:00
brendan%mozilla.org
0b1a5abf97 My spin on Malcolm Rowe's patch for ECMA-compliant \b in regexps (247179, r=me).
git-svn-id: svn://10.0.0.236/trunk@158149 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-18 21:59:06 +00:00
brendan%mozilla.org
368758b07a Fix off-by-one, simplify logic in light of EOF mapping to 0 JS_CCODE.
git-svn-id: svn://10.0.0.236/trunk@158131 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-18 20:40:54 +00:00
roc+%cs.cmu.edu
0b0fa89131 Bug 226439. Convert codebase to use AppendLiteral/AssignLiteral/LowerCaseEqualsLiteral. r+sr=darin
git-svn-id: svn://10.0.0.236/trunk@157992 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-17 00:13:25 +00:00
brendan%mozilla.org
09d3e9ed2a Add JSRESOLVE_DETECTING (246964, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@157980 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-16 21:15:35 +00:00
tor%cs.brown.edu
ff31f81698 Bug 153586 - Date.toLocaleString() not returning locale string.
r=jst, sr=brendan


git-svn-id: svn://10.0.0.236/trunk@157913 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-15 16:38:43 +00:00
brendan%mozilla.org
ad3a71f342 Give JSObjectOps.setRequiredSlot a JSBool return value so it can propagate errors (part of 245890, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@157812 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-12 01:50:09 +00:00
cbiesinger%web.de
39955b6428 bug 245673 named literal strings should be const
r+sr=darin


git-svn-id: svn://10.0.0.236/trunk@157773 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-11 15:05:29 +00:00
brendan%mozilla.org
a8d9f404ad Fix comment glitch pointed out by timeless (243359).
git-svn-id: svn://10.0.0.236/trunk@157754 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-11 06:30:14 +00:00
timeless%mozdev.org
3853fc2694 Bug 238712 nsMemoryImpl::Alloc (0) in XPCConvert::JSArray2Native
r=dbradley sr=brendan


git-svn-id: svn://10.0.0.236/trunk@157752 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-11 04:40:00 +00:00
brendan%mozilla.org
0a83ee7850 Add support for XUL preprocessor line/file coercion (243359, r=bryner).
git-svn-id: svn://10.0.0.236/trunk@157746 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-11 00:55:59 +00:00
pschwartau%netscape.com
6a00502e91 Updating JS_GetImplementationVersion() to date of latest JS release (67111)
git-svn-id: svn://10.0.0.236/trunk@157685 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-09 23:08:07 +00:00
brendan%mozilla.org
fa680b19ae Back out patch for bug 245890 for now.
git-svn-id: svn://10.0.0.236/trunk@157670 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-09 19:39:53 +00:00
brendan%mozilla.org
5e433d42a6 Avoid overparenthesizing function expressions (245795, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@157610 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-08 22:15:23 +00:00
brendan%mozilla.org
a18eda5fd0 Fix bug caused by bug 165201's checkin, where regexp-valued slots in function object clones might dangle after GC (245890, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@157609 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-08 21:58:52 +00:00
brendan%mozilla.org
41019f8b6c Use a GC root by definition, not result, when calling js_Interpret from js_Execute (245570, r=shaver, sr=jst, a=dbaron).
git-svn-id: svn://10.0.0.236/trunk@157424 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-05 01:39:32 +00:00
cbiesinger%web.de
d759864d09 bug 244156 disable PCH when whole program optimization is enabled
patch by Stephen Walker <sdwalker@myrealbox.com> r=bsmedberg


git-svn-id: svn://10.0.0.236/trunk@157382 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-03 20:31:47 +00:00
brendan%mozilla.org
ce0cb35138 ECMA fix: Date.prototype instanceof Date should be false (245113, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@157336 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-02 21:24:17 +00:00
brendan%mozilla.org
b5a53babf2 Fix [null].toSource() to produce [null], not [] (245148, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@157333 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-02 21:10:00 +00:00
brendan%mozilla.org
bb04219d17 Fix PushBackTrackState so it doesn't assume double backtrack stack size suffices to hold the new result (243174, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@156572 18797224-902f-48f8-a5cc-f745e15eee43
2004-05-19 02:15:26 +00:00