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

Side by Side Diff: src/compiler/common-operator.cc

Issue 1323463005: [Interpreter] Add support for JS calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/common-operator.h" 5 #include "src/compiler/common-operator.h"
6 6
7 #include "src/assembler.h" 7 #include "src/assembler.h"
8 #include "src/base/lazy-instance.h" 8 #include "src/base/lazy-instance.h"
9 #include "src/compiler/linkage.h" 9 #include "src/compiler/linkage.h"
10 #include "src/compiler/opcodes.h" 10 #include "src/compiler/opcodes.h"
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 0, 1, descriptor) {} 731 0, 1, descriptor) {}
732 732
733 void PrintParameter(std::ostream& os) const override { 733 void PrintParameter(std::ostream& os) const override {
734 os << "[" << *parameter() << "]"; 734 os << "[" << *parameter() << "]";
735 } 735 }
736 }; 736 };
737 return new (zone()) TailCallOperator(descriptor); 737 return new (zone()) TailCallOperator(descriptor);
738 } 738 }
739 739
740 740
741 const Operator* CommonOperatorBuilder::CallVarArgs(
742 const CallDescriptor* descriptor) {
743 class CallOperator final : public Operator1<const CallDescriptor*> {
744 public:
745 explicit CallOperator(const CallDescriptor* descriptor)
746 : Operator1<const CallDescriptor*>(
747 IrOpcode::kCallVarArgs, descriptor->properties(), "CallVarArgs",
748 descriptor->InputCount() + descriptor->VarArgsInputCount() +
749 descriptor->FrameStateCount(),
750 Operator::ZeroIfPure(descriptor->properties()),
751 Operator::ZeroIfEliminatable(descriptor->properties()),
752 descriptor->ReturnCount(),
753 Operator::ZeroIfPure(descriptor->properties()),
754 Operator::ZeroIfNoThrow(descriptor->properties()), descriptor) {}
755
756 void PrintParameter(std::ostream& os) const override {
757 os << "[" << *parameter() << "]";
758 }
759 };
760 return new (zone()) CallOperator(descriptor);
761 }
762
763
741 const Operator* CommonOperatorBuilder::Projection(size_t index) { 764 const Operator* CommonOperatorBuilder::Projection(size_t index) {
742 switch (index) { 765 switch (index) {
743 #define CACHED_PROJECTION(index) \ 766 #define CACHED_PROJECTION(index) \
744 case index: \ 767 case index: \
745 return &cache_.kProjection##index##Operator; 768 return &cache_.kProjection##index##Operator;
746 CACHED_PROJECTION_LIST(CACHED_PROJECTION) 769 CACHED_PROJECTION_LIST(CACHED_PROJECTION)
747 #undef CACHED_PROJECTION 770 #undef CACHED_PROJECTION
748 default: 771 default:
749 break; 772 break;
750 } 773 }
(...skipping 30 matching lines...) Expand all
781 Handle<SharedFunctionInfo> shared_info, 804 Handle<SharedFunctionInfo> shared_info,
782 ContextCallingMode context_calling_mode) { 805 ContextCallingMode context_calling_mode) {
783 return new (zone()->New(sizeof(FrameStateFunctionInfo))) 806 return new (zone()->New(sizeof(FrameStateFunctionInfo)))
784 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info, 807 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info,
785 context_calling_mode); 808 context_calling_mode);
786 } 809 }
787 810
788 } // namespace compiler 811 } // namespace compiler
789 } // namespace internal 812 } // namespace internal
790 } // namespace v8 813 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698