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

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

Issue 626383003: Fix representation of HLoadRoot. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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
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 "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 2698 matching lines...) Expand 10 before | Expand all | Expand 10 after
2709 return index_ == b->index_; 2709 return index_ == b->index_;
2710 } 2710 }
2711 2711
2712 private: 2712 private:
2713 explicit HLoadRoot(Heap::RootListIndex index, HType type = HType::Tagged()) 2713 explicit HLoadRoot(Heap::RootListIndex index, HType type = HType::Tagged())
2714 : HTemplateInstruction<0>(type), index_(index) { 2714 : HTemplateInstruction<0>(type), index_(index) {
2715 SetFlag(kUseGVN); 2715 SetFlag(kUseGVN);
2716 // TODO(bmeurer): We'll need kDependsOnRoots once we add the 2716 // TODO(bmeurer): We'll need kDependsOnRoots once we add the
2717 // corresponding HStoreRoot instruction. 2717 // corresponding HStoreRoot instruction.
2718 SetDependsOnFlag(kCalls); 2718 SetDependsOnFlag(kCalls);
2719 set_representation(Representation::Tagged());
2719 } 2720 }
2720 2721
2721 virtual bool IsDeletable() const OVERRIDE { return true; } 2722 virtual bool IsDeletable() const OVERRIDE { return true; }
2722 2723
2723 const Heap::RootListIndex index_; 2724 const Heap::RootListIndex index_;
2724 }; 2725 };
2725 2726
2726 2727
2727 class HCheckMaps FINAL : public HTemplateInstruction<2> { 2728 class HCheckMaps FINAL : public HTemplateInstruction<2> {
2728 public: 2729 public:
(...skipping 3640 matching lines...) Expand 10 before | Expand all | Expand 10 after
6369 6370
6370 virtual bool HasEscapingOperandAt(int index) OVERRIDE { return false; } 6371 virtual bool HasEscapingOperandAt(int index) OVERRIDE { return false; }
6371 virtual bool HasOutOfBoundsAccess(int size) OVERRIDE { 6372 virtual bool HasOutOfBoundsAccess(int size) OVERRIDE {
6372 return !access().IsInobject() || access().offset() >= size; 6373 return !access().IsInobject() || access().offset() >= size;
6373 } 6374 }
6374 virtual Representation RequiredInputRepresentation(int index) OVERRIDE { 6375 virtual Representation RequiredInputRepresentation(int index) OVERRIDE {
6375 if (index == 0 && access().IsExternalMemory()) { 6376 if (index == 0 && access().IsExternalMemory()) {
6376 // object must be external in case of external memory access 6377 // object must be external in case of external memory access
6377 return Representation::External(); 6378 return Representation::External();
6378 } 6379 }
6380 if (index == 1) return Representation::None();
6379 return Representation::Tagged(); 6381 return Representation::Tagged();
6380 } 6382 }
6381 virtual Range* InferRange(Zone* zone) OVERRIDE; 6383 virtual Range* InferRange(Zone* zone) OVERRIDE;
6382 virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT 6384 virtual OStream& PrintDataTo(OStream& os) const OVERRIDE; // NOLINT
6383 6385
6384 bool CanBeReplacedWith(HValue* other) const { 6386 bool CanBeReplacedWith(HValue* other) const {
6385 if (!CheckFlag(HValue::kCantBeReplaced)) return false; 6387 if (!CheckFlag(HValue::kCantBeReplaced)) return false;
6386 if (!type().Equals(other->type())) return false; 6388 if (!type().Equals(other->type())) return false;
6387 if (!representation().Equals(other->representation())) return false; 6389 if (!representation().Equals(other->representation())) return false;
6388 if (!other->IsLoadNamedField()) return true; 6390 if (!other->IsLoadNamedField()) return true;
(...skipping 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after
7895 }; 7897 };
7896 7898
7897 7899
7898 7900
7899 #undef DECLARE_INSTRUCTION 7901 #undef DECLARE_INSTRUCTION
7900 #undef DECLARE_CONCRETE_INSTRUCTION 7902 #undef DECLARE_CONCRETE_INSTRUCTION
7901 7903
7902 } } // namespace v8::internal 7904 } } // namespace v8::internal
7903 7905
7904 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7906 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-representation-changes.cc » ('j') | src/hydrogen-representation-changes.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698