Eric Wing
e01e337d75
Added unit test using C99 INFINITY. This test actually tests a float
...
conversion bug where converting to float imposed overflow checking which
should not be there and causes this program to error out. This was seen
originally in Javascript, but it turns out Python has the same bug. Lua
does not have this bug. Other generators have not been tested.
This test also tests the rename feature. The Javascript generator was
not renaming the variable correctly.
2013-09-09 12:53:37 +03:00
Oliver Buchtala
1729fac360
Bug-fix for static variables as proposed by Kota Iguchi.
...
Fixes #20 .
2013-09-09 12:46:07 +03:00
Oliver Buchtala
8408e9b193
Merge pull request #19 from whoozle/devel
...
fixed deprecation warnings for v8-3.21
2013-09-06 19:50:51 -07:00
Oliver Buchtala
6b35c2d419
Let Travis test all three targets.
...
- nodejs: 0.10.12
- libwebgitgtk 1.0
- libv8 3.7.12
We should soon switch to a new v8 version or add an extra runner.
2013-09-06 16:26:02 +03:00
Oliver Buchtala
0facc7ecf9
Allow to run the test suite with our list of smoke tests.
...
The javascript generator can not deal with the whole test-suite.
Moreover, during development I want to have immediate feedback using
a set of smoke tests.
2013-09-06 15:59:43 +03:00
Oliver Buchtala
492d3010ff
Javascript V8 test-cases always create cpp wrappers.
2013-09-06 01:40:23 +03:00
Oliver Buchtala
26b5acbbe8
Test-suite Makefile now supports testing for all three Javascript variants.
...
- node.js
- custom JavascriptCore interpreter
- custom V8 interpreter
2013-09-06 00:42:56 +03:00
Oliver Buchtala
962207e0f3
Rewritten Javascript autoconfiguration.
2013-09-06 00:41:18 +03:00
Oliver Buchtala
29ccb270af
Renamed object provided to JS initializers.
...
JSC initializer create a new module object.
V8 initializer fill a provided 'exports' object.
2013-09-06 00:40:29 +03:00
Oliver Buchtala
4794fa1884
Refactored custom javascript engines to support primitive 'require' statements.
2013-09-06 00:38:07 +03:00
Vladimir Menshakov
b49da78b0a
fixed deprecation warnings for v8-3.21
2013-09-05 19:50:15 +04:00
Oliver Buchtala
740da9c733
Merge pull request #17 from whoozle/devel
...
fixed v8-3.20+ compilation and deprecation warnings.
2013-09-04 09:18:42 -07:00
Vladimir Menshakov
2a39abebb6
moved common swig v8 definitions in javascriptruntime.swg, fixed obsoleted api calls
2013-09-04 20:10:42 +04:00
Oliver Buchtala
8b0ee5491a
Added missing template configuration files for nodejs based tests.
2013-09-04 18:04:40 +02:00
Oliver Buchtala
315287b656
Put the SWIG_V8_VERSION macro into "runtime" block.
2013-09-04 17:55:44 +02:00
Oliver Buchtala
4068f31c6b
Use a diffent name for the V8_VERSION provided via command line.
2013-09-04 17:54:35 +02:00
Vladimir Menshakov
b7db2a84c9
fixed return values and added missing newer v8 dtor wrapper.
2013-09-04 19:33:48 +04:00
Oliver Buchtala
fec11a8def
Allow exceptions in generated example/test node extensions.
2013-09-04 13:07:07 +02:00
Oliver Buchtala
54dd7e96c0
Fix cleanup configuration for javascript test-suite.
2013-09-04 12:47:24 +02:00
Oliver Buchtala
8778146b4b
Relax type check in SWIG_AsVal_int.
...
The array_member test-case revealed that integers
come in as `Numbers`.
2013-09-04 12:10:08 +02:00
Oliver Buchtala
0e78fc0ad7
Fixing travis configuration.
2013-09-03 18:50:46 +02:00
Oliver Buchtala
da48f3307f
Remove javascript autoconf detection (Temporarily).
...
I want to cut it down to a minimum having only nodejs.
We will activate the others (native JSC and V8) later.
2013-09-03 18:24:19 +02:00
Oliver Buchtala
262aca8ead
Fix in travis config.
2013-09-03 17:16:40 +02:00
Oliver Buchtala
83e6aa85b6
Not a real change.
2013-09-03 17:13:38 +02:00
Oliver Buchtala
0aabfeb231
Slight modification to travis config.
2013-09-03 17:07:49 +02:00
Oliver Buchtala
fa27ff2976
Add a travis configuration (experimental).
2013-09-03 17:03:08 +02:00
Oliver Buchtala
8bbd928831
Make javascript test-suite work with nodejs.
2013-09-03 16:57:40 +02:00
Oliver Buchtala
cef82c720f
Replace old style v8 version switches.
2013-09-03 14:41:35 +02:00
Oliver Buchtala
d3074ba4c1
Fix error in SWIG_V8_GetInstancePtr.
2013-09-03 14:02:52 +02:00
Kota Iguchi
f70c0e16f2
Add "equals" to compare between pointers
...
Add "getCPtr" to retrieve pointer value
2013-09-03 13:58:22 +02:00
Kota Iguchi
a29975c69a
Typemap for natural support for arrays
2013-09-03 13:58:09 +02:00
Kota Iguchi
78a3cc9e3e
Added the finalize callback (JSObjectFinalizeCallback)
2013-09-03 13:49:36 +02:00
Oliver Buchtala
14a137adca
Fix regression.
2013-09-03 06:27:14 +02:00
Oliver Buchtala
5da54ca435
Convert javascript examples to nodejs.
2013-09-03 06:26:54 +02:00
Oliver Buchtala
dbf2b1fe94
Ignore javascript Example build files.
2013-09-03 05:46:19 +02:00
Oliver Buchtala
11e2179dd3
First example that addresses node.js as primary execution environment.
2013-09-03 05:40:22 +02:00
Oliver Buchtala
a48438c562
Better v8 version handling.
...
You should start to specify a version on command line, e.g.,
swig -javascript -v8 -DSWIG_V8_VERSION=0x032007
2013-09-03 05:39:37 +02:00
Oliver Buchtala
5228c0eeab
Add a dedicated mode for creating node modules.
2013-09-03 05:36:41 +02:00
Oliver Buchtala
5aba4c7ea6
Starting from scratch with Examples configuration.
2013-09-03 05:35:03 +02:00
Vladimir Menshakov
cb5f4dc47e
ported to newer, more efficient v8 api
2013-08-31 05:00:32 +02:00
Jason Turner
c291675cce
Merge branch 'devel' of https://github.com/ewmailing/swig-v8 into devel
2013-08-31 03:47:49 +02:00
Kota Iguchi
0732592ed9
Patch to support argout typemap for your swig-v8 branch.
2013-08-31 03:47:49 +02:00
Oliver Buchtala
32f9cce600
Merged whoozle branch with ewmailing branch.
...
Conflicts:
Lib/javascript/v8/javascriptcode.swg
2013-08-31 03:47:43 +02:00
Oliver Buchtala
306b265af9
Merge branch 'devel' of git://github.com/oliver----/swig-v8 into devel
...
Conflicts:
Lib/javascript/v8/javascriptcode.swg
2013-08-31 03:47:08 +02:00
Eric Wing
4503c53903
Since this code uses assert, #include <assert.h> is needed.
2013-08-31 03:46:07 +02:00
Eric Wing
65a0be8876
v8: variable name bug fix in my template modifications for pointers to structs.
2013-08-31 03:46:07 +02:00
Eric Wing
f8feeacb68
v8: Removed the extern "C" around the initialize function because it makes no sense since it requires a C++ templates object as a parameter.
2013-08-31 03:46:07 +02:00
Eric Wing
ed729f7d3a
This brings over the memory leak fixes for pointers to structs with a %extend destructor from my Neha fork. The generator was not generating and connecting the needed code for the requested destructor to the v8 dtor finalizer.
...
I did not realize this branch has some JavaScriptCore stuff in it too. Unfortunately, it seems to have its own unique problems (like creating C++ files when it should be generating C files). My changes are targeted for v8, and I don't think my JSCore changes fully reach in this JSCore implementation so more work would need to be done to get this branch working. I think my Neha fork is in better shape at the moment.
Also, I did port over the 'NULL out the dtor function pointer' in the %nodefaultdtor fix to v8.
Usage case:
struct MyData {
%extend {
~MyData() {
FreeData($self);
}
}
};
%newobject CreateData;
struct MyData* CreateData(void);
%delobject FreeData;
void FreeData(struct MyData* the_data);
where the use case is something like:
var my_data = example.CreateData();
my_data = null;
2013-08-31 03:46:07 +02:00
Jason Turner
046ca7686b
Adjust for v8::Persistent API which was deprecated @ 3.19.16
...
https://groups.google.com/forum/#!topic/v8-users/oBE_DTpRC08
2013-08-31 03:46:06 +02:00
Eric Wing
d5df0bb721
Added #if defined guard for V8_3_14 to allow users from the original SWIG v8 implementation to continue using the new changes. It works similarly to the BUILDING_NODE_EXTENSION in all but two places. This define must be explicitly set by users because there is no way to auto detect. (Perhaps a command line switch can be added to generate this on request?)
2013-08-31 03:46:06 +02:00