首页> 外国专利> Sequencing and error detection of template instantiations during compilation of C++ Programs

Sequencing and error detection of template instantiations during compilation of C++ Programs

机译:C ++程序编译过程中模板实例化的排序和错误检测

摘要

A priority queue is used to sequence template instantiations in compiling C++ programs. If the analysis of a C++ code fragment encounters a name that requires full instantiation and no matching full instantiation exists, the parse is terminated and rescheduled, and a full instantiation is scheduled as an antecedent of the failed parse. "Antecedent" means that the failed parse code fragment will not be reparsed until after the full instantiation has succeeded. Only when the full instantiation has succeeded will the terminated parse be reconsidered. Parsing full instantiations may cause additional full instantiations. These are handled in the same manner; the additional instantiation is scheduled, and the current parse is failed and rescheduled. At the time of scheduling, the antecedent instantiation is marked with its dependent, so that the dependent chain give the chronology of the instantiation. This makes it easy to generate historical or "traceback" information for meaningful error messages.
机译:优先级队列用于在编译C ++程序时对模板实例化进行排序。如果对C ++代码片段的分析遇到需要完全实例化的名称,并且不存在匹配的完全实例化,则解析将终止并重新计划,并且完整实例化将作为失败解析的前提进行调度。 “前件”是指失败的解析代码片段只有在完全实例化成功之后才会被解析。仅当完整实例化成功后,才会重新考虑终止的解析。解析完整的实例化可能会导致其他完整的实例化。这些处理方式相同。计划了其他实例化,并且当前解析失败并重新计划了。在调度时,之前的实例化将标有其相关性,以便相关性链给出实例化的时间顺序。这使得为​​有意义的错误消息生成历史信息或“回溯”信息变得容易。

著录项

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号