• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ frame类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中frame的典型用法代码示例。如果您正苦于以下问题:C++ frame类的具体用法?C++ frame怎么用?C++ frame使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了frame类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: hasResult

bool hasResult(frame &cur_frame, uint64_t target) {

	if (!cur_frame.has_std_frame()) return false;

	const ::std_frame& cur_std_frame = cur_frame.std_frame();
	if (!cur_std_frame.has_operand_post_list()) return false;

	const operand_value_list& operand_list = cur_std_frame.operand_post_list();
	for (int i = 0; i < operand_list.elem_size(); i++) {
		const ::operand_info& cur_element = operand_list.elem(i);
		const ::operand_info_specific& cur_specific = cur_element.operand_info_specific();
		if (!cur_specific.has_mem_operand())
			continue;

		uint64_t curr = cur_specific.mem_operand().address();

		if (curr == target) {

			std::cout << cur_frame_counter << " " << i << std::endl;
			return true;
		}

	}
	return false;
}
开发者ID:AnselmNicholas,项目名称:fs-summer-2015,代码行数:25,代码来源:findParentSliceCandidate.cpp


示例2: equal

inline bool frame::equal(frame other) const {
  // Seems close enough
  return sp() == other.sp()
      && fp() == other.fp()
      && pc_addr() == other.pc_addr() 
      && pc() == other.pc();
}
开发者ID:MuniyappanV,项目名称:jdk-source-code,代码行数:7,代码来源:frame_ia64.inline.hpp


示例3: unpack_first_frame

inline void unpack_first_frame(char* &current_pc, frame &current, CodeIterator &c) {
  // first vframe in the array
  if (nlr_through_unpacking) {
    // NLR is comming through unpacked vframes
    current_pc = c.interpreter_return_point();
    // current_pc points to a normal return point in the interpreter.
	// To find the nlr return point we first compute the nlr offset.
    current_pc = ic_info_at(current_pc)->NLR_target();
    current.set_hp(c.next_hp());
  } else if (redo_the_send) {
    // Deoptimizing uncommon trap
    current_pc = Interpreter::redo_bytecode_after_deoptimization();
    current.set_hp(c.next_hp());
	redo_send_offset = c.next_hp() - c.hp();
    redo_the_send = false;
  } else {
    // Normal case
    current_pc = c.interpreter_return_point(true);
    current.set_hp(c.next_hp());

    if (c.is_message_send()) {
	  number_of_arguments_through_unpacking = c.ic()->nof_arguments();
    } else if (c.is_primitive_call()) {
      number_of_arguments_through_unpacking = c.prim_cache()->number_of_parameters();
    } else if (c.is_dll_call()) {
      // The callee should not pop the argument since a DLL call is like a c function call.
      // The continuation code for the DLL call will pop the arguments!
      number_of_arguments_through_unpacking = 0;
    }
  }
}
开发者ID:bossiernesto,项目名称:Strongtalk,代码行数:31,代码来源:process.cpp


示例4: traceDeltaFrame

void traceDeltaFrame(frame& f) {
  if (f.is_compiled_frame()) {
    traceCompiledFrame(f);
  } else if (f.is_interpreted_frame()) {
    traceInterpretedFrame(f);
  }
}
开发者ID:bossiernesto,项目名称:Strongtalk,代码行数:7,代码来源:except.cpp


示例5: ReadFile

bool RS485::receive(frame &frame_receive){

//读取的字节数
	DWORD wCount;
	//读取状态
	int bReadStat = 0;
	char byte_buf = 0;
	char *frame_length = new char[2];
	char frame_type = 0;

//	printf("开始读取\n");
	//读取起始位
	ReadFile(hCom,&byte_buf,1,&wCount,NULL);
	if (byte_buf != 0x10)
	{
//		printf("未读取到起始位0x10\n");
		return false;
	}
	ReadFile(hCom,&byte_buf,1,&wCount,NULL);
	if(byte_buf != 0x02){
//		printf("未读取到到起始位0x02\n");
		return false;
	}
	//读取帧长度
	ReadFile(hCom,frame_length,2,&wCount,NULL);

	//读取帧类型
	ReadFile(hCom, &frame_type, 1,&wCount,NULL);
	frame_receive.set_type(frame_type);

	//读取帧
	ReadFile(hCom, frame_receive.getFrame() + 5, frame_receive.getLength() -5,&wCount,NULL);

	return true;
}
开发者ID:sh894,项目名称:RailwayControlSystem,代码行数:35,代码来源:RS485.cpp


示例6: get_level

size_t layer_raster::get_level(const frame& fr)
{
  const projection pj_rast(get_pj());
  const projection pj_fr(fr.get_pj());
  const double scale(pj_rast == pj_fr? fr.scale(): fr.transform(pj_rast).scale());
  return m_raster.snap_to_level(scale * scale);
}
开发者ID:bekzod786,项目名称:brigantine,代码行数:7,代码来源:layer_raster.cpp


示例7: equal

inline bool frame::equal(frame other) const {
  bool ret =  sp() == other.sp()
           && fp() == other.fp()
           && pc() == other.pc();
  assert(!ret || ret && cb() == other.cb() && _deopt_state == other._deopt_state, "inconsistent construction");
  return ret;
}
开发者ID:,项目名称:,代码行数:7,代码来源:


示例8: is_in_expression_stack

static bool is_in_expression_stack(const frame& fr, const intptr_t* const addr) {
  assert(addr != NULL, "invariant");

  // Ensure to be 'inside' the expresion stack (i.e., addr >= sp for Intel).
  // In case of exceptions, the expression stack is invalid and the sp
  // will be reset to express this condition.
  if (frame::interpreter_frame_expression_stack_direction() > 0) {
    return addr <= fr.interpreter_frame_tos_address();
  }

  return addr >= fr.interpreter_frame_tos_address();
}
开发者ID:krichter722,项目名称:jdk8u-jdk8u60-dev-hotspot,代码行数:12,代码来源:vframe.cpp


示例9: found_bad_method_frame

inline void vframeStreamCommon::fill_from_interpreter_frame() {
  methodOop method = _frame.interpreter_frame_method();
  intptr_t  bcx    = _frame.interpreter_frame_bcx();
  int       bci    = method->validate_bci_from_bcx(bcx);
  // 6379830 AsyncGetCallTrace sometimes feeds us wild frames.
  if (bci < 0) {
    found_bad_method_frame();
    bci = 0;  // pretend it's on the point of entering
  }
  _mode   = interpreted_mode;
  _method = method;
  _bci    = bci;
}
开发者ID:,项目名称:,代码行数:13,代码来源:


示例10: write_to

point string_stencil::write_to(frame& frame_, const std::string& str) const {
	auto dim  =frame_.get_dimension();
	auto rows =required_y(dim.x, str.size());

	if(rows <= dim.y) {
		frame_.write({0, 0}, str);
		return { dim.x, rows };
	}
	else {
		frame_.write({0, 0}, str.cbegin(), str.cbegin()+dim.y*dim.x-1);
		return dim;
	}
}
开发者ID:jgouly,项目名称:irc_client,代码行数:13,代码来源:string_stencil.cpp


示例11:

bool RS485::send(frame &frm){
	DWORD dwBytesWrite=frm.getLength();
	COMSTAT ComStat;
	DWORD dwErrorFlags;
	BOOL bWriteStat;
	ClearCommError(hCom,&dwErrorFlags,&ComStat);
	bWriteStat=WriteFile(hCom,frm.getFrame(),dwBytesWrite,& dwBytesWrite,NULL);
	if(!bWriteStat)
	{
		std::cout<<"写串口失败"<<std::endl;
		return false;
	}
	return true;
}
开发者ID:sh894,项目名称:RailwayControlSystem,代码行数:14,代码来源:RS485.cpp


示例12: do_oop

 void do_oop(oop* o) {
   oop obj = *o;
   if (!obj->verify()) {
     lprintf("Verify failed in frame:\n");
     fr->print();
   }
 }
开发者ID:sebkirche,项目名称:strongtalk,代码行数:7,代码来源:frame.cpp


示例13: getTarget

void sections::getTarget(accumTarget& inTarget,const int& inID,const units& inUnits,const frame& inFrame)
{
	inTarget.size++;

	ID=inID;
	for(int i=0;i<=8;i++)
	{
		if(surroundingSections[i]!=0 && i!=4)
		{
			if(surroundingSections[i]->getID()!=inID)
			{
				surroundingSections[i]->getTarget(inTarget,inID,inUnits,inFrame);
			}
		}
	}
	inTarget.locX+=locationX;
	inTarget.locY+=locationY;

	const unsigned char* newData=inFrame.getData();
	unsigned long pixCounter=0,i=0,j=0,y=0,x=0;
	int intUnitSize=inUnits.getUnitSize();
	double unitHeight=inUnits.getUnitHeight();
	double unitWidth=inUnits.getUnitWidth();
	double unitSize=inUnits.getUnitSize();
	i=locationY;
	j=locationX;
	y=0;
	while(y<unitHeight-1)
	{
		x=0;
		while(x<unitWidth)
		{
			unsigned long temp=i*unitSize*unitHeight*unitWidth*3+j*unitWidth*3+y*unitSize*unitWidth*3+x*3;
			for(unsigned long location=temp;location<=temp+2;location++)
			{
				switch(location%3)
				{
				case 0:
					inTarget.blue+=newData[location];
					break;
				case 1:
					inTarget.green+=newData[location];
					break;
				case 2:
					inTarget.red+=newData[location];
					break;
				default:
					break;
				}

			}
			inTarget.totalPixilCount++;

			x++;

		}
		y++;
	}
}
开发者ID:madmaps,项目名称:Paintball_Sentry,代码行数:59,代码来源:sections.cpp


示例14: receive_data

int tcp_connect::receive_data(frame &f)
{	
	char buf[256];
	struct sockaddr_in client_addr;
	socklen_t len = sizeof(struct sockaddr_in);
	recvfrom(this->csock, buf, BUFLEN, 0, (struct sockaddr *) &(client_addr), &len);
	f.parse(buf,client_addr);
}
开发者ID:flair2005,项目名称:Smart-Sensing,代码行数:8,代码来源:tcp_connect.cpp


示例15: next

  // Iteration
  void next() {
    // handle frames with inlining
    if (_mode == compiled_mode    && fill_in_compiled_inlined_sender()) return;

    // handle general case
    do {
      _frame = _frame.sender(&_reg_map);
    } while (!fill_from_frame());
  }
开发者ID:,项目名称:,代码行数:10,代码来源:


示例16: stack_locals

static void stack_locals(StackValueCollection* result,
                         int length,
                         const InterpreterOopMap& oop_mask,
                         const frame& fr) {

  assert(result != NULL, "invariant");

  for (int i = 0; i < length; ++i) {
    const intptr_t* const addr = fr.interpreter_frame_local_at(i);
    assert(addr != NULL, "invariant");
    assert(addr >= fr.sp(), "must be inside the frame");

    StackValue* const sv = create_stack_value_from_oop_map(oop_mask, i, addr);
    assert(sv != NULL, "sanity check");

    result->add(sv);
  }
}
开发者ID:krichter722,项目名称:jdk8u-jdk8u60-dev-hotspot,代码行数:18,代码来源:vframe.cpp


示例17: found_bad_method_frame

inline void vframeStreamCommon::fill_from_interpreter_frame() {
  Method* method = _frame.interpreter_frame_method();
  address   bcp    = _frame.interpreter_frame_bcp();
  int       bci    = method->validate_bci_from_bcp(bcp);
  // 6379830 AsyncGetCallTrace sometimes feeds us wild frames.
  // AsyncGetCallTrace interrupts the VM asynchronously. As a result
  // it is possible to access an interpreter frame for which
  // no Java-level information is yet available (e.g., becasue
  // the frame was being created when the VM interrupted it).
  // In this scenario, pretend that the interpreter is at the point
  // of entering the method.
  if (bci < 0) {
    found_bad_method_frame();
    bci = 0;
  }
  _mode   = interpreted_mode;
  _method = method;
  _bci    = bci;
}
开发者ID:wei-tang,项目名称:JVM,代码行数:19,代码来源:vframe.hpp


示例18: vframeStreamCommon

// top-frame will be skipped
vframeStream::vframeStream(JavaThread* thread, frame top_frame,
  bool stop_at_java_call_stub) : vframeStreamCommon(thread) {
  _stop_at_java_call_stub = stop_at_java_call_stub;

  // skip top frame, as it may not be at safepoint
  _frame  = top_frame.sender(&_reg_map);
  while (!fill_from_frame()) {
    _frame = _frame.sender(&_reg_map);
  }
}
开发者ID:4T-Shirt,项目名称:OpenJDK-Research,代码行数:11,代码来源:vframe.cpp


示例19: map

void vframeArray::unpack_to_stack(frame &unpack_frame, int exec_mode, int caller_actual_parameters) {
  // stack picture
  //   unpack_frame
  //   [new interpreter frames ] (frames are skeletal but walkable)
  //   caller_frame
  //
  //  This routine fills in the missing data for the skeletal interpreter frames
  //  in the above picture.

  // Find the skeletal interpreter frames to unpack into
  JavaThread* THREAD = JavaThread::current();
  RegisterMap map(THREAD, false);
  // Get the youngest frame we will unpack (last to be unpacked)
  frame me = unpack_frame.sender(&map);
  int index;
  for (index = 0; index < frames(); index++ ) {
    *element(index)->iframe() = me;
    // Get the caller frame (possibly skeletal)
    me = me.sender(&map);
  }

  // Do the unpacking of interpreter frames; the frame at index 0 represents the top activation, so it has no callee
  // Unpack the frames from the oldest (frames() -1) to the youngest (0)
  frame* caller_frame = &me;
  for (index = frames() - 1; index >= 0 ; index--) {
    vframeArrayElement* elem = element(index);  // caller
    int callee_parameters, callee_locals;
    if (index == 0) {
      callee_parameters = callee_locals = 0;
    } else {
      methodHandle caller = elem->method();
      methodHandle callee = element(index - 1)->method();
      Bytecode_invoke inv(caller, elem->bci());
      // invokedynamic instructions don't have a class but obviously don't have a MemberName appendix.
      // NOTE:  Use machinery here that avoids resolving of any kind.
      const bool has_member_arg =
          !inv.is_invokedynamic() && MethodHandles::has_member_arg(inv.klass(), inv.name());
      callee_parameters = callee->size_of_parameters() + (has_member_arg ? 1 : 0);
      callee_locals     = callee->max_locals();
    }
    elem->unpack_on_stack(caller_actual_parameters,
                          callee_parameters,
                          callee_locals,
                          caller_frame,
                          index == 0,
                          index == frames() - 1,
                          exec_mode);
    if (index == frames() - 1) {
      Deoptimization::unwind_callee_save_values(elem->iframe(), this);
    }
    caller_frame = elem->iframe();
    caller_actual_parameters = callee_parameters;
  }
  deallocate_monitor_chunks();
}
开发者ID:641252154,项目名称:HotSpot-JVM-Linux-x86-Research,代码行数:55,代码来源:vframeArray.cpp


示例20: locked

// --- locked ----------------------------------------------------------------
// Count times an oop is locked in this frame & codeblob
int CodeBlob::locked( frame fr, oop o ) const {
  methodCodeRef mcref = owner();
  if( mcref.is_null() ) return 0; // call stubs hit here
  methodCodeOop mcoop = mcref.as_methodCodeOop();
  if( mcoop->_blob != this ) return 0; // vtable stubs share the mcoop with the real blob
  const DebugMap *dbg = mcoop->_debuginfo;
  if( !dbg ) return 0;            // Commonly natives have no debug info
  const DebugScope *ds = dbg->get( fr.pc() -(address)this );
  if ( !ds ) return 0;
  return ds->count_locks( dbg, fr, o );
}
开发者ID:GregBowyer,项目名称:ManagedRuntimeInitiative,代码行数:13,代码来源:codeBlob.cpp



注:本文中的frame类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ freq_range_t类代码示例发布时间:2022-05-31
下一篇:
C++ forward_list类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap