David Barksdale
59651e35af
Add some IPv6 stuff to netinet/in.h.
2013-06-24 22:09:54 -05:00
David Barksdale
aae0d8cbc4
Fix prototypes for stat64, fstat64, lstat64.
2013-06-24 22:09:54 -05:00
David Barksdale
8025e367a8
Make AF_UNIX and AF_INET different.
...
GNUnet contains a switch with cases for AF_UNIX and AF_INET.
2013-06-24 22:09:54 -05:00
David Barksdale
90202efebc
Add IN6_IS_ADDR_* macros and other IPv6 stuff.
2013-06-24 22:09:54 -05:00
David Barksdale
f602fe5f6f
Fix LDBL_ constants in float.h.
...
This fixes a bug compiling libunistring which checks
these constants against sizeof(long double).
2013-06-17 17:01:15 -07:00
Anthony Pesch
80e72facb8
fix weak alias for warn
2013-06-17 10:50:12 -07:00
Alon Zakai
f665c7f0b1
add some dirent defines, fixes #1277
2013-06-16 16:06:38 -07:00
Alon Zakai
45fa7ca807
fix sockaddr sa_data; fixes #1272
2013-06-09 12:31:29 -07:00
Michael Bishop
292502f15a
Added header guards around emscripten.h
2013-05-31 12:35:45 -04:00
Alon Zakai
69b39b965f
implement std::exception::what()
2013-05-30 10:42:19 -07:00
Alon Zakai
d3ff354398
implement ~exception in header, to make std::exception usable; fixes #1198
2013-05-28 11:03:03 -07:00
Alon Zakai
2fe956af7c
emscripten_exit_with_live_runtime
2013-05-27 10:41:55 -07:00
Alon Zakai
fa03914578
remove llvm.global_ctors from libcxx symbols
2013-05-23 18:42:38 -07:00
Chad Austin
fec256e358
Add support for multiple overloaded smart pointer constructors.
2013-05-17 12:58:44 -07:00
Chad Austin
40037cce12
Workaround a bug in LLVM? Emscripten? that causes it to generate terrible code when registering class methods and properties.
2013-05-17 12:58:36 -07:00
Chad Austin
61a7dea5d4
Kill some dead code.
2013-05-17 12:57:52 -07:00
Chad Austin
69d3621782
We can get away with passing memory_view on the stack here...
2013-05-17 12:57:10 -07:00
Chad Austin
fd8cbaa853
Add support for (fast?) memory_view objects. If C++ passes a memory_view to JS, it gets converted into a typed array object on the other side. Intended for WebGL.
2013-05-17 12:56:48 -07:00
Chad Austin
31d6f4e7bf
Checkpoint work towards making vtable->JS calls faster.
2013-05-17 12:56:16 -07:00
Alon Zakai
5e86eb0a83
include netinet/in.h in netdb.h, like linux does; fixes #1153
2013-05-08 18:42:30 -07:00
Alon Zakai
be0fb5cc46
auto-include malloc/free when SDL is used; fixes #1139
2013-05-06 13:35:33 -07:00
Sylvestre Ledru
aa7dbbb0bb
Remove more +x permissions on source or javascript files
2013-05-04 17:32:14 +02:00
Alon Zakai
1e3e0e5cf1
Merge pull request #1126 from imvu/more_embind_updates
...
More embind updates
2013-05-03 13:40:01 -07:00
Sylvestre Ledru
155342908c
Remove executable permissions on simple files
2013-05-03 13:18:26 -07:00
Chad Austin
58352074e5
Add a benchmark for calling from C++ into JS via interfaces
2013-05-02 18:55:54 -07:00
Chad Austin
9b2cb58a35
Snip some dead code
2013-05-02 18:54:49 -07:00
Chad Austin
2dc3ce9992
namespace the binding struct a bit more
2013-05-02 18:54:42 -07:00
Chad Austin
9e375f0d24
snip dead code
2013-05-02 18:54:36 -07:00
Chad Austin
6566a0c989
Add a select_const for selecting the const method implementation if there are only two.
...
Conflicts:
tests/embind/embind_test.cpp
2013-05-02 18:54:27 -07:00
Alon Zakai
80343d7637
add glew test and some degree of support
2013-04-29 18:19:55 -07:00
Bruce Mitchener
edc773c64d
[libcextra] Add wcwidth, wcswidth.
2013-04-29 15:30:32 +07:00
Bruce Mitchener
454d7f9dd2
[libcextra] wctrans and friends.
2013-04-29 14:01:11 +07:00
Bruce Mitchener
30c055fb82
[libcextra] add isw* classification functions.
2013-04-29 12:10:55 +07:00
Bruce Mitchener
c6932c1ea9
Flag malloc_usable_size as weak.
...
This makes it match the other malloc symbols.
2013-04-27 08:03:29 +07:00
Alon Zakai
ce39f0a30b
Merge pull request #1089 from waywardmonkeys/remove-wchar-embind
...
emscripten libcextra provides wmemset,wmemcpy.
2013-04-24 20:38:27 -07:00
Bruce Mitchener
740961e3a4
Don't list internal / undefined symbols.
2013-04-24 14:58:11 +07:00
Bruce Mitchener
f40259d46d
emscripten libcextra provides wmemset,wmemcpy.
2013-04-24 08:57:22 +07:00
Bruce Mitchener
b3dc9ab122
Add a readme giving the date / revision of these sources.
2013-04-23 02:25:34 +07:00
Bruce Mitchener
654b36699e
Move wchar,mb stuff to libcextra.
2013-04-22 18:51:43 +07:00
Bruce Mitchener
7cacf252e7
Add musl multibyte function implementations.
2013-04-22 16:45:07 +07:00
Bruce Mitchener
b9090fa1f2
Add musl wchar function implementations.
2013-04-22 16:45:07 +07:00
Bruce Mitchener
58175e7276
Let libc.symbols use same symbol format as libcxx.
...
This is just the output of 'llvm-nm -extern-only -defined-only'.
2013-04-22 16:45:07 +07:00
Bruce Mitchener
41e2d50e93
Remove unused file.
2013-04-22 16:45:07 +07:00
Alon Zakai
b22b5914e2
Merge pull request #1060 from arlolra/socketpair
...
Socketpair
2013-04-19 14:13:17 -07:00
Chad Austin
a02d08a15f
Make select_overload work for member functions
2013-04-18 20:08:41 +03:00
Chad Austin
b4cc2e135b
calloperator wasn't pulling its own weight. We probably should have a higher-level register_function though...
2013-04-18 20:08:40 +03:00
Chad Austin
f25a4c9d19
Add support for read-only properties.
2013-04-18 20:08:39 +03:00
Chad Austin
a76d9ceaee
switch to EMSCRIPTEN_SYMBOL which improves code size a bit by storing the pointer to the string literal as a constant as opposed to a global variable.
2013-04-18 20:08:19 +03:00
Chad Austin
e5c04828c4
fix readLatin1String to actually cover the range of latin-1 characters and add support for interned string symbols to emscripten::val
2013-04-18 20:08:18 +03:00
Chad Austin
775f840e37
Add perfect forwarding throughout emscripten::val. This shaves 50 KB off the non-minified JS in Northstar.
2013-04-18 20:08:18 +03:00
Chad Austin
d990cb17d8
Finally! JSInterface is dead
2013-04-18 20:08:17 +03:00
Chad Austin
c2bc8d4f1e
implement perfect forwarding in embind
2013-04-18 20:08:16 +03:00
Chad Austin
426cbf616c
Support returning movable types
2013-04-18 20:08:15 +03:00
Chad Austin
6a4574cfe4
Add support for returning std::wstring
2013-04-18 20:08:09 +03:00
Bill Welden
ebb2069d80
Removed dependency on Northstar.
2013-04-18 20:08:08 +03:00
Bill Welden
de80f9c041
Support for intrusive pointers. This dependency on Northstar must be removed before pusing embind to GitHub.
2013-04-18 20:08:07 +03:00
Chad Austin
bdeab9a671
fix a bug in optional argument lists
2013-04-18 20:08:06 +03:00
Chad Austin
17639c372a
allow optional implementation of non-abstract virtual methods
2013-04-18 20:08:05 +03:00
Chad Austin
f554c2fac0
Generalize class property access.
2013-04-18 20:08:04 +03:00
Alon Zakai
985765d9a5
Merge pull request #1044 from imvu/embind_update
...
Embind update
2013-04-16 14:03:43 -07:00
Jukka Jylänki
2f7322d0d0
Revert "Fix cxa_demangle compile errors". By feedback from azakai, we want to keep our libcxxabi clean from custom changes w.r.t. upsstream libcxxabi.
...
This reverts commit 848c186df3
.
2013-04-16 11:44:51 +03:00
Alon Zakai
6749401c21
use compiled i64 div and rem
2013-04-14 17:19:50 -07:00
Alon Zakai
84c58ecc4a
use compiled compiler-rt code for i64 multiplication
2013-04-14 16:33:12 -07:00
Alon Zakai
eeaacf90a9
add compiler-rt files for 64-bit math
2013-04-14 09:10:15 -07:00
Arlo Breault
2ce87cf7d9
socketpair
2013-04-13 14:57:50 -07:00
Jukka Jylänki
af586c3c8e
Revert "Bring back EMSCRIPTEN_KEEPALIVE" - instead directly use the __attribute__((used)) macro in embind/bind.cpp.
...
This reverts commit cbf636a88bcfcabf084331fc4d8a445cacb158f9.
2013-04-12 14:27:39 +03:00
Chad Austin
a28ef129d6
Allow instantiation of subclass wrappers with smart pointers.
2013-04-12 14:27:37 +03:00
Bruce Mitchener
01c2ac873f
Stop using cxa_demangle in embind.
...
With an updated libcxx, we no longer have libcxxabi in the
include path, so we can't have the demangling code in the
build.
2013-04-12 14:27:35 +03:00
Chad Austin
545dc8ef97
support overloaded index access
2013-04-12 14:27:32 +03:00
Chad Austin
9baac4cd7c
Add support for index access to value_tuple and value_struct
2013-04-12 14:27:30 +03:00
Chad Austin
7eb89c3e4f
refactoring
2013-04-12 14:27:21 +03:00
Chad Austin
f508d6306f
Allow value_tuple and value_struct to be registered as global constants. This involved reworking how value_struct and value_tuple are registered.
2013-04-12 14:27:19 +03:00
Chad Austin
d4bf6fbe29
Add support for global constants.
2013-04-12 14:27:18 +03:00
Chad Austin
034ebb08d3
add a convenience for selecting a particular overload when binding a function.
2013-04-12 14:27:12 +03:00
Chad Austin
def5681c4f
Generalize and support mix-and-match member/non-member getter/setter for value types.
2013-04-12 14:27:08 +03:00
Chad Austin
fbcb6a4b34
add value_struct and value_tuple support for member function getters and setters.
2013-04-12 14:27:06 +03:00
Chad Austin
ecb01ee4b1
Support accessing value struct and tuple fields and elements via base class pointers.
2013-04-12 14:27:04 +03:00
Chad Austin
e5af621a18
Generalize support for struct fields
2013-04-12 14:27:03 +03:00
Chad Austin
de48fdc5b0
Further generalize support for tuple elements, and in the meantime, fix a bug that made it into one variant of the function but not the other...
2013-04-12 14:27:01 +03:00
Chad Austin
e30dd3017a
Restructure and generalize tuple accessors.
2013-04-12 14:26:59 +03:00
Chad Austin
8b1b35d8e3
Move context generation/copying out of JavaScript and into C++, where we'll be able to do some cool things in the future.
2013-04-12 14:26:57 +03:00
Jukka Jylanki
0c11a28ccf
Fix passing of UINT_MAX and ULONG_MAX from C++ to JS function. LLVM doesn't have u32 type, so UINT_MAX literal comes out as 'i32 -1' literal to JS, which whould treat it as a negative -1.0 double.
2013-04-12 14:26:50 +03:00
Jukka Jylanki
113721e6c6
Raise a TypeError if user tries to push an integer from JS side to C/C++ function exported with embind and the integer (char/short/int/long) is out of bounds of the data type expected by the C++ function.
2013-04-12 14:26:48 +03:00
Chad Austin
56783851c3
can look up module properties like HEAP8 from within C++ :)
2013-04-12 14:26:43 +03:00
Chad Austin
dbd1a3bfe2
Allow multiple arguments to emscripten::val::new_()
2013-04-12 14:26:41 +03:00
Chad Austin
d0d2471703
Fix a bug in external class function definitions and allow specifying functions that take smart pointers for 'this'
2013-04-12 14:26:38 +03:00
Chad Austin
b7936b0a61
Unify 'this' handling in class functions. 'this' is just the first argument to the method. This removes several special cases and will remove even more soon.
2013-04-12 14:26:36 +03:00
Chad Austin
0b8597a8db
Some tweaks to facilitate making value_struct and value_tuple simpler.
2013-04-12 14:26:34 +03:00
Chad Austin
e10ede1e07
Add sensible error messages when working with classes that depend on unbound types.
2013-04-12 14:26:32 +03:00
Chad Austin
0a6f5476f1
If calling function that uses unbound types, give a sensible error message.
2013-04-12 14:26:30 +03:00
Chad Austin
bfcc6330b2
Simplify getTypeName
2013-04-12 14:26:27 +03:00
Chad Austin
41b65f63c4
Fix a bug in embind when using const return values
2013-04-12 14:26:25 +03:00
Chad Austin
6f219fd0ca
Change EMSCRIPTEN_BINDINGS syntax and allow for out-of-order registration of value_tuple elements.
2013-04-12 14:26:22 +03:00
Chad Austin
78568fe4c2
Remove some dead code
2013-04-12 14:26:14 +03:00
Chad Austin
09effb641c
Simplify upcasting/downcasting, allow multiple smart pointer types per class, and use the same ClassHandle prototype so class handles and smart pointer handles share implementations for .clone() and .delete()
2013-04-12 14:26:12 +03:00
Chad Austin
bb23c470f0
Give each class a typeid function
2013-04-12 14:26:03 +03:00
Chad Austin
7d783d874a
Use typeid name for interface wrappers too. (Also introduce more uses of makeLegalFunctionName)
2013-04-12 14:25:57 +03:00
Chad Austin
fb92020f00
Add a static assertion that a classes's smart_ptr is compatible
2013-04-12 14:25:55 +03:00
Chad Austin
0badaf9b00
Allow smart pointers to have their actual type names.
2013-04-12 14:25:50 +03:00
Chad Austin
7c49e9f886
:O it works. Use a sharing policy approach to autocasting pointers.
2013-04-12 14:25:48 +03:00
Chad Austin
de9a8d6fec
make smart_ptr a method of class_ instead of a global
2013-04-12 14:25:46 +03:00
Chad Austin
495c40ce18
enable_if is scary and cool
2013-04-12 14:25:44 +03:00
Chad Austin
808e914ce1
Just toodling around with smart pointer binding syntax
2013-04-12 14:25:43 +03:00
Chad Austin
8a58711ab6
Throw an error if calling non-const methods on const objects.
2013-04-12 14:25:35 +03:00
Chad Austin
b2fb12ec07
I just learned about the sizeof... operator
2013-04-12 14:25:29 +03:00
Chad Austin
b72bbd3938
.field -> .property
2013-04-12 14:25:27 +03:00
Chad Austin
e698d8bbdb
classmethod -> class_function
2013-04-12 14:25:24 +03:00
Chad Austin
66b9991931
.method -> .function
2013-04-12 14:25:23 +03:00
Chad Austin
e7faeb6d50
reorder bindingtypes to make it easy to read
2013-04-12 14:25:15 +03:00
Chad Austin
3ac2105969
Kill the custom bindingtype for shared_ptr :)
2013-04-12 14:25:14 +03:00
Chad Austin
3dd168f24a
checkpoint work towards unifying the binding type for classes and smart pointers.
2013-04-12 14:25:12 +03:00
Chad Austin
6a0976ce2e
checkpoint work towards unifying the binding type for classes and smart pointers.
2013-04-12 14:25:11 +03:00
Chad Austin
6a1157c12b
Make it possible (again) to define a class before its base class is defined.
2013-04-12 14:25:06 +03:00
Chad Austin
ba6204bd5c
Rewrite how dependent type registrations are implemented. This reduces code size both in JS and C++. There are some known bugs. I'll get to those soon.
2013-04-12 14:25:02 +03:00
Chad Austin
8be7ebc9cc
Explicitly specify base classes. Alas, but it must be done for instanceof :(
2013-04-12 14:24:57 +03:00
Chad Austin
97373dc8c2
kinda start thinking about making isinstance work with base classes
2013-04-12 14:24:48 +03:00
Chad Austin
ececfcc02e
Add support for marshalling custom smart pointer types in and out of parameters.
2013-04-12 14:24:47 +03:00
Chad Austin
50c5092c4a
Kill the malloc(16) by writing a test with a 1 MB smart pointer type :)
2013-04-12 14:24:45 +03:00
Chad Austin
1a35260184
Preliminary support for custom smart pointers.
2013-04-12 14:24:44 +03:00
Chad Austin
067dbfd946
Mike Ey and I decided the smart pointer constructor form is different enough to deserve its own name.
2013-04-12 14:24:39 +03:00
Chad Austin
3adc0bd5ed
Turns out we can simplify and reuse a lot of code :o
2013-04-12 14:24:38 +03:00
Chad Austin
f23cc669e3
Add support for rvalue reference parameters on factories. I don't really understand this code.
2013-04-12 14:24:36 +03:00
Chad Austin
f22f586787
Apparently the WireType Marshaller is no longer necessary??
2013-04-12 14:24:34 +03:00
Chad Austin
612076a7cd
Kill a bunch of C-style casts
2013-04-12 14:24:33 +03:00
Chad Austin
088e1af2f1
allow specialization of get_element_type if using a smart pointer with a different mechanism for looking up the pointee type
2013-04-12 14:24:27 +03:00
Chad Austin
55ebc1f669
Rework how vectors and maps are bound: add bounds checking and return undefined if out of bounds.
2013-04-12 14:24:25 +03:00
Chad Austin
4185573aca
Support external raw pointer constructors.
2013-04-12 14:24:22 +03:00
Chad Austin
f7b5f283e1
Use length-prefix strings instead of null-terminated strings to support passing strings with embedded nul characters.
2013-04-12 14:24:12 +03:00
Chad Austin
78548810ba
Allow const non-member functions
2013-04-12 14:24:10 +03:00
Chad Austin
07cd277b4d
Use standard method machinery for array access.
2013-04-12 14:24:09 +03:00
Chad Austin
176000557d
allow non-member functions bound as methods.
2013-04-12 14:24:08 +03:00
Chad Austin
04d596f040
Replace operator call with a method invoking said operator call, so isinstance works again. When Function.create exists we can have the benefit of both worlds.
2013-04-12 14:24:06 +03:00
Chad Austin
68845c447d
fix a syntax error
2013-04-12 14:24:05 +03:00
Chad Austin
7d1614a3ee
simplify embind a bit and checkpoint progress towards external constructors
2013-04-12 14:24:03 +03:00
Bill Welden
88e9806813
Change register_smart_ptr to smart_ptr.
2013-04-12 14:24:02 +03:00
Chad Austin
dd618d24fc
implement an api for allowing JS subclasses of C++ interfaces
2013-04-12 14:23:59 +03:00
Bill Welden
51dfc764bd
Fix a couple of merge issues bringing down the lastest emscripten.
2013-04-12 14:23:57 +03:00
Chad Austin
771ee9e921
Fix a bunch of compiler warnings
2013-04-12 14:23:56 +03:00
Chad Austin
aef932e3a9
Bring back EMSCRIPTEN_KEEPALIVE
2013-04-12 14:23:55 +03:00
Chad Austin
848c186df3
Fix cxa_demangle compile errors
2013-04-12 14:23:53 +03:00
Chad Austin
70aebcde9e
EMSCRIPTEN_KEEPALIVE has been removed
2013-04-12 14:23:52 +03:00
Todd Lee
4fa56f7967
move vecFromJSArray from bind.h to val.h to make it unnecessary to include bind.h
2013-04-12 14:23:50 +03:00
Todd Lee
62b9f6a00f
header dependency fix
2013-04-12 14:23:49 +03:00
Andy Friesen
3b6ea45565
emscripten::internal::optional is now copyable.
...
Fix JSInterface::JSInterface copy constructor to take a const&
2013-04-12 14:23:47 +03:00
Bill Welden
c42eb7377e
Removed explicit cast capability from bindings.
2013-04-12 14:23:43 +03:00
Bill Welden
40ad51a5c8
Revert "register_smart_ptr changed to .shared_ptr (mod to class definition) -- shared_ptr (outside of class definition) is still allowed"
...
This reverts commit c38bb38e9d6393dfacb4afb0e9ba80ce42aee965.
2013-04-12 14:23:41 +03:00
Bill Welden
e5fca2885b
register_smart_ptr changed to .shared_ptr (mod to class definition) -- shared_ptr (outside of class definition) is still allowed
...
shared pointers passed by reference can be modified by the called code -- the change is now reflected at the Javascript calling level
other minor clean-up and small syntactic changes
2013-04-12 14:23:37 +03:00
Chad Austin
ba7a7200ec
Document operators that are not exposed
2013-04-12 14:23:34 +03:00
Chad Austin
50e05c30bf
Introduce val::new_ for constructor invocation
2013-04-12 14:23:30 +03:00
Chad Austin
bacb23ed1a
Kill eval_global_method: it's replaced with more primitives
2013-04-12 14:23:28 +03:00