forked from qt-creator/qt-creator
Get rid of Environment, introduce external ScopeChain in Link.
Done-with: Roberto
This commit is contained in:
@@ -622,39 +622,6 @@ const Reference *Value::asReference() const
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Environment
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Environment::Environment()
|
||||
{
|
||||
}
|
||||
|
||||
Environment::~Environment()
|
||||
{
|
||||
}
|
||||
|
||||
const Environment *Environment::parent() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
const Value *Environment::lookup(const QString &name) const
|
||||
{
|
||||
if (const Value *member = lookupMember(name))
|
||||
return member;
|
||||
|
||||
else if (const Environment *p = parent())
|
||||
return p->lookup(name);
|
||||
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
const Value *Environment::lookupMember(const QString &) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Values
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -788,8 +755,7 @@ bool MemberProcessor::processGeneratedSlot(const QString &, const Value *)
|
||||
|
||||
ObjectValue::ObjectValue(Engine *engine)
|
||||
: _engine(engine),
|
||||
_prototype(0),
|
||||
_scope(0)
|
||||
_prototype(0)
|
||||
{
|
||||
engine->registerObject(this);
|
||||
}
|
||||
@@ -818,16 +784,6 @@ const ObjectValue *ObjectValue::prototype() const
|
||||
return _prototype;
|
||||
}
|
||||
|
||||
const ObjectValue *ObjectValue::scope() const
|
||||
{
|
||||
return _scope;
|
||||
}
|
||||
|
||||
void ObjectValue::setScope(const ObjectValue *scope)
|
||||
{
|
||||
_scope = scope;
|
||||
}
|
||||
|
||||
void ObjectValue::setProperty(const QString &name, const Value *value)
|
||||
{
|
||||
_members[name] = value;
|
||||
@@ -893,11 +849,6 @@ void ObjectValue::processMembers(MemberProcessor *processor) const
|
||||
}
|
||||
}
|
||||
|
||||
const Environment *ObjectValue::parent() const
|
||||
{
|
||||
return _scope;
|
||||
}
|
||||
|
||||
const Value *ObjectValue::lookupMember(const QString &name) const
|
||||
{
|
||||
if (const Value *m = _members.value(name))
|
||||
|
Reference in New Issue
Block a user