本文整理汇总了C++中BlockEnvironment::home方法的典型用法代码示例。如果您正苦于以下问题:C++ BlockEnvironment::home方法的具体用法?C++ BlockEnvironment::home怎么用?C++ BlockEnvironment::home使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BlockEnvironment
的用法示例。
在下文中一共展示了BlockEnvironment::home方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void BlockEnvironment::Info::show(STATE, Object* self, int level) {
BlockEnvironment* be = as<BlockEnvironment>(self);
class_header(state, self);
indent_attribute(++level, "home"); be->home()->show(state, level);
indent_attribute(level, "home_block"); be->home_block()->show(state, level);
indent_attribute(level, "local_count"); be->local_count()->show(state, level);
indent_attribute(level, "method"); be->method()->show(state, level);
close_body(level);
}
示例2: under_context
BlockEnvironment* BlockEnvironment::under_context(STATE, CompiledMethod* cm,
MethodContext* parent, MethodContext* active, size_t index) {
BlockEnvironment* be = (BlockEnvironment*)state->new_object(G(blokenv));
VMMethod* vmm;
if((vmm = active->vmm->blocks[index]) == NULL) {
vmm = new VMMethod(state, cm);
if(active->vmm->type) {
vmm->specialize(state, active->vmm->type);
}
active->vmm->blocks[index] = vmm;
}
be->home(state, parent);
be->home_block(state, active);
be->method(state, cm);
be->local_count(state, cm->local_count());
be->vmm = vmm;
return be;
}