本文整理汇总了C++中VariableScope::validate方法的典型用法代码示例。如果您正苦于以下问题:C++ VariableScope::validate方法的具体用法?C++ VariableScope::validate怎么用?C++ VariableScope::validate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VariableScope
的用法示例。
在下文中一共展示了VariableScope::validate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: verify_call_frame
/**
* Walks the chain of objects accessible from the specified CallFrame.
*/
void GarbageCollector::verify_call_frame(CallFrame* top_call_frame,
AddressDisplacement* offset)
{
CallFrame* call_frame = top_call_frame;
while(call_frame) {
call_frame = displace(call_frame, offset);
if(call_frame->constant_scope_) {
call_frame->constant_scope_->validate();
}
if(call_frame->compiled_code) {
call_frame->compiled_code->validate();
}
if(call_frame->compiled_code) {
native_int stack_size = call_frame->compiled_code->stack_size()->to_native();
for(native_int i = 0; i < stack_size; i++) {
Object* obj = call_frame->stk[i];
obj->validate();
}
}
VariableScope* scope = call_frame->top_scope_;
if(call_frame->multiple_scopes_p() && scope && !scope->nil_p()) {
scope->validate();
}
if(BlockEnvironment* env = call_frame->block_env()) {
env->validate();
}
Arguments* args = displace(call_frame->arguments, offset);
if(!call_frame->inline_method_p() && args) {
args->recv()->validate();
args->block()->validate();
Object** ary = displace(args->arguments(), offset);
for(uint32_t i = 0; i < args->total(); i++) {
ary[i]->validate();
}
}
if(call_frame->scope && call_frame->compiled_code) {
verify_variable_scope(call_frame, displace(call_frame->scope, offset));
}
call_frame = call_frame->previous;
}
}