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

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

Issue 18650003: Revert "Convert UnaryOpStub to a HydrogenCodeStub" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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.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 // 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 V(CallNamed) \ 85 V(CallNamed) \
86 V(CallNew) \ 86 V(CallNew) \
87 V(CallNewArray) \ 87 V(CallNewArray) \
88 V(CallRuntime) \ 88 V(CallRuntime) \
89 V(CallStub) \ 89 V(CallStub) \
90 V(Change) \ 90 V(Change) \
91 V(CheckFunction) \ 91 V(CheckFunction) \
92 V(CheckHeapObject) \ 92 V(CheckHeapObject) \
93 V(CheckInstanceType) \ 93 V(CheckInstanceType) \
94 V(CheckMaps) \ 94 V(CheckMaps) \
95 V(CheckSmi) \
96 V(CheckPrototypeMaps) \ 95 V(CheckPrototypeMaps) \
97 V(ClampToUint8) \ 96 V(ClampToUint8) \
98 V(ClassOfTestAndBranch) \ 97 V(ClassOfTestAndBranch) \
99 V(CompareIDAndBranch) \ 98 V(CompareIDAndBranch) \
100 V(CompareGeneric) \ 99 V(CompareGeneric) \
101 V(CompareObjectEqAndBranch) \ 100 V(CompareObjectEqAndBranch) \
102 V(CompareMap) \ 101 V(CompareMap) \
103 V(CompareConstantEqAndBranch) \ 102 V(CompareConstantEqAndBranch) \
104 V(Constant) \ 103 V(Constant) \
105 V(Context) \ 104 V(Context) \
(...skipping 16 matching lines...) Expand all
122 V(HasInstanceTypeAndBranch) \ 121 V(HasInstanceTypeAndBranch) \
123 V(InductionVariableAnnotation) \ 122 V(InductionVariableAnnotation) \
124 V(In) \ 123 V(In) \
125 V(InnerAllocatedObject) \ 124 V(InnerAllocatedObject) \
126 V(InstanceOf) \ 125 V(InstanceOf) \
127 V(InstanceOfKnownGlobal) \ 126 V(InstanceOfKnownGlobal) \
128 V(InstanceSize) \ 127 V(InstanceSize) \
129 V(InvokeFunction) \ 128 V(InvokeFunction) \
130 V(IsConstructCallAndBranch) \ 129 V(IsConstructCallAndBranch) \
131 V(IsObjectAndBranch) \ 130 V(IsObjectAndBranch) \
132 V(IsNumberAndBranch) \
133 V(IsStringAndBranch) \ 131 V(IsStringAndBranch) \
134 V(IsSmiAndBranch) \ 132 V(IsSmiAndBranch) \
135 V(IsUndetectableAndBranch) \ 133 V(IsUndetectableAndBranch) \
136 V(LeaveInlined) \ 134 V(LeaveInlined) \
137 V(LoadContextSlot) \ 135 V(LoadContextSlot) \
138 V(LoadExternalArrayPointer) \ 136 V(LoadExternalArrayPointer) \
139 V(LoadFunctionPrototype) \ 137 V(LoadFunctionPrototype) \
140 V(LoadGlobalCell) \ 138 V(LoadGlobalCell) \
141 V(LoadGlobalGeneric) \ 139 V(LoadGlobalGeneric) \
142 V(LoadKeyed) \ 140 V(LoadKeyed) \
(...skipping 2786 matching lines...) Expand 10 before | Expand all | Expand 10 after
2929 HCheckInstanceType(HValue* value, Check check) 2927 HCheckInstanceType(HValue* value, Check check)
2930 : HUnaryOperation(value), check_(check) { 2928 : HUnaryOperation(value), check_(check) {
2931 set_representation(Representation::Tagged()); 2929 set_representation(Representation::Tagged());
2932 SetFlag(kUseGVN); 2930 SetFlag(kUseGVN);
2933 } 2931 }
2934 2932
2935 const Check check_; 2933 const Check check_;
2936 }; 2934 };
2937 2935
2938 2936
2939 class HCheckSmi: public HUnaryOperation {
2940 public:
2941 explicit HCheckSmi(HValue* value) : HUnaryOperation(value) {
2942 set_representation(Representation::Smi());
2943 SetFlag(kUseGVN);
2944 }
2945
2946 virtual Representation RequiredInputRepresentation(int index) {
2947 return Representation::Tagged();
2948 }
2949
2950 virtual HType CalculateInferredType();
2951
2952 virtual HValue* Canonicalize() {
2953 HType value_type = value()->type();
2954 if (value_type.IsSmi()) {
2955 return NULL;
2956 }
2957 return this;
2958 }
2959
2960 DECLARE_CONCRETE_INSTRUCTION(CheckSmi)
2961
2962 protected:
2963 virtual bool DataEquals(HValue* other) { return true; }
2964 };
2965
2966
2967 class HIsNumberAndBranch: public HUnaryControlInstruction {
2968 public:
2969 explicit HIsNumberAndBranch(HValue* value)
2970 : HUnaryControlInstruction(value, NULL, NULL) {
2971 SetFlag(kFlexibleRepresentation);
2972 }
2973
2974 virtual Representation RequiredInputRepresentation(int index) {
2975 return Representation::None();
2976 }
2977
2978 DECLARE_CONCRETE_INSTRUCTION(IsNumberAndBranch)
2979 };
2980
2981
2982 class HCheckHeapObject: public HUnaryOperation { 2937 class HCheckHeapObject: public HUnaryOperation {
2983 public: 2938 public:
2984 explicit HCheckHeapObject(HValue* value) : HUnaryOperation(value) { 2939 explicit HCheckHeapObject(HValue* value) : HUnaryOperation(value) {
2985 set_representation(Representation::Tagged()); 2940 set_representation(Representation::Tagged());
2986 SetFlag(kUseGVN); 2941 SetFlag(kUseGVN);
2987 } 2942 }
2988 2943
2989 virtual Representation RequiredInputRepresentation(int index) { 2944 virtual Representation RequiredInputRepresentation(int index) {
2990 return Representation::Tagged(); 2945 return Representation::Tagged();
2991 } 2946 }
(...skipping 3689 matching lines...) Expand 10 before | Expand all | Expand 10 after
6681 virtual bool IsDeletable() const { return true; } 6636 virtual bool IsDeletable() const { return true; }
6682 }; 6637 };
6683 6638
6684 6639
6685 #undef DECLARE_INSTRUCTION 6640 #undef DECLARE_INSTRUCTION
6686 #undef DECLARE_CONCRETE_INSTRUCTION 6641 #undef DECLARE_CONCRETE_INSTRUCTION
6687 6642
6688 } } // namespace v8::internal 6643 } } // namespace v8::internal
6689 6644
6690 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6645 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698