15 Commits

Author SHA1 Message Date
mccabe%netscape.com
5dce40da3b Propagating work and bug fixes from
development branch:

- 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@6905 18797224-902f-48f8-a5cc-f745e15eee43
1998-07-30 23:46:29 +00:00
mccabe
1301adda9f Changed the definition of JSDOUBLE_IS_INT(d, i) to delay a (jsint)d
cast until after the double in question has been determined to be
finite, not NaN, etc.  This may make the code a little more XP for
platforms like BSD and Alpha Linux that don't like casting strange
values to int.  Thanks go to Uncle George <gatgul@voicenet.com> and
hankin <hankin@consultco.com> for their porting work.


git-svn-id: svn://10.0.0.236/trunk@5137 18797224-902f-48f8-a5cc-f745e15eee43
1998-07-08 07:56:43 +00:00
brendan
cc6ce74501 - Remove duplicate error fprintf from js.c:Load.
- Revise exception handling runtime info (now called trynotes a la srcnotes)
  for more efficient loop control under JSOP_THROW.  Avoid all uses of catch
  and throw while at it, to make C++ lusers happy.
- Combine JSStackFrame.exception with rval, and rename
  JSStackFrame.exceptPending to be ...throwing.
- Optimize JS_TypeOfValue a bit.
- Name, control flow, whitespace, etc. cleanup.


git-svn-id: svn://10.0.0.236/trunk@4772 18797224-902f-48f8-a5cc-f745e15eee43
1998-07-01 02:12:45 +00:00
norris
ded6dd1b99 (Not part of Communicator build)
Fix warning for unspecified prototype.


git-svn-id: svn://10.0.0.236/trunk@4350 18797224-902f-48f8-a5cc-f745e15eee43
1998-06-23 23:28:36 +00:00
fur
fbfc042f83 Allow NULL name argument for JS_NewFunction()
git-svn-id: svn://10.0.0.236/trunk@4341 18797224-902f-48f8-a5cc-f745e15eee43
1998-06-23 22:40:24 +00:00
beard
20827ef061 MacOS/MSL malloc also needs non-zero size.
git-svn-id: svn://10.0.0.236/trunk@4267 18797224-902f-48f8-a5cc-f745e15eee43
1998-06-23 01:57:05 +00:00
norris
d3cb14f1ce (Not part of Communicator build.)
Add implementation version API call.


git-svn-id: svn://10.0.0.236/trunk@4175 18797224-902f-48f8-a5cc-f745e15eee43
1998-06-19 23:47:07 +00:00
mccabe
021b3ef3b3 (Not part of the mozilla build)
Added a guard against casting infinity->int, towards porting to alpha linux.


git-svn-id: svn://10.0.0.236/trunk@3991 18797224-902f-48f8-a5cc-f745e15eee43
1998-06-17 19:36:29 +00:00
shaver
a4c7b3bca0 added JS_YieldRequest to API
git-svn-id: svn://10.0.0.236/trunk@3564 18797224-902f-48f8-a5cc-f745e15eee43
1998-06-09 21:24:14 +00:00
fur
76813139a0 Merge several bug fixes from client 4.1 branch
git-svn-id: svn://10.0.0.236/trunk@2791 18797224-902f-48f8-a5cc-f745e15eee43
1998-06-01 00:31:59 +00:00
shaver
69c0f00221 allow NULL Scripts for JS_NewScriptObject
git-svn-id: svn://10.0.0.236/trunk@2348 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 14:18:51 +00:00
mccabe
1403ada266 Conditionalized a (jsint) cast to ask JSDOUBLE_IS_NaN first -
hopefully avoiding a SIGPFE on Alpha Linux.  (And others?)


git-svn-id: svn://10.0.0.236/trunk@2335 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 04:53:37 +00:00
waldemar
6f622be91c Fixed bug 117404: typeof should return "function" on scripts and regular expressions.
git-svn-id: svn://10.0.0.236/trunk@2295 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 22:11:00 +00:00
fur
0126732a29 When JS_MaybeGC() has decided to do a garbage collection, really do
it, even when the only assignments have been to local JS variables.
Thanks to ahodgkin@acorn.co.uk for noticing.


git-svn-id: svn://10.0.0.236/trunk@606 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 18:08:04 +00:00
fur
dffbf084ac (This code is not built by any flavor of Navigator)
Initial check-in to mozilla tree: JSRef development is migrating from
JSFUN13_BRANCH of /m/src repository to /m/pub


git-svn-id: svn://10.0.0.236/trunk@582 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 01:35:13 +00:00