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

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

Issue 1191243003: [turbofan] Factor out the function specific part from the frame state operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweaks Created 5 years, 6 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/common-operator.h ('k') | src/compiler/frame-states.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 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 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 const Operator* CommonOperatorBuilder::TypedStateValues( 681 const Operator* CommonOperatorBuilder::TypedStateValues(
682 const ZoneVector<MachineType>* types) { 682 const ZoneVector<MachineType>* types) {
683 return new (zone()) Operator1<const ZoneVector<MachineType>*>( // -- 683 return new (zone()) Operator1<const ZoneVector<MachineType>*>( // --
684 IrOpcode::kTypedStateValues, Operator::kPure, // opcode 684 IrOpcode::kTypedStateValues, Operator::kPure, // opcode
685 "TypedStateValues", // name 685 "TypedStateValues", // name
686 static_cast<int>(types->size()), 0, 0, 1, 0, 0, types); // counts 686 static_cast<int>(types->size()), 0, 0, 1, 0, 0, types); // counts
687 } 687 }
688 688
689 689
690 const Operator* CommonOperatorBuilder::FrameState( 690 const Operator* CommonOperatorBuilder::FrameState(
691 FrameStateType type, BailoutId bailout_id, 691 BailoutId bailout_id, OutputFrameStateCombine state_combine,
692 OutputFrameStateCombine state_combine, 692 const FrameStateFunctionInfo* function_info) {
693 MaybeHandle<SharedFunctionInfo> shared_info) { 693 FrameStateInfo state_info(bailout_id, state_combine, function_info);
694 FrameStateCallInfo state_info(type, bailout_id, state_combine, shared_info); 694 return new (zone()) Operator1<FrameStateInfo>( // --
695 return new (zone()) Operator1<FrameStateCallInfo>( // -- 695 IrOpcode::kFrameState, Operator::kPure, // opcode
696 IrOpcode::kFrameState, Operator::kPure, // opcode 696 "FrameState", // name
697 "FrameState", // name 697 5, 0, 0, 1, 0, 0, // counts
698 5, 0, 0, 1, 0, 0, // counts 698 state_info); // parameter
699 state_info); // parameter
700 } 699 }
701 700
702 701
703 const Operator* CommonOperatorBuilder::Call(const CallDescriptor* descriptor) { 702 const Operator* CommonOperatorBuilder::Call(const CallDescriptor* descriptor) {
704 class CallOperator final : public Operator1<const CallDescriptor*> { 703 class CallOperator final : public Operator1<const CallDescriptor*> {
705 public: 704 public:
706 explicit CallOperator(const CallDescriptor* descriptor) 705 explicit CallOperator(const CallDescriptor* descriptor)
707 : Operator1<const CallDescriptor*>( 706 : Operator1<const CallDescriptor*>(
708 IrOpcode::kCall, descriptor->properties(), "Call", 707 IrOpcode::kCall, descriptor->properties(), "Call",
709 descriptor->InputCount() + descriptor->FrameStateCount(), 708 descriptor->InputCount() + descriptor->FrameStateCount(),
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 return Merge(size); 768 return Merge(size);
770 } else if (op->opcode() == IrOpcode::kLoop) { 769 } else if (op->opcode() == IrOpcode::kLoop) {
771 return Loop(size); 770 return Loop(size);
772 } else { 771 } else {
773 UNREACHABLE(); 772 UNREACHABLE();
774 return nullptr; 773 return nullptr;
775 } 774 }
776 } 775 }
777 776
778 777
778 const FrameStateFunctionInfo*
779 CommonOperatorBuilder::CreateFrameStateFunctionInfo(
780 FrameStateType type, int parameter_count, int local_count,
781 Handle<SharedFunctionInfo> shared_info) {
782 return new (zone()->New(sizeof(FrameStateFunctionInfo)))
783 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info);
784 }
785
779 } // namespace compiler 786 } // namespace compiler
780 } // namespace internal 787 } // namespace internal
781 } // namespace v8 788 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/common-operator.h ('k') | src/compiler/frame-states.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698