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

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

Issue 2024033005: [crankshaft] HCall and HCallWithDescriptor should not override CalculateInferredType. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | 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 2143 matching lines...) Expand 10 before | Expand all | Expand 10 after
2154 2154
2155 template <int V> 2155 template <int V>
2156 class HCall : public HTemplateInstruction<V> { 2156 class HCall : public HTemplateInstruction<V> {
2157 public: 2157 public:
2158 // The argument count includes the receiver. 2158 // The argument count includes the receiver.
2159 explicit HCall<V>(int argument_count) : argument_count_(argument_count) { 2159 explicit HCall<V>(int argument_count) : argument_count_(argument_count) {
2160 this->set_representation(Representation::Tagged()); 2160 this->set_representation(Representation::Tagged());
2161 this->SetAllSideEffects(); 2161 this->SetAllSideEffects();
2162 } 2162 }
2163 2163
2164 HType CalculateInferredType() final { return HType::Tagged(); }
2165
2166 virtual int argument_count() const { 2164 virtual int argument_count() const {
2167 return argument_count_; 2165 return argument_count_;
2168 } 2166 }
2169 2167
2170 int argument_delta() const override { return -argument_count(); } 2168 int argument_delta() const override { return -argument_count(); }
2171 2169
2172 private: 2170 private:
2173 int argument_count_; 2171 int argument_count_;
2174 }; 2172 };
2175 2173
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
2233 return Representation::Tagged(); 2231 return Representation::Tagged();
2234 } else { 2232 } else {
2235 int par_index = index - 2; 2233 int par_index = index - 2;
2236 DCHECK(par_index < GetParameterCount()); 2234 DCHECK(par_index < GetParameterCount());
2237 return RepresentationFromType(descriptor_.GetParameterType(par_index)); 2235 return RepresentationFromType(descriptor_.GetParameterType(par_index));
2238 } 2236 }
2239 } 2237 }
2240 2238
2241 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor) 2239 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor)
2242 2240
2243 HType CalculateInferredType() final { return HType::Tagged(); }
2244
2245 // Defines whether this instruction corresponds to a JS call at tail position. 2241 // Defines whether this instruction corresponds to a JS call at tail position.
2246 TailCallMode syntactic_tail_call_mode() const { 2242 TailCallMode syntactic_tail_call_mode() const {
2247 return SyntacticTailCallModeField::decode(bit_field_); 2243 return SyntacticTailCallModeField::decode(bit_field_);
2248 } 2244 }
2249 2245
2250 // Defines whether this call should be generated as a tail call. 2246 // Defines whether this call should be generated as a tail call.
2251 TailCallMode tail_call_mode() const { 2247 TailCallMode tail_call_mode() const {
2252 return TailCallModeField::decode(bit_field_); 2248 return TailCallModeField::decode(bit_field_);
2253 } 2249 }
2254 bool IsTailCall() const { return tail_call_mode() == TailCallMode::kAllow; } 2250 bool IsTailCall() const { return tail_call_mode() == TailCallMode::kAllow; }
(...skipping 4909 matching lines...) Expand 10 before | Expand all | Expand 10 after
7164 bool IsDeletable() const override { return true; } 7160 bool IsDeletable() const override { return true; }
7165 }; 7161 };
7166 7162
7167 #undef DECLARE_INSTRUCTION 7163 #undef DECLARE_INSTRUCTION
7168 #undef DECLARE_CONCRETE_INSTRUCTION 7164 #undef DECLARE_CONCRETE_INSTRUCTION
7169 7165
7170 } // namespace internal 7166 } // namespace internal
7171 } // namespace v8 7167 } // namespace v8
7172 7168
7173 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 7169 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698