Commit 60ba4e54 authored by andersca's avatar andersca
Browse files

Reviewed by Geoff.

        Move the notion of field type to the JNI runtime since that's the only 
        one that was actually using it.
        
        * bindings/c/c_runtime.h:
        (KJS::Bindings::CField::CField):
        * bindings/jni/jni_runtime.h:
        * bindings/objc/objc_runtime.h:
        * bindings/objc/objc_runtime.mm:
        * bindings/qt/qt_runtime.h:
        * bindings/runtime.h:
        * bindings/runtime_method.cpp:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1c920040
2007-06-12 Anders Carlsson <andersca@apple.com>
Reviewed by Geoff.
Move the notion of field type to the JNI runtime since that's the only
one that was actually using it.
* bindings/c/c_runtime.h:
(KJS::Bindings::CField::CField):
* bindings/jni/jni_runtime.h:
* bindings/objc/objc_runtime.h:
* bindings/objc/objc_runtime.mm:
* bindings/qt/qt_runtime.h:
* bindings/runtime.h:
* bindings/runtime_method.cpp:
2007-06-12 Anders Carlsson <andersca@apple.com>
 
Build fix.
......
......@@ -34,12 +34,11 @@ namespace Bindings {
class CField : public Field {
public:
CField(NPIdentifier ident) : _fieldIdentifier(ident) { _fieldIdentifier = ident; }
CField(NPIdentifier ident) : _fieldIdentifier(ident) { }
virtual JSValue* valueFromInstance(ExecState*, const Instance*) const;
virtual void setValueToInstance(ExecState*, const Instance*, JSValue*) const;
virtual const char* name() const;
virtual RuntimeType type() const { return ""; }
private:
NPIdentifier _fieldIdentifier;
......
......@@ -35,6 +35,8 @@ namespace KJS
namespace Bindings
{
typedef const char* RuntimeType;
class JavaString
{
public:
......
......@@ -51,7 +51,6 @@ public:
virtual void setValueToInstance(ExecState *exec, const Instance *instance, JSValue *aValue) const;
virtual const char *name() const;
virtual RuntimeType type() const;
private:
IvarStructPtr _ivar;
......
......@@ -100,20 +100,6 @@ const char* ObjcField::name() const
return [(NSString*)_name.get() UTF8String];
}
RuntimeType ObjcField::type() const
{
#if defined(OBJC_API_VERSION) && OBJC_API_VERSION >= 2
if (_ivar)
return ivar_getTypeEncoding(_ivar);
#else
if (_ivar)
return _ivar->ivar_type;
#endif
// Type is irrelevant if we use KV to set/get the value.
return "";
}
JSValue* ObjcField::valueFromInstance(ExecState* exec, const Instance* instance) const
{
JSValue* result = jsUndefined();
......
......@@ -38,7 +38,6 @@ public:
virtual JSValue* valueFromInstance(ExecState*, const Instance*) const;
virtual void setValueToInstance(ExecState*, const Instance*, JSValue*) const;
virtual const char* name() const;
virtual RuntimeType type() const { return ""; }
private:
QMetaProperty property;
......
......@@ -44,16 +44,12 @@ class Instance;
class Method;
class RootObject;
// For now just use Java style type descriptors.
typedef const char * RuntimeType;
typedef Vector<Method*> MethodList;
class Field
{
public:
virtual const char* name() const = 0;
virtual RuntimeType type() const = 0;
virtual JSValue* valueFromInstance(ExecState*, const Instance*) const = 0;
virtual void setValueToInstance(ExecState*, const Instance*, JSValue*) const = 0;
......
......@@ -98,7 +98,6 @@ CodeType RuntimeMethod::codeType() const
return FunctionCode;
}
Completion RuntimeMethod::execute(ExecState*)
{
return Completion(Normal, jsUndefined());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment