/* 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/. */
// Class for emitting bytecode for do-while loop. // // Usage: (check for the return value is omitted for simplicity) // // `do body while (cond);` // DoWhileEmitter doWhile(this); // doWhile.emitBody(offset_of_do, offset_of_body); // emit(body); // doWhile.emitCond(); // emit(cond); // doWhile.emitEnd(); // class MOZ_STACK_CLASS DoWhileEmitter {
BytecodeEmitter* bce_;
mozilla::Maybe<LoopControl> loopInfo_;
#ifdef DEBUG // The state of this emitter. // // +-------+ emitBody +------+ emitCond +------+ emitEnd +-----+ // | Start |--------->| Body |--------->| Cond |--------->| End | // +-------+ +------+ +------+ +-----+ enumclass State { // The initial state.
Start,
// After calling emitBody.
Body,
// After calling emitCond.
Cond,
// After calling emitEnd.
End
};
State state_ = State::Start; #endif
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.