void FacebookAgent::api(std::string &path, int method, FBInfo ¶ms, FBCallback cb) { requestCallbacks.push_back(cb); PluginParam _path(path.c_str()); PluginParam _method(method); PluginParam _params(params); PluginParam _cbIndex((int)(requestCallbacks.size() - 1)); agentManager->getUserPlugin()->callFuncWithParam("request", &_path, &_method, &_params, &_cbIndex, NULL); }
void CompiledRFrame::init() { RegisterMap map(thread(), false); vframe* vf = vframe::new_vframe(&_fr, &map, thread()); assert(vf->is_compiled_frame(), "must be compiled"); _nm = compiledVFrame::cast(vf)->code(); vf = vf->top(); _vf = javaVFrame::cast(vf); _method = methodHandle(thread(), CodeCache::find_nmethod(_fr.pc())->method()); assert(_method(), "should have found a method"); #ifndef PRODUCT _invocations = _method->compiled_invocation_count(); #endif }
// The width of instruction at "pc" is changing by "delta". Adjust the // exception table, if any, of "rc->mb". void Relocator::adjust_exception_table(int bci, int delta) { ExceptionTable table(_method()); for (int index = 0; index < table.length(); index ++) { if (table.start_pc(index) > bci) { table.set_start_pc(index, table.start_pc(index) + delta); table.set_end_pc(index, table.end_pc(index) + delta); } else if (bci < table.end_pc(index)) { table.set_end_pc(index, table.end_pc(index) + delta); } if (table.handler_pc(index) > bci) table.set_handler_pc(index, table.handler_pc(index) + delta); } }
void buildMetaClass_GScriptCoreService(D _d) { _d.CPGF_MD_TEMPLATE _method("import", &D::ClassType::loadLibrary); _d.CPGF_MD_TEMPLATE _method("_import", &D::ClassType::loadLibrary); }