Commit Graph

59 Commits

Author SHA1 Message Date
03782bdda9 Update.
Some checks failed
CI / build-linux (debug_64bit) (push) Failing after 38s
CI / build-linux (release_64bit) (push) Failing after 1m9s
2026-01-26 13:00:02 +01:00
5edaf69915 Update.
Some checks failed
WrenCI / linux (push) Failing after 34s
WrenCI / mac (push) Has been cancelled
WrenCI / windows (push) Has been cancelled
2026-01-26 12:29:25 +01:00
fe2f087d9f UPdate.
Some checks failed
WrenCI / mac (push) Waiting to run
WrenCI / windows (push) Waiting to run
WrenCI / linux (push) Failing after 55s
2026-01-26 05:12:14 +01:00
1ee28a1644 Update. 2026-01-25 19:02:02 +01:00
735596fdf6 Update. 2026-01-25 10:50:20 +01:00
e4a94d576b Update.
Some checks are pending
WrenCI / linux (push) Waiting to run
WrenCI / mac (push) Waiting to run
WrenCI / windows (push) Waiting to run
2026-01-25 06:08:44 +01:00
2e425571ca Update. 2026-01-25 04:58:39 +01:00
underscorediscovery
7a6ff13290 0.3.0; remove files no longer needed
- docs for cli will be part of wren repo for now
- notes and stuff are vm side already
- the rest is unused
2020-05-29 11:30:41 -07:00
Sven Bergström
f3b0200c39
Merge pull request #541 from kext/amalgamation
Repaired amalgamation script
2019-09-18 00:11:22 -07:00
Bob Nystrom
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
Bob Nystrom
5f29a72d65 Remove the special method type for Fn.call(...).
Instead, using regular primitives for each of the call() methods.
Doesn't help performance (alas), but does seem cleaner to me.
2018-07-18 08:20:11 -07:00
Bob Nystrom
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
Lukas Joeressen
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
Freddie Ridell
492763205b introduced docs auto publish step to travisci 2018-04-04 20:37:05 +01:00
Bob Nystrom
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
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
97b2e1c818 Add web server to doc generator. 2017-10-12 06:38:34 -07:00
Bob Nystrom
d301fefac2 Add a comment explaining the ci targets. 2017-01-12 21:55:35 -08:00
Will Speak
04a7c9b5c8 Improve Travis Build & Test Coverage
Build Wren for more targets, and run the test suite on both 32 and 64
bit builds.

 * Update the build config to test both with and without NAN_TAGGING
   defined.

 * Updatest `util/test.py` to take the executable suffix as a
   parameter. This allows the makefile to control which binaries will be
   tested.

   Adds a new target to the makefile to be run by travis, this runs the
   test suite against all of the configurations it builds.

 * Gcc on some 32 bit platforms was complaining about numeric overflows
   when -INFINITY was used. Update the logic for converting a double to
   a string to not explicitly check against the literal values.

 * Make CI builds run the tests on both 64 _and_ 32 bit builds.

 * If I limit the number of CPUs on my MBP I can get some of the tests
   to time out, I'm imagining that the specs of the Travis Macs means
   that the same is happening there too. Updated the test script to
   allow an extra few seconds for the test to complete successfully
   before killing it.

 * Due to slight differences in accuracy in some computations tests were
   failing on 32 bit builds. Stop comparing things quite as exactly in
   the cases where it is causing issues.

   For some reason 12.34 was refusing to compare equal to itself. Bad
   show 12.34 :-/. I've also updated the test so it doesn't leak handles
   even if the assertions fail.

 * Double-cast from `double` to `uint32_t` to prevent undefined
   behaviour on overflow of basic integers. This should hopefully
   prevent 32 bit test failures on Linux.

 * Move to a version of LibUV with a fix for the 32 bit build error on
   Travis.
2016-12-29 17:52:38 +00:00
Baptiste Fontaine
b41a0f7c07 Allow builds to be verbose
It’s impossible to disable @s in Makefiles to get a verbose build.
Adding them conditionally using a variable lets users choose if they
want a verbose build by using the VERBOSE variable.

Normal build:

    make

Verbose build:

    make VERBOSE=1
2016-07-02 11:21:47 +02:00
Bob Nystrom
bec5181bdb Add separate targets for building just the shared or static library.
make static
make shared

Running "make vm" will build both, as usual.

Fixes #322.
2016-02-19 07:22:10 -08:00
Bob Nystrom
a09892de32 Use a fiber for a finalizer's foreign stack. 2015-12-27 21:43:08 -08:00
Bob Nystrom
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
Bob Nystrom
36f7d74183 Unify "script" and "project" under "util". 2015-09-22 07:45:58 -07:00
Bob Nystrom
f36a795534 Automatically update the string constants when a builtin module changes. 2015-09-13 10:03:02 -07:00
Bob Nystrom
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
Bob Nystrom
0ae59be11a Use the same libuv output directory on Mac and Linux. 2015-08-27 07:55:12 -07:00
Bob Nystrom
d4acbe8a70 A vertical slice of real libuv integration.
This adds a "timer" module to the CLI that provides a Timer class with
a static sleep() method. Not the most exciting functionality in the
world, but it requires the full hunk of libuv integration:

- The CLI sets up libuv and runs the event loop.
- Added a new directory src/module for CLI modules.
- Updated all the make scripts to handle it.
- Reorganized some other CLI code.
2015-08-07 08:10:55 -07:00
Bob Nystrom
4a6d7e0428 Integrate libuv into Wren.
- Add a script that downloads and compiles libuv.
- Hook that up to the Makefile so it pulls down libuv on build.
- Add a separate "vm" target that just builds the VM library and skips
  libuv.
- Link to libuv when compiling the CLI.
- Update the XCode project to link to libuv too.

Linux and Windows support isn't done yet, but it should be pretty
straightforward to add to the Python script.
2015-08-02 10:43:38 -07:00
Bob Nystrom
7084d6bfd5 Add infrastructure to test embedding API. 2015-05-24 09:23:30 -07:00
Bob Nystrom
3be0a396c4 Remove unneeded line from Makefile. 2015-05-19 07:00:44 -07:00
Bob Nystrom
bead9a3406 Output amalgamation into build/. 2015-04-25 08:38:45 -07:00
Luchs
796639e371 Fix amalgamation to work with X Macro files 2015-04-16 14:45:22 +02:00
Luchs
9bcf31e14d Add amalgamation generation script 2015-04-16 14:45:22 +02:00
Bob Nystrom
e2a72282a1 Move gh-pages directory under build/. 2015-03-14 12:19:03 -07: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
ffc770b4a7 Also clean Mac .dylibs. 2015-02-12 09:07:41 -08:00
Jacob Shaffer
e4caeb2a7c made ``make clean`` more explicit 2015-02-12 10:23:13 -05:00
Jacob Shaffer
5b348e61d7 ``make clean`` now removes the libraries
```make clean``` now removes ```libwren.a``` and ```libwren.so``` where it only removed ```build```` and ```wren```
2015-02-06 15:15:41 -05:00
Bob Nystrom
3bed04e0b9 Support clang/OS X shared libraries in the Makefile. 2015-01-28 19:50:53 -08:00
Peter Reijnders
2f97ef57d3 Change Makefile to differentiate between static and shared library
Previously, just the static libraries (libwren*.a) were created. In the Makefile documentation these were mentioned in the comments as shared.
Now both variants will be created.
2015-01-27 15:05:53 +01:00
Bob Nystrom
eb4e50a500 Don't use -fPIC on Windows (cygwin, mingw32). 2015-01-20 13:42:46 -08:00
Kyle Marek-Spartz
9fcaddaa07 Make prep Phony 2015-01-17 20:20:05 -06:00
Bob Nystrom
6e369fc639 Finish making Wren compile as C++98.
- Get Value, the hard part, compiling as C++.
- Add some rudimentary C++ support to the makefile, mainly for testing.
2015-01-15 21:12:51 -08:00
Paul Woolcock
d74e11b80e Allow better debugging
This will ensure that we have better output when running `wren` under
{g,ll}db.
2015-01-12 10:01:34 -05:00
Bob Nystrom
728cb2cbca Gitignore shared libraries and comment makefile a bit. 2015-01-04 10:02:50 -08:00
Paul Woolcock
7cb77b7729 First try at building separate lib + binary 2015-01-02 15:24:07 -05:00
Paul Woolcock
23ba46a9f9 Move the -lm after the list of object files
Fixes linking through `gcc`, doesn't affect `clang`.

Closes #43
2015-01-02 09:32:30 -05:00
Bob Nystrom
d65bd1382b Add gh-pages build step. 2015-01-01 20:58:36 -08:00
Bob Nystrom
8417fadc2f Make all heap objects store a reference to their class and inline class lookup.
This is redundant, but significantly optimizes method dispatch:

binary_trees - wren           ..........  3347  0.30s  110.30% relative to baseline
delta_blue - wren             ..........  7161  0.14s  110.39% relative to baseline
fib - wren                    ..........  2445  0.41s  112.78% relative to baseline
for - wren                    ..........  8600  0.12s  143.00% relative to baseline
method_call - wren            ..........  5112  0.20s  114.15% relative to baseline
2014-12-07 14:29:50 -08:00