/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef ds_Nestable_h #define ds_Nestable_h
#include"mozilla/Assertions.h"
namespace js {
// A base class for nestable structures. // // This subclasses of this class must follow a LIFO destruction order, The // easiest way to ensure that is adding MOZ_STACK_CLASS to the subclasses. // This class doesn't have the MOZ_STACK_CLASS annotation in order to allow // specific cases where the subclasses can be allocated on heap for reduced // stack usage and other implementation specific reasons, but even in such // cases the subclasses must follow a LIFO destruction order. template <typename Concrete> class Nestable {
Concrete** stack_;
Concrete* enclosing_;
// These method are protected. Some derived classes, such as ParseContext, // do not expose the ability to walk the stack.
Concrete* enclosing() const { return enclosing_; }
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.