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

Side by Side Diff: src/x64/lithium-x64.h

Issue 8373029: [hydrogen] optimize switch with string clauses (Closed) Base URL: gh:v8/v8@master
Patch Set: merged with master 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 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 inputs_[0] = value; 633 inputs_[0] = value;
634 } 634 }
635 635
636 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") 636 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch")
637 DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch) 637 DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch)
638 638
639 virtual void PrintDataTo(StringStream* stream); 639 virtual void PrintDataTo(StringStream* stream);
640 }; 640 };
641 641
642 642
643 class LIsStringAndBranch: public LControlInstruction<1, 1> {
644 public:
645 explicit LIsStringAndBranch(LOperand* value, LOperand* temp) {
646 inputs_[0] = value;
647 temps_[0] = temp;
648 }
649
650 DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch")
651 DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch)
652
653 virtual void PrintDataTo(StringStream* stream);
654 };
655
656
643 class LIsSmiAndBranch: public LControlInstruction<1, 0> { 657 class LIsSmiAndBranch: public LControlInstruction<1, 0> {
644 public: 658 public:
645 explicit LIsSmiAndBranch(LOperand* value) { 659 explicit LIsSmiAndBranch(LOperand* value) {
646 inputs_[0] = value; 660 inputs_[0] = value;
647 } 661 }
648 662
649 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") 663 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch")
650 DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch) 664 DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch)
651 665
652 virtual void PrintDataTo(StringStream* stream); 666 virtual void PrintDataTo(StringStream* stream);
(...skipping 1546 matching lines...) Expand 10 before | Expand all | Expand 10 after
2199 2213
2200 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2214 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2201 }; 2215 };
2202 2216
2203 #undef DECLARE_HYDROGEN_ACCESSOR 2217 #undef DECLARE_HYDROGEN_ACCESSOR
2204 #undef DECLARE_CONCRETE_INSTRUCTION 2218 #undef DECLARE_CONCRETE_INSTRUCTION
2205 2219
2206 } } // namespace v8::int 2220 } } // namespace v8::int
2207 2221
2208 #endif // V8_X64_LITHIUM_X64_H_ 2222 #endif // V8_X64_LITHIUM_X64_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698