Commit Graph

10 Commits

Author SHA1 Message Date
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
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
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
15043b897f Add a benchmark for wrenCall(). 2015-12-23 17:29:53 -08:00
01e8f9053e Add a benchmark to test the Wren C API.
I've got some ideas on how to tweak the embedding API, but I want to
see what performance impact they have first, so this adds a little
benchmark that just calls a foreign method a ton of times.
2015-12-15 16:02:13 -08:00
10ece995f7 Add some Dart benchmarks running on fletch. 2015-12-05 11:09:30 -08:00
b365c07d7a Add a benchmark that explicitly invokes the GC. 2015-10-24 11:00:17 -07:00
36f7d74183 Unify "script" and "project" under "util". 2015-09-22 07:45:58 -07:00