本文整理汇总了C++中BasicObjectLock::obj方法的典型用法代码示例。如果您正苦于以下问题:C++ BasicObjectLock::obj方法的具体用法?C++ BasicObjectLock::obj怎么用?C++ BasicObjectLock::obj使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BasicObjectLock
的用法示例。
在下文中一共展示了BasicObjectLock::obj方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fr
GrowableArray<MonitorInfo*>* interpretedVFrame::monitors() const {
GrowableArray<MonitorInfo*>* result = new GrowableArray<MonitorInfo*>(5);
for (BasicObjectLock* current = (fr().previous_monitor_in_interpreter_frame(fr().interpreter_frame_monitor_begin()));
current >= fr().interpreter_frame_monitor_end();
current = fr().previous_monitor_in_interpreter_frame(current)) {
result->push(new MonitorInfo(current->obj(), current->lock(), false, false));
}
return result;
}
示例2: unpack_on_stack
//.........这里部分代码省略.........
}
// Setup the interpreter frame
assert(method() != NULL, "method must exist");
int temps = expressions()->size();
int locks = monitors() == NULL ? 0 : monitors()->number_of_monitors();
Interpreter::layout_activation(method(),
temps + callee_parameters,
popframe_preserved_args_size_in_words,
locks,
caller_actual_parameters,
callee_parameters,
callee_locals,
caller,
iframe(),
is_top_frame,
is_bottom_frame);
// Update the pc in the frame object and overwrite the temporary pc
// we placed in the skeletal frame now that we finally know the
// exact interpreter address we should use.
_frame.patch_pc(thread, pc);
assert (!method()->is_synchronized() || locks > 0, "synchronized methods must have monitors");
BasicObjectLock* top = iframe()->interpreter_frame_monitor_begin();
for (int index = 0; index < locks; index++) {
top = iframe()->previous_monitor_in_interpreter_frame(top);
BasicObjectLock* src = _monitors->at(index);
top->set_obj(src->obj());
src->lock()->move_to(src->obj(), top->lock());
}
if (ProfileInterpreter) {
iframe()->interpreter_frame_set_mdx(0); // clear out the mdp.
}
iframe()->interpreter_frame_set_bcx((intptr_t)bcp); // cannot use bcp because frame is not initialized yet
if (ProfileInterpreter) {
methodDataOop mdo = method()->method_data();
if (mdo != NULL) {
int bci = iframe()->interpreter_frame_bci();
if (use_next_mdp) ++bci;
address mdp = mdo->bci_to_dp(bci);
iframe()->interpreter_frame_set_mdp(mdp);
}
}
// Unpack expression stack
// If this is an intermediate frame (i.e. not top frame) then this
// only unpacks the part of the expression stack not used by callee
// as parameters. The callee parameters are unpacked as part of the
// callee locals.
int i;
for(i = 0; i < expressions()->size(); i++) {
StackValue *value = expressions()->at(i);
intptr_t* addr = iframe()->interpreter_frame_expression_stack_at(i);
switch(value->type()) {
case T_INT:
*addr = value->get_int();
break;
case T_OBJECT:
*addr = value->get_int(T_OBJECT);
break;