Commit Graph

  • bc51de87ef Use of try/catch must disqualify a function from being lightweight. Tor Andersson 2014-11-17 12:21:04 +01:00
  • 4a7ffbf2ed Fix bug in Math.random(). Tor Andersson 2014-11-10 12:19:22 +01:00
  • 339abac8ab Optimize js_stringtofloat to use integer conversion when possible. Tor Andersson 2014-11-07 16:07:56 +01:00
  • 9f181651fb Track array sparseness to be smarter in jsV_resizearray. Tor Andersson 2014-11-07 16:00:45 +01:00
  • 9ded251f9b Oops. Remove stray printf. Tor Andersson 2014-11-06 01:17:07 +01:00
  • 98744d09a4 Fix bug in Array.prototype.splice(). Tor Andersson 2014-11-05 17:36:21 +01:00
  • 9ed0914704 Fix bug in js_setlength when used for relative indices. Tor Andersson 2014-11-05 17:35:51 +01:00
  • a9e6b4cd01 Fix bug in maintaining property enumeration list. Tor Andersson 2014-11-01 13:01:05 +01:00
  • 051d504cfb Add missing js_endtry call in Fp_toString. Tor Andersson 2014-10-31 16:58:08 +01:00
  • 3f69364c7f JSON.stringify: support 'space' argument. Tor Andersson 2014-10-28 13:44:41 +01:00
  • 64cd586798 Add static to some functions that should have it. Tor Andersson 2014-10-28 12:35:24 +01:00
  • 45c62b0fcc Fix JSON parsing problems: Tor Andersson 2014-10-28 12:21:04 +01:00
  • 3fe6635426 Differentiate between "global code" and "eval code" scripts. Tor Andersson 2014-10-27 16:11:23 +01:00
  • 7d771cb0d9 Fix js_strtod to set the sign of -0 correctly Szabolcs Nagy 2014-10-16 21:57:21 +02:00
  • 85d4c8a52c Fix Math.min and Math.max to accept zero args and handle -0 Szabolcs Nagy 2014-10-16 21:52:09 +02:00
  • a88e9d4c5e Fix Math.atan2 and Math.pow argument evaluation order Szabolcs Nagy 2014-10-16 21:44:30 +02:00
  • e107fcf8ca Fix Math.abs to use fabs instead of int abs Szabolcs Nagy 2014-10-16 21:40:37 +02:00
  • 790103815f Add public property iterator function. Tor Andersson 2014-10-16 13:50:44 +02:00
  • 43de5a093f Implement Math.round according to the (stupid) specification. Tor Andersson 2014-10-15 13:12:45 +02:00
  • 46aca3b4f8 Fix return value of RegExp.prototype.exec() Tor Andersson 2014-10-13 16:34:35 +02:00
  • ee6c9c53f0 Optimize isalpha/digit macros in lexer. Tor Andersson 2014-10-13 16:34:21 +02:00
  • 8ab50244bc Fix 'make test' target. Tor Andersson 2014-10-13 16:33:52 +02:00
  • 5ba75dac6b Allow identity escapes in regular expressions. Tor Andersson 2014-10-09 16:14:18 +02:00
  • 15795e2b58 Allow unescaped / inside classes in regular expression tokens. Tor Andersson 2014-10-09 15:18:26 +02:00
  • 8a659b2821 Typedef instruction and check addresses and literals for overflow when emitting code. Tor Andersson 2014-10-09 15:08:02 +02:00
  • a381ba1963 Change error message prefix to 'mujs:'. Tor Andersson 2014-09-25 14:19:31 +02:00
  • 9512755c2c Use LDFLAGS when linking. Tor Andersson 2014-09-25 14:18:34 +02:00
  • aba272ac95 Fix bug where some environment records were not marked by GC. Tor Andersson 2014-09-24 16:02:04 +02:00
  • 2e196dd0fc Strip backslash from escaped / when lexing regular expressions. Tor Andersson 2014-09-24 14:05:59 +02:00
  • bc845cbd64 Optimize lexnumber when using strtod. Tor Andersson 2014-09-22 15:47:04 +02:00
  • 93cc0584df Add portable strtod implementation. Tor Andersson 2014-09-01 16:56:38 +02:00
  • 1f137b8e48 Improve MuJS interactive shell. Tor Andersson 2014-07-31 16:52:26 +02:00
  • e7314780c6 Fix compilation problem on VS 2013 Ray Johnston 2014-07-19 18:42:30 -07:00
  • 7bab97a7d8 Tweak argument order in js_is/touserdata. Tor Andersson 2014-06-12 13:42:48 +02:00
  • 8f7c649985 Move ToPrimitive hint flags into jsvalue.h Tor Andersson 2014-06-11 12:58:14 +02:00
  • 3094ffc94b Add "make tarball" rule to create release archives. Tor Andersson 2014-04-30 13:21:23 +02:00
  • b37173e52e Silence "no return value"/"unreachable statement" warnings. Tor Andersson 2014-03-26 14:27:53 +01:00
  • 89dc0c8cd1 Fix warnings on Windows. Tor Andersson 2014-03-26 13:09:53 +01:00
  • 9e41afffa6 Add signbit() implementation for MSVC. Tor Andersson 2014-03-21 15:55:04 +01:00
  • 546f0330a8 Update README. Tor Andersson 2014-03-20 12:37:26 +01:00
  • 40d4dff589 Add debug, release and install targets. Tor Andersson 2014-03-20 12:37:13 +01:00
  • 48aed4bbb6 Name the library: MuJS! Tor Andersson 2014-03-19 23:07:33 +01:00
  • 83dd92f085 Add and use dtoa function from plan9/libfmt. Tor Andersson 2014-03-18 15:38:35 +01:00
  • 375c8a8e08 Use explicit MAX/MIN_VALUE constants. Tor Andersson 2014-03-13 14:48:39 +01:00
  • 8f87c0a842 Parse 0X1234 as hexadecimal numbers in ToNumber. Tor Andersson 2014-03-13 14:41:14 +01:00
  • 4223434896 Fix attributes of numeric constants. Tor Andersson 2014-03-13 14:40:55 +01:00
  • d664d08a8e Fix compilation of -0. Tor Andersson 2014-03-13 14:23:30 +01:00
  • 5dbd120154 Fix several constructors. Tor Andersson 2014-03-13 13:36:29 +01:00
  • 858d5890b3 Handle empty arguments to Function constructor. Tor Andersson 2014-03-13 13:11:42 +01:00
  • a6ba5356e2 Makefile tweaks. Tor Andersson 2014-03-12 16:58:57 +01:00
  • 3e050a949e Rename libjs.c to one.c and commit it. Tor Andersson 2014-03-12 16:48:40 +01:00
  • d366e4b852 Don't pass argc to functions. Use js_gettop instead. Tor Andersson 2014-03-09 16:13:18 -05:00
  • 1c52e8b7b4 Fix semantics of x++: return ToNumber(x) rather than x. Tor Andersson 2014-03-12 15:19:31 +01:00
  • 46b9d8c7e7 Check that operand to 'in' is an object (no implicit conversion). Tor Andersson 2014-03-12 14:42:22 +01:00
  • eed403069f Use strtod when lexing numbers. Tor Andersson 2014-03-12 14:35:41 +01:00
  • dc386479da Add and use js_touint16. Tor Andersson 2014-03-06 22:33:37 +01:00
  • 44ddedea93 Some tidying. Tor Andersson 2014-03-06 22:26:47 +01:00
  • 41693fa6bd Add protected functions to load and call code. Tor Andersson 2014-03-06 22:21:11 +01:00
  • 222ae8067b Add user customisable panic function. Tor Andersson 2014-03-06 22:00:39 +01:00
  • b24fe47378 Handle NaN and Infinity in Number.toFixed and friends. Tor Andersson 2014-03-06 21:40:37 +01:00
  • 69cb649c2b Use array helper functions. Tor Andersson 2014-03-06 21:23:51 +01:00
  • c87898e63b Implement Function.prototype.bind(). Tor Andersson 2014-03-06 16:48:42 +01:00
  • 35cc749225 Fix regex.c test function printouts. Tor Andersson 2014-03-06 21:20:53 +01:00
  • d608b2f9aa Check bounds of date elements in Date.parse(). Tor Andersson 2014-03-04 00:05:25 +01:00
  • 9eb0a65fcf Improve date parsing. Tor Andersson 2014-03-03 23:47:57 +01:00
  • e4cafa6d26 Always use ISO 8601 formats for date string formatting. Tor Andersson 2014-03-03 23:03:16 +01:00
  • 5961e39073 Fix fmod use with negative (pre-1970) times. Tor Andersson 2014-03-03 19:14:35 +01:00
  • 5b567dd5cf Make date formatting and parsing re-entrant and libc independent. Tor Andersson 2014-03-03 18:30:48 +01:00
  • b4223dfb47 Use gettimeofday/_ftime if available for more accurate times. Tor Andersson 2014-02-28 20:21:31 +01:00
  • 7bac090c8d Tweak js_strtod. Tor Andersson 2014-02-28 17:13:09 +01:00
  • abd59674cc Allow custom allocator. Tor Andersson 2014-02-28 17:13:01 +01:00
  • 67b33c5a86 Handle malloc failure by throwing exceptions. Tor Andersson 2014-02-28 14:24:13 +01:00
  • 598de57d76 Fix ToNumber from strings and parseInt and parseFloat. Tor Andersson 2014-02-27 13:49:22 +01:00
  • 43384d9110 Parse \0 and \x00 and \u0000 in regular expressions. Tor Andersson 2014-02-27 13:12:28 +01:00
  • 9cb65f0e37 Check for invalid character escapes in regular expressions. Tor Andersson 2014-02-27 13:11:03 +01:00
  • bfe569921d Improve Resub API. Tor Andersson 2014-02-26 20:22:53 +01:00
  • 01d85a4994 Move nelem() macro into jsi.h Tor Andersson 2014-02-26 17:35:18 +01:00
  • 90c2ba0bf3 Nul-terminate strings created by toUpper/LowerCase. Tor Andersson 2014-02-26 16:00:23 +01:00
  • 32ac46df15 Fix relational equality with NaN. Tor Andersson 2014-02-26 15:58:02 +01:00
  • 7562052e87 Handle two-digit backreferences and captures. Tor Andersson 2014-02-26 15:30:46 +01:00
  • fee803ad49 Check for infinite loops matching the empty string at parse time. Tor Andersson 2014-02-26 15:06:22 +01:00
  • b60c1cca9b Use explicit backtracking stack rather than recursion. Tor Andersson 2014-02-25 18:24:17 +01:00
  • 697eee89ad Use macro for magic number indicating an infinite number of repeats. Tor Andersson 2014-02-25 16:19:29 +01:00
  • fd0ff38ad0 Remove -Werror. Tor Andersson 2014-02-26 12:57:35 +01:00
  • e7e1e0de9c Build on MSVC 2005. Tor Andersson 2014-02-25 20:43:14 +01:00
  • c67ca523aa Remove more dead code. Tor Andersson 2014-02-25 20:08:16 +01:00
  • a42d36ba8e Potential win32 MSVC compilation fixes. Tor Andersson 2014-02-25 11:35:10 +01:00
  • e766ed71f8 Always open files in binary mode. Tor Andersson 2014-02-25 11:32:18 +01:00
  • 11bcefd541 Don't recurse on second branch of "split" instruction. Tor Andersson 2014-02-25 13:40:24 +01:00
  • 45e3a31950 Some -pedantic warning fixes. Tor Andersson 2014-02-25 01:23:52 +01:00
  • a98748a0ce Use clang by default and enable more warnings. Tor Andersson 2014-02-25 01:01:20 +01:00
  • 70b0d8b902 Change C functions to not have a return value. Tor Andersson 2014-02-25 00:56:33 +01:00
  • e4a6860f6e More signedness fixes. Tor Andersson 2014-02-25 00:22:17 +01:00
  • fe723b6f8b Fix unreachable code warnings. Tor Andersson 2014-02-25 00:21:47 +01:00
  • c7e9ab0b05 Fix signed/unsigned comparison warnings. Tor Andersson 2014-02-24 23:50:06 +01:00
  • ef891c5c9e Oops. Forgot to emit "setprop" for assignment operators. Tor Andersson 2014-02-24 22:44:59 +01:00
  • d4f7b160e1 Fix lookahead captures. Tor Andersson 2014-02-24 16:14:43 +01:00
  • 55ad332621 Rename some regex opcodes. Tor Andersson 2014-02-24 15:33:50 +01:00
  • d50c934fec Fix jsone build. Tor Andersson 2014-02-24 12:04:10 +01:00
  • 2d28162c2f typeof X when X in not declared should return undefined rather than throw. Tor Andersson 2014-02-24 12:03:59 +01:00