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

Side by Side Diff: src/hydrogen-instructions.h

Issue 310593004: Revert "Handle HCheckInstanceType and HIsStringAndBranch in check elimination." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 | « src/hydrogen-check-elimination.cc ('k') | src/hydrogen-instructions.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_
6 #define V8_HYDROGEN_INSTRUCTIONS_H_ 6 #define V8_HYDROGEN_INSTRUCTIONS_H_
7 7
8 #include "v8.h" 8 #include "v8.h"
9 9
10 #include "allocation.h" 10 #include "allocation.h"
(...skipping 2891 matching lines...) Expand 10 before | Expand all | Expand 10 after
2902 UNREACHABLE(); 2902 UNREACHABLE();
2903 return HType::Tagged(); 2903 return HType::Tagged();
2904 } 2904 }
2905 2905
2906 virtual HValue* Canonicalize() V8_OVERRIDE; 2906 virtual HValue* Canonicalize() V8_OVERRIDE;
2907 2907
2908 bool is_interval_check() const { return check_ <= LAST_INTERVAL_CHECK; } 2908 bool is_interval_check() const { return check_ <= LAST_INTERVAL_CHECK; }
2909 void GetCheckInterval(InstanceType* first, InstanceType* last); 2909 void GetCheckInterval(InstanceType* first, InstanceType* last);
2910 void GetCheckMaskAndTag(uint8_t* mask, uint8_t* tag); 2910 void GetCheckMaskAndTag(uint8_t* mask, uint8_t* tag);
2911 2911
2912 Check check() const { return check_; }
2913
2914 DECLARE_CONCRETE_INSTRUCTION(CheckInstanceType) 2912 DECLARE_CONCRETE_INSTRUCTION(CheckInstanceType)
2915 2913
2916 protected: 2914 protected:
2917 // TODO(ager): It could be nice to allow the ommision of instance 2915 // TODO(ager): It could be nice to allow the ommision of instance
2918 // type checks if we have already performed an instance type check 2916 // type checks if we have already performed an instance type check
2919 // with a larger range. 2917 // with a larger range.
2920 virtual bool DataEquals(HValue* other) V8_OVERRIDE { 2918 virtual bool DataEquals(HValue* other) V8_OVERRIDE {
2921 HCheckInstanceType* b = HCheckInstanceType::cast(other); 2919 HCheckInstanceType* b = HCheckInstanceType::cast(other);
2922 return check_ == b->check_; 2920 return check_ == b->check_;
2923 } 2921 }
(...skipping 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after
4420 DECLARE_INSTRUCTION_FACTORY_P1(HIsStringAndBranch, HValue*); 4418 DECLARE_INSTRUCTION_FACTORY_P1(HIsStringAndBranch, HValue*);
4421 DECLARE_INSTRUCTION_FACTORY_P3(HIsStringAndBranch, HValue*, 4419 DECLARE_INSTRUCTION_FACTORY_P3(HIsStringAndBranch, HValue*,
4422 HBasicBlock*, HBasicBlock*); 4420 HBasicBlock*, HBasicBlock*);
4423 4421
4424 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { 4422 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
4425 return Representation::Tagged(); 4423 return Representation::Tagged();
4426 } 4424 }
4427 4425
4428 virtual bool KnownSuccessorBlock(HBasicBlock** block) V8_OVERRIDE; 4426 virtual bool KnownSuccessorBlock(HBasicBlock** block) V8_OVERRIDE;
4429 4427
4430 static const int kNoKnownSuccessorIndex = -1;
4431 int known_successor_index() const { return known_successor_index_; }
4432 void set_known_successor_index(int known_successor_index) {
4433 known_successor_index_ = known_successor_index;
4434 }
4435
4436 DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch) 4428 DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch)
4437 4429
4438 protected: 4430 protected:
4439 virtual int RedefinedOperandIndex() { return 0; } 4431 virtual int RedefinedOperandIndex() { return 0; }
4440 4432
4441 private: 4433 private:
4442 HIsStringAndBranch(HValue* value, 4434 HIsStringAndBranch(HValue* value,
4443 HBasicBlock* true_target = NULL, 4435 HBasicBlock* true_target = NULL,
4444 HBasicBlock* false_target = NULL) 4436 HBasicBlock* false_target = NULL)
4445 : HUnaryControlInstruction(value, true_target, false_target), 4437 : HUnaryControlInstruction(value, true_target, false_target) {}
4446 known_successor_index_(kNoKnownSuccessorIndex) { }
4447
4448 int known_successor_index_;
4449 }; 4438 };
4450 4439
4451 4440
4452 class HIsSmiAndBranch V8_FINAL : public HUnaryControlInstruction { 4441 class HIsSmiAndBranch V8_FINAL : public HUnaryControlInstruction {
4453 public: 4442 public:
4454 DECLARE_INSTRUCTION_FACTORY_P1(HIsSmiAndBranch, HValue*); 4443 DECLARE_INSTRUCTION_FACTORY_P1(HIsSmiAndBranch, HValue*);
4455 DECLARE_INSTRUCTION_FACTORY_P3(HIsSmiAndBranch, HValue*, 4444 DECLARE_INSTRUCTION_FACTORY_P3(HIsSmiAndBranch, HValue*,
4456 HBasicBlock*, HBasicBlock*); 4445 HBasicBlock*, HBasicBlock*);
4457 4446
4458 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch) 4447 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch)
(...skipping 3222 matching lines...) Expand 10 before | Expand all | Expand 10 after
7681 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 7670 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
7682 }; 7671 };
7683 7672
7684 7673
7685 #undef DECLARE_INSTRUCTION 7674 #undef DECLARE_INSTRUCTION
7686 #undef DECLARE_CONCRETE_INSTRUCTION 7675 #undef DECLARE_CONCRETE_INSTRUCTION
7687 7676
7688 } } // namespace v8::internal 7677 } } // namespace v8::internal
7689 7678
7690 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7679 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen-check-elimination.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698