summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-08-05 08:09:08 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-08-05 08:09:37 (GMT)
commitf2f593c68f5c4e63fb78cf789f94ed2d42522498 (patch)
tree718a3371fa3acd294b94f22517590343caf35247 /src/3rdparty
parentcefaaf4cfcd8e4f75539d303ac10185427e193a8 (diff)
downloadQt-f2f593c68f5c4e63fb78cf789f94ed2d42522498.zip
Qt-f2f593c68f5c4e63fb78cf789f94ed2d42522498.tar.gz
Qt-f2f593c68f5c4e63fb78cf789f94ed2d42522498.tar.bz2
add ifdefs for qtscript-specific changes
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/CallData.cpp6
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ConstructData.cpp8
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/PropertySlot.cpp6
3 files changed, 19 insertions, 1 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/CallData.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/CallData.cpp
index 74ef191..f13be43 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/CallData.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/CallData.cpp
@@ -25,8 +25,10 @@
#include "config.h"
#include "CallData.h"
+#ifdef QT_BUILD_SCRIPT_LIB
#include "ExceptionHelpers.h"
#include "Interpreter.h"
+#endif
#include "JSFunction.h"
@@ -35,6 +37,7 @@ namespace JSC {
JSValue call(ExecState* exec, JSValue functionObject, CallType callType, const CallData& callData, JSValue thisValue, const ArgList& args)
{
if (callType == CallTypeHost) {
+#ifdef QT_BUILD_SCRIPT_LIB
ScopeChainNode* scopeChain = exec->scopeChain();
Interpreter *interp = exec->interpreter();
Register *oldEnd = interp->registerFile().end();
@@ -52,6 +55,9 @@ JSValue call(ExecState* exec, JSValue functionObject, CallType callType, const C
JSValue result = callData.native.function(newCallFrame, asObject(functionObject), thisValue, args);
interp->registerFile().shrink(oldEnd);
return result;
+#else
+ return callData.native.function(exec, asObject(functionObject), thisValue, args);
+#endif
}
ASSERT(callType == CallTypeJS);
// FIXME: Can this be done more efficiently using the callData?
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/ConstructData.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/ConstructData.cpp
index b19ae04..051f310 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/ConstructData.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/ConstructData.cpp
@@ -25,17 +25,20 @@
#include "config.h"
#include "ConstructData.h"
+#ifdef QT_BUILD_SCRIPT_LIB
#include "ExceptionHelpers.h"
#include "Interpreter.h"
+#include "JSGlobalObject.h"
+#endif
#include "JSFunction.h"
-#include "JSGlobalObject.h"
namespace JSC {
JSObject* construct(ExecState* exec, JSValue callee, ConstructType constructType, const ConstructData& constructData, const ArgList& args)
{
if (constructType == ConstructTypeHost) {
+#ifdef QT_BUILD_SCRIPT_LIB
Structure* structure;
JSValue prototype = callee.get(exec, exec->propertyNames().prototype);
if (prototype.isObject())
@@ -61,6 +64,9 @@ JSObject* construct(ExecState* exec, JSValue callee, ConstructType constructType
JSObject *result = constructData.native.function(newCallFrame, asObject(callee), args);
interp->registerFile().shrink(oldEnd);
return result;
+#else
+ return constructData.native.function(exec, asObject(object), args);
+#endif
}
ASSERT(constructType == ConstructTypeJS);
// FIXME: Can this be done more efficiently using the constructData?
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/PropertySlot.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/PropertySlot.cpp
index e0a1b5d..08f50b4 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/PropertySlot.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/PropertySlot.cpp
@@ -19,8 +19,10 @@
*/
#include "config.h"
+#ifdef QT_BUILD_SCRIPT_LIB
#include "ExceptionHelpers.h"
#include "Interpreter.h"
+#endif
#include "PropertySlot.h"
#include "JSFunction.h"
@@ -38,6 +40,7 @@ JSValue PropertySlot::functionGetter(ExecState* exec, const Identifier&, const P
CallData callData;
CallType callType = slot.m_data.getterFunc->getCallData(callData);
if (callType == CallTypeHost) {
+#ifdef QT_BUILD_SCRIPT_LIB
ScopeChainNode* scopeChain = exec->scopeChain();
Interpreter *interp = exec->interpreter();
Register *oldEnd = interp->registerFile().end();
@@ -51,6 +54,9 @@ JSValue PropertySlot::functionGetter(ExecState* exec, const Identifier&, const P
JSValue result = callData.native.function(newCallFrame, slot.m_data.getterFunc, slot.slotBase(), exec->emptyList());
interp->registerFile().shrink(oldEnd);
return result;
+#else
+ return callData.native.function(exec, slot.m_data.getterFunc, slot.slotBase(), exec->emptyList());
+#endif
}
ASSERT(callType == CallTypeJS);
// FIXME: Can this be done more efficiently using the callData?