Commit Graph
1369 Commits
Author SHA1 Message Date
Peter Reijnders 2f97ef57d3 Change Makefile to differentiate between static and shared library
Previously, just the static libraries (libwren*.a) were created. In the Makefile documentation these were mentioned in the comments as shared.
Now both variants will be created.
2015-01-27 15:05:53 +01:00
Marco Lizza a2c1ee5c25 Using a single boolean in place of a bitwise masking. 2015-01-27 14:13:26 +01:00
Marco Lizza 6f9b10cde8 Removing bitfields usage from 'Obj' struct. 2015-01-27 14:09:32 +01:00
Bob Nystrom 83ad9abd73 Merge branch 'master' into modules
Conflicts:
	src/wren_core.c
2015-01-26 21:55:41 -08:00
Bob Nystrom 699b453805 Fix ambiguous sequence point in dup. 2015-01-26 21:23:54 -08:00
Bob Nystrom b3f556adba Move globals out of VM and into a Module struct.
Functions store a reference to the module where they were
defined and load "module" variables from there.

Right now there's only one "main" module, but this is a step
in the right direction. Perf is down, though. :(

binary_trees - wren            ..........  3026  0.33s   88.28% relative to baseline
delta_blue - wren              ..........  7248  0.14s   94.32% relative to baseline
fib - wren                     ..........  2414  0.41s   88.08% relative to baseline
for - wren                     ..........  6753  0.15s   78.79% relative to baseline
method_call - wren             ..........  6624  0.15s  100.03% relative to baseline
2015-01-26 07:45:21 -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
Gavin Schulz 8b7c16eebd Strings and ranges should rely on the object definition of equality. 2015-01-25 23:28:37 -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
Gavin Schulz f482a53d0e Define equality on ranges. 2015-01-25 19:50:54 -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
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 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
Gavin Schulz 12102b19ef Adds support for hexadecimal literals. 2015-01-24 22:07:46 -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
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 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
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 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
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
Bob Nystrom 8ce58ec3c4 Reorganize files in XCode project. 2015-01-22 07:05:32 -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
Bob Nystrom b05e5f9c73 Merge pull request #132 from edsrzf/fix-mod-precedence
Fix precedence of % operator
2015-01-21 13:50:09 -08: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 244218286e Updating AUTHORS file. =) 2015-01-21 11:06:22 +01:00
Marco Lizza 61674112c9 Addressing odd Microsoft Visual Studio 2013 optimizer bug. 2015-01-21 11:01:09 +01:00
Marco Lizza 222c2d5bbb Adding Microsoft Visual Studio 2013 project and solution files. 2015-01-21 11:00:35 +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