Commit Graph
24 Commits
Author SHA1 Message Date
Luchs 8d90333ebc #undef some macros which are redefined elsewhere 2015-04-16 14:44:41 +02:00
Bob Nystrom ef06eed680 Minor clean-ups. 2015-04-06 06:53:53 -07:00
Bob Nystrom 82ce1d8be9 Fix up Meta.eval(_).
- Made it use primitives instead of foreign functions.
- This fixed an issue where the interpreter loop was running re-entrantly.
- Which in turn fixed a GC bug.
- Report a runtime error if the argument isn't a string.
- Report a runtime error if the source doesn't compile.
2015-04-03 21:22:58 -07:00
Bob Nystrom 563a090865 Push more core class creation into the core library itself. 2015-04-03 08:00:55 -07:00
Bob Nystrom 37e1e8fe77 Remove outdated comment. 2015-03-28 10:19:38 -07:00
Bob Nystrom a7fafce265 Pull out opcode definitions into an X-macro file. 2015-03-28 09:56:07 -07:00
Bob Nystrom 322eea1af5 Generate a runtime error if a foreign method was not found. 2015-03-26 07:17:09 -07:00
Bob Nystrom 9c414b5da5 Get Meta working with foreign methods. 2015-03-25 20:20:26 -07:00
Bob Nystrom 8dcd336638 Merge branch 'master' into foreign-methods 2015-03-25 20:06:55 -07:00
Bob Nystrom d99a82e6d8 Merge branch 'meta-library' of git://github.com/gsmaverick/wren into gsmaverick-meta-library 2015-03-25 19:21:58 -07:00
Bob Nystrom e4a785a071 Remove oldSize from allocate API.
binary_trees - wren            .......... 0.29s 0.0048 107.79% relative to baseline
delta_blue - wren              .......... 0.12s 0.0017 106.95% relative to baseline
fib - wren                     .......... 0.30s 0.0042 119.95% relative to baseline
for - wren                     .......... 0.12s 0.0020 107.57% relative to baseline
method_call - wren             .......... 0.15s 0.0256 106.09% relative to baseline
map_numeric - wren             .......... 0.44s 0.0199 105.27% relative to baseline
map_string - wren              .......... 0.14s 0.0049 100.18% relative to baseline
string_equals - wren           .......... 0.30s 0.0032 100.57% relative to baseline

Thanks, Michel!
2015-03-25 07:45:29 -07:00
Bob Nystrom 0bd19da392 Bind C methods to Wren using foreign declarations. 2015-03-24 07:58:15 -07:00
Bob Nystrom d168eafeb6 Upvalue -> ObjUpvalue.
This is consistent with ObjModule which also is an Obj
even though it isn't first class in the language.
2015-03-22 22:31:03 -07:00
Bob Nystrom a4df577903 Get rid of some unused parameters. 2015-03-22 22:17:40 -07:00
Bob Nystrom efa6f32d25 Merge branch 'w-extra' of git://github.com/verpeteren/wren into verpeteren-w-extra 2015-03-22 21:49:31 -07:00
Gavin Schulz a937bd1cf9 Adds a Meta library with an eval function for interpreting code inline. 2015-03-22 14:17:02 -07:00
Bob Nystrom 2dfec85506 Enable clang warning on suspicious implicit conversions. 2015-03-22 10:36:08 -07:00
Bob Nystrom 1e493c9061 Hoist instance testing out of the main interpreter loop.
Thanks, Michel!
2015-03-21 16:50:27 -07:00
Bob Nystrom f6cf78c175 Assert instead of silently handling freed VM. 2015-03-20 08:00:52 -07:00
Peter Reijnders 9f32de7047 Added -Wextra to compile flags
-Wextra does several extra checks during the compiling. Unfortunately one of the extra check is for unused parameters.
Several functions have unused parameters (mostly the WrenVM* vm).
2015-03-17 07:29:09 +01:00
Peter Reijnders 26586bfa11 Added a check for allready freed in wrenFreeVm.
If wrenFreeVm was called twice, this would lead to an error, because the memory was allready freed.
The used check is rather naive, suggesting that a valid vm does have at least one methodName set.
2015-03-17 07:28:50 +01:00
Bob Nystrom 034ab3c2af Clean up code for creating strings in the VM. 2015-03-15 22:32:20 -07:00
Bob Nystrom 287c611260 Clean up debug dump code. 2015-03-15 10:09:43 -07:00
Bob Nystrom 92c17e81f6 Reorganize source files.
This makes it clear which files are part of the VM (i.e. the Wren library)
and which are part of the CLI. Makes a directory for the latter so it has
some room to grow.

This probably totally broke the VS project. If you can fix that, send me
a PR!
2015-03-14 15:00:50 -07:00