Changeset 36263 in webkit for trunk/JavaScriptCore/API
- Timestamp:
- Sep 7, 2008, 6:28:33 PM (17 years ago)
- Location:
- trunk/JavaScriptCore/API
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/APICast.h
r35900 r36263 30 30 #include "ExecState.h" 31 31 32 namespace KJS{32 namespace JSC { 33 33 class ExecState; 34 34 class JSValue; … … 46 46 /* Opaque typing convenience methods */ 47 47 48 inline KJS::ExecState* toJS(JSContextRef c)48 inline JSC::ExecState* toJS(JSContextRef c) 49 49 { 50 return reinterpret_cast< KJS::ExecState*>(const_cast<OpaqueJSContext*>(c));50 return reinterpret_cast<JSC::ExecState*>(const_cast<OpaqueJSContext*>(c)); 51 51 } 52 52 53 inline KJS::ExecState* toJS(JSGlobalContextRef c)53 inline JSC::ExecState* toJS(JSGlobalContextRef c) 54 54 { 55 return reinterpret_cast< KJS::ExecState*>(c);55 return reinterpret_cast<JSC::ExecState*>(c); 56 56 } 57 57 58 inline KJS::JSValue* toJS(JSValueRef v)58 inline JSC::JSValue* toJS(JSValueRef v) 59 59 { 60 return reinterpret_cast< KJS::JSValue*>(const_cast<OpaqueJSValue*>(v));60 return reinterpret_cast<JSC::JSValue*>(const_cast<OpaqueJSValue*>(v)); 61 61 } 62 62 63 inline KJS::JSObject* toJS(JSObjectRef o)63 inline JSC::JSObject* toJS(JSObjectRef o) 64 64 { 65 return reinterpret_cast< KJS::JSObject*>(o);65 return reinterpret_cast<JSC::JSObject*>(o); 66 66 } 67 67 68 inline KJS::PropertyNameArray* toJS(JSPropertyNameAccumulatorRef a)68 inline JSC::PropertyNameArray* toJS(JSPropertyNameAccumulatorRef a) 69 69 { 70 return reinterpret_cast< KJS::PropertyNameArray*>(a);70 return reinterpret_cast<JSC::PropertyNameArray*>(a); 71 71 } 72 72 73 inline KJS::JSGlobalData* toJS(JSContextGroupRef g)73 inline JSC::JSGlobalData* toJS(JSContextGroupRef g) 74 74 { 75 return reinterpret_cast< KJS::JSGlobalData*>(const_cast<OpaqueJSContextGroup*>(g));75 return reinterpret_cast<JSC::JSGlobalData*>(const_cast<OpaqueJSContextGroup*>(g)); 76 76 } 77 77 78 inline JSValueRef toRef( KJS::JSValue* v)78 inline JSValueRef toRef(JSC::JSValue* v) 79 79 { 80 80 return reinterpret_cast<JSValueRef>(v); 81 81 } 82 82 83 inline JSValueRef* toRef( KJS::JSValue** v)83 inline JSValueRef* toRef(JSC::JSValue** v) 84 84 { 85 return reinterpret_cast<JSValueRef*>(const_cast<const KJS::JSValue**>(v));85 return reinterpret_cast<JSValueRef*>(const_cast<const JSC::JSValue**>(v)); 86 86 } 87 87 88 inline JSObjectRef toRef( KJS::JSObject* o)88 inline JSObjectRef toRef(JSC::JSObject* o) 89 89 { 90 90 return reinterpret_cast<JSObjectRef>(o); 91 91 } 92 92 93 inline JSObjectRef toRef(const KJS::JSObject* o)93 inline JSObjectRef toRef(const JSC::JSObject* o) 94 94 { 95 return reinterpret_cast<JSObjectRef>(const_cast< KJS::JSObject*>(o));95 return reinterpret_cast<JSObjectRef>(const_cast<JSC::JSObject*>(o)); 96 96 } 97 97 98 inline JSContextRef toRef( KJS::ExecState* e)98 inline JSContextRef toRef(JSC::ExecState* e) 99 99 { 100 100 return reinterpret_cast<JSContextRef>(e); 101 101 } 102 102 103 inline JSGlobalContextRef toGlobalRef( KJS::ExecState* e)103 inline JSGlobalContextRef toGlobalRef(JSC::ExecState* e) 104 104 { 105 105 return reinterpret_cast<JSGlobalContextRef>(e); 106 106 } 107 107 108 inline JSPropertyNameAccumulatorRef toRef( KJS::PropertyNameArray* l)108 inline JSPropertyNameAccumulatorRef toRef(JSC::PropertyNameArray* l) 109 109 { 110 110 return reinterpret_cast<JSPropertyNameAccumulatorRef>(l); 111 111 } 112 112 113 inline JSContextGroupRef toRef( KJS::JSGlobalData* g)113 inline JSContextGroupRef toRef(JSC::JSGlobalData* g) 114 114 { 115 115 return reinterpret_cast<JSContextGroupRef>(g); -
trunk/JavaScriptCore/API/JSBase.cpp
r35900 r36263 37 37 #include <kjs/JSObject.h> 38 38 39 using namespace KJS;39 using namespace JSC; 40 40 41 41 JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef thisObject, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception) -
trunk/JavaScriptCore/API/JSCallbackConstructor.cpp
r35900 r36263 33 33 #include <wtf/Vector.h> 34 34 35 namespace KJS{35 namespace JSC { 36 36 37 37 const ClassInfo JSCallbackConstructor::info = { "CallbackConstructor", 0, 0, 0 }; … … 82 82 } 83 83 84 } // namespace KJS84 } // namespace JSC -
trunk/JavaScriptCore/API/JSCallbackConstructor.h
r35900 r36263 30 30 #include <kjs/JSObject.h> 31 31 32 namespace KJS{32 namespace JSC { 33 33 34 34 class JSCallbackConstructor : public JSObject { … … 49 49 }; 50 50 51 } // namespace KJS51 } // namespace JSC 52 52 53 53 #endif // JSCallbackConstructor_h -
trunk/JavaScriptCore/API/JSCallbackFunction.cpp
r35900 r36263 35 35 #include <wtf/Vector.h> 36 36 37 namespace KJS{37 namespace JSC { 38 38 39 39 ASSERT_CLASS_FITS_IN_CELL(JSCallbackFunction); … … 75 75 } 76 76 77 } // namespace KJS77 } // namespace JSC -
trunk/JavaScriptCore/API/JSCallbackFunction.h
r35900 r36263 30 30 #include "JSObjectRef.h" 31 31 32 namespace KJS{32 namespace JSC { 33 33 34 34 class JSCallbackFunction : public InternalFunction { … … 48 48 }; 49 49 50 } // namespace KJS50 } // namespace JSC 51 51 52 52 #endif // JSCallbackFunction_h -
trunk/JavaScriptCore/API/JSCallbackObject.cpp
r35900 r36263 30 30 #include "collector.h" 31 31 32 namespace KJS{32 namespace JSC { 33 33 34 34 ASSERT_CLASS_FITS_IN_CELL(JSCallbackObject<JSObject>); … … 39 39 template <> const ClassInfo JSCallbackObject<JSGlobalObject>::info = { "CallbackGlobalObject", 0, 0, 0 }; 40 40 41 } // namespace KJS41 } // namespace JSC -
trunk/JavaScriptCore/API/JSCallbackObject.h
r36016 r36263 32 32 #include "JSObject.h" 33 33 34 namespace KJS{34 namespace JSC { 35 35 36 36 template <class Base> … … 102 102 }; 103 103 104 } // namespace KJS104 } // namespace JSC 105 105 106 106 // include the actual template class implementation -
trunk/JavaScriptCore/API/JSCallbackObjectFunctions.h
r36016 r36263 38 38 #include <wtf/Vector.h> 39 39 40 namespace KJS{40 namespace JSC { 41 41 42 42 template <class Base> … … 512 512 } 513 513 514 } // namespace KJS514 } // namespace JSC -
trunk/JavaScriptCore/API/JSClassRef.cpp
r35900 r36263 35 35 #include <kjs/identifier.h> 36 36 37 using namespace KJS;37 using namespace JSC; 38 38 39 39 const JSClassDefinition kJSClassDefinitionEmpty = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; … … 199 199 } 200 200 201 OpaqueJSClassStaticValuesTable* OpaqueJSClass::staticValues( KJS::ExecState* exec)201 OpaqueJSClassStaticValuesTable* OpaqueJSClass::staticValues(JSC::ExecState* exec) 202 202 { 203 203 OpaqueJSClassContextData& jsClassData = contextData(exec); … … 205 205 } 206 206 207 OpaqueJSClassStaticFunctionsTable* OpaqueJSClass::staticFunctions( KJS::ExecState* exec)207 OpaqueJSClassStaticFunctionsTable* OpaqueJSClass::staticFunctions(JSC::ExecState* exec) 208 208 { 209 209 OpaqueJSClassContextData& jsClassData = contextData(exec); -
trunk/JavaScriptCore/API/JSClassRef.h
r35293 r36263 56 56 }; 57 57 58 typedef HashMap<RefPtr< KJS::UString::Rep>, StaticValueEntry*> OpaqueJSClassStaticValuesTable;59 typedef HashMap<RefPtr< KJS::UString::Rep>, StaticFunctionEntry*> OpaqueJSClassStaticFunctionsTable;58 typedef HashMap<RefPtr<JSC::UString::Rep>, StaticValueEntry*> OpaqueJSClassStaticValuesTable; 59 typedef HashMap<RefPtr<JSC::UString::Rep>, StaticFunctionEntry*> OpaqueJSClassStaticFunctionsTable; 60 60 61 61 class OpaqueJSClass; … … 77 77 OpaqueJSClassStaticValuesTable* staticValues; 78 78 OpaqueJSClassStaticFunctionsTable* staticFunctions; 79 KJS::JSObject* cachedPrototype;79 JSC::JSObject* cachedPrototype; 80 80 }; 81 81 … … 85 85 ~OpaqueJSClass(); 86 86 87 KJS::UString className();88 OpaqueJSClassStaticValuesTable* staticValues( KJS::ExecState*);89 OpaqueJSClassStaticFunctionsTable* staticFunctions( KJS::ExecState*);90 KJS::JSObject* prototype(KJS::ExecState*);87 JSC::UString className(); 88 OpaqueJSClassStaticValuesTable* staticValues(JSC::ExecState*); 89 OpaqueJSClassStaticFunctionsTable* staticFunctions(JSC::ExecState*); 90 JSC::JSObject* prototype(JSC::ExecState*); 91 91 92 92 OpaqueJSClass* parentClass; … … 112 112 OpaqueJSClass(const JSClassDefinition*, OpaqueJSClass* protoClass); 113 113 114 OpaqueJSClassContextData& contextData( KJS::ExecState*);114 OpaqueJSClassContextData& contextData(JSC::ExecState*); 115 115 116 116 // UStrings in these data members should not be put into any IdentifierTable. 117 KJS::UString m_className;117 JSC::UString m_className; 118 118 OpaqueJSClassStaticValuesTable* m_staticValues; 119 119 OpaqueJSClassStaticFunctionsTable* m_staticFunctions; -
trunk/JavaScriptCore/API/JSContextRef.cpp
r36016 r36263 35 35 #include <wtf/Platform.h> 36 36 37 using namespace KJS;37 using namespace JSC; 38 38 39 39 JSContextGroupRef JSContextGroupCreate() -
trunk/JavaScriptCore/API/JSObjectRef.cpp
r36016 r36263 44 44 #include <wtf/Platform.h> 45 45 46 using namespace KJS;46 using namespace JSC; 47 47 48 48 JSClassRef JSClassCreate(const JSClassDefinition* definition) -
trunk/JavaScriptCore/API/JSProfilerPrivate.cpp
r36068 r36263 31 31 #include <JavaScriptCore/Profiler.h> 32 32 33 using namespace KJS;33 using namespace JSC; 34 34 35 35 void JSStartProfiling(JSContextRef ctx, JSStringRef title) -
trunk/JavaScriptCore/API/JSStringRef.cpp
r35900 r36263 30 30 #include <wtf/unicode/UTF8.h> 31 31 32 using namespace KJS;32 using namespace JSC; 33 33 using namespace WTF::Unicode; 34 34 -
trunk/JavaScriptCore/API/JSValueRef.cpp
r35900 r36263 44 44 JSType JSValueGetType(JSContextRef, JSValueRef value) 45 45 { 46 KJS::JSValue* jsValue = toJS(value);46 JSC::JSValue* jsValue = toJS(value); 47 47 if (jsValue->isUndefined()) 48 48 return kJSTypeUndefined; … … 59 59 } 60 60 61 using namespace KJS; // placed here to avoid conflict between KJS::JSType and JSType, above.61 using namespace JSC; // placed here to avoid conflict between JSC::JSType and JSType, above. 62 62 63 63 bool JSValueIsUndefined(JSContextRef, JSValueRef value) -
trunk/JavaScriptCore/API/OpaqueJSString.cpp
r35775 r36263 30 30 #include <kjs/identifier.h> 31 31 32 using namespace KJS;32 using namespace JSC; 33 33 34 34 PassRefPtr<OpaqueJSString> OpaqueJSString::create(const UString& ustring) -
trunk/JavaScriptCore/API/OpaqueJSString.h
r35777 r36263 29 29 #include <kjs/ustring.h> 30 30 31 namespace KJS{31 namespace JSC { 32 32 class ExecState; 33 33 class Identifier; … … 47 47 } 48 48 49 static PassRefPtr<OpaqueJSString> create(const KJS::UString&);49 static PassRefPtr<OpaqueJSString> create(const JSC::UString&); 50 50 51 51 UChar* characters() { return this ? m_characters : 0; } 52 52 unsigned length() { return this ? m_length : 0; } 53 53 54 KJS::UString ustring() const;54 JSC::UString ustring() const; 55 55 56 KJS::Identifier identifier(KJS::ExecState*) const;57 KJS::Identifier identifier(KJS::JSGlobalData*) const;56 JSC::Identifier identifier(JSC::ExecState*) const; 57 JSC::Identifier identifier(JSC::JSGlobalData*) const; 58 58 59 59 private:
Note:
See TracChangeset
for help on using the changeset viewer.