aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Austin <caustin@gmail.com>2014-04-12 21:53:09 -0700
committerChad Austin <chad@chadaustin.me>2014-04-13 09:24:38 -0700
commit80731b5e8522feb819edbb439b76c72df1bf800d (patch)
treef88cb8e098bbac4dad7159b749e7897492323d44
parent521216f211165e962664f49be3890e2fc22d8efd (diff)
craftInvokerFunction never seems to use classType
-rw-r--r--src/embind/embind.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/embind/embind.js b/src/embind/embind.js
index 23248335..e2de9734 100644
--- a/src/embind/embind.js
+++ b/src/embind/embind.js
@@ -622,10 +622,6 @@ function craftInvokerFunction(humanName, argTypes, classType, cppInvokerFunc, cp
var isClassMethodFunc = (argTypes[1] !== null && classType !== null);
- if (!isClassMethodFunc && !FUNCTION_TABLE[cppTargetFunc]) {
- throwBindingError('Global function '+humanName+' is not defined!');
- }
-
// Free functions with signature "void function()" do not need an invoker that marshalls between wire types.
// TODO: This omits argument count check - enable only at -O3 or similar.
// if (ENABLE_UNSAFE_OPTS && argCount == 2 && argTypes[0].name == "void" && !isClassMethodFunc) {
@@ -662,8 +658,8 @@ function craftInvokerFunction(humanName, argTypes, classType, cppInvokerFunc, cp
}
var dtorStack = needsDestructorStack ? "destructors" : "null";
- var args1 = ["throwBindingError", "classType", "invoker", "fn", "runDestructors", "retType", "classParam"];
- var args2 = [throwBindingError, classType, cppInvokerFunc, cppTargetFunc, runDestructors, argTypes[0], argTypes[1]];
+ var args1 = ["throwBindingError", "invoker", "fn", "runDestructors", "retType", "classParam"];
+ var args2 = [throwBindingError, cppInvokerFunc, cppTargetFunc, runDestructors, argTypes[0], argTypes[1]];
if (isClassMethodFunc) {
invokerFnBody += "var thisWired = classParam.toWireType("+dtorStack+", this);\n";
@@ -713,7 +709,7 @@ function requireFunction(signature, rawFunction) {
var fp;
if (typeof FUNCTION_TABLE === "undefined") {
// asm.js style
- fp = asm['FUNCTION_TABLE_' + signature](rawFunction);
+ fp = asm['FUNCTION_TABLE_' + signature][rawFunction];
} else {
fp = FUNCTION_TABLE[rawFunction];
}