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


C++ StackFrame::actualArgsEnd方法代码示例

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


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

示例1: if

void
StackIter::popFrame()
{
    StackFrame *oldfp = fp_;
    JS_ASSERT(seg_->contains(oldfp));
    fp_ = fp_->prev();
    if (seg_->contains(fp_)) {
        JSInlinedSite *inline_;
        pc_ = oldfp->prevpc(&inline_);
        JS_ASSERT(!inline_);

        /*
         * If there is a CallArgsList element between oldfp and fp_, then sp_
         * is ignored, so we only consider the case where there is no
         * intervening CallArgsList. The stack representation is not optimized
         * for this operation so we need to do a full case analysis of how
         * frames are pushed by considering each ContextStack::push*Frame.
         */
        if (oldfp->isGeneratorFrame()) {
            /* Generator's args do not overlap with the caller's expr stack. */
            sp_ = (Value *)oldfp->actualArgs() - 2;
        } else if (oldfp->isNonEvalFunctionFrame()) {
            /*
             * When Invoke is called from a native, there will be an enclosing
             * pushInvokeArgs which pushes a CallArgsList element so we can
             * ignore that case. The other two cases of function call frames are
             * Invoke called directly from script and pushInlineFrmae. In both
             * cases, the actual arguments of the callee should be included in
             * the caller's expr stack.
             */
            sp_ = oldfp->actualArgsEnd();
        } else if (oldfp->isFramePushedByExecute()) {
            /* pushExecuteFrame pushes exactly (callee, this) before frame. */
            sp_ = (Value *)oldfp - 2;
        } else {
            /* pushDummyFrame pushes exactly 0 slots before frame. */
            JS_ASSERT(oldfp->isDummyFrame());
            sp_ = (Value *)oldfp;
        }

        script_ = fp_->maybeScript();
    } else {
        poisonRegs();
    }
}
开发者ID:,项目名称:,代码行数:45,代码来源:


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