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

Side by Side Diff: src/ast.h

Issue 28296: Simplify the way that we compile slow-case switch statements. Compile... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 9 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-ia32.cc » ('j') | src/codegen-ia32.cc » ('J')
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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 class CaseClause: public ZoneObject { 440 class CaseClause: public ZoneObject {
441 public: 441 public:
442 CaseClause(Expression* label, ZoneList<Statement*>* statements) 442 CaseClause(Expression* label, ZoneList<Statement*>* statements)
443 : label_(label), statements_(statements) { } 443 : label_(label), statements_(statements) { }
444 444
445 bool is_default() const { return label_ == NULL; } 445 bool is_default() const { return label_ == NULL; }
446 Expression* label() const { 446 Expression* label() const {
447 CHECK(!is_default()); 447 CHECK(!is_default());
448 return label_; 448 return label_;
449 } 449 }
450 JumpTarget* body_target() { return &body_target_; }
450 ZoneList<Statement*>* statements() const { return statements_; } 451 ZoneList<Statement*>* statements() const { return statements_; }
451 452
452 private: 453 private:
453 Expression* label_; 454 Expression* label_;
455 JumpTarget body_target_;
454 ZoneList<Statement*>* statements_; 456 ZoneList<Statement*>* statements_;
455 }; 457 };
456 458
457 459
458 class SwitchStatement: public BreakableStatement { 460 class SwitchStatement: public BreakableStatement {
459 public: 461 public:
460 explicit SwitchStatement(ZoneStringList* labels) 462 explicit SwitchStatement(ZoneStringList* labels)
461 : BreakableStatement(labels, TARGET_FOR_ANONYMOUS), 463 : BreakableStatement(labels, TARGET_FOR_ANONYMOUS),
462 tag_(NULL), cases_(NULL) { } 464 tag_(NULL), cases_(NULL) { }
463 465
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 #undef DEF_VISIT 1644 #undef DEF_VISIT
1643 1645
1644 private: 1646 private:
1645 bool stack_overflow_; 1647 bool stack_overflow_;
1646 }; 1648 };
1647 1649
1648 1650
1649 } } // namespace v8::internal 1651 } } // namespace v8::internal
1650 1652
1651 #endif // V8_AST_H_ 1653 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/codegen-ia32.cc » ('j') | src/codegen-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698