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

Side by Side Diff: src/ast.h

Issue 5626: Get rid of the local variable we use to keep the state... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 2 months 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 | « no previous file | src/codegen-arm.cc » ('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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 Block* catch_block() const { return catch_block_; } 561 Block* catch_block() const { return catch_block_; }
562 562
563 private: 563 private:
564 Expression* catch_var_; 564 Expression* catch_var_;
565 Block* catch_block_; 565 Block* catch_block_;
566 }; 566 };
567 567
568 568
569 class TryFinally: public TryStatement { 569 class TryFinally: public TryStatement {
570 public: 570 public:
571 TryFinally(Block* try_block, Expression* finally_var, Block* finally_block) 571 TryFinally(Block* try_block, Block* finally_block)
572 : TryStatement(try_block), 572 : TryStatement(try_block),
573 finally_var_(finally_var),
574 finally_block_(finally_block) { } 573 finally_block_(finally_block) { }
575 574
576 virtual void Accept(Visitor* v); 575 virtual void Accept(Visitor* v);
577 576
578 // If the finally block is non-trivial it may be problematic to have
579 // extra stuff on the expression stack while evaluating it. The
580 // finally variable is used to hold the state instead of storing it
581 // on the stack. It may be NULL in which case the state is stored on
582 // the stack.
583 Expression* finally_var() const { return finally_var_; }
584
585 Block* finally_block() const { return finally_block_; } 577 Block* finally_block() const { return finally_block_; }
586 578
587 private: 579 private:
588 Expression* finally_var_;
589 Block* finally_block_; 580 Block* finally_block_;
590 }; 581 };
591 582
592 583
593 class DebuggerStatement: public Statement { 584 class DebuggerStatement: public Statement {
594 public: 585 public:
595 virtual void Accept(Visitor* v); 586 virtual void Accept(Visitor* v);
596 }; 587 };
597 588
598 589
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 #undef DEF_VISIT 1257 #undef DEF_VISIT
1267 1258
1268 private: 1259 private:
1269 bool stack_overflow_; 1260 bool stack_overflow_;
1270 }; 1261 };
1271 1262
1272 1263
1273 } } // namespace v8::internal 1264 } } // namespace v8::internal
1274 1265
1275 #endif // V8_AST_H_ 1266 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698