Commit Graph

1133 Commits

Author SHA1 Message Date
fea844382f Merge branch 'doc-todos' of git://github.com/gsmaverick/wren into gsmaverick-doc-todos 2015-04-22 07:22:42 -07:00
9f30400b7d Merge pull request #258 from patriciomacadden/fix-typo
fix typo: orde => order
2015-04-22 07:21:13 -07:00
732dd18019 Merge pull request #256 from bjorn/toList_docs
Some documentation updates
2015-04-22 07:19:00 -07:00
701e97510a added missing "import" keyword 2015-04-19 23:13:40 +02:00
c3497ee840 Code review changes. 2015-04-19 13:32:15 -07:00
512500be17 fix typo: orde => order 2015-04-17 23:13:36 -03:00
796639e371 Fix amalgamation to work with X Macro files 2015-04-16 14:45:22 +02:00
bc7bf2a09f Print LICENSE on top of the amalgamation 2015-04-16 14:45:22 +02:00
c44be6418b Add comments for file start/end 2015-04-16 14:45:22 +02:00
9bcf31e14d Add amalgamation generation script 2015-04-16 14:45:22 +02:00
4dad9cd688 Make builtin statics unambigous 2015-04-16 14:45:22 +02:00
8d90333ebc #undef some macros which are redefined elsewhere 2015-04-16 14:44:41 +02:00
fdf459b1a5 Make callFunction() unique 2015-04-16 13:01:54 +02:00
d59031d614 Some documentation updates
Some Sequence.list references remained after it was renamed to
Sequence.toList.
2015-04-06 17:21:32 +02:00
e4f3072460 Merge branch 'master' of https://github.com/munificent/wren 2015-04-06 06:53:59 -07:00
ef06eed680 Minor clean-ups. 2015-04-06 06:53:53 -07:00
94f7993bd2 Merge pull request #255 from patriciomacadden/add-myself-to-authors
Add myself to AUTHORS
2015-04-06 06:45:11 -07:00
6d2cbcf3b6 Add myself to AUTHORS 2015-04-05 19:52:12 -03:00
d0bebbd380 Add docs for fiber.call. 2015-04-04 16:50:40 -07:00
1cd83eccbc Add docs for fn.call. 2015-04-04 15:29:10 -07:00
e754fcc49f Add docs for list.insert. 2015-04-04 15:23:16 -07: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