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

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

Issue 2152693002: [stubs] Introduce NonPrimitiveToPrimitive builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments. Created 4 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
« no previous file with comments | « src/compiler/code-assembler.h ('k') | src/factory.h » ('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 #include "src/compiler/code-assembler.h" 5 #include "src/compiler/code-assembler.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 Node* target, Node** args, size_t result_size) { 519 Node* target, Node** args, size_t result_size) {
520 CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor( 520 CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor(
521 isolate(), zone(), descriptor, descriptor.GetStackParameterCount(), 521 isolate(), zone(), descriptor, descriptor.GetStackParameterCount(),
522 CallDescriptor::kNoFlags, Operator::kNoProperties, 522 CallDescriptor::kNoFlags, Operator::kNoProperties,
523 MachineType::AnyTagged(), result_size); 523 MachineType::AnyTagged(), result_size);
524 524
525 return CallN(call_descriptor, target, args); 525 return CallN(call_descriptor, target, args);
526 } 526 }
527 527
528 Node* CodeAssembler::TailCallStub(Callable const& callable, Node* context, 528 Node* CodeAssembler::TailCallStub(Callable const& callable, Node* context,
529 Node* arg1, size_t result_size) {
530 Node* target = HeapConstant(callable.code());
531 return TailCallStub(callable.descriptor(), target, context, arg1,
532 result_size);
533 }
534
535 Node* CodeAssembler::TailCallStub(Callable const& callable, Node* context,
529 Node* arg1, Node* arg2, size_t result_size) { 536 Node* arg1, Node* arg2, size_t result_size) {
530 Node* target = HeapConstant(callable.code()); 537 Node* target = HeapConstant(callable.code());
531 return TailCallStub(callable.descriptor(), target, context, arg1, arg2, 538 return TailCallStub(callable.descriptor(), target, context, arg1, arg2,
532 result_size); 539 result_size);
533 } 540 }
534 541
535 Node* CodeAssembler::TailCallStub(Callable const& callable, Node* context, 542 Node* CodeAssembler::TailCallStub(Callable const& callable, Node* context,
536 Node* arg1, Node* arg2, Node* arg3, 543 Node* arg1, Node* arg2, Node* arg3,
537 size_t result_size) { 544 size_t result_size) {
538 Node* target = HeapConstant(callable.code()); 545 Node* target = HeapConstant(callable.code());
539 return TailCallStub(callable.descriptor(), target, context, arg1, arg2, arg3, 546 return TailCallStub(callable.descriptor(), target, context, arg1, arg2, arg3,
540 result_size); 547 result_size);
541 } 548 }
542 549
543 Node* CodeAssembler::TailCallStub(const CallInterfaceDescriptor& descriptor, 550 Node* CodeAssembler::TailCallStub(const CallInterfaceDescriptor& descriptor,
544 Node* target, Node* context, Node* arg1, 551 Node* target, Node* context, Node* arg1,
552 size_t result_size) {
553 CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor(
554 isolate(), zone(), descriptor, descriptor.GetStackParameterCount(),
555 CallDescriptor::kSupportsTailCalls, Operator::kNoProperties,
556 MachineType::AnyTagged(), result_size);
557
558 Node** args = zone()->NewArray<Node*>(2);
559 args[0] = arg1;
560 args[1] = context;
561
562 return raw_assembler_->TailCallN(call_descriptor, target, args);
563 }
564
565 Node* CodeAssembler::TailCallStub(const CallInterfaceDescriptor& descriptor,
566 Node* target, Node* context, Node* arg1,
545 Node* arg2, size_t result_size) { 567 Node* arg2, size_t result_size) {
546 CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor( 568 CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor(
547 isolate(), zone(), descriptor, descriptor.GetStackParameterCount(), 569 isolate(), zone(), descriptor, descriptor.GetStackParameterCount(),
548 CallDescriptor::kSupportsTailCalls, Operator::kNoProperties, 570 CallDescriptor::kSupportsTailCalls, Operator::kNoProperties,
549 MachineType::AnyTagged(), result_size); 571 MachineType::AnyTagged(), result_size);
550 572
551 Node** args = zone()->NewArray<Node*>(3); 573 Node** args = zone()->NewArray<Node*>(3);
552 args[0] = arg1; 574 args[0] = arg1;
553 args[1] = arg2; 575 args[1] = arg2;
554 args[2] = context; 576 args[2] = context;
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 } 898 }
877 } 899 }
878 } 900 }
879 901
880 bound_ = true; 902 bound_ = true;
881 } 903 }
882 904
883 } // namespace compiler 905 } // namespace compiler
884 } // namespace internal 906 } // namespace internal
885 } // namespace v8 907 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/code-assembler.h ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698