代码拉取完成,页面将自动刷新
#include "runtime/cellObject.hpp"
#include "object/hiList.hpp"
#include "object/hiDict.hpp"
#include "object/hiString.hpp"
#include "memory/oopClosure.hpp"
CellKlass* CellKlass::_instance = NULL;
CellKlass* CellKlass::get_instance() {
if (_instance == NULL) {
_instance = new CellKlass();
}
return _instance;
}
CellKlass::CellKlass() {
set_klass_dict(new HiDict());
set_name(new HiString("cell"));
}
CellObject::CellObject(HiList* t, int i) :
_table(t),
_index(i) {
set_klass(CellKlass::get_instance());
}
HiObject* CellObject::value() {
return _table->get(_index);
}
size_t CellKlass::size() {
return sizeof(CellKlass);
}
void CellKlass::oops_do(OopClosure* closure, HiObject* obj) {
CellObject* co = (CellObject*)obj;
closure->do_oop((HiObject**)&co->_table);
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。