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

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

Issue 2035893004: [turbofan] Introduce a dedicated CheckBounds operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE 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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 const Operator* SimplifiedOperatorBuilder::CheckIf() { 416 const Operator* SimplifiedOperatorBuilder::CheckIf() {
417 return &cache_.kCheckIf; 417 return &cache_.kCheckIf;
418 } 418 }
419 419
420 const Operator* SimplifiedOperatorBuilder::ReferenceEqual(Type* type) { 420 const Operator* SimplifiedOperatorBuilder::ReferenceEqual(Type* type) {
421 return new (zone()) Operator(IrOpcode::kReferenceEqual, 421 return new (zone()) Operator(IrOpcode::kReferenceEqual,
422 Operator::kCommutative | Operator::kPure, 422 Operator::kCommutative | Operator::kPure,
423 "ReferenceEqual", 2, 0, 0, 1, 0, 0); 423 "ReferenceEqual", 2, 0, 0, 1, 0, 0);
424 } 424 }
425 425
426 const Operator* SimplifiedOperatorBuilder::CheckBounds() {
427 // TODO(bmeurer): Cache this operator. Make it pure!
428 return new (zone()) Operator(IrOpcode::kCheckBounds, Operator::kEliminatable,
429 "CheckBounds", 2, 1, 1, 1, 1, 0);
430 }
431
426 const Operator* SimplifiedOperatorBuilder::TypeGuard(Type* type) { 432 const Operator* SimplifiedOperatorBuilder::TypeGuard(Type* type) {
427 class TypeGuardOperator final : public Operator1<Type*> { 433 class TypeGuardOperator final : public Operator1<Type*> {
428 public: 434 public:
429 explicit TypeGuardOperator(Type* type) 435 explicit TypeGuardOperator(Type* type)
430 : Operator1<Type*>( // -- 436 : Operator1<Type*>( // --
431 IrOpcode::kTypeGuard, Operator::kPure, // opcode 437 IrOpcode::kTypeGuard, Operator::kPure, // opcode
432 "TypeGuard", // name 438 "TypeGuard", // name
433 1, 0, 1, 1, 0, 0, // counts 439 1, 0, 1, 1, 0, 0, // counts
434 type) {} // parameter 440 type) {} // parameter
435 441
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \ 511 Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \
506 #Name, value_input_count, 1, control_input_count, \ 512 #Name, value_input_count, 1, control_input_count, \
507 output_count, 1, 0, access); \ 513 output_count, 1, 0, access); \
508 } 514 }
509 ACCESS_OP_LIST(ACCESS) 515 ACCESS_OP_LIST(ACCESS)
510 #undef ACCESS 516 #undef ACCESS
511 517
512 } // namespace compiler 518 } // namespace compiler
513 } // namespace internal 519 } // namespace internal
514 } // namespace v8 520 } // 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