More work on controlling access to members of the Object class:
- Moved the code for initializing the object class, species and base object inside the Object class - Made propertyOffsetToId() a method of the Object class - Made relocateObject() a method of the Object class - The Object getVariable() method now returns a reference to the requested variable Only SegManager::reconstructScripts() is left needing direct access to the members of the Object class svn-id: r49228
This commit is contained in:
parent
60dd310688
commit
1c0bbb10cb
5 changed files with 120 additions and 82 deletions
|
@ -120,7 +120,7 @@ static reg_t &validate_property(Object *obj, int index) {
|
|||
return dummyReg;
|
||||
}
|
||||
|
||||
return obj->_variables[index];
|
||||
return obj->getVariable(index);
|
||||
}
|
||||
|
||||
static StackPtr validate_stack_addr(EngineState *s, StackPtr sp) {
|
||||
|
@ -1758,8 +1758,7 @@ void quit_vm() {
|
|||
|
||||
reg_t* ObjVarRef::getPointer(SegManager *segMan) const {
|
||||
Object *o = segMan->getObject(obj);
|
||||
if (!o) return 0;
|
||||
return &(o->_variables[varindex]);
|
||||
return o ? &o->getVariable(varindex) : 0;
|
||||
}
|
||||
|
||||
reg_t* ExecStack::getVarPointer(SegManager *segMan) const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue