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

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

Issue 1330033002: [calls] Consistent call protocol for calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add arm64, mips and mips64 ports. Created 5 years, 3 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 | « 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 // 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 <cstring> 8 #include <cstring>
9 #include <iosfwd> 9 #include <iosfwd>
10 10
(...skipping 2210 matching lines...) Expand 10 before | Expand all | Expand 10 after
2221 } 2221 }
2222 2222
2223 HValue* first() const { return OperandAt(0); } 2223 HValue* first() const { return OperandAt(0); }
2224 HValue* second() const { return OperandAt(1); } 2224 HValue* second() const { return OperandAt(1); }
2225 }; 2225 };
2226 2226
2227 2227
2228 class HCallJSFunction final : public HCall<1> { 2228 class HCallJSFunction final : public HCall<1> {
2229 public: 2229 public:
2230 static HCallJSFunction* New(Isolate* isolate, Zone* zone, HValue* context, 2230 static HCallJSFunction* New(Isolate* isolate, Zone* zone, HValue* context,
2231 HValue* function, int argument_count, 2231 HValue* function, int argument_count);
2232 bool pass_argument_count);
2233 2232
2234 HValue* function() const { return OperandAt(0); } 2233 HValue* function() const { return OperandAt(0); }
2235 2234
2236 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT 2235 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT
2237 2236
2238 Representation RequiredInputRepresentation(int index) final { 2237 Representation RequiredInputRepresentation(int index) final {
2239 DCHECK(index == 0); 2238 DCHECK(index == 0);
2240 return Representation::Tagged(); 2239 return Representation::Tagged();
2241 } 2240 }
2242 2241
2243 bool pass_argument_count() const { return pass_argument_count_; }
2244
2245 bool HasStackCheck() final { return has_stack_check_; } 2242 bool HasStackCheck() final { return has_stack_check_; }
2246 2243
2247 DECLARE_CONCRETE_INSTRUCTION(CallJSFunction) 2244 DECLARE_CONCRETE_INSTRUCTION(CallJSFunction)
2248 2245
2249 private: 2246 private:
2250 // The argument count includes the receiver. 2247 // The argument count includes the receiver.
2251 HCallJSFunction(HValue* function, 2248 HCallJSFunction(HValue* function,
2252 int argument_count, 2249 int argument_count,
2253 bool pass_argument_count,
2254 bool has_stack_check) 2250 bool has_stack_check)
2255 : HCall<1>(argument_count), 2251 : HCall<1>(argument_count),
2256 pass_argument_count_(pass_argument_count),
2257 has_stack_check_(has_stack_check) { 2252 has_stack_check_(has_stack_check) {
2258 SetOperandAt(0, function); 2253 SetOperandAt(0, function);
2259 } 2254 }
2260 2255
2261 bool pass_argument_count_;
2262 bool has_stack_check_; 2256 bool has_stack_check_;
2263 }; 2257 };
2264 2258
2265 2259
2266 enum CallMode { NORMAL_CALL, TAIL_CALL }; 2260 enum CallMode { NORMAL_CALL, TAIL_CALL };
2267 2261
2268 2262
2269 class HCallWithDescriptor final : public HInstruction { 2263 class HCallWithDescriptor final : public HInstruction {
2270 public: 2264 public:
2271 static HCallWithDescriptor* New(Isolate* isolate, Zone* zone, HValue* context, 2265 static HCallWithDescriptor* New(Isolate* isolate, Zone* zone, HValue* context,
(...skipping 5761 matching lines...) Expand 10 before | Expand all | Expand 10 after
8033 }; 8027 };
8034 8028
8035 8029
8036 8030
8037 #undef DECLARE_INSTRUCTION 8031 #undef DECLARE_INSTRUCTION
8038 #undef DECLARE_CONCRETE_INSTRUCTION 8032 #undef DECLARE_CONCRETE_INSTRUCTION
8039 8033
8040 } } // namespace v8::internal 8034 } } // namespace v8::internal
8041 8035
8042 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 8036 #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