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


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

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


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

示例1: getStackTraceLine

	static Stringp getStackTraceLine(MethodInfo* method, Stringp filename) 
	{
		AvmCore *core = method->pool()->core;
		Stringp s = core->newStringLatin1("\tat ");
		s = core->concatStrings(s, method->format(core));
		if (filename)
		{
			s = s->appendLatin1("[");
			s = s->append(filename);
			s = s->appendLatin1(":");
		}
		return s;
	}
开发者ID:hgl888,项目名称:nashtest,代码行数:13,代码来源:StackTrace.cpp

示例2: verify


//.........这里部分代码省略.........
					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;
				#endif

				    verifier.verify(coder);
					PERFM_TPROF_END();
			
					if (!jit->overflow) {
						// assembler LIR into native code
						jit->emitMD();
					}

					// the MD buffer can overflow so we need to re-iterate
					// over the whole thing, since we aren't yet robust enough
					// to just rebuild the MD code.

					// mark it as interpreted and try to limp along
					if (jit->overflow) {
						if (core->JITMustSucceed()) {
							Exception* e = new (core->GetGC()) Exception(core, core->newStringLatin1("JIT failed")->atom());
							e->flags |= Exception::EXIT_EXCEPTION;
							core->throwException(e);
						}
						setInterpImpl();
					}
	                #ifdef AVMPLUS_WORD_CODE
					else {
						if (_abc.word_code.translated_code) 
						{
							set_word_code(core->GetGC(), NULL);
						}
						if (_abc.word_code.exceptions) 
						{
							_abc.word_code.exceptions = NULL;
						}
					}
                    #endif
				}
				else
				{
					// NOTE copied below
					#if defined AVMPLUS_WORD_CODE
					WordcodeEmitter* translator = new(translator_buf) WordcodeEmitter(this, toplevel);
					coder = translator;
					#else
					CodeWriter* stubWriter = new(stubWriter_buf) CodeWriter();
					coder = stubWriter;
					#endif
					verifier.verify(coder); // pass2 dataflow
					setInterpImpl();
					// NOTE end copy
				}
开发者ID:Jeffxz,项目名称:nodeas,代码行数:67,代码来源:MethodInfo.cpp


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