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

Side by Side Diff: src/compiler/simplified-operator.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/simplified-operator.h ('k') | src/compiler/typer.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/simplified-operator.h" 5 #include "src/compiler/simplified-operator.h"
6 6
7 #include "src/base/lazy-instance.h" 7 #include "src/base/lazy-instance.h"
8 #include "src/compiler/opcodes.h" 8 #include "src/compiler/opcodes.h"
9 #include "src/compiler/operator.h" 9 #include "src/compiler/operator.h"
10 #include "src/types-inl.h" 10 #include "src/types-inl.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 SimplifiedOperatorBuilder::SimplifiedOperatorBuilder(Zone* zone) 227 SimplifiedOperatorBuilder::SimplifiedOperatorBuilder(Zone* zone)
228 : cache_(kCache.Get()), zone_(zone) {} 228 : cache_(kCache.Get()), zone_(zone) {}
229 229
230 230
231 #define PURE(Name, properties, input_count) \ 231 #define PURE(Name, properties, input_count) \
232 const Operator* SimplifiedOperatorBuilder::Name() { return &cache_.k##Name; } 232 const Operator* SimplifiedOperatorBuilder::Name() { return &cache_.k##Name; }
233 PURE_OP_LIST(PURE) 233 PURE_OP_LIST(PURE)
234 #undef PURE 234 #undef PURE
235 235
236 236
237 const Operator* SimplifiedOperatorBuilder::CheckMaps(int map_count) {
238 DCHECK_GE(map_count, 1);
239 // TODO(turbofan): cache CheckMaps operators
240 return new (zone()) Operator1<int32_t>(
241 IrOpcode::kCheckMaps, Operator::kNoWrite | Operator::kNoThrow,
242 "CheckMaps", 1 + map_count, 1, 1, 0, 0, 1, map_count);
243 }
244
245
237 const Operator* SimplifiedOperatorBuilder::ReferenceEqual(Type* type) { 246 const Operator* SimplifiedOperatorBuilder::ReferenceEqual(Type* type) {
238 // TODO(titzer): What about the type parameter? 247 // TODO(titzer): What about the type parameter?
239 return new (zone()) Operator(IrOpcode::kReferenceEqual, 248 return new (zone()) Operator(IrOpcode::kReferenceEqual,
240 Operator::kCommutative | Operator::kPure, 249 Operator::kCommutative | Operator::kPure,
241 "ReferenceEqual", 2, 0, 0, 1, 0, 0); 250 "ReferenceEqual", 2, 0, 0, 1, 0, 0);
242 } 251 }
243 252
244 253
245 const Operator* SimplifiedOperatorBuilder::Allocate(PretenureFlag pretenure) { 254 const Operator* SimplifiedOperatorBuilder::Allocate(PretenureFlag pretenure) {
246 return new (zone()) 255 return new (zone())
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \ 298 Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \
290 #Name, value_input_count, 1, control_input_count, \ 299 #Name, value_input_count, 1, control_input_count, \
291 output_count, 1, 0, access); \ 300 output_count, 1, 0, access); \
292 } 301 }
293 ACCESS_OP_LIST(ACCESS) 302 ACCESS_OP_LIST(ACCESS)
294 #undef ACCESS 303 #undef ACCESS
295 304
296 } // namespace compiler 305 } // namespace compiler
297 } // namespace internal 306 } // namespace internal
298 } // namespace v8 307 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-operator.h ('k') | src/compiler/typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698