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

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

Issue 2064163002: Revert of [turbofan] Introduce a dedicated CheckBounds operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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/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.h" 10 #include "src/types.h"
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 const Operator* SimplifiedOperatorBuilder::CheckIf() { 325 const Operator* SimplifiedOperatorBuilder::CheckIf() {
326 return &cache_.kCheckIf; 326 return &cache_.kCheckIf;
327 } 327 }
328 328
329 const Operator* SimplifiedOperatorBuilder::ReferenceEqual(Type* type) { 329 const Operator* SimplifiedOperatorBuilder::ReferenceEqual(Type* type) {
330 return new (zone()) Operator(IrOpcode::kReferenceEqual, 330 return new (zone()) Operator(IrOpcode::kReferenceEqual,
331 Operator::kCommutative | Operator::kPure, 331 Operator::kCommutative | Operator::kPure,
332 "ReferenceEqual", 2, 0, 0, 1, 0, 0); 332 "ReferenceEqual", 2, 0, 0, 1, 0, 0);
333 } 333 }
334 334
335 const Operator* SimplifiedOperatorBuilder::CheckBounds() {
336 // TODO(bmeurer): Cache this operator. Make it pure!
337 return new (zone()) Operator(IrOpcode::kCheckBounds, Operator::kEliminatable,
338 "CheckBounds", 2, 1, 1, 1, 1, 0);
339 }
340
341 const Operator* SimplifiedOperatorBuilder::TypeGuard(Type* type) { 335 const Operator* SimplifiedOperatorBuilder::TypeGuard(Type* type) {
342 class TypeGuardOperator final : public Operator1<Type*> { 336 class TypeGuardOperator final : public Operator1<Type*> {
343 public: 337 public:
344 explicit TypeGuardOperator(Type* type) 338 explicit TypeGuardOperator(Type* type)
345 : Operator1<Type*>( // -- 339 : Operator1<Type*>( // --
346 IrOpcode::kTypeGuard, Operator::kPure, // opcode 340 IrOpcode::kTypeGuard, Operator::kPure, // opcode
347 "TypeGuard", // name 341 "TypeGuard", // name
348 1, 0, 1, 1, 0, 0, // counts 342 1, 0, 1, 1, 0, 0, // counts
349 type) {} // parameter 343 type) {} // parameter
350 344
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \ 414 Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \
421 #Name, value_input_count, 1, control_input_count, \ 415 #Name, value_input_count, 1, control_input_count, \
422 output_count, 1, 0, access); \ 416 output_count, 1, 0, access); \
423 } 417 }
424 ACCESS_OP_LIST(ACCESS) 418 ACCESS_OP_LIST(ACCESS)
425 #undef ACCESS 419 #undef ACCESS
426 420
427 } // namespace compiler 421 } // namespace compiler
428 } // namespace internal 422 } // namespace internal
429 } // namespace v8 423 } // 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