29 Commits

Author SHA1 Message Date
mccabe%netscape.com
4083308200 #ifdefs to build the JavaScript engine under metrowerks on windows machines.
Fixes courtesy Chris Dillman <chrisd@plaidworld.com>.

r=mccabe
a=sdagley


git-svn-id: svn://10.0.0.236/trunk@56316 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-22 00:03:50 +00:00
mccabe%netscape.com
fed797cf9d Additional Date object APIS courtesy 'Chris' Houck. r=mccabe.
git-svn-id: svn://10.0.0.236/trunk@54650 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-30 00:42:07 +00:00
mccabe%netscape.com
b31e8409ff Fix most remaining warnings in js/src. Patch courtesy slamm.
r=mccabe.


git-svn-id: svn://10.0.0.236/trunk@53245 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-11 21:52:35 +00:00
mccabe%netscape.com
c568cf9bed Add an API entry point for building JS Date objects from millisecond values.
Patches courtesy Chris Houck.  r=mccabe.


git-svn-id: svn://10.0.0.236/trunk@52130 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 22:11:41 +00:00
dmose%mozilla.org
ec2434440d update license boilerplate to NPL-1.1 dual-licensed with the GPL. a=brendan, r=brendan.
git-svn-id: svn://10.0.0.236/trunk@49258 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-28 23:12:09 +00:00
waldemar%netscape.com
d9de75afbd Added ECMA number formatting
git-svn-id: svn://10.0.0.236/trunk@47753 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-16 07:12:30 +00:00
slamm%netscape.com
a0c00bbe39 Fix warnings (again) by moving string.h include inside ifdef. Tested on mac, win, and linux.
git-svn-id: svn://10.0.0.236/trunk@46371 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-08 19:03:57 +00:00
slamm%netscape.com
fd0377dc09 Mac needs string.h put it back.
git-svn-id: svn://10.0.0.236/trunk@46227 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-07 21:09:29 +00:00
slamm%netscape.com
e3949cea38 Fix unix build warnings
git-svn-id: svn://10.0.0.236/trunk@46220 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-07 20:35:19 +00:00
mccabe%netscape.com
fb30e5c33e Fix warnings flagged by the auto-warnings page http://tinderbox.mozilla.org/SeaMonkey/warnings.html . Thanks slamm.
git-svn-id: svn://10.0.0.236/trunk@40656 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-22 10:37:35 +00:00
mccabe%netscape.com
50fc06d9f7 Fix to 9523. In the javascript Date implementation, check for unsupplied date argument to new Date(year, month, date) rather than clamping it to 1 if < 1. Previously we ignored negative values for the date argument, rather than subtracting from the resulting date, as per the ECMA-262 spec. for the JavaScript language.
Thanks go to Martin Honnen <martin.honnen@sector27.de> for spotting this difference from the spec.


git-svn-id: svn://10.0.0.236/trunk@39607 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-16 00:50:11 +00:00
fur%netscape.com
dc0c8d45d1 Merge changes from SpiderMonkey140_BRANCH. Note: none of the
added files participate in the client build.


git-svn-id: svn://10.0.0.236/trunk@29432 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-27 15:18:57 +00:00
mccabe%netscape.com
54e58b62ff Backwards-compatible versioned behavior for getYear(), for legacy scripts.
git-svn-id: svn://10.0.0.236/trunk@27542 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-15 04:09:22 +00:00
mccabe%netscape.com
308371b4fa Fix to bugzilla bug 4088; fixed javascript Date string parsing to
handle 12:30 AM and 12:30 PM properly.

(Previously, the code just added 12 hours whenever it saw PM.)


git-svn-id: svn://10.0.0.236/trunk@24779 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-23 02:48:01 +00:00
mccabe%netscape.com
a02a1efd96 Stable drop of JavaScript interpreter code from SpiderMonkey140_BRANCH
git-svn-id: svn://10.0.0.236/trunk@14116 18797224-902f-48f8-a5cc-f745e15eee43
1998-11-05 00:08:43 +00:00
fur%netscape.com
e655606d45 Checkpoint JS1.4 from JS_STABLE_10131998_BRANCH. Changes include:
+ merging of js/src and js/ref
 + elimination of most dependencies on NSPR
 + JS1.4 feature additions and accumulated bug fixes

More details are in last week's mozilla status report.


git-svn-id: svn://10.0.0.236/trunk@12797 18797224-902f-48f8-a5cc-f745e15eee43
1998-10-14 10:22:38 +00:00
brendan%netscape.com
68cdb7d0b0 Fix typos, int type mismatch, white-space, and layout style nits.
git-svn-id: svn://10.0.0.236/trunk@8438 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-25 08:23:34 +00:00
mccabe%netscape.com
cd73b6485a Another attempt to remove trailing nul characters added courtesy CVS.
git-svn-id: svn://10.0.0.236/trunk@6915 18797224-902f-48f8-a5cc-f745e15eee43
1998-07-31 01:45:05 +00:00
mccabe%netscape.com
b32b6c20e8 Propagating numerous fixes from js/ref
and development branches, including but
not limited to:

- Preliminary exception handling per
ECMA proposal; try, multiple
catchblocks, and finally.  Catchblocks
are of the form catch (v) or
catch(v:<guard>), where guard is an
optional boolean expression that is
evaluated to determine whether the
exception is to be caught by that block.

- ECMA-proposed 'in' operator; "'foo' in
o" or "4 in o" asks if o has property
foo or element 4.

- Added a new set of defines in
jsconfig.h for js 1.4
features-in-progress.  (in, instanceof,
exception handling.)  Default build
version is now 1.4.  Fixed a few
conditional features that had become
broken.

- Progress towards porting to FreeBSD
and Alpha; casts of NaN and friends to
int are a little more localized.  Not
there yet...

- New config files to compile on more
OSes; various fixes to improve
portability.


git-svn-id: svn://10.0.0.236/trunk@6907 18797224-902f-48f8-a5cc-f745e15eee43
1998-07-31 00:07:22 +00:00
fur
aea62596b0 Propagation of numerous bug fixes from 4.06 (which have been reviewed
and tested in that release):

#114564: Fix JS_Enumerate to return an empty id array instead of null
#115395: Fix JS garbage collection
#115200: Security dialog no longer blows assertion
#123211: Make sure output of sort array function is -1, 0, or 1.
#116195: Fix ImportProperty(), cope with an existing local variable
         of the same name as the imported property
         Unbusticate JS_invoke() so that closures work again
#115384,#115395: Handle bugs in toSource that strike when
         getProperty is non-idempotent.  Fix crash during JavaScript
         garbage collection after enumerating object properties.

#??????: mjudge - Win16 files to make ptrdiff_t be 32 bits on Win16


git-svn-id: svn://10.0.0.236/trunk@3573 18797224-902f-48f8-a5cc-f745e15eee43
1998-06-09 23:04:48 +00:00
mccabe
a603cb7869 Warning fix - added an (int16) cast to quiet a Windows warning.
git-svn-id: svn://10.0.0.236/trunk@1555 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 22:13:30 +00:00
mccabe
eeb3cc74f2 Restoring changes that were backed out because of a one-line error in
prmjtime.c.


git-svn-id: svn://10.0.0.236/trunk@958 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 00:22:06 +00:00
hshaw
db8e901896 Back out changes which are breaking builds (at request of mccabe)
git-svn-id: svn://10.0.0.236/trunk@902 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 08:10:05 +00:00
mccabe
4747d02fa9 Changed pr[mj]time.c to just return 0 for failure in FormatTime, and
changed jsdate.c to detect failure and default to using toString in
place of toLocaleString whenever FormatTime fails.


git-svn-id: svn://10.0.0.236/trunk@895 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 03:51:26 +00:00
mccabe
246b37fa96 Fixes for getting the timezone string fot toString, and for asking for
a localized string from the os for toLocaleString.  The time struct
used to interface to the os time-formatting functions only takes a
16-bit year, so we map to an equivalent year (for getting the timezone
string) or clamp for years outside that range.


git-svn-id: svn://10.0.0.236/trunk@886 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 00:27:43 +00:00
mccabe
c9d08d5bba Added disambiguating braces to appease gcc 2.8.1 warning.
git-svn-id: svn://10.0.0.236/trunk@728 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 01:22:19 +00:00
mccabe
68bd3eb6a0 Add some braces to quiet dangling-else warnings by gcc 2.8.1.
git-svn-id: svn://10.0.0.236/trunk@640 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 05:24:42 +00:00
fur
6e3cdaec31 Initial checkin of JavaScript 1.3, migrated from JSFUN13_BRANCH in /m/src repository
git-svn-id: svn://10.0.0.236/trunk@578 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 00:31:11 +00:00
ltabb
8ed5afe62c Free the lizard
git-svn-id: svn://10.0.0.236/trunk@10 18797224-902f-48f8-a5cc-f745e15eee43
1998-03-28 02:44:41 +00:00