Changeset 11527 in webkit for trunk/JavaScriptCore/kjs/testkjs.cpp
- Timestamp:
- Dec 10, 2005, 6:06:17 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/testkjs.cpp
r11525 r11527 36 36 using namespace KJS; 37 37 38 class TestFunctionImp : public ObjectImp{38 class TestFunctionImp : public JSObject { 39 39 public: 40 40 TestFunctionImp(int i, int length); 41 41 virtual bool implementsCall() const { return true; } 42 virtual ValueImp *callAsFunction(ExecState *exec, ObjectImp*thisObj, const List &args);42 virtual JSValue *callAsFunction(ExecState *exec, JSObject *thisObj, const List &args); 43 43 44 44 enum { Print, Debug, Quit, GC }; … … 48 48 }; 49 49 50 TestFunctionImp::TestFunctionImp(int i, int length) : ObjectImp(), id(i)50 TestFunctionImp::TestFunctionImp(int i, int length) : JSObject(), id(i) 51 51 { 52 52 putDirect(lengthPropertyName,length,DontDelete|ReadOnly|DontEnum); 53 53 } 54 54 55 ValueImp *TestFunctionImp::callAsFunction(ExecState *exec, ObjectImp*/*thisObj*/, const List &args)55 JSValue *TestFunctionImp::callAsFunction(ExecState *exec, JSObject */*thisObj*/, const List &args) 56 56 { 57 57 switch (id) { … … 76 76 } 77 77 78 class VersionFunctionImp : public ObjectImp{78 class VersionFunctionImp : public JSObject { 79 79 public: 80 VersionFunctionImp() : ObjectImp() {}80 VersionFunctionImp() : JSObject() {} 81 81 virtual bool implementsCall() const { return true; } 82 virtual ValueImp *callAsFunction(ExecState *exec, ObjectImp*thisObj, const List &args);82 virtual JSValue *callAsFunction(ExecState *exec, JSObject *thisObj, const List &args); 83 83 }; 84 84 85 ValueImp *VersionFunctionImp::callAsFunction(ExecState */*exec*/, ObjectImp*/*thisObj*/, const List &/*args*/)85 JSValue *VersionFunctionImp::callAsFunction(ExecState */*exec*/, JSObject */*thisObj*/, const List &/*args*/) 86 86 { 87 87 // We need this function for compatibility with the Mozilla JS tests but for now … … 90 90 } 91 91 92 class GlobalImp : public ObjectImp{92 class GlobalImp : public JSObject { 93 93 public: 94 94 virtual UString className() const { return "global"; } … … 107 107 JSLock lock; 108 108 109 ObjectImp*global(new GlobalImp());109 JSObject *global(new GlobalImp()); 110 110 111 111 // create interpreter … … 154 154 if (comp.complType() == Throw) { 155 155 ExecState *exec = interp.globalExec(); 156 ValueImp*exVal = comp.value();156 JSValue *exVal = comp.value(); 157 157 char *msg = exVal->toString(exec).ascii(); 158 158 int lineno = -1; 159 159 if (exVal->isObject()) { 160 ValueImp *lineVal = static_cast<ObjectImp*>(exVal)->get(exec,"line");160 JSValue *lineVal = static_cast<JSObject *>(exVal)->get(exec,"line"); 161 161 if (lineVal->isNumber()) 162 162 lineno = int(lineVal->toNumber(exec));
Note:
See TracChangeset
for help on using the changeset viewer.