| Index: src/ast-inl.h
|
| diff --git a/src/ast-inl.h b/src/ast-inl.h
|
| index f0a25c171fe9abbec910ff62d65b8432a70d8f7d..e88156d6e418b2e4f4f5cac33a10650c2c583f69 100644
|
| --- a/src/ast-inl.h
|
| +++ b/src/ast-inl.h
|
| @@ -25,18 +25,17 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| +#ifndef V8_AST_INL_H_
|
| +#define V8_AST_INL_H_
|
| +
|
| #include "v8.h"
|
|
|
| #include "ast.h"
|
| +#include "jump-target-inl.h"
|
|
|
| namespace v8 {
|
| namespace internal {
|
|
|
| -BreakableStatement::BreakableStatement(ZoneStringList* labels, Type type)
|
| - : labels_(labels), type_(type) {
|
| - ASSERT(labels == NULL || labels->length() > 0);
|
| -}
|
| -
|
|
|
| SwitchStatement::SwitchStatement(ZoneStringList* labels)
|
| : BreakableStatement(labels, TARGET_FOR_ANONYMOUS),
|
| @@ -44,17 +43,42 @@ SwitchStatement::SwitchStatement(ZoneStringList* labels)
|
| }
|
|
|
|
|
| +Block::Block(ZoneStringList* labels, int capacity, bool is_initializer_block)
|
| + : BreakableStatement(labels, TARGET_FOR_NAMED_ONLY),
|
| + statements_(capacity),
|
| + is_initializer_block_(is_initializer_block) {
|
| +}
|
| +
|
| +
|
| +BreakableStatement::BreakableStatement(ZoneStringList* labels, Type type)
|
| + : labels_(labels),
|
| + type_(type),
|
| + entry_id_(GetNextId()),
|
| + exit_id_(GetNextId()) {
|
| + ASSERT(labels == NULL || labels->length() > 0);
|
| +}
|
| +
|
| +
|
| IterationStatement::IterationStatement(ZoneStringList* labels)
|
| : BreakableStatement(labels, TARGET_FOR_ANONYMOUS),
|
| body_(NULL),
|
| - continue_target_(JumpTarget::BIDIRECTIONAL) {
|
| + continue_target_(JumpTarget::BIDIRECTIONAL),
|
| + osr_entry_id_(GetNextId()) {
|
| }
|
|
|
|
|
| -Block::Block(ZoneStringList* labels, int capacity, bool is_initializer_block)
|
| - : BreakableStatement(labels, TARGET_FOR_NAMED_ONLY),
|
| - statements_(capacity),
|
| - is_initializer_block_(is_initializer_block) {
|
| +DoWhileStatement::DoWhileStatement(ZoneStringList* labels)
|
| + : IterationStatement(labels),
|
| + cond_(NULL),
|
| + condition_position_(-1),
|
| + next_id_(GetNextId()) {
|
| +}
|
| +
|
| +
|
| +WhileStatement::WhileStatement(ZoneStringList* labels)
|
| + : IterationStatement(labels),
|
| + cond_(NULL),
|
| + may_have_function_literal_(true) {
|
| }
|
|
|
|
|
| @@ -64,7 +88,8 @@ ForStatement::ForStatement(ZoneStringList* labels)
|
| cond_(NULL),
|
| next_(NULL),
|
| may_have_function_literal_(true),
|
| - loop_variable_(NULL) {
|
| + loop_variable_(NULL),
|
| + next_id_(GetNextId()) {
|
| }
|
|
|
|
|
| @@ -73,8 +98,6 @@ ForInStatement::ForInStatement(ZoneStringList* labels)
|
| }
|
|
|
|
|
| -DoWhileStatement::DoWhileStatement(ZoneStringList* labels)
|
| - : IterationStatement(labels), cond_(NULL), condition_position_(-1) {
|
| -}
|
| -
|
| } } // namespace v8::internal
|
| +
|
| +#endif // V8_AST_INL_H_
|
|
|