Commit Graph
26 Commits
Author SHA1 Message Date
Tor Andersson 704d16409f Collect garbage. 2014-01-18 00:02:04 +01:00
Tor Andersson 96ca91ec7c Garbage collector lists. 2014-01-17 23:02:14 +01:00
Tor Andersson 56042de82b Fix the shape of the outer API a bit. Implement eval. 2014-01-16 21:36:54 +01:00
Tor Andersson 288eef80e1 Clean up. Rearrange files. Rename functions. 2014-01-16 20:48:43 +01:00
Tor Andersson 3715d6d145 Add JS_NORETURN declaration to longjumping functions. 2014-01-16 14:15:17 +01:00
Tor Andersson 0f87d01184 Add callable CFunctions and a print() function. 2014-01-16 02:14:07 +01:00
Tor Andersson 18b192b8aa Minor cleanups. 2014-01-16 02:14:07 +01:00
Tor Andersson ede0f888ce Prepare for objects with internal properties, and closures as objects. 2014-01-15 23:41:41 +01:00
Tor Andersson 47e88ac805 Calculate stack index for both positive and negative numbers.
Call all functions with "this" as the first argument.

Negative indexes count from the top, positive indexes count from
the current function call frame (so arguments start at 0).
2014-01-15 01:34:30 +01:00
Tor Andersson a4cc139e1c Add js_Object with js_Property binary search tree.
Use object to represent a variable record and implement variable
loading and storing in the interpreter.
2014-01-13 21:32:33 +01:00
Tor Andersson 5756da56d1 Begin generating byte code. 2014-01-12 13:39:42 +01:00
Tor Andersson a476ffcc12 Preserve regexp flags. Escape more characters when dumping strings. 2014-01-11 12:47:08 +01:00
Tor Andersson 9db2fce3a2 Add proper pretty-printing functions.
jsP_dumpsyntax to print as javascript.
jsP_dumplist to print as s-expressions.
2014-01-10 19:50:01 +01:00
Tor Andersson 8342452b13 Rename files and put stuff in the correct headers. 2014-01-10 14:37:57 +01:00
Tor Andersson 24e9127b83 Style cleanup. 2014-01-10 11:12:18 +01:00
Tor Andersson 45e2f80a80 Clean up interface between lexer and parser. 2014-01-10 01:48:38 +01:00
Tor Andersson c3a035d6f9 Use setjmp/longjmp to handle parsing errors. 2014-01-09 17:24:21 +01:00
Tor Andersson 5ead782e99 Recursive descent parser for expressions. 2014-01-09 17:24:21 +01:00
Tor Andersson adbbeec672 String interning table. 2014-01-08 21:02:39 +01:00
Tor Andersson e928c1410c Set newline flag if a token is preceded by a line terminator. 2013-12-28 12:55:44 +01:00
Tor Andersson a4e846ba53 Prepare lexer for hooking up to generated parser.
Use single character tokens as-is. Make token enums private in a
separate header file, and give them better names.
2013-12-27 23:54:45 +01:00
Tor Andersson cb273846e4 Throw errors on future words immediately.
Use the latest ECMA 262-5 list of future words.
2013-12-27 18:31:17 +01:00
Tor Andersson 294a803552 Print error message with line number on lexical errors. 2013-12-27 15:54:35 +01:00
Tor Andersson e37029624d Lex regular expression literals. 2013-12-24 00:35:46 +01:00
Tor Andersson db3ae4ed23 Move yytext and yynumber into js_State.
Make yytext dynamically allocated and grown.
2013-12-23 23:13:24 +01:00
Sebastian Rasmussen bb2279e43d Add lexer. 2013-12-23 19:53:34 +01:00