Commit Graph
1477 Commits
Author SHA1 Message Date
Michel Hermier e4901c51d8 Add wrenStringEqualStrLength and wrenStringsEqual. 2018-03-29 09:12:32 +02:00
Michel Hermier 3c39f7e0af Make symboltable use ObjString.
* Avoid to have 2 different string representation in the code.
* Reduce memory creation in meta API, by reusing created strings.
2018-03-28 18:12:50 +02:00
Michel Hermier 3e9bf0277b Move Obj* type definition to wren_common.h.
Uniformize structure naming, and should help file includes.
2018-03-28 17:51:34 +02:00
Bob Nystrom 7487eeab49 Merge pull request #515 from kjk/patch-1
fix bindForeignMethod() example
2018-03-26 07:52:26 -07:00
Bob Nystrom af9fda5e60 Merge branch 'master' of https://github.com/munificent/wren 2018-03-26 07:50:49 -07:00
Bob Nystrom 8c7174d1c6 Merge branch 'fix-assert' of https://github.com/maxdeviant/wren into maxdeviant-fix-assert 2018-03-26 07:50:16 -07:00
Bob Nystrom 8852e5accc Merge pull request #500 from mhermier/critical_fixes
[critical] Fix getNumArguments and wrenBindMethodCode opcodes data.
2018-03-26 07:49:54 -07:00
Bob Nystrom e1f105fd8e Merge pull request #484 from feiss/patch-1
parameter missing in errorFn
2018-03-22 10:31:01 -07:00
Krzysztof Kowalczyk bcc31e63a2 add() method is bound as static but bindForeignMethod responds to non-static 2018-03-20 17:13:28 -07:00
Bob Nystrom 7612b6bc8c Merge pull request #513 from snocl/replfix
Fix REPL being broken by latest commit
2018-03-19 14:08:04 -07:00
snocl 92cb88366b Fix REPL being broken by latest commit. 2018-03-19 21:50:12 +01:00
Bob Nystrom 2c88e19497 Compile imports to closures, not fibers.
This is simpler and marginally faster. We don't need the overhead of
fibers since you can't have long or recursive import chains anyway.

More importantly, this makes the behavior more well-defined when you do
things like yield from an imported module. (Not that you should do that,
but if you do, it shouldn't do weird things.)
2018-03-17 09:33:33 -07:00
Bob Nystrom 43cf652003 Simplify wrenCompileSource(). 2018-03-17 09:13:51 -07:00
Bob Nystrom bd3897278c Use newer GYP. 2018-03-14 08:06:06 -07:00
Bob Nystrom a95077cd9f Don't build the libuv tests on Linux. 2018-03-14 07:27:29 -07:00
Bob Nystrom 011e8fab96 Fix off-by-one error in arg checking. 2018-03-14 07:27:29 -07:00
Bob Nystrom f866ee7003 Vendor GYP and libuv into the repo.
Instead of dynamically downloading these as needed during a build, this
checks in those two dependencies directly into the Wren repo. That's a
little lame because users of Wren who aren't building the CLI don't
actually need them, but they aren't too big, so it's not a huge deal.

It makes builds (particularly on Travis) more reliable, because they
don't have to pull down additional content over the network.
2018-03-14 07:27:29 -07:00
Bob Nystrom 3ce9ecfc65 Merge pull request #506 from adsr/patch-readme
Fix embedding link in README
2018-02-20 14:23:39 -08:00
Adam Saponara 0ad0af0e1f Fix embedding link in README 2018-02-16 23:18:01 -05:00
Marshall Bowers 89ae3f92ec Add @maxdeviant to AUTHORS 2018-01-18 00:48:02 -05:00
Marshall Bowers e493e6679b Fix variable in assert
Fixes #493
2018-01-18 00:46:58 -05:00
Michel Hermier a2cf3c34ad Fix getNumArguments and wrenBindMethodCode opcodes data.
Some instructions data in these 2 functions are out of syncs, and can try to
patch the code in bad manner.
2018-01-11 12:20:35 +01:00
Diego F. Goberna d1a772e820 parameter missing in errorFn 2017-11-14 16:56:16 +01:00
Bob Nystrom c4d08bcb81 Fix missing return error. 2017-10-31 22:07:07 -07:00
Bob Nystrom 7b326d804b Merge pull request #475 from KyleCharters/master
Correct method examples in Range docs
2017-10-31 16:24:58 -07:00
Bob Nystrom 8d37b20783 Compile imports to actual instructions instead of core library calls. 2017-10-31 15:58:59 -07:00
Bob Nystrom e9ac543853 Merge pull request #480 from aliou/ad-fix-embedding-path
Fix embedding path in getting started
2017-10-31 14:04:37 -07:00
Aliou Diallo b45cab28d1 Fix embedding path in getting started. 2017-10-31 21:47:51 +01:00
kylewcharters@gmail.com 1be76bb478 Correct method examples in Range docs 2017-10-23 13:48:43 -04:00
Bob Nystrom 88ff8f90ef Merge pull request #474 from minirop/typo-in-doc
missing language specifier and variable declaration
2017-10-19 22:12:25 -07:00
Bob Nystrom 1661f5368f Allow passing a value when first starting a fiber.
If the function the fiber is created from takes a parameter, the value
passed to the first call() or transfer() gets bound to that parameter.

Also, this now correctly handles fibers with functions that take
parameters. It used to leave the stack in a busted state. Now, it's a
runtime error to create a fiber with a function that takes any more
than one parameter.
2017-10-19 20:45:13 -07:00
Bob Nystrom e043a95e4e Edit docs. Docs docs docs. 2017-10-19 19:52:05 -07:00
minirop 6444a5f5db missing language specifier and variable declaration 2017-10-19 21:17:40 +02:00
Bob Nystrom f8076c2c1c Revise embedding docs. 2017-10-19 07:02:18 -07:00
Bob Nystrom e2e16dc4a9 Finish off the rest of the embedding docs.
A first draft of them, at least. They probably need some editing.
Remove the "Application Lifecycle" page for now. I do intend to add
some docs about how fibers interact with the host app, but I can do
that later.
2017-10-17 08:26:06 -07:00
Bob Nystrom 9661a5b999 Fix a couple of bugs in the REPL.
- Not sure what was going on, but fix #456. It makes more sense for the
  REPL to invoke the compiled code as a fiber than a function anyway.

- Flush stdout before reading from stdin since System.print() no longer
  does that automatically.
2017-10-13 07:58:57 -07:00
Bob Nystrom 97b2e1c818 Add web server to doc generator. 2017-10-12 06:38:34 -07:00
Bob Nystrom 91853a7fa9 Fix comment on foreign allocate function.
Fix #453.
2017-10-12 06:37:49 -07:00
Bob Nystrom 2021e086bf Don't automatically flush on every System.write().
It's handy because it ensures writes are flushed to the terminal before
any calls to read from stdin, but it's also gratuitously slow.

Instead, added a Stdout class with an explicit flush() method that can
be called by the user.

Fix #445.
2017-10-09 07:16:05 -07:00
Bob Nystrom c4b0f83cb3 "ClassCompiler" -> "ClassInfo".
Fix #469.
2017-10-09 06:47:42 -07:00
Bob Nystrom 973b43eb7f Simplify statement compiler code a little. 2017-10-08 10:47:31 -07:00
Bob Nystrom c7087652ee Add regression tests from wren-fuzz.
These are all non-crashing now, so it looks like the underlying issue
is fixed. (It was probably #429.)

Fix #442.
2017-10-08 10:15:15 -07:00
Bob Nystrom c38d97b973 Properly detect a missing "}" in a block.
Fix #429.
2017-10-08 10:03:42 -07:00
Bob Nystrom 18449102e8 Parenthesize macro arguments in ALLOCATE_FLEX and ALLOCATE_ARRAY.
Fix #457.
2017-10-08 09:45:06 -07:00
Bob Nystrom fec54d5021 Avoid undefined pointer difference behavior.
Fix #458.
2017-10-08 09:42:35 -07:00
Bob Nystrom eba0b97aa2 Merge pull request #472 from KyleCharters/master
Add Num .round
2017-10-06 07:51:55 -07:00
Bob Nystrom 8963a870ff Abort all fibers along a call chain when one aborts. 2017-10-06 07:39:00 -07:00
Bob Nystrom 0f19984017 Merge branch '201703_bubble_exceptions' of https://github.com/JonesAndrew/wren into JonesAndrew-201703_bubble_exceptions 2017-10-06 06:58:27 -07:00
Bob Nystrom 61f5e56e93 Merge pull request #460 from skybrian/fixcomment
Remove obsolete comment
2017-10-05 06:51:48 -07:00
Bob Nystrom 2bb531d860 Tweak Fiber.error docs. 2017-10-05 06:50:45 -07:00