summaryrefslogtreecommitdiffstats
path: root/Source/JavaScriptCore/runtime/ScopeChain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/runtime/ScopeChain.cpp')
-rw-r--r--Source/JavaScriptCore/runtime/ScopeChain.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/Source/JavaScriptCore/runtime/ScopeChain.cpp b/Source/JavaScriptCore/runtime/ScopeChain.cpp
index 976cff6..4615f9a 100644
--- a/Source/JavaScriptCore/runtime/ScopeChain.cpp
+++ b/Source/JavaScriptCore/runtime/ScopeChain.cpp
@@ -31,16 +31,16 @@ namespace JSC {
#ifndef NDEBUG
-void ScopeChainNode::print() const
+void ScopeChainNode::print()
{
ScopeChainIterator scopeEnd = end();
for (ScopeChainIterator scopeIter = begin(); scopeIter != scopeEnd; ++scopeIter) {
- DeprecatedPtr<JSObject> o = *scopeIter;
+ JSObject* o = scopeIter->get();
PropertyNameArray propertyNames(globalObject->globalExec());
o->getPropertyNames(globalObject->globalExec(), propertyNames);
PropertyNameArray::const_iterator propEnd = propertyNames.end();
- fprintf(stderr, "----- [scope %p] -----\n", o.get());
+ fprintf(stderr, "----- [scope %p] -----\n", o);
for (PropertyNameArray::const_iterator propIter = propertyNames.begin(); propIter != propEnd; propIter++) {
Identifier name = *propIter;
fprintf(stderr, "%s, ", name.ustring().utf8().data());
@@ -51,12 +51,12 @@ void ScopeChainNode::print() const
#endif
-int ScopeChain::localDepth() const
+int ScopeChainNode::localDepth()
{
int scopeDepth = 0;
ScopeChainIterator iter = this->begin();
ScopeChainIterator end = this->end();
- while (!(*iter)->inherits(&JSActivation::info)) {
+ while (!(*iter)->inherits(&JSActivation::s_info)) {
++iter;
if (iter == end)
break;
@@ -65,4 +65,13 @@ int ScopeChain::localDepth() const
return scopeDepth;
}
+void ScopeChainNode::markChildren(MarkStack& markStack)
+{
+ if (next)
+ markStack.append(&next);
+ markStack.append(&object);
+ markStack.append(&globalObject);
+ markStack.append(&globalThis);
+}
+
} // namespace JSC