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
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
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
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
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
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
Vladimir Menshakov
cb5f4dc47e
ported to newer, more efficient v8 api
2013-08-31 05:00:32 +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
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
Vladimir Menshakov
3af7d543cb
fixed crash while instantiating generic-wrapped objects from external code, please review
2013-08-31 03:46:06 +02:00
Vladimir Menshakov
9e74bdb97e
added virtual dtor to V8ErrorHandler
2013-08-31 03:46:06 +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
Jason Turner
cf9b7e89ac
Get memory updates working with Node.js again.
2013-08-31 03:46:06 +02:00
Oliver Buchtala
868803ce2a
Merge replayed as done by c778d16abed35829b103d607a53c8f88e3b2d595
2013-08-31 03:44:44 +02:00
Vladimir Menshakov
45bfc97ef4
converted function templates to the persistent ones (fixed crash on large wrappers)
2013-08-31 03:34:39 +02:00
Vladimir Menshakov
9b6a4870dd
added missing scope.Close()
2013-08-31 03:34:39 +02:00
Vladimir Menshakov
fe25e2dfc8
replaced GetInternalField with GetAlignedPointer (it does not work with SetAlignedPointer, btw)
2013-08-31 03:34:39 +02:00
Vladimir Menshakov
9111773400
generate v8-3.19.x compatible code
2013-08-31 03:34:39 +02:00
Oliver Buchtala
b511e33121
Remove std::iostream relicts from generated v8 wrapper code.
2013-08-31 03:34:38 +02:00
Oliver Buchtala
d3aa8e06fb
Bugfix: treat persistent V8 references correctly.
...
V8 is somewhat inconvenient regarding invoke of destructors for C++ proxies.
2013-08-31 03:34:38 +02:00
Oliver Buchtala
827cef75a3
Add an ifndef-guard to resolve a warning when building nodejs extension.
2013-08-31 03:34:38 +02:00
Oliver Buchtala
31feff8586
Add missing return statement in v8 code template.
2013-08-31 03:34:38 +02:00
Oliver Buchtala
5da4f5794c
Add preprocessor define for building node.js extensions.
2013-08-31 03:34:38 +02:00
Oliver Buchtala
65560a8664
Fix v8 string conversion in case of null arguments.
2013-08-31 03:34:38 +02:00
Oliver Buchtala
b0cb875ac1
Merge branch 'devel' of github.com:oliver----/swig-v8 into devel
2013-08-31 03:34:37 +02:00
Oliver Buchtala
8b10c47ed8
Fix regression: add an include for Node.js header.
2013-08-31 03:34:37 +02:00
Oliver Buchtala
04cdde0563
Add test to check javascript unicode strings.
2013-08-31 03:34:37 +02:00
Oliver Buchtala
213c107b7f
Add a swig macro to register node.js extensions.
2013-08-31 03:23:12 +02:00
Oliver Buchtala
31844ac72a
Simplify the signature of the v8 module intializer.
2013-08-31 03:23:11 +02:00
Oliver Buchtala
9d630ab930
Fix std::string support for v8.
2013-08-31 03:23:11 +02:00
Oliver Buchtala
2c4a90a37d
Generate defines for initializer function.
2013-08-31 03:23:11 +02:00
Oliver Buchtala
be06ceea26
Fixes in std_string for JSC generator.
2013-08-31 03:23:11 +02:00
Oliver Buchtala
7fffd801e4
Fix std_string.i which generated compile errors in certain cases.
2013-08-31 03:23:11 +02:00
Oliver Buchtala
fb9c4955fb
Not a real change: removed some trailing spaces.
2013-08-31 03:23:11 +02:00
Oliver Buchtala
9d22644563
Rename a argument variable to avoid errors with overloaded functions.
2013-08-31 03:23:11 +02:00
Oliver Buchtala
008adca72f
Provide more control about the target object/namespace where a v8 module is registered to.
2013-08-31 03:23:10 +02:00
Oliver Buchtala
86cb621466
Add comments to v8 code templates.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/oliverb-javascript-v8@13829 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-09-08 01:16:42 +00:00