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

Side by Side Diff: src/ast.h

Issue 8373029: [hydrogen] optimize switch with string clauses (Closed) Base URL: gh:v8/v8@master
Patch Set: mips: CompareGenericAndBranch Created 9 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 703
704 int position() const { return position_; } 704 int position() const { return position_; }
705 void set_position(int pos) { position_ = pos; } 705 void set_position(int pos) { position_ = pos; }
706 706
707 int EntryId() { return entry_id_; } 707 int EntryId() { return entry_id_; }
708 int CompareId() { return compare_id_; } 708 int CompareId() { return compare_id_; }
709 709
710 // Type feedback information. 710 // Type feedback information.
711 void RecordTypeFeedback(TypeFeedbackOracle* oracle); 711 void RecordTypeFeedback(TypeFeedbackOracle* oracle);
712 bool IsSmiCompare() { return compare_type_ == SMI_ONLY; } 712 bool IsSmiCompare() { return compare_type_ == SMI_ONLY; }
713 bool IsSymbolCompare() { return compare_type_ == SYMBOL_ONLY; }
fschneider 2011/11/01 09:26:19 You introduce IsSymbolCompare, but it does not see
indutny 2011/11/01 09:31:07 Probably, better remove it, as I can't see any use
713 bool IsObjectCompare() { return compare_type_ == OBJECT_ONLY; } 714 bool IsObjectCompare() { return compare_type_ == OBJECT_ONLY; }
714 715
715 private: 716 private:
716 Expression* label_; 717 Expression* label_;
717 Label body_target_; 718 Label body_target_;
718 ZoneList<Statement*>* statements_; 719 ZoneList<Statement*>* statements_;
719 int position_; 720 int position_;
720 enum CompareTypeFeedback { NONE, SMI_ONLY, OBJECT_ONLY }; 721 enum CompareTypeFeedback { NONE, SMI_ONLY, SYMBOL_ONLY, OBJECT_ONLY };
721 CompareTypeFeedback compare_type_; 722 CompareTypeFeedback compare_type_;
722 int compare_id_; 723 int compare_id_;
723 int entry_id_; 724 int entry_id_;
724 }; 725 };
725 726
726 727
727 class SwitchStatement: public BreakableStatement { 728 class SwitchStatement: public BreakableStatement {
728 public: 729 public:
729 inline SwitchStatement(Isolate* isolate, ZoneStringList* labels); 730 inline SwitchStatement(Isolate* isolate, ZoneStringList* labels);
730 731
(...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after
2124 2125
2125 private: 2126 private:
2126 Isolate* isolate_; 2127 Isolate* isolate_;
2127 bool stack_overflow_; 2128 bool stack_overflow_;
2128 }; 2129 };
2129 2130
2130 2131
2131 } } // namespace v8::internal 2132 } } // namespace v8::internal
2132 2133
2133 #endif // V8_AST_H_ 2134 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/ast.cc » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698