1
0
forked from Mirror/wren

108 Commits

Author SHA1 Message Date
d78f481079 wren_core.wren.inc backslash characters escaped (#1023) 2021-05-21 16:09:00 -07:00
0fa16a20ec Fix deprecated Python timing in benchmark & give more error info. (#844)
- Note: process_time gives CPU time used and perf_counter is absolute time used.
- Looks to have noise of about 1-2%.
2021-01-30 21:40:20 -08:00
58611240e7 Remove magic values as exit codes in test application (#777) 2020-07-11 13:30:43 -07:00
30b2ebd3f7 fix util/generate_project.py
- fix premake args being incorrect
- remove platform assumptions, making it portable
- start with a best guess based on project layout
- use fallback if not specified or not found
- display errors/help if not found
2020-06-14 19:44:58 -07:00
909d1c9471 Add script to regenerate projects using premake (#755) 2020-06-13 21:24:55 -07:00
2c2f5936eb tests; warn against missing wren_test binary correctly 2020-06-06 10:38:43 -07:00
6cfe6dd6de tests; warn against missing wren_test binary instead of a loud error 2020-06-06 10:29:35 -07:00
cd01246997 remove pygments setup 2020-06-05 15:21:33 -07:00
6350ddd242 fix permissions for travis doc script 2020-06-05 15:16:59 -07:00
d585a080e8 Merge pull request #751 from wren-lang/0.3.0-refactor
0.3.0 refactor
2020-06-05 14:57:20 -07:00
53cf6f511b benchmark; fix parsing of None in certain cases (like with no interpreter when a baseline is made) 2019-10-07 23:48:42 -07:00
f3b0200c39 Merge pull request #541 from kext/amalgamation
Repaired amalgamation script
2019-09-18 00:11:22 -07:00
2a1499b04b Fix horrendously bad bit hashing function.
hashBits() is used to generate a hash code from the same 64 bits used
to represent a Wren number as a double. When building a map containing
a large number of integer keys, it's important for this to do a good
job scattering the bits across the 32-bit key space.

Alas, it does not. Worse, the benchmark to test this happens to stop
just before the performance falls off a cliff, so this was easy to
overlook.

This replaces it with the hash function V8 uses, which has much better
performance across the numeric range.
2019-07-27 13:34:07 -07:00
ccb9ba3441 Disable 32 bit macOS Build
With the latest XCode it looks like 32 bit builds are deprecated. This
causes build warnings which fail the libuv build. This commit remvoves
the 32 bit arch from the macOS libuv build, and stops building the 32
build on Travis.
2019-02-12 06:56:38 +00:00
a5147aa2d9 Add a limited form of re-entrant calls.
This doesn't let you arbitrarily call back into the VM from within
foreign methods. I'm still not sure if that's even a good idea since
God knows what that would mean if you switch fibers while doing that.

But this does allow the very important use case of being able to call
a foreign method from within a call to wrenCall(). In other words,
foreign methods need to always be leaf calls on the call stack, but the
root of that stack can now come from runInterpreter() or wrenCall().

Fix #510.
2019-02-08 17:09:39 -08:00
29cef0bd53 docs; update generator
- copies files in doc/site/static/ to output
- update output formatting to include potential differences in markdown generator (local generate had >, so cover both to remain consistent)
- copy rss xml (could be in static too, but for now...)
2019-02-05 18:14:34 -08:00
091d2c4313 Fix call to markdown.markdown 2018-10-30 15:06:50 -04:00
f23c82071a Don't allow calling the root fiber.
The VM used to not detect this case. It meant you could get into a
situation where another fiber's caller had completed. Then, when it
tried to resume that fiber, the VM would crash because there was nothing
to resume to.

This is part of thinking through all the cases around re-entrancy. Added
some notes for that too.
2018-07-21 10:02:29 -07:00
ed64a13778 Add new files to api_test target in XCode project. 2018-07-18 07:30:18 -07:00
1a37d2228d Merge branch 'smarter-imports' 2018-07-16 07:00:08 -07:00
7a42a20b98 Merge branch 'master' into smarter-imports
# Conflicts:
#	src/module/io.c
#	src/vm/wren_vm.c
2018-07-15 21:01:14 -07:00
c367fc3bfc Get logical imports in "wren_modules" working.
There's a lot of changes here and surely some rough edges to iron out.
Also, I need to update the docs. But I want to get closer to landing
this so I can build on it.
2018-07-15 20:09:41 -07:00
e486c56ae9 Merge pull request #546 from mathewmariani/master
Fixed PreBuildEvents on vs2017
2018-07-15 11:08:21 -07:00
ef5f38b48f Turn on auto-deploying docs.
Looks like it's working now. <crosses fingers>
2018-07-14 21:35:33 -07:00
c7c69d1291 Check in shared Xcode file. 2018-07-14 12:12:37 -07:00
52f08aec05 Install the custom pygments lexer using python3. 2018-07-14 11:44:53 -07:00
d13cafed71 Fix command. I am an idiot. 2018-07-14 11:17:36 -07:00
db77a9dce4 Disable container-based build so we can use sudo. 2018-07-14 11:05:41 -07:00
5fff693530 Testing fix to doc deploy script. 2018-07-14 10:35:45 -07:00
08b5492362 Turn off doc deploying for now. 2018-07-13 09:15:26 -07:00
c120769977 Make some tweaks to doc deploy script.
- Rename file to match other naming conventions.
- Simplify condition a little.
2018-07-13 08:02:37 -07:00
91b4f53ee5 Merge branch 'auto-deploy-docs-from-travis' of https://github.com/CodogoFreddie/wren into CodogoFreddie-auto-deploy-docs-from-travis 2018-07-13 07:46:46 -07:00
1f93e16fb2 Provide actual soname when building shared lib on Linux.
Fix #572.
2018-07-13 07:19:06 -07:00
9934d17019 Update PreBuildEvent scripts for more conditions 2018-05-21 11:14:23 -04:00
85b2c9a99d added explicity vs2017 argument
To build with VS2017 you need to explicitly add a vs2017 argument
2018-05-21 01:57:50 -04:00
4957fff584 Fixed PreBuildEvents on vs2017 2018-05-21 01:25:38 -04:00
c40bb93d60 Changed shebang to python3 2018-05-16 23:10:44 +02:00
abd1cf37c4 Repaired amalgamation script
The amalgamation script now searches for files in the different
directories of src.

Also the full paths in the amalgamation were replaced by the basename
to produce the same content on all machines.

The makefile now creates the build directory for the amalgamation
if it does not exist.
2018-05-12 09:24:23 +02:00
492763205b introduced docs auto publish step to travisci 2018-04-04 20:37:05 +01:00
8210452970 Relative imports!
This is a breaking change because existing imports in user Wren code
that assume the path is relative to the entrypoint file will now likely
fail.

Also, stack trace output and host API calls that take a module string
now need the resolved module string, not the short name that appears in
the import.
2018-03-24 11:10:36 -07:00
5539c59750 Add a minimal path manipulation C module.
This is just for the VM's own internal use, for resolving relative
imports.

Also added a tiny unit test framework for writing tests of low-level
C functionality that isn't exposed directly by the language or VM.
2018-03-24 10:58:07 -07:00
8a71735e0f Expose an API to let the host resolve relative import strings.
This is a breaking API change: wrenInterpret() now takes an additional
parameter for the module name to interpret the code in.
2018-03-23 07:54:09 -07:00
bd3897278c Use newer GYP. 2018-03-14 08:06:06 -07:00
a95077cd9f Don't build the libuv tests on Linux. 2018-03-14 07:27:29 -07:00
011e8fab96 Fix off-by-one error in arg checking. 2018-03-14 07:27:29 -07:00
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
97b2e1c818 Add web server to doc generator. 2017-10-12 06:38:34 -07:00
21b4032fae Remove Visual Studio 2013 solution 2017-03-28 22:06:03 +03:00
a32f54126b Add Visual Studio 2017 solution 2017-03-28 22:05:58 +03:00
02bcefcbe4 Add test for user data.
Also moved the VM parameter in the error callback to be first like it
is in other callbacks.
2017-03-22 07:26:19 -07:00