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

Side by Side Diff: src/compiler/instruction-selector.cc

Issue 680313003: Move input/output counts directly into Operators, simplying OperatorProperties. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: yes Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/common-operator.cc ('k') | src/compiler/js-inlining.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 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/instruction-selector.h" 5 #include "src/compiler/instruction-selector.h"
6 6
7 #include "src/compiler/instruction-selector-impl.h" 7 #include "src/compiler/instruction-selector-impl.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties-inl.h" 9 #include "src/compiler/node-properties-inl.h"
10 #include "src/compiler/pipeline.h" 10 #include "src/compiler/pipeline.h"
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 955
956 956
957 void InstructionSelector::VisitThrow(Node* value) { 957 void InstructionSelector::VisitThrow(Node* value) {
958 UNIMPLEMENTED(); // TODO(titzer) 958 UNIMPLEMENTED(); // TODO(titzer)
959 } 959 }
960 960
961 961
962 void InstructionSelector::FillTypeVectorFromStateValues( 962 void InstructionSelector::FillTypeVectorFromStateValues(
963 ZoneVector<MachineType>* types, Node* state_values) { 963 ZoneVector<MachineType>* types, Node* state_values) {
964 DCHECK(state_values->opcode() == IrOpcode::kStateValues); 964 DCHECK(state_values->opcode() == IrOpcode::kStateValues);
965 int count = OpParameter<int>(state_values); 965 int count = state_values->InputCount();
966 types->reserve(static_cast<size_t>(count)); 966 types->reserve(static_cast<size_t>(count));
967 for (int i = 0; i < count; i++) { 967 for (int i = 0; i < count; i++) {
968 types->push_back(GetMachineType(state_values->InputAt(i))); 968 types->push_back(GetMachineType(state_values->InputAt(i)));
969 } 969 }
970 } 970 }
971 971
972 972
973 FrameStateDescriptor* InstructionSelector::GetFrameStateDescriptor( 973 FrameStateDescriptor* InstructionSelector::GetFrameStateDescriptor(
974 Node* state) { 974 Node* state) {
975 DCHECK(state->opcode() == IrOpcode::kFrameState); 975 DCHECK(state->opcode() == IrOpcode::kFrameState);
976 DCHECK_EQ(5, state->InputCount()); 976 DCHECK_EQ(5, state->InputCount());
977 DCHECK_EQ(IrOpcode::kStateValues, state->InputAt(0)->opcode());
978 DCHECK_EQ(IrOpcode::kStateValues, state->InputAt(1)->opcode());
979 DCHECK_EQ(IrOpcode::kStateValues, state->InputAt(2)->opcode());
977 FrameStateCallInfo state_info = OpParameter<FrameStateCallInfo>(state); 980 FrameStateCallInfo state_info = OpParameter<FrameStateCallInfo>(state);
978 981
979 int parameters = OpParameter<int>(state->InputAt(0)); 982 int parameters = state->InputAt(0)->InputCount();
980 int locals = OpParameter<int>(state->InputAt(1)); 983 int locals = state->InputAt(1)->InputCount();
981 int stack = OpParameter<int>(state->InputAt(2)); 984 int stack = state->InputAt(2)->InputCount();
982 985
983 FrameStateDescriptor* outer_state = NULL; 986 FrameStateDescriptor* outer_state = NULL;
984 Node* outer_node = state->InputAt(4); 987 Node* outer_node = state->InputAt(4);
985 if (outer_node->opcode() == IrOpcode::kFrameState) { 988 if (outer_node->opcode() == IrOpcode::kFrameState) {
986 outer_state = GetFrameStateDescriptor(outer_node); 989 outer_state = GetFrameStateDescriptor(outer_node);
987 } 990 }
988 991
989 return new (instruction_zone()) FrameStateDescriptor( 992 return new (instruction_zone()) FrameStateDescriptor(
990 instruction_zone(), state_info, parameters, locals, stack, outer_state); 993 instruction_zone(), state_info, parameters, locals, stack, outer_state);
991 } 994 }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 MachineOperatorBuilder::Flags 1079 MachineOperatorBuilder::Flags
1077 InstructionSelector::SupportedMachineOperatorFlags() { 1080 InstructionSelector::SupportedMachineOperatorFlags() {
1078 return MachineOperatorBuilder::Flag::kNoFlags; 1081 return MachineOperatorBuilder::Flag::kNoFlags;
1079 } 1082 }
1080 1083
1081 #endif // !V8_TURBOFAN_BACKEND 1084 #endif // !V8_TURBOFAN_BACKEND
1082 1085
1083 } // namespace compiler 1086 } // namespace compiler
1084 } // namespace internal 1087 } // namespace internal
1085 } // namespace v8 1088 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/common-operator.cc ('k') | src/compiler/js-inlining.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698