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

Side by Side Diff: src/compiler/code-assembler.h

Issue 2584743003: [turbofan] Combine family of TailCallStub() methods into single implementation. (Closed)
Patch Set: Created 4 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/compiler/code-assembler.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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_COMPILER_CODE_ASSEMBLER_H_ 5 #ifndef V8_COMPILER_CODE_ASSEMBLER_H_
6 #define V8_COMPILER_CODE_ASSEMBLER_H_ 6 #define V8_COMPILER_CODE_ASSEMBLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 return CallStubR(descriptor, 1, target, context, args...); 320 return CallStubR(descriptor, 1, target, context, args...);
321 } 321 }
322 322
323 template <class... TArgs> 323 template <class... TArgs>
324 Node* CallStubR(const CallInterfaceDescriptor& descriptor, size_t result_size, 324 Node* CallStubR(const CallInterfaceDescriptor& descriptor, size_t result_size,
325 Node* target, Node* context, TArgs... args); 325 Node* target, Node* context, TArgs... args);
326 326
327 Node* CallStubN(const CallInterfaceDescriptor& descriptor, size_t result_size, 327 Node* CallStubN(const CallInterfaceDescriptor& descriptor, size_t result_size,
328 int input_count, Node* const* inputs); 328 int input_count, Node* const* inputs);
329 329
330 Node* TailCallStub(Callable const& callable, Node* context, Node* arg1, 330 template <class... TArgs>
331 size_t result_size = 1); 331 Node* TailCallStub(Callable const& callable, Node* context, TArgs... args) {
332 Node* TailCallStub(Callable const& callable, Node* context, Node* arg1, 332 Node* target = HeapConstant(callable.code());
333 Node* arg2, size_t result_size = 1); 333 return TailCallStub(callable.descriptor(), target, context, args...);
334 Node* TailCallStub(Callable const& callable, Node* context, Node* arg1, 334 }
335 Node* arg2, Node* arg3, size_t result_size = 1);
336 Node* TailCallStub(Callable const& callable, Node* context, Node* arg1,
337 Node* arg2, Node* arg3, Node* arg4,
338 size_t result_size = 1);
339 Node* TailCallStub(Callable const& callable, Node* context, Node* arg1,
340 Node* arg2, Node* arg3, Node* arg4, Node* arg5,
341 size_t result_size = 1);
342 335
336 template <class... TArgs>
343 Node* TailCallStub(const CallInterfaceDescriptor& descriptor, Node* target, 337 Node* TailCallStub(const CallInterfaceDescriptor& descriptor, Node* target,
344 Node* context, Node* arg1, size_t result_size = 1); 338 Node* context, TArgs... args);
345 Node* TailCallStub(const CallInterfaceDescriptor& descriptor, Node* target,
346 Node* context, Node* arg1, Node* arg2,
347 size_t result_size = 1);
348 Node* TailCallStub(const CallInterfaceDescriptor& descriptor, Node* target,
349 Node* context, Node* arg1, Node* arg2, Node* arg3,
350 size_t result_size = 1);
351 Node* TailCallStub(const CallInterfaceDescriptor& descriptor, Node* target,
352 Node* context, Node* arg1, Node* arg2, Node* arg3,
353 Node* arg4, size_t result_size = 1);
354 Node* TailCallStub(const CallInterfaceDescriptor& descriptor, Node* target,
355 Node* context, Node* arg1, Node* arg2, Node* arg3,
356 Node* arg4, Node* arg5, size_t result_size = 1);
357 Node* TailCallStub(const CallInterfaceDescriptor& descriptor, Node* target,
358 Node* context, Node* arg1, Node* arg2, Node* arg3,
359 Node* arg4, Node* arg5, Node* arg6,
360 size_t result_size = 1);
361 339
362 Node* TailCallBytecodeDispatch(const CallInterfaceDescriptor& descriptor, 340 Node* TailCallBytecodeDispatch(const CallInterfaceDescriptor& descriptor,
363 Node* code_target_address, Node** args); 341 Node* code_target_address, Node** args);
364 342
365 template <class... TArgs> 343 template <class... TArgs>
366 Node* CallJS(Callable const& callable, Node* context, Node* function, 344 Node* CallJS(Callable const& callable, Node* context, Node* function,
367 Node* receiver, TArgs... args) { 345 Node* receiver, TArgs... args) {
368 int argc = static_cast<int>(sizeof...(args)); 346 int argc = static_cast<int>(sizeof...(args));
369 Node* arity = Int32Constant(argc); 347 Node* arity = Int32Constant(argc);
370 return CallStub(callable, context, function, arity, receiver, args...); 348 return CallStub(callable, context, function, arity, receiver, args...);
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 ZoneSet<CodeAssemblerVariable::Impl*> variables_; 475 ZoneSet<CodeAssemblerVariable::Impl*> variables_;
498 476
499 DISALLOW_COPY_AND_ASSIGN(CodeAssemblerState); 477 DISALLOW_COPY_AND_ASSIGN(CodeAssemblerState);
500 }; 478 };
501 479
502 } // namespace compiler 480 } // namespace compiler
503 } // namespace internal 481 } // namespace internal
504 } // namespace v8 482 } // namespace v8
505 483
506 #endif // V8_COMPILER_CODE_ASSEMBLER_H_ 484 #endif // V8_COMPILER_CODE_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/code-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698