1
0
forked from Mirror/wren
Commit Graph

913 Commits

Author SHA1 Message Date
6d2cbcf3b6 Add myself to AUTHORS 2015-04-05 19:52:12 -03:00
bb3de9eeba Don't confuse the GC if a collection occurs after a compile error. 2015-04-03 23:12:14 -07:00
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
9ffdc09672 Merge pull request #252 from lluchs/broken-link
Fix broken link to wren.h
2015-04-03 18:51:21 -07:00
455196db81 Merge pull request #249 from lluchs/clang-absolute-value
Fix warning in clang 3.5 (-Wabsolute-value)
2015-04-03 18:38:10 -07:00
62e76a5780 Fix broken link to wren.h 2015-04-04 00:51:42 +02:00
75a3051fae .list -> .toList
Fix #248.
2015-04-03 11:22:34 -07:00
563a090865 Push more core class creation into the core library itself. 2015-04-03 08:00:55 -07:00
278f1c063b Merge branch 'refactoring' of git://github.com/patriciomacadden/wren into patriciomacadden-refactoring 2015-04-03 07:19:17 -07:00
45fc872214 Fix warning in clang 3.5 (-Wabsolute-value) 2015-04-01 17:42:20 +02:00
b46828e93e Update docs for map(_) and where(_). 2015-04-01 07:31:15 -07:00
f4a836c66e Merge branch 'deferred_execution' of git://github.com/bjorn/wren into bjorn-deferred_execution
Conflicts:
	builtin/core.wren
	src/vm/wren_core.c
2015-04-01 07:22:02 -07:00
561d46ef1d Merge pull request #241 from bjorn/sequence_each
Added Sequence.each
2015-04-01 07:10:21 -07:00
92a054f76a Don't make locals in scope in their own initializer. 2015-04-01 07:05:40 -07:00
2256448017 Fix whitespace. 2015-04-01 06:43:44 -07:00
c826348c2b Merge pull request #247 from ComFreek/patch-2
Fixed char-subscripts warning
2015-04-01 06:42:38 -07:00
fca4e3d9e2 refactor defineSingleClass and defineClass 2015-03-31 22:58:55 -03:00
a8ea2a91a6 Use deferred execution for Sequence.map and Sequence.where
The methods Sequence.map and Sequence.where are now implemented using
deferred execution. They return an instance of a new Sequence-derived
class that performs the operation while iterating. This has three main
advantages:

* It can be computationally cheaper when not the whole sequence is
  iterated.

* It consumes less memory since it does not store the result in a newly
  allocated list.

* They can work on infinite sequences.

Some disadvantages are:

* Iterating the returned iterator will be slightly slower due to
  the added indirection.

* You should be aware that modifications made to the original sequence
  will affect the returned sequence.

* If you need the result in a list, you now need to call Sequence.list
  on the result.
2015-03-31 22:25:07 +02:00
c00d6ad694 Added Sequence.each
This is a bit of a style preference since of course you can always write
the same thing with a for loop. However, I think sometimes the code
looks better when using this method.

It also provides an alternative to Sequence.map for cases where you
don't need the resulting list, and one that becomes especially necessary
when Sequence.map is changed to return a new sequence. The example in
the README.md file was using Sequence.map in a way that required this
alternative in that case.
2015-03-31 21:53:29 +02:00
2a26ceeea7 Fixed char-subscripts warning 2015-03-31 18:27:44 +02:00
13c519d0be Merge branch 'master' of https://github.com/munificent/wren 2015-03-30 07:39:37 -07:00
9bdbc05be1 Flush benchmark output after each ".".
Thanks, Michel!
2015-03-30 07:39:21 -07:00
54ee4987d1 Merge pull request #242 from patriciomacadden/fix-function-call
Fix wrong function call
2015-03-28 18:08:51 -07:00
515b9317c7 Fix wrong function call 2015-03-28 17:01:21 -03:00
37e1e8fe77 Remove outdated comment. 2015-03-28 10:19:38 -07:00
07f9d4d2be Tweak Sequence.all() and Sequence.any().
When possible, they return the actual value from the predicate
instead of always just "true" and "false". This matches && and ||
which evaluate to the RHS or LHS when appropriate.
2015-03-28 10:18:45 -07:00
a7fafce265 Pull out opcode definitions into an X-macro file. 2015-03-28 09:56:07 -07:00
6254a2e15e Invert the return value for finishBloc().
Thanks, Michel!
2015-03-28 09:15:19 -07:00
53ee453f0f Merge pull request #239 from bjorn/sequence_list
Added Sequence.list
2015-03-28 09:06:49 -07:00
5bb3154e83 Copy editing. 2015-03-27 20:59:15 -07:00
72c38a59ce More stuff for working with strings and bytes!
- "\x" escape sequence to put byte values in strings: "\x34"
- String.byteAt(index) gets value of byte in string.
- String.bytes returns a raw sequence of bytes for a string.
- String.codePointAt(index) gets the code point at an offset as a raw number.
2015-03-27 20:44:07 -07:00
b409569b6f Added Sequence.list
This helper method turns any sequence into a List.
2015-03-27 22:59:58 +01:00
7d45dda383 String.fromCodePoint(). Fix #219. 2015-03-27 07:43:36 -07:00
373770a8d5 Fields are private, not protected. Fix #237. 2015-03-27 06:46:12 -07:00
322eea1af5 Generate a runtime error if a foreign method was not found. 2015-03-26 07:17:09 -07:00
9c414b5da5 Get Meta working with foreign methods. 2015-03-25 20:20:26 -07:00
8dcd336638 Merge branch 'master' into foreign-methods 2015-03-25 20:06:55 -07:00
35d0da92b9 Merge branch 'master' of https://github.com/munificent/wren 2015-03-25 19:25:37 -07:00
c707135b9a Add wren_meta to XCode project. 2015-03-25 19:25:18 -07:00
d99a82e6d8 Merge branch 'meta-library' of git://github.com/gsmaverick/wren into gsmaverick-meta-library 2015-03-25 19:21:58 -07:00
1776c329db Merge pull request #235 from bjorn/master
Added myself to the AUTHORS file
2015-03-25 19:15:58 -07:00
6b9c162fe9 Added myself to the AUTHORS file 2015-03-26 00:01:39 +01:00
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
8c4e5eeea8 Show standard deviation and other tweaks in benchmark script. 2015-03-25 07:26:45 -07:00
31d2989565 Remove unnecessary headers. 2015-03-24 23:30:53 -07:00
0bd19da392 Bind C methods to Wren using foreign declarations. 2015-03-24 07:58:15 -07:00
82fceb8361 Give makefile prettier output. Pretty! 2015-03-24 07:51:48 -07:00
c9226256ff Merge pull request #220 from bjorn/count_predicate
Added Sequence.count(predicate)
2015-03-23 07:35:17 -07:00
89ebffb582 Rearrange a bit. 2015-03-23 06:48:08 -07:00
0484accb2d Merge branch 'module-index' of git://github.com/gsmaverick/wren into gsmaverick-module-index 2015-03-23 06:42:03 -07:00