Commit Graph
66 Commits
Author SHA1 Message Date
shaver 0e6b7d7f0b more jsI?Context stuff, some Scriptable hackery 1998-07-15 16:59:47 +00:00
danm fccae485e1 optionally include GlowCode. bug 299200 a:don. 1998-07-13 00:22:53 +00:00
danm 208065064e glowcode. bug 299200 a:don. 1998-07-09 16:33:15 +00:00
shaver 8c7ccfab97 start at jsContext and jsRuntime implementations, enough to run trivial script 1998-07-08 16:53:49 +00:00
shaver 00f4af6dbf forgot the NPL 1998-07-01 19:59:06 +00:00
shaver 2b021ed266 adding XPCOM interface support (non-functional) -- not part of Gromit 1998-07-01 18:18:00 +00:00
atotic f506e4f9d7 Remove NavigatorStubs dependency Added new targets (JavaScriptNoJSJ$D) to build JavaScript without JSJ dependency. 1998-06-26 23:37:04 +00:00
atotic c88b8147a3 Implemented MyReadLocation inline to remove the NavigatorStubs dependency 1998-06-26 23:35:01 +00:00
fur e601aa5432 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
1998-06-09 23:04:48 +00:00
shaver 73cbb7f772 added JS_YieldRequest to API (me), and removed assertion in InitClass (mlm) 1998-06-09 21:39:58 +00:00
shaver babcd334db first arg to Script.prototype.exec is scopeobj, not second-with-ignored-first 1998-06-09 21:10:45 +00:00
fur 854958a9c2 Replacement for stddef.h in the JS interpreter which defines ptrdiff_t to be 32 bits rather than 16 bits on Win16 only 1998-06-09 21:05:54 +00:00
norris 99b6c54252 Fix 123552 Array length updating is incorrect
js> a = new Array()

js> a["3.00"] = "three"
three
js> a.length
4

Since "3.00" is not an array index as defined by ECMA, a.length should be 0.
1998-06-09 16:47:00 +00:00
norris 3d2de335e6 Fix bug 104191 "ECMA: multiple params w/ same name":
Decompiling "function f(a,b,a) { ... }" would only print two parameters.
1998-06-08 23:41:54 +00:00
mccabe 8bd55ad548 ECMA fix to bug (93557). When excecuting the Function constructor,
treat all the 'arguments arguments' as if they were concatenated
together as a comma-separated list, and treat the list as if it were
the arguments list in a normal function declaration.  That is, allow
comments, arbitrary whitespace, etc.

Fixed by introducing a TokenStream instance in the Function contructor
code.
1998-06-08 19:04:17 +00:00
mccabe 44e11d3ab3 Added a few (JSOp) casts to appease Macintosh compiler workings.
Enums are types!
1998-06-04 00:22:55 +00:00
sfraser 08e94ca5ea Changes to project and prefix files for Mac commercial build 1998-06-03 23:01:03 +00:00
sfraser 6bffa30a5a First Checked In. 1998-06-03 23:00:41 +00:00
sfraser c5dfcf97e7 First Checked In. 1998-06-03 22:38:01 +00:00
mccabe 776d8ba625 Hopefully removed the offending jsstddef.h for good. 1998-06-03 03:55:10 +00:00
sar f08b3a07f0 backing out mccabes checkin 1998-06-03 02:30:46 +00:00
jgellman 741f369fdb merge from OJI branch 1998-06-03 00:37:20 +00:00
mccabe bdb69dd44e Removed reference to jsstddef.h - which got propagated over from
recent changes to js/ref.  We need to fix prconv.sed or check in
src/jsstddef.h!
1998-06-03 00:23:57 +00:00
scc a01e8f8d5b First Checked In. 1998-06-02 23:54:58 +00:00
mccabe 022c3b3c5f Cleanup of parseInt checkin, including comment changes. The code is
now a little more explit about when it expects js strings to be
null-terminated.
1998-06-02 23:21:08 +00:00
sfraser a2ac1c78e2 Changes for new build system, and unified prefix files. 1998-05-28 19:22:54 +00:00
shaver 8308422d3d tracking ref fixes: XDR and jsnum 1998-05-27 14:24:39 +00:00
mccabe a6f9ecc9e7 Conditionalized a (jsint) cast to ask JSDOUBLE_IS_NaN first -
hopefully avoiding a SIGPFE on Alpha Linux.  (And others?)
1998-05-27 04:53:37 +00:00
sfraser 4423df0d8c First Checked In. 1998-05-23 01:14:17 +00:00
mccabe ac5492c1fb Fix to (83996), global parseInt function fails for numbers > 2^31.
It now passes all of the tests in 15.1.2.2-1 (except that parseInt
still has the .length property, which is a different bug) - so I'll
close the bug.

Still possibly at issue is whether we conform to ECMA language about
decimal numbers that are too large to fit in a double.  I treat
decimal digits after the 20th as zero, but there could be some
floating-point rounding wackiness going on.  In particular - are we
doing the right thing for numbers that are powers of 2, but larger
than 2^54, that are representable in a double?
1998-05-21 23:15:24 +00:00
matt 48bdb8b8dd ifdef include on prosdep. If should not be dependent. Was breaking js/src builds 1998-05-21 22:41:18 +00:00
mccabe 6adb434ce4 Removed the escape and unescape functions, as they are now part of the
core engine.  (They've become part of the ECMA spec.)  Fix to (97681).
1998-05-20 03:25:41 +00:00
brendan 79ca493026 Modernize README 1998-05-16 00:55:35 +00:00
mccabe 7d4477c4b5 ECMA fix to (117144).
Array.prototype.sort(comparefn) was casting the result of the compare
to an int, which lost when the compare function returned (ecma-valid)
strange double values.  These now get clamped to -1, 0, 1.
1998-05-13 23:29:52 +00:00
mccabe 72c546d151 Warning fix - added an (int16) cast to quiet a Windows warning. 1998-05-13 22:13:30 +00:00
mccabe df6d86bd0b (Not part of the mozilla build process.)
Added support in the javascript shell for the #! unix script hack; if
the first line read by the shell (from a file, not interactive) starts
with #, the line is treated as a comment.

This should make
#!/usr/bin/js work...
1998-05-09 05:54:12 +00:00
mccabe 208ffce27a Added #if defined ( SNI ) to a few existing #if tests, for compiling
on SINIX.
1998-05-01 07:06:12 +00:00
mccabe bba7700ad5 Another place where error reporting hadn't caught up to 16-bit
character strings; added a js_DeflateString call.  Thanks to gcc 2.8.1
for catching this - it complained about "char format, different type
arg (arg 4)" - which means that it looked in the (printf-style) format
string and checked type against it.  Wow.
1998-05-01 01:39:51 +00:00
mccabe 4bd987fe37 Restoring changes that were backed out because of a one-line error in
prmjtime.c.
1998-05-01 00:22:06 +00:00
hshaw 5df5e079ff Back out changes which are breaking builds (at request of mccabe) 1998-04-30 08:18:42 +00:00
hshaw f317392d76 Back out changes which are breaking builds (at request of mccabe) 1998-04-30 08:10:05 +00:00
mccabe 8043ca77f3 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.
1998-04-30 03:51:26 +00:00
mccabe 3c92cd5c60 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.
1998-04-30 00:27:43 +00:00
mccabe 17cfa3171d Removed some unused constants. 1998-04-30 00:14:07 +00:00
mccabe 2069c9a726 Removed some unused lines related to jsdate.c. 1998-04-30 00:11:31 +00:00
mccabe e1dc792c82 ECMA-conformance fix to (95045) - added 'enum' and 'debugger' as
reserved words, and changed the versioning check that previously
applied to 'export' to accept any 'ecma' version... which means that
export becomes a keyword for the default version.  Does this mean
we'll need to unreserve all the java keywords?  Not sure we want to do
that...
1998-04-29 23:57:20 +00:00
mccabe 02625b5eed Fixed error message associated with trying to use a keyword as an
identifier; it was only printing the first character of the
identifier, because it expected 8-bit chars, and was being called with
a 16-bit representation of the offending keyword.
1998-04-29 23:52:40 +00:00
donm 54bc29b433 removing Henrit's jsfile.c and jsfile.h to fix unix build bustage. 1998-04-28 18:00:54 +00:00
donm c2cd5bc4c8 backing out Henrit's changes to fix build bustage. 1998-04-28 18:00:00 +00:00
sar 3a6d6dd264 jsfile doesn't compile on unix. Backing out the changes that henrit put it 1998-04-28 17:57:43 +00:00