Commit Graph
460 Commits
Author SHA1 Message Date
Bob Nystrom b45d3689de Clean up some comments. 2015-02-21 00:09:55 -08:00
Bob Nystrom ae88ee539d Merge branch 'master' of https://github.com/munificent/wren 2015-02-18 07:55:38 -08:00
Bob Nystrom 8ec89740c5 Merge pull request #172 from MarcoLizza/more_bitwise
More bitwise operands
2015-02-18 06:51:13 -08:00
Bob Nystrom b2ca4c0381 Allow zero or multiple imported names. 2015-02-17 07:32:33 -08:00
Bob Nystrom 31304ac2bb Merge branch 'master' into modules 2015-02-17 07:22:21 -08:00
Bob Nystrom c6043d3c81 Use bytecode to import variable, instead of builtin function. 2015-02-17 07:21:51 -08:00
Bob Nystrom 314c39e430 Use a native bytecode to load a module, instead of a weird builtin function on String. 2015-02-16 22:45:58 -08:00
Marco Lizza 269bf90ec8 More explicit naming bitwise operand implementations. 2015-02-16 22:29:30 +01:00
Marco Lizza c45d70ac4e Fixed token name for '<<' and '>>'. 2015-02-16 22:26:54 +01:00
Bob Nystrom c2c576b27c Get rid of builtin function for importing. 2015-02-16 10:21:29 -08:00
Bob Nystrom 5b1447882b Move running the module fiber into C. 2015-02-16 10:16:42 -08:00
Bob Nystrom 36d100b8e4 Move module load failure into C. 2015-02-16 10:12:41 -08:00
Bob Nystrom cbd0217072 Merge pull request #174 from MarcoLizza/IO_time
IO.time
2015-02-16 10:01:56 -08:00
Bob Nystrom 032c650e1f Get rid of hash constants for singleton values. 2015-02-16 09:33:07 -08:00
Marco Lizza c9400a2c81 Adding 'IO.time' static method. 2015-02-16 12:04:56 +01:00
Marco Lizza 5280bf6c28 Adding '^', '<<', and '>>' operands implementation for numbers. 2015-02-16 11:29:14 +01:00
Marco Lizza 71fb636c94 Compiler now recognizes '^', '<<', and '>>' operands. 2015-02-16 11:28:34 +01:00
Bob Nystrom a44d479643 Basic import syntax. 2015-02-14 16:46:00 -08:00
Bob Nystrom b7cd8c755f Make map deletion not soul-crushingly slow.
In cases where the hashtable had a large cluster (which can happen with lots of sequential numeric keys),
deletion would regress to near O(n).

Instead, this deletes by leaving a tombstone entry, similar to what Python, Lua, et. al. do.
2015-02-11 22:43:39 -08:00
Bob Nystrom bc5a793c41 Split out the core and main modules.
- Implicitly import everything in core into every imported module.
- Test cyclic imports.
2015-02-11 10:06:45 -08:00
Bob Nystrom 2005e1e0a2 Add ".wren" to modules in the embedder. 2015-02-06 11:52:05 -08:00
Bob Nystrom bb647d4247 Start getting module loading working.
Right now, it uses a weird "import_" method on String which
should either be replaced or at least hidden behind some syntax.

But it does roughly the right thing. Still lots of corner cases to
clean up and stuff to fix. In particular:

- Need to handle compilation errors in imported modules.
- Need to implicitly import all core and IO types into imported module.
- Need to handle circular imports.
  (Just need to give entry module the right name for this to work.)
2015-02-06 07:01:15 -08:00
Bob Nystrom 30a5284338 Merge branch 'master' into modules
Conflicts:
	src/wren_debug.c
	src/wren_value.c
	src/wren_value.h
2015-02-05 12:07:25 -08:00
Bob Nystrom 02600e2cb1 Get rid of main module field in WrenVM.
Instead, the main module is stored in the module map.
2015-02-05 12:03:19 -08:00
Bob Nystrom 4a19050416 Merge branch 'uint32_string' of git://github.com/MarcoLizza/wren into MarcoLizza-uint32_string 2015-02-04 20:28:27 -08:00
Bob Nystrom 878be6fb6b Clean up wrenStringFind() a bit. 2015-02-04 20:23:50 -08:00
Bob Nystrom ba4760331e Merge branch 'replacing_strstr' of git://github.com/MarcoLizza/wren into MarcoLizza-replacing_strstr 2015-02-04 17:56:29 -08:00
Bob Nystrom aa9cfffb34 Keep code within 80 columns. 2015-02-04 08:15:35 -08:00
Bob Nystrom 8f313bf4ec Merge branch 'fixing_string_concatenation' of git://github.com/MarcoLizza/wren into MarcoLizza-fixing_string_concatenation 2015-02-04 08:12:50 -08:00
Bob Nystrom ed534b8165 Merge pull request #159 from MarcoLizza/null_char_escape
Adding '\0' escape sequence for null characters.
2015-02-04 06:57:42 -08:00
Bob Nystrom 6f26f542ea Merge pull request #163 from MarcoLizza/memcpy_for_strings
Getting rid of "strcpy()/strncpy()" in favour of "memcpy()".
2015-02-04 06:57:17 -08:00
Marco Lizza 8af1a787e2 Getting rid of constant unsigned error when compiling for C++ on GCC. 2015-02-04 13:59:53 +01:00
Marco Lizza 096e5cf33c Fixing empty search string corner case. 2015-02-04 13:53:59 +01:00
Marco Lizza 4d1e0833fb Getting rid of "strcpy()/strncpy()" in favour of "memcpy()". 2015-02-04 13:51:54 +01:00
Marco Lizza 4c58830684 Fixing minor string length comparison warning. 2015-02-04 13:47:09 +01:00
Marco Lizza d3ca27fb9a Changing 'wrenStringConcat()' to support null-containing strings. 2015-02-04 13:44:39 +01:00
Marco Lizza 875ee9e55a Replacing 'strstr()' with 'wrenStringFind()' to support 8-bit strings. Internally the Boyer-Moore-Horspool algorithm is used. 2015-02-04 13:38:15 +01:00
Marco Lizza 866aeb7a3a Changing string size type to 'uint32_t'. 2015-02-04 13:29:15 +01:00
Marco Lizza 6997b9475d Adding '\0' escape sequence for null characters. 2015-02-04 13:25:25 +01:00
Bob Nystrom 9917c16876 Fix un-Nan-tagging mode. Thanks, Michel Hermier! 2015-02-01 15:26:33 -08:00
Bob Nystrom 593e5c8b35 Clean up how flex arrays are allocated. 2015-02-01 15:12:37 -08:00
Bob Nystrom 98df1b2bd1 Add cast. 2015-01-31 10:54:27 -08:00
Bob Nystrom 970093299a Merge branch 'symbol_table_optimization' of git://github.com/MarcoLizza/wren into MarcoLizza-symbol_table_optimization 2015-01-31 10:49:41 -08:00
Bob Nystrom 2ba8da7418 Merge branch 'master' into modules 2015-01-30 07:21:41 -08:00
Marco Lizza 87b9fdd620 Using 'memcmp' in place of 'strncmp'. 2015-01-30 09:24:10 +01:00
Marco Lizza a54bde7294 Fixing style typo. 2015-01-30 09:23:30 +01:00
Bob Nystrom 8e25aa646e Remove unneeded conversion. Fix #148. 2015-01-29 20:44:46 -08:00
Marco Lizza 23cc8a5384 Fixed debug symbols dump. 2015-01-29 17:08:05 +01:00
Marco Lizza 5143b0707d Keeping trace of symbols length in the symbol table. 2015-01-29 16:54:21 +01:00
Bob Nystrom f10058a704 Merge branch 'master' of https://github.com/munificent/wren 2015-01-28 19:19:19 -08:00