hannes%helma.at 23053eda13 Patch for bug 637587 - Functionality of built-in classes is exposed to changes in global object
This patch adds a new TopLevel class that extends IDScriptableObject and is
extended by ImporterTopLevel. TopLevel is meant to be used as top-level scope
and allows to cache built-in ECMAScript objects such as Object, Array,
Function, String etc.

The patch also adds two methods to ScriptRuntime called newBuiltinObject() and
setBuiltinProtoAndParent() that work similar to newObject() and
setObjectProtoAndParent() but directly access the cached built-ins in the
TopLevel scope.

If the top-level scope is not an instance of TopLevel or does not have its
built-in cache initialized, these methods will fall back to the old behaviour.


git-svn-id: svn://10.0.0.236/trunk@262006 18797224-902f-48f8-a5cc-f745e15eee43
2011-03-06 14:52:54 +00:00
..