36f3059e48
Get finalizers working.
2015-08-31 21:56:21 -07:00
1e0a2e6036
Get rid of WrenMethod and just use WrenValue for both.
...
Thanks, Michel!
2015-08-31 07:57:48 -07:00
1cea3ca3bc
Remove redundant ignoreNewlines().
2015-08-31 07:46:17 -07:00
2b044666ee
Reorganize trailing comma code a bit.
...
- Split out syntax error tests.
- Avoid redundant handling of empty literals.
2015-08-31 07:23:36 -07:00
d7eed08774
Add some tests with invalid trailing commas
2015-08-31 06:41:09 -07:00
b20c9a1b38
Allow trailing comma in list literal
2015-08-31 06:41:09 -07:00
e1d3596643
Allow trailing comma in map literal
2015-08-31 06:41:09 -07:00
6559edbc56
Update docs to mention libuv.
2015-08-30 22:38:40 -07:00
556af50f83
Revise low level fiber semantics to play nicer with schedulers.
...
Now that I'm starting to write a real async scheduler on top of Wren's
basic fiber API, I have a better feel for what it needs. It turns out
run() is not it.
- Remove run() methods.
- Add transfer() which leaves the caller of the invoked fiber alone.
- Add suspend() to return control to the host application.
- Add Timer.schedule() to start a new independently scheduled fiber.
- Change Timer.sleep() so that it only transfers control to explicitly
scheduled fibers, not any one.
2015-08-30 22:15:37 -07:00
91af02ac81
Merge branch 'master' into libuv
...
# Conflicts:
# project/xcode/wren.xcodeproj/project.pbxproj
# script/wren.mk
# src/cli/main.c
# src/cli/vm.c
# src/cli/vm.h
# test/api/main.c
2015-08-28 23:13:56 -07:00
a11450e722
Install g++-multilib for 32-bit std C++ libs on Travis.
2015-08-28 20:25:26 -07:00
647e70a8be
Print output when a command fails in libuv.py.
2015-08-28 20:14:55 -07:00
52f7f96813
Get libuv building for all architectures on Linux.
2015-08-28 19:49:19 -07:00
b4deb30a02
Reorganize build scripts for libuv.
...
- Create separate libs for each architecture. OS X doesn't need this
(we just build a universal binary), but it will help Linux.
- Move the libuv build stuff into wren.mk where the actual dependency
on the lib is.
- Download libuv to deps/ instead of build/. That way "make clean"
doesn't blow it away.
- Don't redownload libuv unless needed.
2015-08-28 19:31:03 -07:00
0ae59be11a
Use the same libuv output directory on Mac and Linux.
2015-08-27 07:55:12 -07:00
f33b362cc0
Clean up delta_blue benchmark.
2015-08-27 06:25:24 -07:00
fa4a8148c9
A little bit of code clean-up.
2015-08-22 07:56:38 -07:00
881824227d
Don't count "{" or "}" in the line count.
2015-08-22 07:27:32 -07:00
1c941c0258
Make a helper function for matching and consuming a character.
2015-08-21 23:08:11 -07:00
470d2347ff
Store number and string literals directly as a Value in the parser.
...
Thanks, Michel!
2015-08-21 22:54:30 -07:00
eda3f89266
Merge branch 'master' of https://github.com/munificent/wren
2015-08-20 22:34:42 -07:00
610952f727
Update line count in docs.
2015-08-20 22:34:33 -07:00
f433237ff2
Merge pull request #297 from Fedjmike/patch-1
...
readme: Updated line count
2015-08-20 22:34:08 -07:00
40fbf6112b
Use "init " as the prefix for initializers.
2015-08-20 22:30:44 -07:00
ab3c57d518
Merge branch 'still-seeing-this' of https://github.com/minirop/wren into ctor
2015-08-20 22:23:53 -07:00
4d613fc394
Merge branch 'fix-timer-libuv' of https://github.com/Rohansi/wren into timer
2015-08-20 22:09:52 -07:00
147a0815f2
Tweak style.
2015-08-20 22:08:39 -07:00
95ef53e758
Merge branch 'fix-windows-libuv' of https://github.com/Rohansi/wren into win
2015-08-20 22:07:34 -07:00
7be1fb543b
Fix test name.
2015-08-20 22:04:42 -07:00
4ab9c06e2c
Merge branch 'exponant-notation' of https://github.com/minirop/wren into science
2015-08-20 22:03:19 -07:00
69b0d34065
Start working on docs for the embedding API.
2015-08-20 22:02:13 -07:00
af5b654f4b
updated comments where "this" was still used for constructors
2015-08-19 19:33:54 +02:00
ff7ebdc381
Updated line count
...
The line count is actually around 7,000 (or 11,000 including blanks and comments):
```
~/wren $ cloc src/*/*.{c,h}
26 text files.
26 unique files.
0 files ignored.
http://cloc.sourceforge.net v 1.60 T=0.08 s (344.3 files/s, 146330.5 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
C 12 1471 1279 6102
C/C++ Header 14 380 967 850
-------------------------------------------------------------------------------
SUM: 26 1851 2246 6952
-------------------------------------------------------------------------------
```
2015-08-18 17:03:11 +01:00
513f272244
Copy the null terminator with the string instead of setting it
2015-08-16 14:00:50 -04:00
cb603f44c2
Properly dispose of libuv timers when we finish using them
2015-08-16 13:58:24 -04:00
0efb943173
Fix timerGetSource() returning a string without a null terminator
2015-08-16 13:58:23 -04:00
cd5087d222
Get 32-bit and C++ Mac builds happy with libuv.
2015-08-16 10:28:55 -07:00
6be1dce49c
Link to rtlib too.
2015-08-16 09:59:53 -07:00
214f72ccf1
Put the libs last?
2015-08-16 09:57:47 -07:00
e6b0a89046
Try allowing gnu C99 extensions.
2015-08-16 09:55:50 -07:00
bd3a9ad7c6
Try including libuv as an object instead of linking to it.
2015-08-16 09:40:02 -07:00
1f13416724
Remove libuv.a from the objects list.
2015-08-16 09:36:17 -07:00
572ba7c7da
Maybe the order of libraries matters...
2015-08-16 09:16:26 -07:00
9608002d65
Try to get pthreads working on Linux (again...).
2015-08-16 09:07:41 -07:00
c46519eeda
Don't use rmtree on Windows if it's going to cause problems
2015-08-16 09:32:38 -04:00
0c539af6ac
added scientific notation
2015-08-16 11:50:45 +02:00
9b18d38546
Merge pull request #291 from Rohansi/fix-broken-links
...
Fixed some broken links in the readme
2015-08-15 19:58:42 -07:00
48bdbc7745
First pass at implementing foreign classes.
...
Most of the pieces are there:
- You can declare a foreign class.
- It will call your C function to provide an allocator function.
- Whenever a foreign object is created, it calls the allocator.
- Foreign methods can access the foreign bytes of an object.
- Most of the runtime checking is in place for things like subclassing
foreign classes.
There is still some loose ends to tie up:
- Finalizers are not called.
- Some of the error-handling could be better.
- The GC doesn't track how much memory a marked foreign object uses.
2015-08-15 12:07:53 -07:00
7a79b8fac6
Simplify the API tests.
...
Use fewer test suites with more tests in each one since there's so much
boilerplate for defining an API test.
2015-08-13 09:09:27 -07:00
ad60a7e46e
Update project files to build with libuv and the timer module
2015-08-13 01:39:34 -04:00