word neologism, not two words.
- Use consistent neighboring terseness ("error" rather than "err" in intercaps
identifiers).
- Don't leave pointers in JSErrorReport to freed memory if bailing on OOM in
jscntxt.c:js_ExpandErrorArguments.
- Hanging indentation, code fusion via continue, and other misc. cleanups.
git-svn-id: svn://10.0.0.236/trunk@9455 18797224-902f-48f8-a5cc-f745e15eee43
evaluate the case label each time.
Still to do is to optimize so that TABLESWITCH and LOOKUPSWITCH are created
when possible.
git-svn-id: svn://10.0.0.236/trunk@9296 18797224-902f-48f8-a5cc-f745e15eee43
Fixed bug #317398, for loop without condition wasn't decompiling the body
correctly since the first statement in that body was getting eaten by
mistake when trying to consume the condition expression.
git-svn-id: svn://10.0.0.236/trunk@9233 18797224-902f-48f8-a5cc-f745e15eee43
call, and experimented with copying the original JSErrorReport into
private data. Much of this to support a toString method for exception
objects.
It's not polished, but I wanted to get toString available quickly.
git-svn-id: svn://10.0.0.236/trunk@9145 18797224-902f-48f8-a5cc-f745e15eee43
Thanks go to Marc Fraioli <fraioli@dg-rtp.dg.com> for
the initial port of the js/ref standalone javascript
engine to DG/UX.
git-svn-id: svn://10.0.0.236/trunk@9105 18797224-902f-48f8-a5cc-f745e15eee43
Most of these will require a second look, but I wanted to get all of
them (that need exceptions) throwing something interesting.
git-svn-id: svn://10.0.0.236/trunk@8931 18797224-902f-48f8-a5cc-f745e15eee43
the compile-error reporting mechanism,
providing a way to associate exceptions
(very likely SyntaxError exceptions)
with compile-time errors.
(Hopefully this is temporary, as I'd
prefer one central place in the
error-reporting process to put the
js_ErrorToException call.)
Also changed the error reporter in js.c
to only ignore error reports marked with
the JSREPORT_EXCEPTION advisory flag when
the error occurs during javascript execution.
If it's at the toplevel compilation
level, then the error is still reported
(and the exception discarded.)
The api is feeling slightly dirtier, but
it still seems like the best
compromise...
git-svn-id: svn://10.0.0.236/trunk@8855 18797224-902f-48f8-a5cc-f745e15eee43
enum JSErrNum, and changed a uintN
errorNumber declaration to JSErrNum.
It'd be nice to change the uintN
errorNumber field in JSErrorReport to
JSErrNum, but it's not clear that
JSErrNum is or should be exposed in the
API. Any C esthetes want to offer their
opinions?
It made my debugger slightly happier.
git-svn-id: svn://10.0.0.236/trunk@8853 18797224-902f-48f8-a5cc-f745e15eee43
Including:
Preliminary work on internationalizing error messages
Preliminary work on exposing runtime errors as catchable exceptions
ECMA-proposed throw and try/catch/finally, with multiple catch clauses
and catchguards
ECMA-proposed in/instanceof operators
IEEE-conformant number to string conversion
Fixes and other good stuff.
git-svn-id: svn://10.0.0.236/trunk@8770 18797224-902f-48f8-a5cc-f745e15eee43
the compiler to puhleeze let us used denormalized floating point
values, as required by the ECMA spec. Thanks to various contributors,
including Torsten Rüger <torsten@ponton-hamburg.de>, for working on
numeric issues. Fix courtesy wtc.
git-svn-id: svn://10.0.0.236/trunk@7884 18797224-902f-48f8-a5cc-f745e15eee43
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
compiler extension, and we want to be able to turn off compiler
extensions for osf. And longs are long long there anyway.
Propagated from nspr, courtesy wtc.
git-svn-id: svn://10.0.0.236/trunk@6445 18797224-902f-48f8-a5cc-f745e15eee43
'in' keyword as an operator in the init clause of for loops; this
disambiguates for/in loop parsing. (Previously, there was some
treenode examination magic going on.) Per recent ECMA submission.
git-svn-id: svn://10.0.0.236/trunk@5784 18797224-902f-48f8-a5cc-f745e15eee43