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

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

Issue 1132423004: [turbofan] Add a Simplified::CheckMaps instruction. Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/opcodes.h ('k') | src/compiler/simplified-lowering.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/operator-properties.h" 5 #include "src/compiler/operator-properties.h"
6 6
7 #include "src/compiler/js-operator.h" 7 #include "src/compiler/js-operator.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/compiler/opcodes.h" 9 #include "src/compiler/opcodes.h"
10 10
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 // Compare operators that can deopt in the middle the operation (e.g., 89 // Compare operators that can deopt in the middle the operation (e.g.,
90 // as a result of lazy deopt in ToNumber conversion) need a second frame 90 // as a result of lazy deopt in ToNumber conversion) need a second frame
91 // state so that we can resume before the operation. 91 // state so that we can resume before the operation.
92 case IrOpcode::kJSGreaterThan: 92 case IrOpcode::kJSGreaterThan:
93 case IrOpcode::kJSGreaterThanOrEqual: 93 case IrOpcode::kJSGreaterThanOrEqual:
94 case IrOpcode::kJSLessThan: 94 case IrOpcode::kJSLessThan:
95 case IrOpcode::kJSLessThanOrEqual: 95 case IrOpcode::kJSLessThanOrEqual:
96 return 2; 96 return 2;
97 97
98 // TODO(titzer): is this necessary?
99 case IrOpcode::kCheckMaps:
100 return 1;
101
98 default: 102 default:
99 return 0; 103 return 0;
100 } 104 }
101 } 105 }
102 106
103 107
104 // static 108 // static
105 int OperatorProperties::GetTotalInputCount(const Operator* op) { 109 int OperatorProperties::GetTotalInputCount(const Operator* op) {
106 return op->ValueInputCount() + GetContextInputCount(op) + 110 return op->ValueInputCount() + GetContextInputCount(op) +
107 GetFrameStateInputCount(op) + op->EffectInputCount() + 111 GetFrameStateInputCount(op) + op->EffectInputCount() +
108 op->ControlInputCount(); 112 op->ControlInputCount();
109 } 113 }
110 114
111 115
112 // static 116 // static
113 bool OperatorProperties::IsBasicBlockBegin(const Operator* op) { 117 bool OperatorProperties::IsBasicBlockBegin(const Operator* op) {
114 Operator::Opcode const opcode = op->opcode(); 118 Operator::Opcode const opcode = op->opcode();
115 return opcode == IrOpcode::kStart || opcode == IrOpcode::kEnd || 119 return opcode == IrOpcode::kStart || opcode == IrOpcode::kEnd ||
116 opcode == IrOpcode::kDead || opcode == IrOpcode::kLoop || 120 opcode == IrOpcode::kDead || opcode == IrOpcode::kLoop ||
117 opcode == IrOpcode::kMerge || opcode == IrOpcode::kIfTrue || 121 opcode == IrOpcode::kMerge || opcode == IrOpcode::kIfTrue ||
118 opcode == IrOpcode::kIfFalse || opcode == IrOpcode::kIfSuccess || 122 opcode == IrOpcode::kIfFalse || opcode == IrOpcode::kIfSuccess ||
119 opcode == IrOpcode::kIfException || opcode == IrOpcode::kIfValue || 123 opcode == IrOpcode::kIfException || opcode == IrOpcode::kIfValue ||
120 opcode == IrOpcode::kIfDefault; 124 opcode == IrOpcode::kIfDefault;
121 } 125 }
122 126
123 } // namespace compiler 127 } // namespace compiler
124 } // namespace internal 128 } // namespace internal
125 } // namespace v8 129 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/simplified-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698