Commit Graph
100 Commits
Author SHA1 Message Date
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 8e25aa646e Remove unneeded conversion. Fix #148. 2015-01-29 20:44:46 -08:00
Bob Nystrom f10058a704 Merge branch 'master' of https://github.com/munificent/wren 2015-01-28 19:19:19 -08:00
Bob Nystrom 0aa4d7c2bd Fix crash when doing a lookup on an empty map. 2015-01-28 19:19:04 -08:00
Bob Nystrom 81dd7a7412 Merge pull request #143 from MarcoLizza/dropped_bitfields_usage
Bitfields usage
2015-01-27 07:06:18 -08:00
Bob Nystrom 699b453805 Fix ambiguous sequence point in dup. 2015-01-26 21:23:54 -08:00
Bob Nystrom b93ad5fae4 Merge branch 'range-equality' of git://github.com/gsmaverick/wren into gsmaverick-range-equality 2015-01-26 07:01:15 -08:00
Bob Nystrom ed8e595f54 Get rid of bytecodes for list literals.
Just compile them to:

new List
.add(...)
.add(...)
...

Gets rid of some code in the interpreter loop, which is always good.
Also addresses the old limitation where a list literal could only have
255 elements.
2015-01-25 22:49:30 -08:00
Bob Nystrom a9bd864c6b More docs for maps. 2015-01-25 21:39:22 -08:00
Bob Nystrom 44db50e7ef Don't rely on fallthrough. 2015-01-25 17:51:50 -08:00
Bob Nystrom 41d9ba9b3d Merge branch 'hex-literals' of git://github.com/gsmaverick/wren into gsmaverick-hex-literals 2015-01-25 17:49:05 -08:00
Bob Nystrom 4579171afa Add remove() to Map. 2015-01-25 17:42:36 -08:00
Bob Nystrom 0e6a90443e Add containsKey() to Map, and validate key types. 2015-01-25 12:39:19 -08:00
Bob Nystrom 3061bdde7f Start documenting maps and work on some other docs a bit. 2015-01-25 11:08:13 -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
Bob Nystrom cff08f989b Rename a couple of tests. 2015-01-24 14:42:25 -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
Bob Nystrom efd161cea2 Add "arity" getter to Fn. 2015-01-23 20:33:05 -08:00
Bob Nystrom c3a858a2c7 Update doc on VS project. 2015-01-23 10:41:11 -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
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 a92e58c804 Add tests for string methods that support UTF-8 already. 2015-01-22 15:28:54 -08:00
Bob Nystrom c5e67953b8 Allow non-ASCII UTF-8 characters in string literals. 2015-01-22 15:18:30 -08:00
Bob Nystrom 2cee4c83bd Clean up and improve docs in embedder API. Fix #133. 2015-01-22 07:05:55 -08:00
Bob Nystrom 8ce58ec3c4 Reorganize files in XCode project. 2015-01-22 07:05:32 -08:00
Bob Nystrom b05e5f9c73 Merge pull request #132 from edsrzf/fix-mod-precedence
Fix precedence of % operator
2015-01-21 13:50:09 -08: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
Bob Nystrom 9453acf1e6 User-defined subscript operators. 2015-01-20 18:25:54 -08:00
Bob Nystrom 311bec5b03 Mention authors on the footer! 2015-01-20 17:47:17 -08:00
Bob Nystrom 879d9d725e Add links to mailing list. 2015-01-20 17:46:52 -08:00
Bob Nystrom b6443f0301 Move XCode project under project/. 2015-01-20 17:14:30 -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
Bob Nystrom 8c3759a457 Merge branch 'feature-wrenGetArgumentBool' of git://github.com/hazbo/wren into hazbo-feature-wrenGetArgumentBool 2015-01-20 13:58:36 -08:00
Bob Nystrom eb4e50a500 Don't use -fPIC on Windows (cygwin, mingw32). 2015-01-20 13:42:46 -08:00
Bob Nystrom 2a4804bbc9 Reorganize core library docs. 2015-01-18 15:36:36 -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
Bob Nystrom 8a292fac9e Merge pull request #121 from zeckalpha/phony-prep
Make prep Phony
2015-01-18 10:03:13 -08:00
Bob Nystrom ea32ba5f55 Merge pull request #118 from hazbo/feature-wrenReturnBool
Feature wren return bool
2015-01-17 08:45:45 -08:00
Bob Nystrom ae97e9c3a4 Remove Linux-specific libc stuff. 2015-01-16 23:32:20 -08:00
Bob Nystrom f79f1d2b63 Show benchmarks are time, not scores. 2015-01-16 17:51:10 -08:00
Bob Nystrom fe71ddd520 Update benchmark table. 2015-01-16 07:52:51 -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
Bob Nystrom 096578cc92 Reorganize docs a bit. 2015-01-16 07:04:01 -08:00
Bob Nystrom 64c2bd7633 Make all types support "!" so "if (!foo)" works reliably for all objects. 2015-01-15 21:50:01 -08:00
Bob Nystrom 94259fac8a Merge branch 'master' of https://github.com/munificent/wren 2015-01-15 21:17:45 -08:00
Bob Nystrom 8651d9c12a Merge branch 'cpp'
Conflicts:
	src/wren_vm.c
2015-01-15 21:17:08 -08:00
Bob Nystrom 93a4dd1b64 Update docs to mention compiling as C++. 2015-01-15 21:15:21 -08:00
Bob Nystrom 6e369fc639 Finish making Wren compile as C++98.
- Get Value, the hard part, compiling as C++.
- Add some rudimentary C++ support to the makefile, mainly for testing.
2015-01-15 21:12:51 -08:00
Bob Nystrom 4bd2c949e1 Merge pull request #113 from gsmaverick/fix-all-docs
Fix all docs
2015-01-15 20:38:00 -08:00
Bob Nystrom 0dec887a2f Fix interpreter loop when computed gotos are disabled. 2015-01-15 16:22:55 -08:00
Bob Nystrom 3a2432eef7 Get value compiling as C++. 2015-01-15 16:21:14 -08:00
Bob Nystrom 89a6ed9687 Get vm compiling as C++. 2015-01-15 16:02:38 -08:00
Bob Nystrom 08263e3676 Get debug and utils compiling as C++. 2015-01-15 16:00:51 -08:00
Bob Nystrom e3ccb68c79 Get main.c and compiler compiling as C++. 2015-01-15 15:59:14 -08:00
Bob Nystrom 4249f92571 Rename tests. 2015-01-15 06:54:16 -08:00
Bob Nystrom 78e99c6c99 Merge branch 'list-forall' of git://github.com/gsmaverick/wren into gsmaverick-list-forall 2015-01-15 06:52:43 -08:00
Bob Nystrom 7ce4f20533 Merge branch 'nonlocal-names' 2015-01-14 23:08:34 -08:00
Bob Nystrom c50e46725f Implicitly define nonlocal names.
If a capitalized name cannot be resolved, a new top-level
variable with its name is implicitly declared. If a real
definition is not found later, a compile time error is raised.

Mutual recursion at the top level works now!

Fix #101. Fix #106.
2015-01-14 23:08:25 -08:00
Bob Nystrom 74a7ac6b95 Update DeltaBlue to use nonlocal name. 2015-01-14 23:03:17 -08:00
Bob Nystrom 15561be89b Don't check against other keywords once we find a match. Fix #110. 2015-01-14 06:46:02 -08:00
Bob Nystrom a8e2ba233c Add support for "nonlocal" (capitalized) names, and change how variable lookup works.
Inside a method, all local variable lookup stops at the method boundary. In other
words, methods, do not close over outer local variables.

If a name is not found inside a method and is lowercase, it's a method on this.
If it's capitalized, it's a global variable.
2015-01-13 21:36:42 -08:00
Bob Nystrom 9cb414d63b Merge branch 'master' of https://github.com/munificent/wren 2015-01-13 06:42:35 -08:00
Bob Nystrom 39e5aea77c Merge pull request #104 from zeckalpha/typos
Typos
2015-01-12 16:58:05 -08:00
Bob Nystrom 12b8168b94 Merge pull request #103 from pwoolcoc/add-debugging-symbols
Allow better debugging
2015-01-12 07:32:21 -08:00
Bob Nystrom 1d9445d9bc Tests for IO.read(). 2015-01-11 21:47:29 -08:00
Bob Nystrom 7a7c7a8fad Merge branch 'add-read-string' of git://github.com/pwoolcoc/wren into pwoolcoc-add-read-string
Conflicts:
	builtin/io.wren
	src/wren_io.c
2015-01-11 20:05:52 -08:00
Bob Nystrom 73b041a78a Merge branch 'master' of git://github.com/Alek900/wren into Alek900-master
Conflicts:
	src/wren_compiler.c
2015-01-11 20:01:30 -08:00
Bob Nystrom 21e740d5c3 Test that carriage returns are treated like whitespace. 2015-01-11 19:58:30 -08:00
Bob Nystrom ad6d350140 Merge branch 'master' of https://github.com/munificent/wren 2015-01-11 19:53:17 -08:00
Bob Nystrom 3feb72041e Tweak style a bit. 2015-01-11 19:52:59 -08:00
Bob Nystrom ab1c5aca0c Merge branch 'Fix-CRLF-bug' of git://github.com/elder-george/wren into elder-george-Fix-CRLF-bug 2015-01-11 19:52:08 -08:00
Bob Nystrom e07156d9e2 Merge pull request #74 from tamc/document-inheritance-from-builtins
Added documentation about issue #70 - can't inherit from built-ins
2015-01-11 19:50:39 -08:00
Bob Nystrom 650a70b9a3 Merge pull request #96 from zeckalpha/feature/set-example_updated_syntax
Set example updated syntax
2015-01-11 19:50:07 -08:00
Bob Nystrom 6bd245b4b2 Tweak comment. 2015-01-11 19:44:35 -08:00
Bob Nystrom be0032cc40 Merge branch 'segfault_on_top_level_super_with_no_args' of git://github.com/zeckalpha/wren into zeckalpha-segfault_on_top_level_super_with_no_args 2015-01-11 19:42:26 -08:00
Bob Nystrom bc29e0929e Rename a couple of files and tweak some docs. 2015-01-11 19:13:15 -08:00
Bob Nystrom aa48223361 Merge pull request #92 from zeckalpha/https_for_fonts
Fonts weren't working in Firefox due to Mixed Content errors.
2015-01-09 09:34:35 -08:00
Bob Nystrom 3116bf97de Use correct buffer size in string subscript operator. 2015-01-09 07:12:25 -08:00
Bob Nystrom bcf052436f Merge pull request #94 from edsrzf/fix-neg-number
Don't treat negative numbers as literals
2015-01-09 07:00:12 -08:00
Bob Nystrom efabf20fee Make a few changes to methodNotFound():
- Move closer to other runtime error code.
- Make it static since it's private to wren_vm.h.
- Allocate a managed ObjString* for the message so the GC can handle it.
  That's how it ends up anyway, so this cuts out the middle man.
- Use a width specifier in sprintf() to print the canonical method name.
2015-01-08 22:29:37 -08:00
Bob Nystrom a9f1d52ef7 Merge branch 'improve-debugging' of git://github.com/gsmaverick/wren into gsmaverick-improve-debugging 2015-01-08 21:49:20 -08:00
Bob Nystrom 7f1b5bfe51 Add stack vs register-based question to FAQ. 2015-01-08 21:06:10 -08:00
Bob Nystrom 15b0d8777c Handle toString not returning a string in IO.print and IO.write.
Fix #67.
2015-01-08 07:53:37 -08:00
Bob Nystrom 92fcfc1b00 Merge pull request #83 from zeckalpha/benchmark_missing_interpreters
Benchmark: Alert that an interpreter was not found rather than halting.
2015-01-08 07:44:29 -08:00
Bob Nystrom cb0bb6a375 Merge pull request #84 from zeckalpha/operator_they_their_typo
Docs: Expressions: Operators: they->their typo
2015-01-08 07:43:00 -08:00