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

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

Issue 1108563002: Detect simple tail calls (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Handle callers with args Created 5 years, 7 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
« src/compiler/x64/code-generator-x64.cc ('K') | « src/globals.h ('k') | 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_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 2223 matching lines...) Expand 10 before | Expand all | Expand 10 after
2234 pass_argument_count_(pass_argument_count), 2234 pass_argument_count_(pass_argument_count),
2235 has_stack_check_(has_stack_check) { 2235 has_stack_check_(has_stack_check) {
2236 SetOperandAt(0, function); 2236 SetOperandAt(0, function);
2237 } 2237 }
2238 2238
2239 bool pass_argument_count_; 2239 bool pass_argument_count_;
2240 bool has_stack_check_; 2240 bool has_stack_check_;
2241 }; 2241 };
2242 2242
2243 2243
2244 enum CallMode { NORMAL_CALL, TAIL_CALL };
2245
2246
2247 class HCallWithDescriptor final : public HInstruction { 2244 class HCallWithDescriptor final : public HInstruction {
2248 public: 2245 public:
2249 static HCallWithDescriptor* New(Isolate* isolate, Zone* zone, HValue* context, 2246 static HCallWithDescriptor* New(Isolate* isolate, Zone* zone, HValue* context,
2250 HValue* target, int argument_count, 2247 HValue* target, int argument_count,
2251 CallInterfaceDescriptor descriptor, 2248 CallInterfaceDescriptor descriptor,
2252 const Vector<HValue*>& operands, 2249 const Vector<HValue*>& operands,
2253 CallMode call_mode = NORMAL_CALL) { 2250 CallMode call_mode = NORMAL_CALL) {
2254 DCHECK(operands.length() == descriptor.GetEnvironmentLength()); 2251 DCHECK(operands.length() == descriptor.GetEnvironmentLength());
2255 HCallWithDescriptor* res = new (zone) HCallWithDescriptor( 2252 HCallWithDescriptor* res = new (zone) HCallWithDescriptor(
2256 target, argument_count, descriptor, operands, call_mode, zone); 2253 target, argument_count, descriptor, operands, call_mode, zone);
(...skipping 5561 matching lines...) Expand 10 before | Expand all | Expand 10 after
7818 }; 7815 };
7819 7816
7820 7817
7821 7818
7822 #undef DECLARE_INSTRUCTION 7819 #undef DECLARE_INSTRUCTION
7823 #undef DECLARE_CONCRETE_INSTRUCTION 7820 #undef DECLARE_CONCRETE_INSTRUCTION
7824 7821
7825 } } // namespace v8::internal 7822 } } // namespace v8::internal
7826 7823
7827 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7824 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« src/compiler/x64/code-generator-x64.cc ('K') | « src/globals.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698