本文整理汇总了C++中PClass::imported方法的典型用法代码示例。如果您正苦于以下问题:C++ PClass::imported方法的具体用法?C++ PClass::imported怎么用?C++ PClass::imported使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PClass
的用法示例。
在下文中一共展示了PClass::imported方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: emit_native_function_call
void UCContext::emit_native_function_call(Function *pfn, CALLFN fn)
{
Type rt = pfn->return_type();
// *change 1.2.0 Moved from compile_function_call()
// for cdecl-style method imports,
if (pfn->is_cdecl() && pfn->is_method()) {
// push mOP onto exec stack
emit(PUSH_THIS,0);
// do note that returned objects are by a another hidden arg
// *fix 1.1.4 The return type must specifically be an _object_, not a pointer to an object!
if (rt.is_object()) emit(SWAP,0);
}
emit(CALLN,DIRECT,NFBlock::create(pfn,fn));
pfn->fun_block()->data = (void *)fn; // convenient place to keep this!
// We need to check imported class object ptrs to see if they have a VMT....
// Any imported class ptrs need their UC VMT patched with CHKVMT
// *fix 1.1.0 Imported references as well as pointers!
if (rt.is_class() && rt.is_ref_or_ptr()) {
PClass pc = pc = rt.as_class();
if (pc->imported() && pc->has_VMT())
out(CodeGenerator::instruction_with_pointer(CHKVMT,pc));
}
// *add 1.2.9 Sometimes necessary to clear out upper 3bytes of 32-bit boolean values
else
if (rt == t_bool) {
emit(I2B);
}
}