aboutsummaryrefslogtreecommitdiffstats
path: root/llvm_runtime.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2012-11-14 10:10:04 +0100
committerErik Verbruggen <erik.verbruggen@digia.com>2012-11-14 12:01:52 +0100
commita09d75dd1fd4d598e641ff29ee73c312a0aaba73 (patch)
treec8d5295b6bee53c88300bab7100e7cad319c85e8 /llvm_runtime.cpp
parent03e7d5e3ef407852c37ffb7a3008da26fce77e6a (diff)
Added more built-ins to the llvm backend and runtime.
Change-Id: I7c63395bc80ce8d37d04f1102b02220a54050d06 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'llvm_runtime.cpp')
-rw-r--r--llvm_runtime.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/llvm_runtime.cpp b/llvm_runtime.cpp
index 158cb66b20..90c7a17c09 100644
--- a/llvm_runtime.cpp
+++ b/llvm_runtime.cpp
@@ -41,6 +41,7 @@
#include "qmljs_runtime.h"
#include <stdio.h>
+#include <setjmp.h>
using namespace QQmlJS::VM;
@@ -457,6 +458,32 @@ void __qmljs_llvm_throw(Context *context, Value *value)
__qmljs_throw(*value, context);
}
+void __qmljs_llvm_create_exception_handler(Context *context, Value *result)
+{
+ void *buf = __qmljs_create_exception_handler(context);
+ *result = Value::fromInt32(setjmp(* static_cast<jmp_buf *>(buf)));
+}
+
+void __qmljs_llvm_delete_exception_handler(Context *context)
+{
+ __qmljs_delete_exception_handler(context);
+}
+
+void __qmljs_llvm_get_exception(Context *context, Value *result)
+{
+ *result = __qmljs_get_exception(context);
+}
+
+void __qmljs_llvm_foreach_iterator_object(Context *context, Value *result, Value *in)
+{
+ *result = __qmljs_foreach_iterator_object(*in, context);
+}
+
+void __qmljs_llvm_foreach_next_property_name(Value *result, Value *it)
+{
+ *result = __qmljs_foreach_next_property_name(*it);
+}
+
void __qmljs_llvm_get_this_object(Context *ctx, Value *result)
{
*result = __qmljs_get_thisObject(ctx);