Commit Graph

2140 Commits

Author SHA1 Message Date
timeless%mozdev.org
52eaac4256 Bug 123584 JavaScript engine should use malloc/realloc/free consistently
Removing the unused JS_MALLOC macro per brendan


git-svn-id: svn://10.0.0.236/trunk@153213 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-25 14:05:29 +00:00
timeless%mozdev.org
21792e511e Bug 123584 JavaScript engine should use malloc/realloc/free consistently
Removing the unused JS_NEW and JS_DELETE macros per brendan


git-svn-id: svn://10.0.0.236/trunk@153212 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-25 14:01:24 +00:00
timeless%mozdev.org
4276d3af21 Bug 123584 JavaScript engine should use malloc/realloc/free consistently
Replace JS_DELETE with free/JS_smprintf_free
r=rogerl


git-svn-id: svn://10.0.0.236/trunk@153211 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-25 13:33:42 +00:00
jst%mozilla.jstenback.com
5e5b060347 Fixing bogus assert on startup for DEBUG_xpc_hacker people. Not part of the default build.
git-svn-id: svn://10.0.0.236/trunk@153174 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-24 22:50:46 +00:00
kyle.yuan%sun.com
8059442ec8 Bug 200016 Crash accessing Java package from JS
r=xiaobin.lu, sr=brendan
Block accessing to sun.plugin package


git-svn-id: svn://10.0.0.236/trunk@153135 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-24 03:18:09 +00:00
brendan%mozilla.org
dbe6162d4d Move script_filename_table into JSRuntime where it belongs (235145, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@153079 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-22 03:21:15 +00:00
dbaron%dbaron.org
58150a14fa Backing out brendan's checkin due to tinderbox orange.
git-svn-id: svn://10.0.0.236/trunk@153077 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-22 01:11:47 +00:00
brendan%mozilla.org
2247a47000 Move script_filename_table into JSRuntime where it belongs (235145, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@153072 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-21 19:41:52 +00:00
cls%seawood.org
b831f8cd44 Add support for cross-compiling to mingw.
Bug #222013 r=bryner


git-svn-id: svn://10.0.0.236/trunk@153042 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-20 22:14:14 +00:00
timeless%mozdev.org
b251ca2b3e Bug 235035 change nsIRunnable.Run to nsIRunnable.run
r=dougt sr=darin


git-svn-id: svn://10.0.0.236/trunk@153039 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-20 21:34:57 +00:00
timeless%mozdev.org
087c6d1b44 Bug 234703 mClassInfoFlags is always 0 instead of using the XPCWrappedNativeProto(..., ClassInfoFlags, ...) value
r=jst sr=bz moa=dbradley


git-svn-id: svn://10.0.0.236/trunk@152942 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-19 15:20:39 +00:00
darin%meer.net
55688e6410 landing string defragmentation patch for bug 231995, r/sr=dbaron,jst,dougt
git-svn-id: svn://10.0.0.236/trunk@152905 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-19 02:44:03 +00:00
timeless%mozdev.org
25d5410fb8 Bug 233335 XP_PC still referenced in jssh.c
Use defined()


git-svn-id: svn://10.0.0.236/trunk@152820 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-16 18:27:06 +00:00
leaf%mozilla.org
c08cd533ab bug 226380. backout code that breaks ActiveX plugin properties, a=chofmann
git-svn-id: svn://10.0.0.236/trunk@152770 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-14 01:01:08 +00:00
brendan%mozilla.org
b2a9180db2 Fix two nits in last checkin.
git-svn-id: svn://10.0.0.236/trunk@152661 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-11 07:51:50 +00:00
brendan%mozilla.org
42c8b66573 NARCISSUS ifdefs and related general fixes (r=shaver).
git-svn-id: svn://10.0.0.236/trunk@152659 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-11 07:21:59 +00:00
kyle.yuan%sun.com
33f1a73932 Bug 110584 Missing call to jsj_ExitJava
use |break| instead of |return| in |switch|
r=xiaobin.lu, sr=brendan


git-svn-id: svn://10.0.0.236/trunk@152266 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-04 02:01:54 +00:00
timeless%mozdev.org
7eaea205a1 Bug 137193 Debug Mozilla aborts when JSObject.call("func", args) and args is zero-length array
r=kyle sr=brendan


git-svn-id: svn://10.0.0.236/trunk@152172 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-02 19:10:33 +00:00
brendan%mozilla.org
ee77ac0954 More bug 231518 followup: non-identifier as well as reserved-id property names must be quoted/indexed, not dotted (r=shaver).
git-svn-id: svn://10.0.0.236/trunk@152092 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-30 20:34:23 +00:00
pschwartau%netscape.com
6207775b14 Updating JS_GetImplementationVersion() to date of latest JS release (67111).
git-svn-id: svn://10.0.0.236/trunk@151932 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-28 02:10:31 +00:00
brendan%mozilla.org
c48008dcde Brace style fascism.
git-svn-id: svn://10.0.0.236/trunk@151782 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-24 00:36:10 +00:00
brendan%mozilla.org
660246582b Fix quoting/escaping of non-ASCII chars and reserved ids in all property access cases (231518, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@151754 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-23 17:52:03 +00:00
dbaron%dbaron.org
07ffb5471c Print more information about nsXPCWrappedJS objects in GC_MARK_DEBUG. b=231384 r=brendan sr=bryner
git-svn-id: svn://10.0.0.236/trunk@151653 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-21 21:09:18 +00:00
brendan%mozilla.org
f9711b11a9 Fix bug reported by Adrian Klein <master@dragosan.net> where o['if'] is decompiled as o.if.
git-svn-id: svn://10.0.0.236/trunk@151509 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-18 18:31:34 +00:00
brendan%mozilla.org
3b19a173aa Unify license comment per js/src/plify_jsdhash.sed, plus comment simplification.
git-svn-id: svn://10.0.0.236/trunk@151341 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-15 02:00:55 +00:00
brendan%mozilla.org
b400313557 Anything that starts like a {min,max} quantifier but doesn't parse as one is taken as a flat string to match (228087, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@151209 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-12 21:10:26 +00:00
timeless%mozdev.org
3ef3b07d6b Bug 230522 warning C4047: 'return' : 'foo *' differs in levels of in direction from 'int'
rs=brendan


git-svn-id: svn://10.0.0.236/trunk@151181 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-11 17:26:30 +00:00
timeless%mozdev.org
cde3e8ca16 Adding support for WinXP (copied from Win2k)
git-svn-id: svn://10.0.0.236/trunk@151093 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-09 20:15:27 +00:00
bsmedberg%covad.net
7e08b118b7 Continuing to land the PACKAGING_20030906_BRANCH for bug 20640. Not part of the build, yet.
git-svn-id: svn://10.0.0.236/trunk@150973 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-07 13:37:00 +00:00
bsmedberg%covad.net
9706f93476 Beginning to land the PACKAGING_20030906_BRANCH for bug 20640. Not part of the build, yet.
git-svn-id: svn://10.0.0.236/trunk@150961 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-07 01:22:31 +00:00
brendan%mozilla.org
adbc08ffcb - Eliminate WellTerminated by coalescing its call sites to the end of Statement and inlining it there. This adds a tiny bit of overhead in some cases, due to
the ON_CURRENT_LINE check, which can be proven redundant for cases such as the
debugger statement.  But the cost should be in the noise, and code size wins.

- Remove bogus lastExprType argument to WellTerminated and eliminate its only
use, in parsing an expression statement.  Also eliminate the WellTerminated
check after a function "statement" (which could be a top-level declaration, or
an instance of our function statement extension, e.g. 'if (x) function f(){}',
neither of which should require semicolon termination).

The intent of the lastExprType parameter, the WellTerminated call from the
TOK_FUNCTION case, the call from the default expression-statement case, and the
#if JS_HAS_LEXICAL_CLOSURE code in WellTerminated appears to have been to allow
'function f(){} function g(){}' for JS versions < 1.2, and to forbid it as an
error otherwise, requiring a semicolon in between the function declarations.
But in fact ECMA and good sense should allow as many function declarations on
a line as you please, optionally followed by other statements, and without
requiring semicolons after function declarations.

Since this change removes an error case, I don't expect any incompatibility
bugs to be reported.

- Coalescing/inlining WellTerminated meant removing its call from MatchLabel,
called by the break and continue cases in Statement.

- The debugger keyword could be used without a semicolon terminator to make it
a statement, as in 'debugger 1 + 2;', parsed as a debugger statement followed
by an expression statement -- which seems quite wrong (ECMA reserves debugger
but does not specify its usage).

This bug arose due to the early return at the end of the TOK_DEBUGGER case.
Although that case called WellTerminated, because it returned rather than broke
from the main switch, it failed to match an explicit semicolon terminator (if
present), making 'debugger; 1 + 2;' parse as three statements, with the first
semicolon becoming an empty statement (contrary to ECMA automatic semicolon
insertion rules).


git-svn-id: svn://10.0.0.236/trunk@150879 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-05 07:47:49 +00:00
brendan%mozilla.org
1a973e5f6d Use macroized version of dbaron's fix for >65535 line script parsing bug (229006, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@150850 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-03 18:19:51 +00:00
brendan%mozilla.org
853d5f2ee0 Fix SCRIPT_FIND_CATCH_START to cope with exceptions thrown from prolog bytecodes (206199, r=shaver, a=asa).
git-svn-id: svn://10.0.0.236/trunk@150794 18797224-902f-48f8-a5cc-f745e15eee43
2003-12-31 02:53:02 +00:00
technutz%netscape.net
85802c6a61 MinGW bustage fix from bug 213910's landing. Patch by bsmedberg@covad.net. r=dbaron, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@150778 18797224-902f-48f8-a5cc-f745e15eee43
2003-12-30 17:53:17 +00:00
brendan%mozilla.org
b2008e8627 Don't JS_ReportOutOfMemory while holding script_filename_table_lock (r=self).
git-svn-id: svn://10.0.0.236/trunk@150775 18797224-902f-48f8-a5cc-f745e15eee43
2003-12-30 07:54:09 +00:00
bsmedberg%covad.net
784122711d Bug 213910 - Implement Components.interfacesByID r=dbradley sr=jst
git-svn-id: svn://10.0.0.236/trunk@150757 18797224-902f-48f8-a5cc-f745e15eee43
2003-12-28 04:37:57 +00:00
brendan%mozilla.org
247b65b64a Disable bogus error check for { followed by a digit (228087, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@150688 18797224-902f-48f8-a5cc-f745e15eee43
2003-12-23 17:05:24 +00:00
brendan%mozilla.org
4589d4e341 Footprint wins: disable export/import from js1.5, fuse common code before a given jump target in js_Invoke, avoid unnecessary subtraction when enforcing ARGC_LIMIT. Also, clean up comment nits.
git-svn-id: svn://10.0.0.236/trunk@150622 18797224-902f-48f8-a5cc-f745e15eee43
2003-12-22 06:15:14 +00:00
brendan%mozilla.org
02051b6e5c Add an assertion to catch an embedding API usage error mentioned recently on m.jseng.
git-svn-id: svn://10.0.0.236/trunk@150621 18797224-902f-48f8-a5cc-f745e15eee43
2003-12-22 06:13:07 +00:00
brendan%mozilla.org
0e7037caf3 Add JS_GetObjectId, void cx->exception in JS_ClearPendingException (127418, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@150620 18797224-902f-48f8-a5cc-f745e15eee43
2003-12-22 06:10:51 +00:00
brendan%mozilla.org
9d6a799abb Followup patch to cope with lightweight function calls (direct or via natives) to exec (227432, r=shaver, a=dbaron).
git-svn-id: svn://10.0.0.236/trunk@150182 18797224-902f-48f8-a5cc-f745e15eee43
2003-12-10 00:24:13 +00:00
brendan%mozilla.org
c03099810d Fix Script.prototype.exec called from native code (227432, r=shaver, a=asa).
git-svn-id: svn://10.0.0.236/trunk@150073 18797224-902f-48f8-a5cc-f745e15eee43
2003-12-05 04:21:05 +00:00
brendan%mozilla.org
54b6320351 Attempt to update, still much to do.
git-svn-id: svn://10.0.0.236/trunk@149838 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-29 18:14:56 +00:00
brendan%mozilla.org
e6d9d9b9e5 Fix someone else's old copy-paste error in comment (no code change).
git-svn-id: svn://10.0.0.236/trunk@149805 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-27 03:22:31 +00:00
brendan%mozilla.org
7ac3a829ec Comment tweaks (no code changes).
git-svn-id: svn://10.0.0.236/trunk@149785 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-27 00:08:36 +00:00
brendan%mozilla.org
856ce9dea7 Fix bungled attempt to ComputeThis before __noSuchMethod__ extension (225423, r=shaver, a=asa).
git-svn-id: svn://10.0.0.236/trunk@149757 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-26 02:46:50 +00:00
brendan%mozilla.org
24cd91464d Comment-only change.
git-svn-id: svn://10.0.0.236/trunk@149708 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-25 01:50:41 +00:00
brendan%mozilla.org
f9784dd70c Patch from Igor Bukanov <igor@fastmail.fm> with a few tweaks from me to limit stack consumption under js_EmitTree (226507, r=shaver, a=rjesup).
git-svn-id: svn://10.0.0.236/trunk@149707 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-25 01:50:17 +00:00
timeless%mozdev.org
e06b35a771 Adding support for Solaris 9 (copied from Solaris 8)
git-svn-id: svn://10.0.0.236/trunk@149658 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-23 20:13:36 +00:00
mkaply%us.ibm.com
e17e819d83 #200144
r=brendan, a=mkaply
Remove XP_OS2 #ifdefs from JS


git-svn-id: svn://10.0.0.236/trunk@149564 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-19 23:07:57 +00:00