Commit Graph
696 Commits
Author SHA1 Message Date
Gavin Schulz 0ad7a7d9ff Code review changes. 2015-01-25 13:02:44 -08:00
Bob Nystrom 0e6a90443e Add containsKey() to Map, and validate key types. 2015-01-25 12:39:19 -08:00
Bob Nystrom 492c730e6f Key and value iteration for maps. Also toString. 2015-01-25 10:27:38 -08:00
Bob Nystrom 251b623c65 Map "clear" method. 2015-01-25 08:39:44 -08:00
Bob Nystrom e740a4c95a Map literals! 2015-01-24 23:21:50 -08:00
Bob Nystrom abe80e6d4b Initial map implementation.
Still lots of methods missing and clean up and tests to do.
Also still no literal syntax.

But the core hash table code is there and working. The supported
key types are all, uh, supported.
2015-01-24 22:27:35 -08:00
Gavin Schulz 12102b19ef Adds support for hexadecimal literals. 2015-01-24 22:07:46 -08:00
Bob Nystrom 438e7bae3f Merge branch 'list-join' of git://github.com/gsmaverick/wren into gsmaverick-list-join 2015-01-24 14:39:45 -08:00
Gavin Schulz 4977083904 Abstract List's toString method to a more general join method on Sequence. 2015-01-24 14:01:16 -08:00
Bob Nystrom efd161cea2 Add "arity" getter to Fn. 2015-01-23 20:33:05 -08:00
Bob Nystrom 94080a0e96 Be a bit more explicit about uses of the struct hack. 2015-01-23 10:38:12 -08:00
Bob Nystrom cda727a18d Merge branch 'msvc-project-and-compatibility' of git://github.com/MarcoLizza/wren into MarcoLizza-msvc-project-and-compatibility 2015-01-23 10:12:12 -08:00
Marco Lizza 2f12ad879d Pulling the "Math" library out. 2015-01-23 10:08:34 +01:00
Marco Lizza 1464280933 Restoring original header files order and using MSVC project setting to disable non-secure CRT warnings. 2015-01-23 10:05:10 +01:00
Bob Nystrom eb424f5c1a Make strings iterable over their code points.
I'm not sure why, but this also regresses perf:

binary_trees - wren            ..........  3290  0.30s   96.68% relative to baseline
delta_blue - wren              ..........  7948  0.13s   99.06% relative to baseline
fib - wren                     ..........  3165  0.32s   95.90% relative to baseline
for - wren                     ..........  8242  0.12s   96.00% relative to baseline
method_call - wren             ..........  5417  0.18s   78.74% relative to baseline

Need to investigate.
2015-01-22 20:58:22 -08:00
Bob Nystrom a5b00cebe7 Clarify how string subscripting handles UTF-8. 2015-01-22 16:38:03 -08:00
Bob Nystrom c5e67953b8 Allow non-ASCII UTF-8 characters in string literals. 2015-01-22 15:18:30 -08:00
Marco Lizza c88e61d018 Adding "Math" lib into Wren. 2015-01-22 17:46:09 +01:00
Marco Lizza 5f267ee822 Merge branch 'math_lib' into msvc-project-and-compatibility 2015-01-22 16:42:40 +01:00
Marco Lizza 6df15f209a Added simple "Math" library. 2015-01-22 16:41:19 +01:00
Bob Nystrom 2cee4c83bd Clean up and improve docs in embedder API. Fix #133. 2015-01-22 07:05:55 -08:00
Marco Lizza f628de1201 Merge remote-tracking branch 'munificent/master' into 'msvc-project-and-compatibility' branch for fix #128. 2015-01-22 10:13:16 +01:00
Evan Shaw 513af6df65 Fix precedence of % operator
It previously had the same precedence as + and -.
2015-01-22 09:49:53 +13:00
Bob Nystrom bdc3439a71 Remove old "pinned" terminology. 2015-01-21 08:02:18 -08:00
Bob Nystrom 1d0f6a5033 Get rid of totally broken WREN_PIN. Fix #128. 2015-01-21 07:56:06 -08:00
Marco Lizza 61674112c9 Addressing odd Microsoft Visual Studio 2013 optimizer bug. 2015-01-21 11:01:09 +01:00
Marco Lizza 73ce2b0b7e Revised headers include order. The "wren_common.h" should be included first, being a sort of "configuration" header. Then the "wren-XYZ.h" header should follow for "XYZ.c" source file. Then the other "wren_*.h" headers (in lexicographical order if possible). Al last, the standard include files. 2015-01-21 10:30:37 +01:00
Marco Lizza 991ada8919 Microsoft compiler seems not to support the computed-goto approach. 2015-01-21 10:27:27 +01:00
Marco Lizza 67da0c42f0 Fixed returning a "void" function return value (!). 2015-01-21 10:23:46 +01:00
Marco Lizza bc74c28904 Using a "char" could cause odd sign extension results. 2015-01-21 10:22:56 +01:00
Marco Lizza a45ec69f9f In MSVC the "inline" modifier is not available when compiling in plain-C. 2015-01-21 10:22:18 +01:00
Marco Lizza bb9708a7e3 Resolving (non-standard) zero-sized array usage warning. 2015-01-21 10:21:04 +01:00
Bob Nystrom 9453acf1e6 User-defined subscript operators. 2015-01-20 18:25:54 -08:00
Bob Nystrom c63b027210 More explicit casting between Value and Obj* to satisfy 32-bit MinGW.
Fix #111.
2015-01-20 17:06:39 -08:00
Bob Nystrom d7ae2bbc4c Turn CalculatedRange into output params. 2015-01-20 15:33:21 -08:00
Bob Nystrom b55eb7de7a Merge branch 'string-range-subscript' of git://github.com/gsmaverick/wren into gsmaverick-string-range-subscript 2015-01-20 15:01:14 -08:00
Bob Nystrom d894fc3dec Tighten numeric types in intepreter:
binary_trees - wren            ..........  3563  0.28s  101.26% relative to baseline
delta_blue - wren              ..........  8162  0.12s  106.05% relative to baseline
fib - wren                     ..........  3310  0.30s  103.39% relative to baseline
for - wren                     ..........  8576  0.12s  102.16% relative to baseline
method_call - wren             ..........  6946  0.14s  107.08% relative to baseline
2015-01-20 14:41:09 -08:00
Bob Nystrom 721db7564b Remove unused return value from consume() and consumeLine(). 2015-01-20 14:40:34 -08:00
Bob Nystrom 363dff2ffd Reorganize a bit. 2015-01-20 14:00:03 -08:00
Harry Lawrence 2763ab3176 Implemented wrenGetArgumentBool 2015-01-19 14:40:37 +00:00
Gavin Schulz bfc2f9c0ee Adds range subscripting for strings. 2015-01-18 22:55:30 -08:00
Bob Nystrom 50c0cbe8c3 Merge branch 'master' of https://github.com/munificent/wren 2015-01-18 10:20:29 -08:00
Bob Nystrom d8b678356e Raise precedence of "is". Fix #119. 2015-01-18 10:20:13 -08:00
Harry Lawrence dec4f0d1e7 Implemented wrenReturnBool in vm 2015-01-17 11:48:27 +00:00
Bob Nystrom ae97e9c3a4 Remove Linux-specific libc stuff. 2015-01-16 23:32:20 -08:00
Bob Nystrom eece4ee926 Inline callFunction():
binary_trees - wren            ..........  3400  0.29s   97.79% relative to baseline
delta_blue - wren              ..........  7565  0.13s  102.23% relative to baseline
fib - wren                     ..........  3039  0.33s   98.93% relative to baseline
for - wren                     ..........  8265  0.12s   92.49% relative to baseline
method_call - wren             ..........  6759  0.15s  131.21% relative to baseline
2015-01-16 07:45:42 -08:00
Bob Nystrom 2a37110bd1 Don't use designated initializer. 2015-01-16 07:10:33 -08:00
Luchs 5cfb638fd1 Use @munificent's single-argument reduce 2015-01-16 09:26:19 +01:00
Luchs 4c6b819ed1 Add reduce function on Sequence 2015-01-16 09:24:59 +01:00
Bob Nystrom 64c2bd7633 Make all types support "!" so "if (!foo)" works reliably for all objects. 2015-01-15 21:50:01 -08:00