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

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

Issue 1488493002: Use HType::JSReceiver instead of HType::JSObject in some places. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 5 years 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
« no previous file with comments | « no previous file | src/crankshaft/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_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 5 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
7 7
8 #include <cstring> 8 #include <cstring>
9 #include <iosfwd> 9 #include <iosfwd>
10 10
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 protected: 769 protected:
770 // This function must be overridden for instructions with flag kUseGVN, to 770 // This function must be overridden for instructions with flag kUseGVN, to
771 // compare the non-Operand parts of the instruction. 771 // compare the non-Operand parts of the instruction.
772 virtual bool DataEquals(HValue* other) { 772 virtual bool DataEquals(HValue* other) {
773 UNREACHABLE(); 773 UNREACHABLE();
774 return false; 774 return false;
775 } 775 }
776 776
777 bool ToStringOrToNumberCanBeObserved() const { 777 bool ToStringOrToNumberCanBeObserved() const {
778 if (type().IsTaggedPrimitive()) return false; 778 if (type().IsTaggedPrimitive()) return false;
779 if (type().IsJSObject()) return true; 779 if (type().IsJSReceiver()) return true;
780 return !representation().IsSmiOrInteger32() && !representation().IsDouble(); 780 return !representation().IsSmiOrInteger32() && !representation().IsDouble();
781 } 781 }
782 782
783 virtual Representation RepresentationFromInputs() { 783 virtual Representation RepresentationFromInputs() {
784 return representation(); 784 return representation();
785 } 785 }
786 virtual Representation RepresentationFromUses(); 786 virtual Representation RepresentationFromUses();
787 Representation RepresentationFromUseRequirements(); 787 Representation RepresentationFromUseRequirements();
788 bool HasNonSmiUse(); 788 bool HasNonSmiUse();
789 virtual void UpdateRepresentation(Representation new_rep, 789 virtual void UpdateRepresentation(Representation new_rep,
(...skipping 2083 matching lines...) Expand 10 before | Expand all | Expand 10 after
2873 DECLARE_INSTRUCTION_FACTORY_P2(HCheckInstanceType, HValue*, Check); 2873 DECLARE_INSTRUCTION_FACTORY_P2(HCheckInstanceType, HValue*, Check);
2874 2874
2875 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT 2875 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT
2876 2876
2877 Representation RequiredInputRepresentation(int index) override { 2877 Representation RequiredInputRepresentation(int index) override {
2878 return Representation::Tagged(); 2878 return Representation::Tagged();
2879 } 2879 }
2880 2880
2881 HType CalculateInferredType() override { 2881 HType CalculateInferredType() override {
2882 switch (check_) { 2882 switch (check_) {
2883 case IS_JS_RECEIVER: return HType::JSObject(); 2883 case IS_JS_RECEIVER: return HType::JSReceiver();
2884 case IS_JS_ARRAY: return HType::JSArray(); 2884 case IS_JS_ARRAY: return HType::JSArray();
2885 case IS_JS_DATE: return HType::JSObject(); 2885 case IS_JS_DATE: return HType::JSObject();
2886 case IS_STRING: return HType::String(); 2886 case IS_STRING: return HType::String();
2887 case IS_INTERNALIZED_STRING: return HType::String(); 2887 case IS_INTERNALIZED_STRING: return HType::String();
2888 } 2888 }
2889 UNREACHABLE(); 2889 UNREACHABLE();
2890 return HType::Tagged(); 2890 return HType::Tagged();
2891 } 2891 }
2892 2892
2893 HValue* Canonicalize() override; 2893 HValue* Canonicalize() override;
(...skipping 4923 matching lines...) Expand 10 before | Expand all | Expand 10 after
7817 7817
7818 7818
7819 7819
7820 #undef DECLARE_INSTRUCTION 7820 #undef DECLARE_INSTRUCTION
7821 #undef DECLARE_CONCRETE_INSTRUCTION 7821 #undef DECLARE_CONCRETE_INSTRUCTION
7822 7822
7823 } // namespace internal 7823 } // namespace internal
7824 } // namespace v8 7824 } // namespace v8
7825 7825
7826 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 7826 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | src/crankshaft/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698