Commit Graph
809 Commits
Author SHA1 Message Date
Marco Lizza 919950bc33 Fixing 'truncate', too. 2015-03-05 00:46:45 +01:00
Marco Lizza 15f73b43f0 Renaming 'decimal' as 'fraction'. 2015-03-05 00:45:30 +01:00
Marco Lizza f33d89bd0b Adding integer division method ('div'). 2015-03-04 16:10:37 +01:00
Bob Nystrom 2b66880bb3 Simplify marking. 2015-03-04 07:08:48 -08:00
Marco Lizza 52ebb2b5d7 Consistency in variable names. :) 2015-03-04 14:46:24 +01:00
Marco Lizza fc866f896f Extending 'sign' method to handle also "equal to zero" case. 2015-03-04 14:45:51 +01:00
Marco Lizza 86e63dd597 Adding number 'sign' method. 2015-03-04 14:42:50 +01:00
Marco Lizza f494b526c7 Inverting 'decimal' and 'truncate'... opps! :D 2015-03-04 14:42:34 +01:00
Marco Lizza d6e9a49813 Adding 'decimal' and 'truncate' number methods. 2015-03-04 00:29:19 +01:00
Marco Lizza 5007e1ff33 Adding deg<->rad number conversion methods. 2015-03-04 00:28:44 +01:00
Bob Nystrom 90aa43450b Merge branch 'master' of git://github.com/bjorn/wren into bjorn-master 2015-03-03 07:23:47 -08:00
Bob Nystrom 28005ed47a Refactor number parsing a bit. 2015-03-03 07:17:56 -08:00
Gavin Schulz 0ec31433c8 Generate an error if a number literal is too large to be represented with the Num class. 2015-03-03 00:07:55 -08:00
Bob Nystrom 794d09ef15 Fix typo. 2015-03-02 07:32:09 -08:00
Bob Nystrom de80f1fd65 Add DEALLOCATE() macro. 2015-03-02 07:31:46 -08:00
Bob Nystrom 4cf23218f9 "Native" -> "primitive". Yay consistency! 2015-03-02 07:24:04 -08:00
Thorbjørn Lindeijer 8f985847d4 Added Sequence.any as complement to Sequence.all 2015-03-01 23:14:32 +01:00
Bob Nystrom a025e01971 Clean up some dumb mistakes. 2015-02-28 13:51:19 -08:00
Bob Nystrom 876c2d9208 Add API to call Wren method from C code.
This gives you a simple, efficient way to invoke a method on
some Wren object from C code, passing in arguments.

The basic API is in place and works, but there's still lots to do:

- Lots of error handling.
- Documentation.
- Tests!
2015-02-28 13:31:15 -08:00
Bob Nystrom 6b05610c6a Correctly count range size in GC. 2015-02-28 09:09:57 -08:00
Bob Nystrom f472a301a2 Don't trigger GC on deallocation. 2015-02-27 21:41:59 -08:00
Bob Nystrom c27a094882 Reorganize superclass validation a bit. 2015-02-27 08:08:27 -08:00
Bob Nystrom 46713a5bb3 Merge branch 'issue-70' of git://github.com/verpeteren/wren into verpeteren-issue-70 2015-02-27 07:41:25 -08:00
Bob Nystrom 07c7b49681 Use full signature in method debug name. 2015-02-27 07:10:44 -08:00
Bob Nystrom 5d116153dd Simplify parameterList(). 2015-02-27 06:51:37 -08:00
Bob Nystrom 96ceaa528b Allow empty argument list methods.
- Compile them as calls and definitions.
- Use them for call(), clear(), run(), try(), and yield().
- Update the docs.
2015-02-26 23:08:36 -08:00
Bob Nystrom 1aaa8cff52 Use more comprehensive signature strings for methods. 2015-02-26 21:56:15 -08:00
Bob Nystrom e007bb7f11 Make embedding API provide full method signature. 2015-02-26 07:44:45 -08:00
Bob Nystrom 22edfd7e7f Add note to comment. 2015-02-26 07:37:10 -08:00
Peter Reijnders f05d6143f5 Generating a runtime error on subclassing of builtins
As discussed in https://github.com/munificent/wren/issues/70, it is not allowed to subclass built-in types.
2015-02-25 20:13:37 +01:00
Bob Nystrom 6a10d9740c Merge pull request #187 from MarcoLizza/bitwise_precedence
Bitwise precedence
2015-02-25 07:14:31 -08:00
Bob Nystrom fc2ed6f6e1 Don't allow trailing non-number characters when parsing a string to a number. 2015-02-25 07:07:54 -08:00
Marco Lizza 88e7f778aa Raising '&&' precedence above '||' one's. 2015-02-25 16:04:02 +01:00
Marco Lizza 21734b169a Bitwise operators precedence is now between 'PREC_COMPARISON' and 'PREC_RANGE'. 2015-02-25 16:02:29 +01:00
Bob Nystrom 4b88292ec1 Merge branch 'num-from-string' of git://github.com/gsmaverick/wren into gsmaverick-num-from-string 2015-02-25 06:53:12 -08:00
Bob Nystrom b5e5f80d8c Fix some signed-unsigned mismatches. 2015-02-24 21:56:33 -08:00
Bob Nystrom 0242e43ed5 Make sure UINT32_MAX is available even in gcc C++ builds. 2015-02-24 21:09:04 -08:00
Bob Nystrom d0923f8fe1 Make sure UINT32_MAX is defined. 2015-02-24 20:26:39 -08:00
Bob Nystrom 5f0a2ba21c Just use a normal relative path to import relative to the cwd. 2015-02-24 19:47:17 -08:00
Bob Nystrom dc0dda3993 Merge branch 'wren_cpp_warnings' of git://github.com/MarcoLizza/wren into MarcoLizza-wren_cpp_warnings 2015-02-24 19:43:12 -08:00
Marco Lizza f280789758 Fix bitwise operators precedence. 2015-02-23 17:28:43 +01:00
Bob Nystrom 422801a64a Allow executing multiple chunks of code in the same module.
This means successive calls to wrenInterpret() will run in
the same context. Allows variables to span calls in the REPL.
2015-02-23 07:02:27 -08:00
Marco Lizza 0577bf3784 Use current working directory as a module root for REPL. 2015-02-23 13:57:56 +01:00
Marco Lizza 940135c03b Remove C++ warnings on GCC and (minor) memory leak when allocating root-directory. 2015-02-23 13:57:20 +01:00
Gavin Schulz 03a5b96040 Add a fromString static method on Num that converts strings to numbers. 2015-02-22 20:06:17 -08:00
Bob Nystrom 0dda174855 A bit more compiler clean up. 2015-02-22 11:04:43 -08:00
Bob Nystrom 0f9e15833f Unify argument parsing. Fix #24. 2015-02-22 10:42:49 -08:00
Bob Nystrom d6ec8c114e Don't crash if script path has no path separator. Fix #181. 2015-02-22 10:22:21 -08:00
Bob Nystrom 037a2bdb66 Massive Makefile clean up!
- "make all" builds all combinations of configurations
- Binaries are built to "bin"
- (For convenience, the release interpreter also goes in the top level dir)
- Libraries are built to "lib"

This will also make it easier to support building and testing other
configurations like Nan tagging versus union, computed goto, etc.
2015-02-22 10:19:23 -08:00
Bob Nystrom b45d3689de Clean up some comments. 2015-02-21 00:09:55 -08:00