Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: src/ast.h

Issue 385136: Step next should respect do/while condition block. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/codegen.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 315
316 private: 316 private:
317 Statement* body_; 317 Statement* body_;
318 BreakTarget continue_target_; 318 BreakTarget continue_target_;
319 }; 319 };
320 320
321 321
322 class DoWhileStatement: public IterationStatement { 322 class DoWhileStatement: public IterationStatement {
323 public: 323 public:
324 explicit DoWhileStatement(ZoneStringList* labels) 324 explicit DoWhileStatement(ZoneStringList* labels)
325 : IterationStatement(labels), cond_(NULL) { 325 : IterationStatement(labels), cond_(NULL), condition_position_(-1) {
326 } 326 }
327 327
328 void Initialize(Expression* cond, Statement* body) { 328 void Initialize(Expression* cond, Statement* body) {
329 IterationStatement::Initialize(body); 329 IterationStatement::Initialize(body);
330 cond_ = cond; 330 cond_ = cond;
331 } 331 }
332 332
333 virtual void Accept(AstVisitor* v); 333 virtual void Accept(AstVisitor* v);
334 334
335 Expression* cond() const { return cond_; } 335 Expression* cond() const { return cond_; }
336 336
337 // Position where condition expression starts. We need it to make
338 // the loop's condition a breakable location.
339 int condition_position() { return condition_position_; }
340 void set_condition_position(int pos) { condition_position_ = pos; }
341
337 private: 342 private:
338 Expression* cond_; 343 Expression* cond_;
344 int condition_position_;
339 }; 345 };
340 346
341 347
342 class WhileStatement: public IterationStatement { 348 class WhileStatement: public IterationStatement {
343 public: 349 public:
344 explicit WhileStatement(ZoneStringList* labels) 350 explicit WhileStatement(ZoneStringList* labels)
345 : IterationStatement(labels), 351 : IterationStatement(labels),
346 cond_(NULL), 352 cond_(NULL),
347 may_have_function_literal_(true) { 353 may_have_function_literal_(true) {
348 } 354 }
(...skipping 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after
1774 #undef DEF_VISIT 1780 #undef DEF_VISIT
1775 1781
1776 private: 1782 private:
1777 bool stack_overflow_; 1783 bool stack_overflow_;
1778 }; 1784 };
1779 1785
1780 1786
1781 } } // namespace v8::internal 1787 } } // namespace v8::internal
1782 1788
1783 #endif // V8_AST_H_ 1789 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698