本文整理汇总了C++中StackValueCollection::set_obj_at方法的典型用法代码示例。如果您正苦于以下问题:C++ StackValueCollection::set_obj_at方法的具体用法?C++ StackValueCollection::set_obj_at怎么用?C++ StackValueCollection::set_obj_at使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StackValueCollection
的用法示例。
在下文中一共展示了StackValueCollection::set_obj_at方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: locals
StackValueCollection* compiledVFrame::locals() const {
// Natives has no scope
if (scope() == NULL) return new StackValueCollection(0);
GrowableArray<ScopeValue*>* scv_list = scope()->locals();
if (scv_list == NULL) return new StackValueCollection(0);
// scv_list is the list of ScopeValues describing the JVM stack state.
// There is one scv_list entry for every JVM stack state in use.
int length = scv_list->length();
StackValueCollection* result = new StackValueCollection(length);
// In rare instances set_locals may have occurred in which case
// there are local values that are not described by the ScopeValue anymore
GrowableArray<jvmtiDeferredLocalVariable*>* deferred = NULL;
GrowableArray<jvmtiDeferredLocalVariableSet*>* list = thread()->deferred_locals();
if (list != NULL ) {
// In real life this never happens or is typically a single element search
for (int i = 0; i < list->length(); i++) {
if (list->at(i)->matches((vframe*)this)) {
deferred = list->at(i)->locals();
break;
}
}
}
for( int i = 0; i < length; i++ ) {
result->add( create_stack_value(scv_list->at(i)) );
}
// Replace specified locals with any deferred writes that are present
if (deferred != NULL) {
for ( int l = 0; l < deferred->length() ; l ++) {
jvmtiDeferredLocalVariable* val = deferred->at(l);
switch (val->type()) {
case T_BOOLEAN:
result->set_int_at(val->index(), val->value().z);
break;
case T_CHAR:
result->set_int_at(val->index(), val->value().c);
break;
case T_FLOAT:
result->set_float_at(val->index(), val->value().f);
break;
case T_DOUBLE:
result->set_double_at(val->index(), val->value().d);
break;
case T_BYTE:
result->set_int_at(val->index(), val->value().b);
break;
case T_SHORT:
result->set_int_at(val->index(), val->value().s);
break;
case T_INT:
result->set_int_at(val->index(), val->value().i);
break;
case T_LONG:
result->set_long_at(val->index(), val->value().j);
break;
case T_OBJECT:
{
Handle obj((oop)val->value().l);
result->set_obj_at(val->index(), obj);
}
break;
default:
ShouldNotReachHere();
}
}
}
return result;
}