25 #ifndef _KJS_INTERPRETER_H_
26 #define _KJS_INTERPRETER_H_
94 Object variableObject()
const;
121 const Context callingContext()
const;
127 CodeType codeType()
const;
133 int sourceId()
const;
138 int curStmtFirstLine()
const;
143 int curStmtLastLine()
const;
203 Object &globalObject()
const;
205 void initGlobalObject();
208 static void unlock();
231 bool checkSyntax(
const UString &code,
int *errLine,
UString *errMsg);
239 bool checkSyntax(
const UString &code);
264 InterpreterImp *imp();
274 Object builtinObject()
const;
279 Object builtinFunction()
const;
284 Object builtinArray()
const;
289 Object builtinBoolean()
const;
294 Object builtinString()
const;
299 Object builtinNumber()
const;
304 Object builtinDate()
const;
309 Object builtinRegExp()
const;
314 Object builtinError()
const;
319 Object builtinObjectPrototype()
const;
324 Object builtinFunctionPrototype()
const;
329 Object builtinArrayPrototype()
const;
334 Object builtinBooleanPrototype()
const;
339 Object builtinStringPrototype()
const;
344 Object builtinNumberPrototype()
const;
349 Object builtinDatePrototype()
const;
354 Object builtinRegExpPrototype()
const;
359 Object builtinErrorPrototype()
const;
364 Object builtinEvalError()
const;
365 Object builtinRangeError()
const;
366 Object builtinReferenceError()
const;
367 Object builtinSyntaxError()
const;
368 Object builtinTypeError()
const;
369 Object builtinURIError()
const;
371 Object builtinEvalErrorPrototype()
const;
372 Object builtinRangeErrorPrototype()
const;
373 Object builtinReferenceErrorPrototype()
const;
374 Object builtinSyntaxErrorPrototype()
const;
375 Object builtinTypeErrorPrototype()
const;
376 Object builtinURIErrorPrototype()
const;
378 enum CompatMode { NativeMode, IECompat, NetscapeCompat };
385 void setCompatMode(CompatMode mode);
386 CompatMode compatMode()
const;
392 static bool collect();
406 virtual int rtti() {
return 0; }
412 static void finalCheck();
431 virtual void virtual_hook(
int id,
void* data );
440 friend class InterpreterImp;
442 friend class GlobalFuncImp;
443 friend class TryNode;
444 friend class VarDeclNode;
445 friend class FuncDeclNode;
456 Interpreter *interpreter()
const {
return dynamicInterpreter(); }
464 Interpreter *lexicalInterpreter()
const;
473 void setException(
const Value &e);
474 void clearException();
475 Value exception()
const {
return _exception; }
482 static void requestTerminate() { terminate_request =
true; }
486 static bool (*confirmTerminate)();
488 ExecState(Interpreter *interp, ContextImp *con)
489 : _interpreter(interp), _context(con) { }
490 Interpreter *_interpreter;
491 ContextImp *_context;
493 static bool terminate_request;
498 #endif // _KJS_INTERPRETER_H_
Value objects are act as wrappers ("smart pointers") around ValueImp objects and their descendents...
virtual void mark()
Called by InterpreterImp during the mark phase of the garbage collector Default implementation does n...
Interpreter * dynamicInterpreter() const
Returns the interpreter associated with this execution state.
Interpreter objects can be used to evaluate ECMAScript code.
virtual int rtti()
Provides a way to distinguish derived classes.
Represents an execution context, as specified by section 10 of the ECMA spec.
Implementation class for functions implemented in JS.
Context context() const
Returns the execution context associated with this execution state.
Completion objects are used to convey the return status and value from functions. ...
Represents the current state of script execution.
Represents an Identifier for a Javascript object.