Changeset 10084 in webkit for trunk/JavaScriptCore/kjs/interpreter.cpp
- Timestamp:
- Aug 7, 2005, 9:07:46 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/interpreter.cpp
r10076 r10084 51 51 } 52 52 53 Object 53 ObjectImp *Context::variableObject() const 54 54 { 55 55 return rep->variableObject(); 56 56 } 57 57 58 Object 58 ObjectImp *Context::thisValue() const 59 59 { 60 60 return rep->thisValue(); … … 68 68 // ------------------------------ Interpreter ---------------------------------- 69 69 70 Interpreter::Interpreter( const Object &global)70 Interpreter::Interpreter(ObjectImp *global) 71 71 : rep(0) 72 72 , m_argumentsPropertyName(&argumentsPropertyName) 73 73 , m_specialPrototypePropertyName(&specialPrototypePropertyName) 74 74 { 75 rep = new InterpreterImp(this, global);75 rep = new InterpreterImp(this, global); 76 76 } 77 77 … … 81 81 , m_specialPrototypePropertyName(&specialPrototypePropertyName) 82 82 { 83 Object global(new ObjectImp()); 84 rep = new InterpreterImp(this,global); 83 rep = new InterpreterImp(this, new ObjectImp); 85 84 } 86 85 … … 90 89 } 91 90 92 Object &Interpreter::globalObject() const91 ObjectImp *Interpreter::globalObject() const 93 92 { 94 93 return rep->globalObject(); … … 125 124 } 126 125 127 Completion Interpreter::evaluate(const UString &code, const Value &thisV, const UString &)126 Completion Interpreter::evaluate(const UString &code, ValueImp *thisV, const UString &) 128 127 { 129 128 return evaluate(UString(), 0, code, thisV); 130 129 } 131 130 132 Completion Interpreter::evaluate(const UString &sourceURL, int startingLineNumber, const UString &code, const Value &thisV)131 Completion Interpreter::evaluate(const UString &sourceURL, int startingLineNumber, const UString &code, ValueImp *thisV) 133 132 { 134 133 Completion comp = rep->evaluate(code,thisV, sourceURL, startingLineNumber); … … 139 138 ExecState *exec = rep->globalExec(); 140 139 char *f = strdup(sourceURL.ascii()); 141 const char *message = comp.value() .toObject(exec).toString(exec).ascii();140 const char *message = comp.value()->toObject(exec)->toString(exec).ascii(); 142 141 printf("[%d] %s:%s\n", getpid(), f, message); 143 142 … … 150 149 } 151 150 152 Object 151 ObjectImp *Interpreter::builtinObject() const 153 152 { 154 153 return rep->builtinObject(); 155 154 } 156 155 157 Object 156 ObjectImp *Interpreter::builtinFunction() const 158 157 { 159 158 return rep->builtinFunction(); 160 159 } 161 160 162 Object 161 ObjectImp *Interpreter::builtinArray() const 163 162 { 164 163 return rep->builtinArray(); 165 164 } 166 165 167 Object 166 ObjectImp *Interpreter::builtinBoolean() const 168 167 { 169 168 return rep->builtinBoolean(); 170 169 } 171 170 172 Object 171 ObjectImp *Interpreter::builtinString() const 173 172 { 174 173 return rep->builtinString(); 175 174 } 176 175 177 Object 176 ObjectImp *Interpreter::builtinNumber() const 178 177 { 179 178 return rep->builtinNumber(); 180 179 } 181 180 182 Object 181 ObjectImp *Interpreter::builtinDate() const 183 182 { 184 183 return rep->builtinDate(); 185 184 } 186 185 187 Object 186 ObjectImp *Interpreter::builtinRegExp() const 188 187 { 189 188 return rep->builtinRegExp(); 190 189 } 191 190 192 Object 191 ObjectImp *Interpreter::builtinError() const 193 192 { 194 193 return rep->builtinError(); 195 194 } 196 195 197 Object 196 ObjectImp *Interpreter::builtinObjectPrototype() const 198 197 { 199 198 return rep->builtinObjectPrototype(); 200 199 } 201 200 202 Object 201 ObjectImp *Interpreter::builtinFunctionPrototype() const 203 202 { 204 203 return rep->builtinFunctionPrototype(); 205 204 } 206 205 207 Object 206 ObjectImp *Interpreter::builtinArrayPrototype() const 208 207 { 209 208 return rep->builtinArrayPrototype(); 210 209 } 211 210 212 Object 211 ObjectImp *Interpreter::builtinBooleanPrototype() const 213 212 { 214 213 return rep->builtinBooleanPrototype(); 215 214 } 216 215 217 Object 216 ObjectImp *Interpreter::builtinStringPrototype() const 218 217 { 219 218 return rep->builtinStringPrototype(); 220 219 } 221 220 222 Object 221 ObjectImp *Interpreter::builtinNumberPrototype() const 223 222 { 224 223 return rep->builtinNumberPrototype(); 225 224 } 226 225 227 Object 226 ObjectImp *Interpreter::builtinDatePrototype() const 228 227 { 229 228 return rep->builtinDatePrototype(); 230 229 } 231 230 232 Object 231 ObjectImp *Interpreter::builtinRegExpPrototype() const 233 232 { 234 233 return rep->builtinRegExpPrototype(); 235 234 } 236 235 237 Object 236 ObjectImp *Interpreter::builtinErrorPrototype() const 238 237 { 239 238 return rep->builtinErrorPrototype(); 240 239 } 241 240 242 Object 241 ObjectImp *Interpreter::builtinEvalError() const 243 242 { 244 243 return rep->builtinEvalError(); 245 244 } 246 245 247 Object 246 ObjectImp *Interpreter::builtinRangeError() const 248 247 { 249 248 return rep->builtinRangeError(); 250 249 } 251 250 252 Object 251 ObjectImp *Interpreter::builtinReferenceError() const 253 252 { 254 253 return rep->builtinReferenceError(); 255 254 } 256 255 257 Object 256 ObjectImp *Interpreter::builtinSyntaxError() const 258 257 { 259 258 return rep->builtinSyntaxError(); 260 259 } 261 260 262 Object 261 ObjectImp *Interpreter::builtinTypeError() const 263 262 { 264 263 return rep->builtinTypeError(); 265 264 } 266 265 267 Object 266 ObjectImp *Interpreter::builtinURIError() const 268 267 { 269 268 return rep->builtinURIError(); 270 269 } 271 270 272 Object 271 ObjectImp *Interpreter::builtinEvalErrorPrototype() const 273 272 { 274 273 return rep->builtinEvalErrorPrototype(); 275 274 } 276 275 277 Object 276 ObjectImp *Interpreter::builtinRangeErrorPrototype() const 278 277 { 279 278 return rep->builtinRangeErrorPrototype(); 280 279 } 281 280 282 Object 281 ObjectImp *Interpreter::builtinReferenceErrorPrototype() const 283 282 { 284 283 return rep->builtinReferenceErrorPrototype(); 285 284 } 286 285 287 Object 286 ObjectImp *Interpreter::builtinSyntaxErrorPrototype() const 288 287 { 289 288 return rep->builtinSyntaxErrorPrototype(); 290 289 } 291 290 292 Object 291 ObjectImp *Interpreter::builtinTypeErrorPrototype() const 293 292 { 294 293 return rep->builtinTypeErrorPrototype(); 295 294 } 296 295 297 Object 296 ObjectImp *Interpreter::builtinURIErrorPrototype() const 298 297 { 299 298 return rep->builtinURIErrorPrototype(); … … 338 337 339 338 340 void *Interpreter::createLanguageInstanceForValue (ExecState *exec, int language, const Object &value, const Bindings::RootObject *origin, const Bindings::RootObject *current)339 void *Interpreter::createLanguageInstanceForValue(ExecState *exec, int language, ObjectImp *value, const Bindings::RootObject *origin, const Bindings::RootObject *current) 341 340 { 342 341 return Bindings::Instance::createLanguageInstanceForValue (exec, (Bindings::Instance::BindingLanguage)language, value, origin, current);
Note:
See TracChangeset
for help on using the changeset viewer.