#include <interpreter.h>
Public Methods | |
| Interpreter (const Object &global) | |
| Interpreter () | |
| Object | globalObject () const |
| ExecState * | globalExec () |
| bool | checkSyntax (const UString &code) |
| Completion | evaluate (const UString &code, const Value &thisV=Value()) |
| Object | builtinObject () const |
| Object | builtinFunction () const |
| Object | builtinArray () const |
| Object | builtinBoolean () const |
| Object | builtinString () const |
| Object | builtinNumber () const |
| Object | builtinDate () const |
| Object | builtinRegExp () const |
| Object | builtinError () const |
| Object | builtinObjectPrototype () const |
| Object | builtinFunctionPrototype () const |
| Object | builtinArrayPrototype () const |
| Object | builtinBooleanPrototype () const |
| Object | builtinStringPrototype () const |
| Object | builtinNumberPrototype () const |
| Object | builtinDatePrototype () const |
| Object | builtinRegExpPrototype () const |
| Object | builtinErrorPrototype () const |
| Object | builtinEvalError () const |
| void | setCompatMode (CompatMode mode) |
| virtual void | mark () |
| virtual int | rtti () |
Static Public Methods | |
| bool | collect () |
Definition at line 119 of file interpreter.h.
|
|
Creates a new interpreter. The supplied object will be used as the global object for all scripts executed with this interpreter. During constuction, all the standard properties such as "Object" and "Number" will be added to the global object. Note: You should not use the same global object for multiple interpreters. This is due do the fact that the built-in properties are set in the constructor, and if these objects have been modified from another interpreter (e.g. a script modifying String.prototype), the changes will be overridden.
|
|
|
Creates a new interpreter. A global object will be created and initialized with the standard global properties. |
|
|
Returns the builtin "Array" object. |
|
|
Returns the builtin "Array.prototype" object. |
|
|
Returns the builtin "Boolean" object. |
|
|
Returns the builtin "Boolean.prototype" object. |
|
|
Returns the builtin "Date" object. |
|
|
Returns the builtin "Date.prototype" object. |
|
|
Returns the builtin "Error" object. |
|
|
Returns the builtin "Error.prototype" object. |
|
|
The initial value of "Error" global property |
|
|
Returns the builtin "Function" object. |
|
|
Returns the builtin "Function.prototype" object. |
|
|
Returns the builtin "Number" object. |
|
|
Returns the builtin "Number.prototype" object. |
|
|
Returns the builtin "Object" object. This is the object that was set as a property of the global object during construction; if the property is replaced by script code, this method will still return the original object.
|
|
|
Returns the builtin "Object.prototype" object. |
|
|
Returns the builtin "RegExp" object. |
|
|
Returns the builtin "RegExp.prototype" object. |
|
|
Returns the builtin "String" object. |
|
|
Returns the builtin "String.prototype" object. |
|
|
Parses the supplied ECMAScript code and checks for syntax errors.
|
|
|
Run the garbage collection. Returns true when at least one object was collected; false otherwise. |
|
||||||||||||
|
Evaluates the supplied ECMAScript code. Since this method returns a Completion, you should check the type of completion to detect an error or before attempting to access the returned value. For example, if an error occurs during script execution and is not caught by the script, the completion type will be Throw. If the supplied code is invalid, a SyntaxError will be thrown.
|
|
|
Returns the execution state object which can be used to execute scripts using this interpreter at a the "global" level, i.e. one with a execution context that has the global object as the "this" value, and who's scope chain contains only the global object. Note: this pointer remains constant for the life of the interpreter and should not be manually deleted.
|
|
|
Returns the object that is used as the global object during all script execution performed by this interpreter |
|
|
Called by InterpreterImp during the mark phase of the garbage collector Default implementation does nothing, this exist for classes that reimplement Interpreter. Definition at line 332 of file interpreter.h. |
|
|
Provides a way to distinguish derived classes. Only useful if you reimplement Interpreter and if different kind of interpreters are created in the same process. The base class returns 0, the ECMA-bindings interpreter returns 1. Definition at line 340 of file interpreter.h. |
|
|
Call this to enable a compatibility mode with another browser. (by default konqueror is in "native mode"). Currently, in KJS, this only changes the behaviour of Date::getYear() which returns the full year under IE. |
1.2.18