source: webkit/trunk/JavaScriptCore/kjs/CallData.h@ 37747

Last change on this file since 37747 was 37706, checked in by Darin Adler, 17 years ago

JavaScriptCore:

2008-10-19 Darin Adler <Darin Adler>

Reviewed by Oliver Hunt.

Remove most uses of JSValue, which will be removed in a future patch.

  • VM/Machine.cpp: (JSC::fastToUInt32): Call toUInt32SlowCase function; no longer a member of JSValue.
  • kjs/JSNumberCell.h: (JSC::JSNumberCell::toInt32): Ditto. (JSC::JSNumberCell::toUInt32): Ditto.
  • kjs/JSValue.cpp: (JSC::toInt32SlowCase): Made a non-member function. (JSC::JSValue::toInt32SlowCase): Changed to call non-member function. (JSC::toUInt32SlowCase): More of the same. (JSC::JSValue::toUInt32SlowCase): Ditto.
  • kjs/JSValue.h: Moved static member function so they are no longer member functions at all.
  • VM/CTI.h: Removed forward declaration of JSValue.
  • VM/ExceptionHelpers.h: Ditto.
  • kjs/CallData.h: Ditto.
  • kjs/ConstructData.h: Ditto.
  • kjs/JSGlobalObjectFunctions.h: Ditto.
  • kjs/PropertyMap.h: Ditto.
  • kjs/StructureID.h: Ditto.
  • kjs/collector.h: Ditto.
  • kjs/completion.h: Ditto.
  • kjs/grammar.y: (JSC::makeBitwiseNotNode): Call new non-member toInt32 function. (JSC::makeLeftShiftNode): More of the same. (JSC::makeRightShiftNode): Ditto.
  • kjs/protect.h: Added a specialization for ProtectedPtr<JSValuePtr> so this can be used with JSValuePtr.

JavaScriptGlue:

2008-10-19 Darin Adler <Darin Adler>

Reviewed by Oliver Hunt.

Remove most uses of JSValue, which will be removed in a future patch.

  • JSValueWrapper.h: Use JSValuePtr instead of JSValue*.

WebCore:

2008-10-19 Darin Adler <Darin Adler>

Reviewed by Oliver Hunt.

Remove most uses of JSValue, which will be removed in a future patch.

  • bindings/js/JSCustomXPathNSResolver.h: Removed declaration of JSValue and used JSValuePtr instead.
  • bindings/js/JSEventTarget.h: Ditto.
  • bindings/js/JSNodeFilterCondition.h: Ditto.
  • bindings/js/ScheduledAction.h: Ditto.
  • bindings/js/ScriptController.h: Ditto.
  • bindings/objc/WebScriptObjectPrivate.h: Ditto.
  • bridge/c/c_utility.h: Ditto.
  • bridge/jni/jni_jsobject.h: Ditto.
  • bridge/jni/jni_utility.h: Ditto.
  • bridge/objc/WebScriptObject.h: Ditto.
  • dom/Traversal.h: Ditto.
  • inspector/InspectorController.cpp: Ditto.
  • inspector/JavaScriptProfile.h: Ditto.
  • inspector/JavaScriptProfileNode.h: Ditto.
  • loader/FrameLoader.h: Ditto.
  • page/Console.h: Ditto.
  • plugins/MimeTypeArray.h: Ditto.
  • plugins/Plugin.h: Ditto.
  • plugins/PluginArray.h: Ditto.
  • plugins/PluginView.cpp: (WebCore::getString): Ditto. (WebCore::PluginView::performRequest): Ditto.
  • plugins/gtk/PluginViewGtk.cpp: Ditto.
  • plugins/qt/PluginViewQt.cpp: Ditto.
  • plugins/win/PluginViewWin.cpp: Ditto.
  • bridge/qt/qt_class.cpp: (JSC::Bindings::QtClass::fallbackObject): Use JSValuePtr and JSObject* instead of JSValue*.
  • bridge/qt/qt_class.h: Ditto.
  • bridge/qt/qt_instance.cpp: (JSC::Bindings::QtInstance::mark): Ditto. (JSC::Bindings::QtInstance::invokeMethod): Ditto. (JSC::Bindings::QtInstance::defaultValue): Ditto. (JSC::Bindings::QtInstance::stringValue): Ditto. (JSC::Bindings::QtInstance::numberValue): Ditto. (JSC::Bindings::QtInstance::booleanValue): Ditto. (JSC::Bindings::QtInstance::valueOf): Ditto. (JSC::Bindings::QtField::valueFromInstance): Ditto. (JSC::Bindings::QtField::setValueToInstance): Ditto.
  • bridge/qt/qt_instance.h: Ditto.
  • bridge/qt/qt_runtime.cpp: Ditto. (JSC::Bindings::valueRealType): Ditto. (JSC::Bindings::convertValueToQVariant): Ditto. (JSC::Bindings::convertQVariantToValue): Ditto. (JSC::Bindings::findMethodIndex): Ditto. (JSC::Bindings::QtRuntimeMetaMethod::call): Ditto. (JSC::Bindings::QtRuntimeMetaMethod::lengthGetter): Ditto. (JSC::Bindings::QtRuntimeMetaMethod::connectGetter): Ditto. (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter): Ditto. (JSC::Bindings::QtRuntimeConnectionMethod::call): Ditto. (JSC::Bindings::QtRuntimeConnectionMethod::lengthGetter): Ditto. (JSC::Bindings::QtArray::setValueAt): Ditto. (JSC::Bindings::QtArray::valueAt): Ditto.
  • bridge/qt/qt_runtime.h: Ditto.
  • bridge/testqtbindings.cpp: (main): Use JSValuePtr.

WebKit/mac:

2008-10-19 Darin Adler <Darin Adler>

Reviewed by Oliver Hunt.

Remove most uses of JSValue, which will be removed in a future patch.

  • WebView/WebFrame.mm: (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): Use JSValuePtr instead of JSValue.
  • WebView/WebScriptDebugger.h: Removed declaration of JSValue.

WebKit/qt:

2008-10-19 Darin Adler <Darin Adler>

Reviewed by Oliver Hunt.

Remove most uses of JSValue, which will be removed in a future patch.

  • Api/qwebframe.cpp: (QWebFrame::evaluateJavaScript): Use JSValuePtr.

WebKit/win:

2008-10-19 Darin Adler <Darin Adler>

Reviewed by Oliver Hunt.

Remove most uses of JSValue, which will be removed in a future patch.

  • WebScriptCallFrame.cpp: (WebScriptCallFrame::jsValueToString): Use JSValuePtr. (WebScriptCallFrame::stringByEvaluatingJavaScriptFromString): Ditto. (WebScriptCallFrame::valueForVariable): Put more code inside and ifdef. (WebScriptCallFrame::valueByEvaluatingJavaScriptFromString): Ditto.
  • WebScriptCallFrame.h: Use JSValuePtr.
  • WebView.cpp: (WebView::stringByEvaluatingJavaScriptFromString): Use JSValuePtr.

WebKit/wx:

2008-10-19 Darin Adler <Darin Adler>

Reviewed by Oliver Hunt.

Remove most uses of JSValue, which will be removed in a future patch.

  • WebFrame.cpp: (wxWebFrame::RunScript): Use JSValuePtr.
File size: 2.3 KB
Line 
1/*
2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
14 * its contributors may be used to endorse or promote products derived
15 * from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#ifndef CallData_h
30#define CallData_h
31
32#include "JSImmediate.h"
33
34namespace JSC {
35
36 class ArgList;
37 class ExecState;
38 class FunctionBodyNode;
39 class JSObject;
40 class ScopeChainNode;
41
42 enum CallType {
43 CallTypeNone,
44 CallTypeHost,
45 CallTypeJS
46 };
47
48 typedef JSValuePtr (*NativeFunction)(ExecState*, JSObject*, JSValuePtr thisValue, const ArgList&);
49
50 union CallData {
51 struct {
52 NativeFunction function;
53 } native;
54 struct {
55 FunctionBodyNode* functionBody;
56 ScopeChainNode* scopeChain;
57 } js;
58 };
59
60 JSValuePtr call(ExecState*, JSValuePtr functionObject, CallType, const CallData&, JSValuePtr thisValue, const ArgList&);
61
62} // namespace JSC
63
64#endif // CallData_h
Note: See TracBrowser for help on using the repository browser.