当前位置: 首页>>代码示例>>C++>>正文


C++ AvmCore::debugger方法代码示例

本文整理汇总了C++中AvmCore::debugger方法的典型用法代码示例。如果您正苦于以下问题:C++ AvmCore::debugger方法的具体用法?C++ AvmCore::debugger怎么用?C++ AvmCore::debugger使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AvmCore的用法示例。


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

示例1: getListener

 FunctionObject* TraceClass::getListener()
 {
     FunctionObject* f = 0;
 #ifdef DEBUGGER
     AvmCore *core = this->core();
     if (core->debugger())
         f = core->debugger()->trace_callback;
 #endif /* DEBUGGER */
     return f;
 }
开发者ID:DaZhu,项目名称:crossbridge,代码行数:10,代码来源:SamplerScript.cpp

示例2: getLevel

 int TraceClass::getLevel(int target)
 {
     int lvl = 0 ; /*Debugger::TRACE_OFF;*/
 #ifdef DEBUGGER
     AvmCore *core = this->core();
     if (core->debugger())
     {
         if (target > 1)
             lvl = core->debugger()->astrace_callback;
         else
             lvl = core->debugger()->astrace_console;
     }
 #endif /* DEBUGGER */
     (void)target;
     return lvl;
 }
开发者ID:DaZhu,项目名称:crossbridge,代码行数:16,代码来源:SamplerScript.cpp

示例3: setLevel

 Atom TraceClass::setLevel(int lvl, int target)
 {
 #ifdef DEBUGGER
     AvmCore *core = this->core();
     if (core->debugger())
     {
         if (target > 1)
             core->debugger()->astrace_callback = (Debugger::TraceLevel) lvl;
         else
             core->debugger()->astrace_console = (Debugger::TraceLevel) lvl;
     }
 #endif /* DEBUGGER */
     (void)lvl;
     (void)target;
     return undefinedAtom;
 }
开发者ID:DaZhu,项目名称:crossbridge,代码行数:16,代码来源:SamplerScript.cpp

示例4: setListener

	void TraceClass::setListener(ScriptObject* f)
	{
	#ifdef DEBUGGER
		AvmCore *core = this->core();
		if (core->debugger())
		{
			// Listeners MUST be functions or null
			if ( core->isNullOrUndefined(f->atom()) )
			{
				f = 0;
			}
			else if (!AvmCore::istype(f->atom(), core->traits.function_itraits)) 
			{
				toplevel()->argumentErrorClass()->throwError( kInvalidArgumentError, core->toErrorString("Function"));
				return;
			}
			
			//MethodClosure* mc = f->toplevel()->methodClosureClass->create(f->getCallMethodEnv(), f->atom());
			core->debugger()->trace_callback = f;
		}
	#endif /* DEBUGGER */
		(void)f;
	}
开发者ID:weimingtom,项目名称:mod-actionscript,代码行数:23,代码来源:SamplerScript.cpp

示例5: verify

	void MethodInfo::verify(Toplevel *toplevel, AbcEnv* abc_env)
	{
		AvmAssert(declaringTraits()->isResolved());
		resolveSignature(toplevel);
		AvmCore* core = this->pool()->core;
		if (isNative())
		{
			union {
				GprMethodProc implGPR;
				AvmThunkNativeThunker thunker;
				AvmThunkNativeThunkerN thunkerN;
			} u;
	#ifdef DEBUGGER
			if (core->debugger())
			{
				MethodSignaturep ms = getMethodSignature();
				if (ms->returnTraitsBT() == BUILTIN_number)
					u.thunkerN = MethodInfo::debugEnterExitWrapperN;
				else
					u.thunker = MethodInfo::debugEnterExitWrapper32;
			}
			else
	#endif
			{
				u.thunker = this->thunker();
			}
			this->setNativeImpl(u.implGPR);
		}
		else
		{
			#ifdef DEBUGGER
			// just a fake CallStackNode here, so that if we throw a verify error, 
			// we get a stack trace with the method being verified as its top entry.
			CallStackNode callStackNode(this);
			#endif /* DEBUGGER */

			PERFM_NTPROF("verify-ticks");

			CodeWriter* coder = NULL;
			Verifier verifier(this, toplevel, abc_env);

			/*
				These "buf" declarations are an unfortunate but expedient hack:
				the existing CodeWriter classes (eg CodegenLIR, etc) have historically
				always been stack-allocated, thus they have no WB protection on member
				fields. Recent changes were made to allow for explicit cleanup() of them
				in the event of exception, but there was a latent bug waiting to happen:
				the actual automatic var was going out of scope, but still being referenced
				(via the 'coder' pointer) in the exception handler, but the area being 
				pointed to may or may not still be valid. The ideal fix for this would 
				simply be to heap-allocate the CodeWriters, but that would require going
				thru the existing code carefully and inserting WB where appropriate.
				Instead, this "expedient" hack uses placement new to ensure the memory
				stays valid into the exception handler. 
				
				Note: the lack of a call to the dtor of the CodeWriter(s) is not an oversight.
				Calling cleanup() on coder is equivalent to running the dtor for all
				of the CodeWriters here.
				
				Note: allocated using arrays of intptr_t (rather than char) to ensure alignment is acceptable.
			*/
		#define MAKE_BUF(name, type) \
			intptr_t name[(sizeof(type)+sizeof(intptr_t)-1)/sizeof(intptr_t)]

		#if defined FEATURE_NANOJIT
			MAKE_BUF(jit_buf, CodegenLIR);
			#if defined AVMPLUS_WORD_CODE
			MAKE_BUF(teeWriter_buf, TeeWriter);
			#endif
			#ifdef FEATURE_CFGWRITER
			MAKE_BUF(cfg_buf, CFGWriter);
			#endif
		#endif
			#if defined AVMPLUS_WORD_CODE
			MAKE_BUF(translator_buf, WordcodeEmitter);
			#else
			MAKE_BUF(stubWriter_buf, CodeWriter);
			#endif

			TRY(core, kCatchAction_Rethrow)
			{
#if defined FEATURE_NANOJIT
				if ((core->IsJITEnabled()) && !suggestInterp())
				{
					PERFM_NTPROF("verify & IR gen");
					
					// note placement-new usage!
					CodegenLIR* jit = new(jit_buf) CodegenLIR(this);
					#if defined AVMPLUS_WORD_CODE
					WordcodeEmitter* translator = new(translator_buf) WordcodeEmitter(this, toplevel);
					TeeWriter* teeWriter = new(teeWriter_buf) TeeWriter(translator, jit);
					coder = teeWriter;
					#else
					coder = jit;
					#endif

				#ifdef FEATURE_CFGWRITER
					// analyze code and generate LIR
					CFGWriter* cfg = new(cfg_buf) CFGWriter(this, coder); 
					coder = cfg;
//.........这里部分代码省略.........
开发者ID:Jeffxz,项目名称:nodeas,代码行数:101,代码来源:MethodInfo.cpp


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